diff --git a/demos/benchmark/assets/img_benchmark_cogwheel_alpha256.c b/demos/benchmark/assets/img_benchmark_cogwheel_alpha256.c index 2b2ee099f..13c52a26f 100644 --- a/demos/benchmark/assets/img_benchmark_cogwheel_alpha256.c +++ b/demos/benchmark/assets/img_benchmark_cogwheel_alpha256.c @@ -21,11 +21,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_BENCHMARK_COGWHEEL_ALPHA256 - #define LV_ATTRIBUTE_IMG_IMG_BENCHMARK_COGWHEEL_ALPHA256 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_BENCHMARK_COGWHEEL_ALPHA256 + #define LV_ATTRIBUTE_IMAGE_IMG_BENCHMARK_COGWHEEL_ALPHA256 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_BENCHMARK_COGWHEEL_ALPHA256 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_BENCHMARK_COGWHEEL_ALPHA256 uint8_t img_benchmark_cogwheel_alpha256_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -129,7 +129,7 @@ img_benchmark_cogwheel_alpha256_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x09, 0x0c, 0x0c, 0x0b, 0x10, 0x18, 0x12, 0x0b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_benchmark_cogwheel_alpha256 = { +const lv_image_dsc_t img_benchmark_cogwheel_alpha256 = { .header.cf = LV_COLOR_FORMAT_A8, .header.always_zero = 0, .header.w = 100, diff --git a/demos/benchmark/assets/img_benchmark_cogwheel_argb.c b/demos/benchmark/assets/img_benchmark_cogwheel_argb.c index 017241a4b..599e5e5ba 100644 --- a/demos/benchmark/assets/img_benchmark_cogwheel_argb.c +++ b/demos/benchmark/assets/img_benchmark_cogwheel_argb.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB - #define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB +#ifndef LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_ARGB + #define LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_ARGB #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB uint8_t img_benchmark_cogwheel_argb_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_ARGB uint8_t img_benchmark_cogwheel_argb_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Alpha 8 bit, Red: 3 bit, Green: 3 bit, Blue: 2 bit*/ 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, 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, 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, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x08, 0x97, 0xff, 0x72, 0xff, 0x72, 0xff, 0x72, 0xff, 0x72, 0xff, 0x72, 0xff, 0x92, 0xff, 0xdb, 0x6c, 0xff, 0x03, 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, 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, 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, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, @@ -421,7 +421,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB uint8_t img_benc #endif }; -const lv_img_dsc_t img_benchmark_cogwheel_argb = { +const lv_image_dsc_t img_benchmark_cogwheel_argb = { .header.always_zero = 0, .header.w = 100, .header.h = 100, diff --git a/demos/benchmark/assets/img_benchmark_cogwheel_indexed16.c b/demos/benchmark/assets/img_benchmark_cogwheel_indexed16.c index 86af1c317..11b3ec060 100644 --- a/demos/benchmark/assets/img_benchmark_cogwheel_indexed16.c +++ b/demos/benchmark/assets/img_benchmark_cogwheel_indexed16.c @@ -6,11 +6,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16 - #define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_INDEXED16 + #define LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_INDEXED16 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16 uint8_t img_benchmark_cogwheel_indexed16_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_INDEXED16 uint8_t img_benchmark_cogwheel_indexed16_map[] = +{ 0x00, 0x00, 0x00, 0x00, /*Color of index 0*/ 0x6c, 0x5e, 0x4a, 0xff, /*Color of index 1*/ 0x72, 0x64, 0x50, 0xff, /*Color of index 2*/ @@ -130,7 +131,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16 uint8_t img 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_benchmark_cogwheel_indexed16 = { +const lv_image_dsc_t img_benchmark_cogwheel_indexed16 = { .header.always_zero = 0, .header.w = 100, .header.h = 100, diff --git a/demos/benchmark/assets/img_benchmark_cogwheel_rgb.c b/demos/benchmark/assets/img_benchmark_cogwheel_rgb.c index 5daefac1b..3631a8b6f 100644 --- a/demos/benchmark/assets/img_benchmark_cogwheel_rgb.c +++ b/demos/benchmark/assets/img_benchmark_cogwheel_rgb.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB - #define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB +#ifndef LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_RGB + #define LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_RGB #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB uint8_t img_benchmark_cogwheel_rgb_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_RGB uint8_t img_benchmark_cogwheel_rgb_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Red: 3 bit, Green: 3 bit, Blue: 2 bit*/ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x97, 0x72, 0x72, 0x72, 0x72, 0x72, 0x92, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -322,7 +322,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB uint8_t img_bench #endif }; -const lv_img_dsc_t img_benchmark_cogwheel_rgb = { +const lv_image_dsc_t img_benchmark_cogwheel_rgb = { .header.always_zero = 0, .header.w = 100, .header.h = 100, diff --git a/demos/benchmark/lv_demo_benchmark.c b/demos/benchmark/lv_demo_benchmark.c index 8e1d66558..3a0766f1b 100644 --- a/demos/benchmark/lv_demo_benchmark.c +++ b/demos/benchmark/lv_demo_benchmark.c @@ -79,14 +79,14 @@ static uint32_t disp_ori_timer_period; static uint32_t anim_ori_timer_period; #if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16 - LV_IMG_DECLARE(img_benchmark_cogwheel_rgb565a8); + LV_IMAGE_DECLARE(img_benchmark_cogwheel_rgb565a8); #else - LV_IMG_DECLARE(img_benchmark_cogwheel_argb); + LV_IMAGE_DECLARE(img_benchmark_cogwheel_argb); #endif -LV_IMG_DECLARE(img_benchmark_cogwheel_rgb); -LV_IMG_DECLARE(img_benchmark_cogwheel_chroma_keyed); -LV_IMG_DECLARE(img_benchmark_cogwheel_indexed16); -LV_IMG_DECLARE(img_benchmark_cogwheel_alpha256); +LV_IMAGE_DECLARE(img_benchmark_cogwheel_rgb); +LV_IMAGE_DECLARE(img_benchmark_cogwheel_chroma_keyed); +LV_IMAGE_DECLARE(img_benchmark_cogwheel_indexed16); +LV_IMAGE_DECLARE(img_benchmark_cogwheel_alpha256); #if LV_USE_FONT_COMPRESSED LV_FONT_DECLARE(lv_font_benchmark_montserrat_12_compr_az); @@ -269,14 +269,14 @@ static void shadow_large_ofs_cb(void) static void img_rgb_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); img_create(&style_common, &img_benchmark_cogwheel_rgb, false, false, false); } static void img_argb_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); #if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16 img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false); @@ -288,7 +288,7 @@ static void img_argb_cb(void) static void img_index_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); img_create(&style_common, &img_benchmark_cogwheel_indexed16, false, false, false); } @@ -296,7 +296,7 @@ static void img_index_cb(void) static void img_alpha_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); img_create(&style_common, &img_benchmark_cogwheel_alpha256, false, false, false); } @@ -304,8 +304,8 @@ static void img_alpha_cb(void) static void img_rgb_recolor_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_img_recolor_opa(&style_common, LV_OPA_50); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_recolor_opa(&style_common, LV_OPA_50); img_create(&style_common, &img_benchmark_cogwheel_rgb, false, false, false); } @@ -313,8 +313,8 @@ static void img_rgb_recolor_cb(void) static void img_argb_recolor_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_img_recolor_opa(&style_common, LV_OPA_50); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_recolor_opa(&style_common, LV_OPA_50); #if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16 img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false); #else @@ -325,8 +325,8 @@ static void img_argb_recolor_cb(void) static void img_index_recolor_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_img_recolor_opa(&style_common, LV_OPA_50); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_recolor_opa(&style_common, LV_OPA_50); img_create(&style_common, &img_benchmark_cogwheel_indexed16, false, false, false); } @@ -334,21 +334,21 @@ static void img_index_recolor_cb(void) static void img_rgb_rot_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); img_create(&style_common, &img_benchmark_cogwheel_rgb, true, false, false); } static void img_rgb_rot_aa_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); img_create(&style_common, &img_benchmark_cogwheel_rgb, true, false, true); } static void img_argb_rot_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); #if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16 img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, true, false, false); #else @@ -359,7 +359,7 @@ static void img_argb_rot_cb(void) static void img_argb_rot_aa_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); #if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16 img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, true, false, true); #else @@ -370,7 +370,7 @@ static void img_argb_rot_aa_cb(void) static void img_rgb_zoom_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); img_create(&style_common, &img_benchmark_cogwheel_rgb, false, true, false); } @@ -378,7 +378,7 @@ static void img_rgb_zoom_cb(void) static void img_rgb_zoom_aa_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); img_create(&style_common, &img_benchmark_cogwheel_rgb, false, true, true); @@ -387,7 +387,7 @@ static void img_rgb_zoom_aa_cb(void) static void img_argb_zoom_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); #if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16 img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, true, false); #else @@ -399,7 +399,7 @@ static void img_argb_zoom_cb(void) static void img_argb_zoom_aa_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); #if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16 img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, true, true); #else @@ -520,10 +520,10 @@ static void sub_shadow_cb(void) } -static void sub_img_cb(void) +static void sub_image_cb(void) { lv_style_reset(&style_common); - lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); lv_style_set_blend_mode(&style_common, LV_BLEND_MODE_SUBTRACTIVE); #if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16 img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false); @@ -619,7 +619,7 @@ static scene_dsc_t scenes[] = { {.name = "Substr. rectangle", .weight = 10, .create_cb = sub_rectangle_cb}, {.name = "Substr. border", .weight = 10, .create_cb = sub_border_cb}, {.name = "Substr. shadow", .weight = 10, .create_cb = sub_shadow_cb}, - {.name = "Substr. image", .weight = 10, .create_cb = sub_img_cb}, + {.name = "Substr. image", .weight = 10, .create_cb = sub_image_cb}, {.name = "Substr. line", .weight = 10, .create_cb = sub_line_cb}, {.name = "Substr. arc", .weight = 10, .create_cb = sub_arc_cb}, {.name = "Substr. text", .weight = 10, .create_cb = sub_text_cb}, @@ -1108,15 +1108,15 @@ static void img_create(lv_style_t * style, const void * src, bool rotate, bool z { uint32_t i; for(i = 0; i < (uint32_t)IMG_NUM; i++) { - lv_obj_t * obj = lv_img_create(scene_bg); + lv_obj_t * obj = lv_image_create(scene_bg); lv_obj_remove_style_all(obj); lv_obj_add_style(obj, style, 0); - lv_img_set_src(obj, src); - lv_obj_set_style_img_recolor(obj, lv_color_hex(rnd_next(0, 0xFFFFF0)), 0); + lv_image_set_src(obj, src); + lv_obj_set_style_image_recolor(obj, lv_color_hex(rnd_next(0, 0xFFFFF0)), 0); - if(rotate) lv_img_set_angle(obj, rnd_next(0, 3599)); - if(zoom) lv_img_set_zoom(obj, rnd_next(IMG_ZOOM_MIN, IMG_ZOOM_MAX)); - lv_img_set_antialias(obj, aa); + if(rotate) lv_image_set_angle(obj, rnd_next(0, 3599)); + if(zoom) lv_image_set_zoom(obj, rnd_next(IMG_ZOOM_MIN, IMG_ZOOM_MAX)); + lv_image_set_antialias(obj, aa); fall_anim(obj); } diff --git a/demos/flex_layout/lv_demo_flex_layout_view.c b/demos/flex_layout/lv_demo_flex_layout_view.c index 16c3467bf..ffd941e17 100644 --- a/demos/flex_layout/lv_demo_flex_layout_view.c +++ b/demos/flex_layout/lv_demo_flex_layout_view.c @@ -114,7 +114,7 @@ void view_create(lv_obj_t * par, view_t * ui) static lv_obj_t * btn_create(lv_obj_t * par, const char * str, lv_color_t color) { - lv_obj_t * btn = lv_btn_create(par); + lv_obj_t * btn = lv_button_create(par); lv_obj_set_width(btn, lv_pct(30)); lv_obj_set_height(btn, 30); lv_obj_set_style_border_width(btn, 0, LV_PART_MAIN); diff --git a/demos/flex_layout/lv_demo_flex_layout_view_ctrl_pad.c b/demos/flex_layout/lv_demo_flex_layout_view_ctrl_pad.c index 852869957..fa0e0b002 100644 --- a/demos/flex_layout/lv_demo_flex_layout_view_ctrl_pad.c +++ b/demos/flex_layout/lv_demo_flex_layout_view_ctrl_pad.c @@ -60,11 +60,11 @@ void view_ctrl_pad_create(lv_obj_t * par, view_t * ui) lv_obj_set_style_radius(tv, 0, 0); lv_obj_set_style_bg_color(tv, lv_color_hex(0xffffff), 0); - lv_obj_t * btns = lv_tabview_get_tab_btns(tv); - lv_obj_set_style_outline_width(btns, 0, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); - lv_obj_set_style_outline_width(btns, 0, LV_STATE_FOCUS_KEY); - lv_obj_set_style_bg_color(btns, lv_color_white(), LV_PART_ITEMS | LV_STATE_CHECKED); - lv_obj_set_height(btns, 40); + lv_obj_t * buttons = lv_tabview_get_tab_buttons(tv); + lv_obj_set_style_outline_width(buttons, 0, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); + lv_obj_set_style_outline_width(buttons, 0, LV_STATE_FOCUS_KEY); + lv_obj_set_style_bg_color(buttons, lv_color_white(), LV_PART_ITEMS | LV_STATE_CHECKED); + lv_obj_set_height(buttons, 40); ui->ctrl_pad.tab.view = tv; @@ -188,7 +188,7 @@ static lv_obj_t * spinbox_ctrl_create(lv_obj_t * par, lv_style_prop_t prop, lv_o lv_style_set_text_color(&btn_style, lv_theme_get_color_primary(par)); } - lv_obj_t * btn_dec = lv_btn_create(cont_spinbox); + lv_obj_t * btn_dec = lv_button_create(cont_spinbox); lv_obj_set_width(btn_dec, 30); lv_obj_add_style(btn_dec, &btn_style, LV_PART_MAIN); label = lv_label_create(btn_dec); @@ -208,7 +208,7 @@ static lv_obj_t * spinbox_ctrl_create(lv_obj_t * par, lv_style_prop_t prop, lv_o lv_spinbox_set_digit_format(spinbox, 3, 0); lv_spinbox_step_prev(spinbox); - lv_obj_t * btn_inc = lv_btn_create(cont_spinbox); + lv_obj_t * btn_inc = lv_button_create(cont_spinbox); lv_obj_set_width(btn_inc, 30); lv_obj_add_style(btn_inc, &btn_style, LV_PART_MAIN); label = lv_label_create(btn_inc); diff --git a/demos/keypad_encoder/lv_demo_keypad_encoder.c b/demos/keypad_encoder/lv_demo_keypad_encoder.c index 1b55bca10..c16e4679d 100644 --- a/demos/keypad_encoder/lv_demo_keypad_encoder.c +++ b/demos/keypad_encoder/lv_demo_keypad_encoder.c @@ -102,7 +102,7 @@ static void selectors_create(lv_obj_t * parent) obj = lv_calendar_create(parent); lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS); - obj = lv_btnmatrix_create(parent); + obj = lv_buttonmatrix_create(parent); lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS); obj = lv_checkbox_create(parent); @@ -130,13 +130,13 @@ static void selectors_create(lv_obj_t * parent) lv_obj_set_height(list, lv_obj_get_content_height(parent)); } - lv_list_add_btn(list, LV_SYMBOL_OK, "Apply"); - lv_list_add_btn(list, LV_SYMBOL_CLOSE, "Close"); - lv_list_add_btn(list, LV_SYMBOL_EYE_OPEN, "Show"); - lv_list_add_btn(list, LV_SYMBOL_EYE_CLOSE, "Hide"); - lv_list_add_btn(list, LV_SYMBOL_TRASH, "Delete"); - lv_list_add_btn(list, LV_SYMBOL_COPY, "Copy"); - lv_list_add_btn(list, LV_SYMBOL_PASTE, "Paste"); + lv_list_add_button(list, LV_SYMBOL_OK, "Apply"); + lv_list_add_button(list, LV_SYMBOL_CLOSE, "Close"); + lv_list_add_button(list, LV_SYMBOL_EYE_OPEN, "Show"); + lv_list_add_button(list, LV_SYMBOL_EYE_CLOSE, "Hide"); + lv_list_add_button(list, LV_SYMBOL_TRASH, "Delete"); + lv_list_add_button(list, LV_SYMBOL_COPY, "Copy"); + lv_list_add_button(list, LV_SYMBOL_PASTE, "Paste"); } static void text_input_create(lv_obj_t * parent) @@ -162,11 +162,11 @@ static void text_input_create(lv_obj_t * parent) static void msgbox_create(void) { - static const char * btns[] = {"Ok", "Cancel", ""}; - lv_obj_t * mbox = lv_msgbox_create(NULL, "Hi", "Welcome to the keyboard and encoder demo", btns, false); + static const char * buttons[] = {"Ok", "Cancel", ""}; + lv_obj_t * mbox = lv_msgbox_create(NULL, "Hi", "Welcome to the keyboard and encoder demo", buttons, false); lv_obj_add_event(mbox, msgbox_event_cb, LV_EVENT_ALL, NULL); - lv_group_focus_obj(lv_msgbox_get_btns(mbox)); - lv_obj_add_state(lv_msgbox_get_btns(mbox), LV_STATE_FOCUS_KEY); + lv_group_focus_obj(lv_msgbox_get_buttons(mbox)); + lv_obj_add_state(lv_msgbox_get_buttons(mbox), LV_STATE_FOCUS_KEY); lv_group_focus_freeze(g, true); lv_obj_align(mbox, LV_ALIGN_CENTER, 0, 0); @@ -182,7 +182,7 @@ static void msgbox_event_cb(lv_event_t * e) lv_obj_t * msgbox = lv_event_get_current_target(e); if(code == LV_EVENT_VALUE_CHANGED) { - const char * txt = lv_msgbox_get_active_btn_text(msgbox); + const char * txt = lv_msgbox_get_active_button_text(msgbox); if(txt) { lv_msgbox_close(msgbox); lv_group_focus_freeze(g, false); diff --git a/demos/keypad_encoder/lv_demo_keypad_encoder.py b/demos/keypad_encoder/lv_demo_keypad_encoder.py index 6842ebbe1..e4b045b4c 100644 --- a/demos/keypad_encoder/lv_demo_keypad_encoder.py +++ b/demos/keypad_encoder/lv_demo_keypad_encoder.py @@ -45,7 +45,7 @@ class KeyboardEncoder: obj = lv.calendar(parent) obj.add_flag(lv.obj.FLAG.SCROLL_ON_FOCUS) - obj = lv.btnmatrix(parent) + obj = lv.buttonmatrix(parent) obj.add_flag(lv.obj.FLAG.SCROLL_ON_FOCUS) obj = lv.checkbox(parent) obj.add_flag(lv.obj.FLAG.SCROLL_ON_FOCUS); @@ -71,13 +71,13 @@ class KeyboardEncoder: if list.get_height() > parent.get_content_height() : list.set_height(parent.get_content_height()) - list.add_btn(lv.SYMBOL.OK, "Apply") - list.add_btn(lv.SYMBOL.CLOSE, "Close") - list.add_btn(lv.SYMBOL.EYE_OPEN, "Show") - list.add_btn(lv.SYMBOL.EYE_CLOSE, "Hide") - list.add_btn(lv.SYMBOL.TRASH, "Delete") - list.add_btn(lv.SYMBOL.COPY, "Copy") - list.add_btn(lv.SYMBOL.PASTE, "Paste") + list.add_button(lv.SYMBOL.OK, "Apply") + list.add_button(lv.SYMBOL.CLOSE, "Close") + list.add_button(lv.SYMBOL.EYE_OPEN, "Show") + list.add_button(lv.SYMBOL.EYE_CLOSE, "Hide") + list.add_button(lv.SYMBOL.TRASH, "Delete") + list.add_button(lv.SYMBOL.COPY, "Copy") + list.add_button(lv.SYMBOL.PASTE, "Paste") def text_input_create(self,parent) : @@ -102,11 +102,11 @@ class KeyboardEncoder: def msgbox_create(self): - btns = ["Ok", "Cancel", ""] - mbox = lv.msgbox(None, "Hi", "Welcome to the keyboard and encoder demo", btns, False) + buttons = ["Ok", "Cancel", ""] + mbox = lv.msgbox(None, "Hi", "Welcome to the keyboard and encoder demo", buttons, False) mbox.add_event(self.msgbox_event_cb, lv.EVENT.ALL, None) - lv.group_focus_obj(mbox.get_btns()) - mbox.get_btns().add_state(lv.STATE.FOCUS_KEY) + lv.group_focus_obj(mbox.get_buttons()) + mbox.get_buttons().add_state(lv.STATE.FOCUS_KEY) self.g.focus_freeze(True) mbox.align(lv.ALIGN.CENTER, 0, 0) @@ -122,7 +122,7 @@ class KeyboardEncoder: msgbox = e.get_target() if code == lv.EVENT.VALUE_CHANGED: - txt = msgbox.get_active_btn_text() + txt = msgbox.get_active_button_text() if txt: msgbox.close() self.g.focus_freeze(False) diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_1.c b/demos/multilang/assets/avatars/img_multilang_avatar_1.c index 190e5680b..5d42f48f3 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_1.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_1.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_1 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_1 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_1 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_1 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_1 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_1 uint8_t img_multilang_avatar_1_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x11, 0xff, 0xff, 0xff, 0x37, 0xff, 0xff, 0xff, 0x5e, 0xff, 0xff, 0xff, 0x86, 0xff, 0xff, 0xff, 0xa8, 0xfe, 0xfe, 0xfe, 0xbf, 0xff, 0xff, 0xff, 0xd2, 0xfe, 0xfe, 0xfe, 0xe5, 0xfe, 0xfe, 0xfe, 0xee, 0xff, 0xff, 0xff, 0xf2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0xfe, 0xfe, 0xfe, 0xee, 0xfe, 0xfe, 0xfe, 0xe5, 0xff, 0xff, 0xff, 0xd2, 0xfe, 0xfe, 0xfe, 0xbf, 0xff, 0xff, 0xff, 0xa8, 0xff, 0xff, 0xff, 0x86, 0xff, 0xff, 0xff, 0x5e, 0xff, 0xff, 0xff, 0x37, 0xff, 0xff, 0xff, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x19, 0xff, 0xff, 0xff, 0x55, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xc1, 0xfe, 0xfe, 0xfe, 0xe9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xe9, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0x55, 0xff, 0xff, 0xff, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_1_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0f, 0x0f, 0x11, 0x20, 0x20, 0x25, 0x37, 0x12, 0x15, 0x18, 0x5f, 0x24, 0x24, 0x29, 0x86, 0x15, 0x16, 0x1b, 0xa8, 0x1e, 0x1e, 0x22, 0xc0, 0x19, 0x1a, 0x1e, 0xd3, 0x17, 0x18, 0x1b, 0xe6, 0x22, 0x23, 0x26, 0xee, 0x20, 0x21, 0x25, 0xf5, 0x27, 0x28, 0x2c, 0xff, 0x14, 0x15, 0x19, 0xff, 0x22, 0x23, 0x26, 0xf5, 0x1e, 0x1f, 0x23, 0xee, 0x19, 0x1a, 0x1f, 0xe6, 0x1a, 0x1a, 0x1f, 0xd3, 0x1e, 0x1e, 0x22, 0xc0, 0x27, 0x27, 0x2c, 0xa8, 0x18, 0x18, 0x1c, 0x86, 0x22, 0x22, 0x28, 0x5f, 0x17, 0x17, 0x1b, 0x37, 0x1e, 0x1e, 0x2d, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_1 = { +const lv_image_dsc_t img_multilang_avatar_1 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_10.c b/demos/multilang/assets/avatars/img_multilang_avatar_10.c index 65df7654e..ce3506a6a 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_10.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_10.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_10 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_10 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_10 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_10 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_10 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_10 uint8_t img_multilang_avatar_10_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x17, 0x1b, 0x25, 0x37, 0x08, 0x0a, 0x1b, 0x5e, 0x00, 0x00, 0x0d, 0x86, 0x13, 0x13, 0x21, 0xa8, 0x1a, 0x22, 0x30, 0xbf, 0x13, 0x1e, 0x2a, 0xd2, 0x18, 0x23, 0x33, 0xe5, 0x25, 0x32, 0x41, 0xee, 0x2f, 0x37, 0x42, 0xf2, 0x08, 0x0b, 0x0f, 0xff, 0x14, 0x18, 0x1f, 0xff, 0x00, 0x01, 0x08, 0xf2, 0x03, 0x04, 0x06, 0xee, 0x03, 0x03, 0x04, 0xe5, 0x09, 0x0d, 0x13, 0xd2, 0x09, 0x10, 0x1c, 0xbf, 0x13, 0x1b, 0x2a, 0xa8, 0x11, 0x16, 0x24, 0x86, 0x25, 0x30, 0x38, 0x5e, 0x29, 0x33, 0x40, 0x37, 0x1e, 0x1e, 0x2d, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x3d, 0x19, 0x2a, 0x2d, 0x33, 0x55, 0x17, 0x1c, 0x20, 0x8f, 0x12, 0x16, 0x1a, 0xc1, 0x0a, 0x0a, 0x0a, 0xe9, 0x01, 0x00, 0x00, 0xff, 0x15, 0x19, 0x22, 0xff, 0x2e, 0x38, 0x45, 0xff, 0x09, 0x0f, 0x1e, 0xff, 0x08, 0x0e, 0x19, 0xff, 0x37, 0x41, 0x4e, 0xff, 0x23, 0x2f, 0x3f, 0xff, 0x26, 0x32, 0x42, 0xff, 0x0d, 0x18, 0x28, 0xff, 0x2b, 0x37, 0x43, 0xff, 0x2b, 0x30, 0x36, 0xff, 0x13, 0x18, 0x20, 0xff, 0x0d, 0x11, 0x19, 0xff, 0x00, 0x01, 0x03, 0xff, 0x03, 0x05, 0x06, 0xff, 0x03, 0x06, 0x0b, 0xff, 0x09, 0x12, 0x1d, 0xff, 0x25, 0x2d, 0x3e, 0xff, 0x0a, 0x12, 0x1d, 0xff, 0x1c, 0x25, 0x2c, 0xff, 0x2a, 0x32, 0x41, 0xff, 0x1e, 0x25, 0x3a, 0xff, 0x0c, 0x16, 0x23, 0xe9, 0x30, 0x37, 0x46, 0xc1, 0x27, 0x29, 0x37, 0x8f, 0x5a, 0x5a, 0x57, 0x55, 0xff, 0xff, 0xff, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_10_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0f, 0x00, 0x11, 0x12, 0x0d, 0x09, 0x37, 0x12, 0x0a, 0x08, 0x5f, 0x14, 0x0b, 0x09, 0x86, 0x04, 0x00, 0x00, 0xa8, 0x2e, 0x2b, 0x2e, 0xc0, 0x7c, 0x82, 0x88, 0xd3, 0x93, 0x9a, 0xa1, 0xe6, 0x84, 0x8d, 0x97, 0xee, 0x72, 0x7a, 0x82, 0xf5, 0x8a, 0x8f, 0x93, 0xff, 0x88, 0x8c, 0x93, 0xff, 0x7e, 0x84, 0x8d, 0xf5, 0x78, 0x7c, 0x84, 0xee, 0x71, 0x77, 0x80, 0xe6, 0x78, 0x80, 0x88, 0xd3, 0x73, 0x7b, 0x84, 0xc0, 0x85, 0x8b, 0x93, 0xa8, 0x96, 0x9c, 0xa1, 0x86, 0x96, 0x9b, 0xa1, 0x5f, 0x99, 0xa2, 0xa6, 0x37, 0x96, 0x96, 0x96, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_10 = { +const lv_image_dsc_t img_multilang_avatar_10 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_11.c b/demos/multilang/assets/avatars/img_multilang_avatar_11.c index 14bcb9ace..f2aae34ce 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_11.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_11.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_11 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_11 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_11 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_11 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_11 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_11 uint8_t img_multilang_avatar_11_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x11, 0xff, 0xff, 0xff, 0x37, 0xff, 0xff, 0xff, 0x5e, 0xff, 0xff, 0xff, 0x86, 0xff, 0xff, 0xff, 0xa8, 0xfe, 0xfe, 0xfe, 0xbf, 0xff, 0xff, 0xff, 0xd2, 0xfe, 0xfe, 0xfe, 0xe5, 0xfe, 0xfe, 0xfe, 0xee, 0xff, 0xff, 0xff, 0xf2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0xfe, 0xfe, 0xfe, 0xee, 0xfe, 0xfe, 0xfe, 0xe5, 0xff, 0xff, 0xff, 0xd2, 0xfe, 0xfe, 0xfe, 0xbf, 0xff, 0xff, 0xff, 0xa8, 0xff, 0xff, 0xff, 0x86, 0xff, 0xff, 0xff, 0x5e, 0xff, 0xff, 0xff, 0x37, 0xff, 0xff, 0xff, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x19, 0xff, 0xff, 0xff, 0x55, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xc1, 0xfe, 0xfe, 0xfe, 0xe9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xe9, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0x55, 0xff, 0xff, 0xff, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_11_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x96, 0x78, 0x11, 0xc2, 0x99, 0x7d, 0x37, 0xbe, 0x86, 0x78, 0x5f, 0xc0, 0x92, 0x8c, 0x86, 0xe6, 0xd9, 0xcf, 0xa8, 0xff, 0xfb, 0xf3, 0xc0, 0xe1, 0xc9, 0xc0, 0xd3, 0xc6, 0x9c, 0x86, 0xe6, 0xca, 0x98, 0x7b, 0xee, 0xc7, 0x9a, 0x7b, 0xf5, 0xb7, 0x8d, 0x76, 0xff, 0xbd, 0x97, 0x89, 0xff, 0xcd, 0xac, 0xa3, 0xf5, 0xd5, 0xb8, 0xac, 0xee, 0xc9, 0xac, 0x99, 0xe6, 0xc0, 0x92, 0x7d, 0xd3, 0xad, 0x84, 0x7c, 0xc0, 0x67, 0x6a, 0x73, 0xa8, 0x3e, 0x5d, 0x74, 0x86, 0x48, 0x55, 0x70, 0x5f, 0x4e, 0x5c, 0x7d, 0x37, 0x4b, 0x69, 0x87, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_11 = { +const lv_image_dsc_t img_multilang_avatar_11 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_12.c b/demos/multilang/assets/avatars/img_multilang_avatar_12.c index 15a341fb3..9924a8162 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_12.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_12.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_12 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_12 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_12 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_12 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_12 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_12 uint8_t img_multilang_avatar_12_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x96, 0x69, 0x11, 0xcc, 0xa6, 0x61, 0x37, 0xd9, 0xaa, 0x56, 0x5e, 0xe6, 0xb2, 0x55, 0x86, 0xeb, 0xba, 0x4d, 0xa8, 0xec, 0xbc, 0x46, 0xbf, 0xec, 0xbd, 0x42, 0xd2, 0xed, 0xbf, 0x40, 0xe5, 0xeb, 0xbb, 0x41, 0xee, 0xe6, 0xb6, 0x49, 0xf2, 0xdf, 0xb1, 0x4a, 0xff, 0xe4, 0xaf, 0x4a, 0xff, 0xe0, 0xab, 0x58, 0xf2, 0xca, 0xa1, 0x66, 0xee, 0xac, 0x8a, 0x70, 0xe5, 0x96, 0x77, 0x7b, 0xd2, 0x95, 0x72, 0x7d, 0xbf, 0xa6, 0x77, 0x7c, 0xa8, 0xad, 0x79, 0x70, 0x86, 0xb8, 0x7c, 0x6f, 0x5e, 0xb9, 0x7d, 0x73, 0x37, 0xb4, 0x78, 0x78, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x84, 0x5b, 0x19, 0xb1, 0x84, 0x5d, 0x55, 0xac, 0x82, 0x5c, 0x8f, 0xae, 0x85, 0x63, 0xc1, 0xb3, 0x8d, 0x65, 0xe9, 0xc1, 0x99, 0x65, 0xff, 0xd3, 0xa8, 0x5c, 0xff, 0xde, 0xb1, 0x4d, 0xff, 0xea, 0xb9, 0x48, 0xff, 0xed, 0xc0, 0x40, 0xff, 0xf0, 0xc0, 0x39, 0xff, 0xf1, 0xc2, 0x37, 0xff, 0xf2, 0xc2, 0x35, 0xff, 0xf3, 0xc1, 0x34, 0xff, 0xf1, 0xbd, 0x38, 0xff, 0xe9, 0xbb, 0x3d, 0xff, 0xe7, 0xb5, 0x49, 0xff, 0xd5, 0xa8, 0x60, 0xff, 0xbd, 0x9b, 0x66, 0xff, 0x9f, 0x85, 0x69, 0xff, 0x8f, 0x76, 0x74, 0xff, 0x95, 0x76, 0x7a, 0xff, 0xa1, 0x79, 0x74, 0xff, 0xa6, 0x76, 0x69, 0xff, 0xaf, 0x76, 0x65, 0xff, 0xb1, 0x72, 0x66, 0xff, 0xb7, 0x74, 0x6e, 0xff, 0xbb, 0x77, 0x72, 0xe9, 0xb7, 0x72, 0x6d, 0xc1, 0xbb, 0x79, 0x6e, 0x8f, 0xc0, 0x81, 0x6c, 0x55, 0xcc, 0x84, 0x66, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_12_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0f, 0x00, 0x11, 0x09, 0x04, 0x00, 0x37, 0x0a, 0x08, 0x05, 0x5f, 0x0b, 0x07, 0x07, 0x86, 0x09, 0x07, 0x07, 0xa8, 0x07, 0x06, 0x05, 0xc0, 0x08, 0x07, 0x06, 0xd3, 0x06, 0x05, 0x04, 0xe6, 0x07, 0x05, 0x03, 0xee, 0x09, 0x06, 0x02, 0xf5, 0x09, 0x06, 0x03, 0xff, 0x09, 0x05, 0x04, 0xff, 0x08, 0x04, 0x04, 0xf5, 0x0d, 0x04, 0x00, 0xee, 0x15, 0x01, 0x00, 0xe6, 0x1a, 0x00, 0x09, 0xd3, 0x39, 0x0d, 0x3a, 0xc0, 0x87, 0x56, 0x96, 0xa8, 0xc2, 0x9d, 0xc0, 0x86, 0xdc, 0xc6, 0xcc, 0x5f, 0xe7, 0xd9, 0xde, 0x37, 0xf0, 0xf0, 0xf0, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_12 = { +const lv_image_dsc_t img_multilang_avatar_12 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_13.c b/demos/multilang/assets/avatars/img_multilang_avatar_13.c index af6a3b98c..137257a1d 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_13.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_13.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_13 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_13 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_13 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_13 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_13 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_13 uint8_t img_multilang_avatar_13_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0xb4, 0xb4, 0x11, 0xab, 0xb0, 0xb0, 0x37, 0xa8, 0xb0, 0xad, 0x5e, 0xa9, 0xaf, 0xa9, 0x86, 0xab, 0xae, 0xa3, 0xa8, 0xa5, 0xad, 0xa1, 0xbf, 0x9d, 0xa8, 0xac, 0xd2, 0x99, 0xa8, 0xb5, 0xe5, 0x9b, 0xae, 0xb9, 0xee, 0x9d, 0xaf, 0xb1, 0xf2, 0xa3, 0xaf, 0xb1, 0xff, 0xa4, 0xb0, 0xb4, 0xff, 0xa3, 0xaf, 0xb4, 0xf2, 0xa0, 0xac, 0xae, 0xee, 0xa1, 0xac, 0xac, 0xe5, 0xa1, 0xac, 0xab, 0xd2, 0xa1, 0xa9, 0xa9, 0xbf, 0xa6, 0xab, 0xa8, 0xa8, 0xa7, 0xab, 0xa3, 0x86, 0xa8, 0xaa, 0xa8, 0x5e, 0xab, 0xb0, 0xab, 0x37, 0xa5, 0xb4, 0xa5, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0xad, 0xad, 0x19, 0xab, 0xae, 0xae, 0x55, 0xa9, 0xae, 0xae, 0x8f, 0xaa, 0xb1, 0xae, 0xc1, 0xa8, 0xaf, 0xac, 0xe9, 0xa9, 0xae, 0xae, 0xff, 0xa7, 0xaf, 0xaf, 0xff, 0xa6, 0xae, 0xae, 0xff, 0xa8, 0xad, 0xab, 0xff, 0xab, 0xad, 0xa6, 0xff, 0xa7, 0xae, 0xa5, 0xff, 0x9d, 0xa7, 0xa8, 0xff, 0x8d, 0x9a, 0xa7, 0xff, 0x97, 0xa9, 0xb1, 0xff, 0xa0, 0xb3, 0xb2, 0xff, 0xa7, 0xb0, 0xb3, 0xff, 0xa6, 0xb0, 0xb4, 0xff, 0xa5, 0xb1, 0xb5, 0xff, 0xa2, 0xaf, 0xb2, 0xff, 0xa3, 0xae, 0xaf, 0xff, 0xa5, 0xaf, 0xad, 0xff, 0x9d, 0xa6, 0xa6, 0xff, 0xa5, 0xab, 0xa7, 0xff, 0xa9, 0xad, 0xa6, 0xff, 0xa7, 0xab, 0xa6, 0xff, 0xa8, 0xac, 0xa7, 0xff, 0xa9, 0xac, 0xaa, 0xff, 0xa8, 0xaa, 0xa9, 0xe9, 0xa6, 0xaa, 0xa7, 0xc1, 0xa5, 0xac, 0xa7, 0x8f, 0xa8, 0xab, 0xa8, 0x55, 0xa3, 0xad, 0xa3, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_13_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x69, 0x69, 0x11, 0x4a, 0x40, 0x45, 0x37, 0x25, 0x1d, 0x1a, 0x5f, 0x2f, 0x20, 0x18, 0x86, 0x32, 0x22, 0x1e, 0xa8, 0x1e, 0x12, 0x15, 0xc0, 0x1f, 0x18, 0x1a, 0xd3, 0x23, 0x1d, 0x23, 0xe6, 0x25, 0x22, 0x26, 0xee, 0x2a, 0x26, 0x2d, 0xf5, 0x30, 0x28, 0x33, 0xff, 0x33, 0x2d, 0x35, 0xff, 0x3e, 0x35, 0x38, 0xf5, 0x5c, 0x4c, 0x4d, 0xee, 0x5d, 0x4b, 0x4b, 0xe6, 0x6a, 0x59, 0x5b, 0xd3, 0x45, 0x3a, 0x3d, 0xc0, 0x24, 0x1e, 0x21, 0xa8, 0x20, 0x1a, 0x1e, 0x86, 0x25, 0x1d, 0x1d, 0x5f, 0x3c, 0x2e, 0x33, 0x37, 0x5a, 0x4b, 0x4b, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_13 = { +const lv_image_dsc_t img_multilang_avatar_13 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_14.c b/demos/multilang/assets/avatars/img_multilang_avatar_14.c index ca064f95b..5a35e6c44 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_14.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_14.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_14 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_14 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_14 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_14 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_14 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_14 uint8_t img_multilang_avatar_14_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xc3, 0xc3, 0x11, 0x81, 0x8b, 0x94, 0x37, 0xb5, 0xb5, 0xb5, 0x5e, 0xf3, 0xe8, 0xe2, 0x86, 0xf8, 0xf1, 0xe9, 0xa8, 0xf4, 0xf2, 0xea, 0xbf, 0xf2, 0xf1, 0xef, 0xd2, 0xf0, 0xf0, 0xec, 0xe5, 0xf3, 0xf0, 0xea, 0xee, 0xfd, 0xfa, 0xf7, 0xf2, 0xfb, 0xfb, 0xfc, 0xff, 0xf6, 0xf3, 0xef, 0xff, 0xfc, 0xfa, 0xf8, 0xf2, 0xfc, 0xfd, 0xfd, 0xee, 0xfc, 0xfd, 0xfd, 0xe5, 0xfc, 0xfc, 0xfc, 0xd2, 0xfd, 0xfd, 0xfd, 0xbf, 0xfd, 0xfd, 0xfd, 0xa8, 0xfd, 0xfd, 0xfd, 0x86, 0xff, 0xfc, 0xfc, 0x5e, 0xff, 0xff, 0xff, 0x37, 0xff, 0xff, 0xff, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xc1, 0xc1, 0x19, 0xff, 0xff, 0xff, 0x55, 0xff, 0xff, 0xff, 0x8f, 0xdf, 0xe3, 0xe3, 0xc1, 0x8f, 0x9c, 0xa3, 0xe9, 0x8d, 0x96, 0x9c, 0xff, 0xe0, 0xe0, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xf9, 0xf5, 0xf2, 0xff, 0xf7, 0xf1, 0xef, 0xff, 0xf5, 0xf0, 0xed, 0xff, 0xf4, 0xef, 0xec, 0xff, 0xf3, 0xef, 0xea, 0xff, 0xfa, 0xf8, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xf6, 0xf1, 0xff, 0xf9, 0xf7, 0xf5, 0xff, 0xfc, 0xfd, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xfd, 0xfd, 0xfd, 0xff, 0xfd, 0xfe, 0xfd, 0xff, 0xfd, 0xfd, 0xfd, 0xff, 0xfd, 0xfd, 0xfd, 0xff, 0xfd, 0xfe, 0xfd, 0xff, 0xfe, 0xfe, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xe9, 0x92, 0x96, 0x8e, 0xc1, 0x7e, 0x8c, 0x97, 0x8f, 0xff, 0xff, 0xff, 0x55, 0xff, 0xf4, 0xf4, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_14_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x69, 0xb4, 0x11, 0x33, 0x6a, 0xb0, 0x37, 0x33, 0x66, 0xab, 0x5f, 0x2f, 0x62, 0xa9, 0x86, 0x2a, 0x5f, 0xa5, 0xa8, 0x2a, 0x5f, 0xa4, 0xc0, 0x2a, 0x5e, 0xa4, 0xd3, 0x26, 0x5a, 0xa0, 0xe6, 0x25, 0x58, 0x9e, 0xee, 0x22, 0x56, 0x9c, 0xf5, 0x22, 0x55, 0x9c, 0xff, 0x23, 0x59, 0x9e, 0xff, 0x2a, 0x61, 0xa6, 0xf5, 0x34, 0x6c, 0xb0, 0xee, 0x39, 0x74, 0xb9, 0xe6, 0x37, 0x76, 0xbb, 0xd3, 0x39, 0x74, 0xb9, 0xc0, 0x3c, 0x73, 0xb9, 0xa8, 0x39, 0x72, 0xb8, 0x86, 0x38, 0x70, 0xb6, 0x5f, 0x37, 0x6f, 0xb4, 0x37, 0x3c, 0x78, 0xb4, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_14 = { +const lv_image_dsc_t img_multilang_avatar_14 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_15.c b/demos/multilang/assets/avatars/img_multilang_avatar_15.c index 693f69475..d06c7af65 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_15.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_15.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_15 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_15 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_15 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_15 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_15 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_15 uint8_t img_multilang_avatar_15_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x69, 0x69, 0x11, 0x6f, 0x66, 0x66, 0x37, 0x6f, 0x67, 0x69, 0x5e, 0x6e, 0x66, 0x6e, 0x86, 0x6d, 0x64, 0x6e, 0xa8, 0x62, 0x5e, 0x71, 0xbf, 0x5d, 0x5d, 0x72, 0xd2, 0x66, 0x66, 0x78, 0xe5, 0x7e, 0x78, 0x89, 0xee, 0x8f, 0x83, 0x8e, 0xf2, 0x9f, 0x8f, 0x96, 0xff, 0xaa, 0x9a, 0x98, 0xff, 0xb4, 0xa5, 0x9b, 0xf2, 0xb9, 0xa9, 0x9b, 0xee, 0xbb, 0xaa, 0x98, 0xe5, 0xbc, 0xad, 0x9b, 0xd2, 0xbd, 0xb1, 0xa0, 0xbf, 0xbf, 0xb3, 0x9f, 0xa8, 0xbe, 0xb2, 0x9a, 0x86, 0xbb, 0xb0, 0x9a, 0x5e, 0xb9, 0xb0, 0x99, 0x37, 0xb4, 0xb4, 0x96, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x7a, 0x19, 0x66, 0x63, 0x72, 0x55, 0x69, 0x63, 0x72, 0x8f, 0x6b, 0x64, 0x70, 0xc1, 0x6e, 0x65, 0x6e, 0xe9, 0x72, 0x67, 0x71, 0xff, 0x6a, 0x62, 0x6c, 0xff, 0x69, 0x63, 0x6c, 0xff, 0x68, 0x62, 0x70, 0xff, 0x66, 0x60, 0x73, 0xff, 0x61, 0x60, 0x73, 0xff, 0x5e, 0x5e, 0x73, 0xff, 0x67, 0x66, 0x7a, 0xff, 0x7f, 0x7a, 0x8b, 0xff, 0x93, 0x89, 0x93, 0xff, 0xa1, 0x92, 0x98, 0xff, 0xae, 0x9d, 0x9c, 0xff, 0xb6, 0xa5, 0x9d, 0xff, 0xbc, 0xab, 0x9e, 0xff, 0xc2, 0xb0, 0x9f, 0xff, 0xc4, 0xb4, 0xa1, 0xff, 0xc4, 0xb5, 0xa4, 0xff, 0xc3, 0xb6, 0xa3, 0xff, 0xbf, 0xb5, 0x9e, 0xff, 0xba, 0xb0, 0x9a, 0xff, 0xb7, 0xb0, 0x9a, 0xff, 0xb5, 0xb0, 0x99, 0xff, 0xb3, 0xb1, 0x9a, 0xe9, 0xb7, 0xb2, 0x9e, 0xc1, 0xbe, 0xb5, 0xa0, 0x8f, 0xc0, 0xba, 0xa2, 0x55, 0xc1, 0xb7, 0xa3, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_15_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xe1, 0xf0, 0x11, 0xa6, 0xd0, 0xec, 0x37, 0xa1, 0xcc, 0xee, 0x5f, 0x9d, 0xc2, 0xeb, 0x86, 0x9c, 0xba, 0xe8, 0xa8, 0x9b, 0xbb, 0xe7, 0xc0, 0x9d, 0xc1, 0xea, 0xd3, 0xa5, 0xc8, 0xf3, 0xe6, 0x9f, 0xc5, 0xf0, 0xee, 0x80, 0xa0, 0xcc, 0xf5, 0x70, 0x8b, 0xb8, 0xff, 0x6e, 0x88, 0xb2, 0xff, 0x6d, 0x89, 0xb0, 0xf5, 0x61, 0x7e, 0xa7, 0xee, 0x54, 0x6d, 0x9b, 0xe6, 0x59, 0x72, 0x9e, 0xd3, 0x5c, 0x74, 0xa3, 0xc0, 0x58, 0x6e, 0x9a, 0xa8, 0x53, 0x6a, 0x92, 0x86, 0x50, 0x66, 0x90, 0x5f, 0x4a, 0x61, 0x8b, 0x37, 0x4b, 0x5a, 0x87, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_15 = { +const lv_image_dsc_t img_multilang_avatar_15 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_16.c b/demos/multilang/assets/avatars/img_multilang_avatar_16.c index 04d29fdc3..a19ea7f96 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_16.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_16.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_16 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_16 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_16 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_16 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_16 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_16 uint8_t img_multilang_avatar_16_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0xb4, 0xb4, 0x11, 0xab, 0xb0, 0xb0, 0x37, 0xaa, 0xb0, 0xb0, 0x5e, 0xad, 0xaf, 0xaf, 0x86, 0xae, 0xb1, 0xb1, 0xa8, 0xad, 0xb0, 0xb1, 0xbf, 0xac, 0xb2, 0xb1, 0xd2, 0xac, 0xb2, 0xb1, 0xe5, 0xad, 0xb0, 0xb1, 0xee, 0xac, 0xb1, 0xb2, 0xf2, 0xad, 0xb1, 0xb1, 0xff, 0xad, 0xb2, 0xb1, 0xff, 0xac, 0xb2, 0xb1, 0xf2, 0xad, 0xb2, 0xb1, 0xee, 0xaf, 0xb5, 0xb4, 0xe5, 0xae, 0xb3, 0xb2, 0xd2, 0xae, 0xb4, 0xb2, 0xbf, 0xae, 0xb3, 0xb4, 0xa8, 0xaf, 0xb4, 0xb4, 0x86, 0xb0, 0xb5, 0xb3, 0x5e, 0xb0, 0xb4, 0xb4, 0x37, 0xb4, 0xb4, 0xb4, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xc1, 0xc1, 0x19, 0xba, 0xbd, 0xba, 0x55, 0xae, 0xb4, 0xb2, 0x8f, 0xa9, 0xae, 0xad, 0xc1, 0xa8, 0xae, 0xae, 0xe9, 0xab, 0xb0, 0xaf, 0xff, 0xac, 0xb0, 0xaf, 0xff, 0xac, 0xb1, 0xb0, 0xff, 0xad, 0xb2, 0xb1, 0xff, 0xad, 0xb2, 0xb1, 0xff, 0xad, 0xb2, 0xb1, 0xff, 0xad, 0xb1, 0xb1, 0xff, 0xad, 0xb2, 0xb2, 0xff, 0xae, 0xb2, 0xb2, 0xff, 0xae, 0xb2, 0xb3, 0xff, 0xad, 0xb1, 0xb3, 0xff, 0xad, 0xb1, 0xb2, 0xff, 0xae, 0xb3, 0xb2, 0xff, 0xaf, 0xb4, 0xb3, 0xff, 0xaf, 0xb3, 0xb3, 0xff, 0xaf, 0xb4, 0xb4, 0xff, 0xaf, 0xb4, 0xb3, 0xff, 0xaf, 0xb4, 0xb4, 0xff, 0xaf, 0xb4, 0xb4, 0xff, 0xaf, 0xb4, 0xb3, 0xff, 0xaf, 0xb4, 0xb3, 0xff, 0xb0, 0xb4, 0xb4, 0xff, 0xb0, 0xb3, 0xb4, 0xe9, 0xaf, 0xb3, 0xb5, 0xc1, 0xb0, 0xb2, 0xb4, 0x8f, 0xb1, 0xb4, 0xb4, 0x55, 0xad, 0xb7, 0xb7, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_16_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x78, 0xa5, 0x11, 0x73, 0x86, 0xb4, 0x37, 0x80, 0x90, 0xb9, 0x5f, 0x85, 0x9a, 0xbe, 0x86, 0x8b, 0x9f, 0xc5, 0xa8, 0x93, 0xa4, 0xcf, 0xc0, 0x97, 0xa9, 0xd1, 0xd3, 0x9d, 0xb0, 0xd3, 0xe6, 0x99, 0xad, 0xd7, 0xee, 0x96, 0xa9, 0xd5, 0xf5, 0x99, 0xab, 0xd7, 0xff, 0x9a, 0xae, 0xda, 0xff, 0x97, 0xae, 0xdc, 0xf5, 0x98, 0xae, 0xdc, 0xee, 0x9a, 0xaf, 0xdc, 0xe6, 0x99, 0xaf, 0xde, 0xd3, 0x9b, 0xb3, 0xdf, 0xc0, 0x9a, 0xb3, 0xe0, 0xa8, 0x94, 0xad, 0xda, 0x86, 0x8e, 0xa9, 0xd6, 0x5f, 0x86, 0xa2, 0xd5, 0x37, 0x87, 0xa5, 0xd2, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_16 = { +const lv_image_dsc_t img_multilang_avatar_16 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_17.c b/demos/multilang/assets/avatars/img_multilang_avatar_17.c index e3376f66b..725333fd8 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_17.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_17.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_17 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_17 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_17 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_17 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_17 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_17 uint8_t img_multilang_avatar_17_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0xd2, 0xd2, 0x11, 0xd0, 0xd5, 0xd5, 0x37, 0xd0, 0xd3, 0xd3, 0x5e, 0xd1, 0xd3, 0xd3, 0x86, 0xd1, 0xd4, 0xd4, 0xa8, 0xd1, 0xd4, 0xd4, 0xbf, 0xd0, 0xd3, 0xd3, 0xd2, 0xd1, 0xd2, 0xd2, 0xe5, 0xd0, 0xd3, 0xd3, 0xee, 0xd0, 0xd2, 0xd2, 0xf2, 0xd1, 0xd3, 0xd3, 0xff, 0xd1, 0xd3, 0xd3, 0xff, 0xd0, 0xd2, 0xd2, 0xf2, 0xd0, 0xd3, 0xd3, 0xee, 0xd1, 0xd2, 0xd2, 0xe5, 0xd0, 0xd3, 0xd3, 0xd2, 0xd1, 0xd4, 0xd4, 0xbf, 0xd1, 0xd4, 0xd4, 0xa8, 0xd1, 0xd3, 0xd3, 0x86, 0xd0, 0xd3, 0xd3, 0x5e, 0xd0, 0xd5, 0xd5, 0x37, 0xd2, 0xd2, 0xd2, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xd6, 0xd6, 0x19, 0xd2, 0xd2, 0xd2, 0x55, 0xd0, 0xd2, 0xd2, 0x8f, 0xd0, 0xd3, 0xd3, 0xc1, 0xd1, 0xd3, 0xd3, 0xe9, 0xd1, 0xd3, 0xd3, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd2, 0xd4, 0xd4, 0xff, 0xd1, 0xd3, 0xd3, 0xff, 0xd1, 0xd3, 0xd3, 0xff, 0xd1, 0xd3, 0xd3, 0xe9, 0xd0, 0xd3, 0xd3, 0xc1, 0xd0, 0xd2, 0xd2, 0x8f, 0xd2, 0xd2, 0xd2, 0x55, 0xcc, 0xd6, 0xd6, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_17_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x5a, 0x69, 0x11, 0x17, 0x66, 0x99, 0x37, 0x0a, 0x40, 0x68, 0x5f, 0x22, 0x31, 0x48, 0x86, 0x18, 0x2a, 0x36, 0xa8, 0x16, 0x1d, 0x22, 0xc0, 0x00, 0x37, 0x64, 0xd3, 0x5e, 0x92, 0xb4, 0xe6, 0xb8, 0xba, 0xad, 0xee, 0xb5, 0xbf, 0xc3, 0xf5, 0x41, 0x7f, 0xb0, 0xff, 0x00, 0x1f, 0x33, 0xff, 0x0f, 0x1d, 0x24, 0xf5, 0x24, 0x2a, 0x34, 0xee, 0x23, 0x27, 0x2e, 0xe6, 0x1a, 0x21, 0x29, 0xd3, 0x1b, 0x22, 0x22, 0xc0, 0x1e, 0x22, 0x1e, 0xa8, 0x1c, 0x11, 0x13, 0x86, 0x2a, 0x33, 0x43, 0x5f, 0x86, 0x8f, 0x8f, 0x37, 0x69, 0x69, 0x5a, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_17 = { +const lv_image_dsc_t img_multilang_avatar_17 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_18.c b/demos/multilang/assets/avatars/img_multilang_avatar_18.c index a915bc6ec..0b92eff5f 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_18.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_18.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_18 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_18 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_18 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_18 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_18 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_18 uint8_t img_multilang_avatar_18_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x3c, 0x4b, 0x11, 0x0d, 0x12, 0x25, 0x37, 0x00, 0x05, 0x12, 0x5e, 0x18, 0x1c, 0x24, 0x86, 0x15, 0x18, 0x1f, 0xa8, 0x0e, 0x11, 0x18, 0xbf, 0x11, 0x0f, 0x14, 0xd2, 0x0d, 0x0e, 0x0e, 0xe5, 0x28, 0x2b, 0x33, 0xee, 0x0c, 0x10, 0x17, 0xf2, 0x19, 0x1d, 0x22, 0xff, 0x33, 0x37, 0x41, 0xff, 0x07, 0x09, 0x18, 0xf2, 0x16, 0x16, 0x25, 0xee, 0x11, 0x0f, 0x17, 0xe5, 0x1f, 0x1f, 0x24, 0xd2, 0x29, 0x2c, 0x38, 0xbf, 0x5b, 0x61, 0x73, 0xa8, 0x1c, 0x1c, 0x2d, 0x86, 0x20, 0x1d, 0x33, 0x5e, 0x37, 0x3c, 0x4e, 0x37, 0x0f, 0x1e, 0x2d, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0xa3, 0xcc, 0x19, 0x7e, 0x7e, 0x9f, 0x55, 0x41, 0x4c, 0x69, 0x8f, 0x47, 0x59, 0x75, 0xc1, 0x47, 0x59, 0x74, 0xe9, 0x49, 0x57, 0x72, 0xff, 0x43, 0x4e, 0x65, 0xff, 0x2f, 0x3a, 0x4c, 0xff, 0x0b, 0x11, 0x1c, 0xff, 0x11, 0x17, 0x20, 0xff, 0x16, 0x1b, 0x24, 0xff, 0x17, 0x1e, 0x25, 0xff, 0x09, 0x0e, 0x11, 0xff, 0x35, 0x3c, 0x45, 0xff, 0x2b, 0x31, 0x3d, 0xff, 0x07, 0x0a, 0x14, 0xff, 0x10, 0x14, 0x23, 0xff, 0x2b, 0x2a, 0x3b, 0xff, 0x26, 0x22, 0x2e, 0xff, 0x16, 0x12, 0x1f, 0xff, 0x19, 0x18, 0x23, 0xff, 0x46, 0x48, 0x5a, 0xff, 0x42, 0x46, 0x5a, 0xff, 0x0b, 0x0d, 0x20, 0xff, 0x3a, 0x3e, 0x55, 0xff, 0x3c, 0x41, 0x58, 0xff, 0x4c, 0x55, 0x6a, 0xff, 0x61, 0x6c, 0x81, 0xe9, 0x71, 0x7d, 0x92, 0xc1, 0x72, 0x7e, 0x97, 0x8f, 0x6c, 0x78, 0x90, 0x55, 0x66, 0x7a, 0x8e, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_18_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x87, 0x96, 0x11, 0x81, 0x7d, 0x8f, 0x37, 0x7e, 0x7e, 0x8e, 0x5f, 0x7f, 0x7f, 0x8e, 0x86, 0x7d, 0x7c, 0x8d, 0xa8, 0x7e, 0x7e, 0x8c, 0xc0, 0x7c, 0x7c, 0x8c, 0xd3, 0x7b, 0x79, 0x89, 0xe6, 0x79, 0x78, 0x88, 0xee, 0x77, 0x76, 0x86, 0xf5, 0x75, 0x75, 0x84, 0xff, 0x73, 0x72, 0x82, 0xff, 0x72, 0x6e, 0x81, 0xf5, 0x6c, 0x6a, 0x7c, 0xee, 0x62, 0x66, 0x76, 0xe6, 0x5e, 0x60, 0x74, 0xd3, 0x5b, 0x5c, 0x72, 0xc0, 0x5c, 0x5b, 0x70, 0xa8, 0x5b, 0x5b, 0x6c, 0x86, 0x5b, 0x5b, 0x6b, 0x5f, 0x5c, 0x58, 0x6a, 0x37, 0x5a, 0x5a, 0x69, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_18 = { +const lv_image_dsc_t img_multilang_avatar_18 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_19.c b/demos/multilang/assets/avatars/img_multilang_avatar_19.c index 8fc52305c..bf25c1909 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_19.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_19.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_19 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_19 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_19 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_19 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_19 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_19 uint8_t img_multilang_avatar_19_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0f, 0x0f, 0x11, 0x09, 0x09, 0x09, 0x37, 0x12, 0x12, 0x12, 0x5e, 0x1c, 0x1c, 0x1c, 0x86, 0x16, 0x16, 0x16, 0xa8, 0x11, 0x11, 0x11, 0xbf, 0x06, 0x06, 0x06, 0xd2, 0x0a, 0x0a, 0x0a, 0xe5, 0x0d, 0x0d, 0x0d, 0xee, 0x0f, 0x0f, 0x0f, 0xf2, 0x15, 0x15, 0x15, 0xff, 0x1d, 0x1d, 0x1d, 0xff, 0x20, 0x20, 0x20, 0xf2, 0x26, 0x26, 0x26, 0xee, 0x2d, 0x2d, 0x2d, 0xe5, 0x3b, 0x3b, 0x3b, 0xd2, 0x39, 0x39, 0x39, 0xbf, 0x3f, 0x3f, 0x3f, 0xa8, 0x44, 0x44, 0x44, 0x86, 0x30, 0x30, 0x30, 0x5e, 0x29, 0x29, 0x29, 0x37, 0x2d, 0x2d, 0x2d, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x0a, 0x19, 0x09, 0x09, 0x09, 0x55, 0x11, 0x11, 0x11, 0x8f, 0x0b, 0x0b, 0x0b, 0xc1, 0x08, 0x08, 0x08, 0xe9, 0x06, 0x06, 0x06, 0xff, 0x0d, 0x0d, 0x0d, 0xff, 0x1d, 0x1d, 0x1d, 0xff, 0x16, 0x16, 0x16, 0xff, 0x0e, 0x0e, 0x0e, 0xff, 0x08, 0x08, 0x08, 0xff, 0x09, 0x09, 0x09, 0xff, 0x11, 0x11, 0x11, 0xff, 0x12, 0x12, 0x12, 0xff, 0x16, 0x16, 0x16, 0xff, 0x23, 0x23, 0x23, 0xff, 0x25, 0x25, 0x25, 0xff, 0x20, 0x20, 0x20, 0xff, 0x18, 0x18, 0x18, 0xff, 0x1b, 0x1b, 0x1b, 0xff, 0x31, 0x31, 0x31, 0xff, 0x3d, 0x3d, 0x3d, 0xff, 0x3d, 0x3d, 0x3d, 0xff, 0x3b, 0x3b, 0x3b, 0xff, 0x4b, 0x4b, 0x4b, 0xff, 0x2e, 0x2e, 0x2e, 0xff, 0x25, 0x25, 0x25, 0xff, 0x38, 0x38, 0x38, 0xe9, 0x23, 0x23, 0x23, 0xc1, 0x2c, 0x2c, 0x2c, 0x8f, 0x2a, 0x2a, 0x2a, 0x55, 0x3d, 0x3d, 0x3d, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_19_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x5a, 0x5a, 0x11, 0x66, 0x66, 0x66, 0x37, 0x66, 0x66, 0x66, 0x5f, 0x62, 0x62, 0x62, 0x86, 0x65, 0x65, 0x65, 0xa8, 0x64, 0x64, 0x64, 0xc0, 0x60, 0x60, 0x60, 0xd3, 0x60, 0x60, 0x60, 0xe6, 0x5f, 0x5f, 0x5f, 0xee, 0x5e, 0x5e, 0x5e, 0xf5, 0x60, 0x60, 0x60, 0xff, 0x61, 0x61, 0x61, 0xff, 0x5f, 0x5f, 0x5f, 0xf5, 0x60, 0x60, 0x60, 0xee, 0x5d, 0x5d, 0x5d, 0xe6, 0x5e, 0x5e, 0x5e, 0xd3, 0x5f, 0x5f, 0x5f, 0xc0, 0x5e, 0x5e, 0x5e, 0xa8, 0x5d, 0x5d, 0x5d, 0x86, 0x60, 0x60, 0x60, 0x5f, 0x61, 0x61, 0x61, 0x37, 0x69, 0x69, 0x69, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_19 = { +const lv_image_dsc_t img_multilang_avatar_19 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_2.c b/demos/multilang/assets/avatars/img_multilang_avatar_2.c index e12aee9e0..e9bc6b8e0 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_2.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_2.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_2 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_2 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_2 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_2 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_2 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_2 uint8_t img_multilang_avatar_2_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xd2, 0xf0, 0x11, 0xb9, 0xd5, 0xf1, 0x37, 0xb8, 0xd6, 0xee, 0x5e, 0xb8, 0xd5, 0xef, 0x86, 0xb7, 0xd6, 0xee, 0xa8, 0xb8, 0xd5, 0xee, 0xbf, 0xb8, 0xd5, 0xef, 0xd2, 0xb7, 0xd5, 0xef, 0xe5, 0xb8, 0xd6, 0xee, 0xee, 0xb6, 0xd3, 0xed, 0xf2, 0xb6, 0xd4, 0xed, 0xff, 0xb6, 0xd4, 0xed, 0xff, 0xb4, 0xd1, 0xea, 0xf2, 0xb2, 0xd2, 0xea, 0xee, 0xb2, 0xd1, 0xe9, 0xe5, 0xae, 0xce, 0xe6, 0xd2, 0xad, 0xcc, 0xe5, 0xbf, 0xae, 0xcc, 0xe6, 0xa8, 0xab, 0xcd, 0xe6, 0x86, 0xaa, 0xce, 0xe3, 0x5e, 0xab, 0xcc, 0xe3, 0x37, 0xa5, 0xd2, 0xe1, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xd6, 0xf4, 0x19, 0xc3, 0xdb, 0xf3, 0x55, 0xbe, 0xd9, 0xf0, 0x8f, 0xb7, 0xd7, 0xf0, 0xc1, 0xb8, 0xd6, 0xef, 0xe9, 0xb9, 0xd7, 0xf0, 0xff, 0xb8, 0xd6, 0xef, 0xff, 0xb7, 0xd5, 0xee, 0xff, 0xb7, 0xd5, 0xed, 0xff, 0xb7, 0xd5, 0xed, 0xff, 0xb7, 0xd5, 0xee, 0xff, 0xb7, 0xd5, 0xee, 0xff, 0xb7, 0xd5, 0xee, 0xff, 0xb7, 0xd5, 0xed, 0xff, 0xb6, 0xd4, 0xec, 0xff, 0xb4, 0xd2, 0xeb, 0xff, 0xb3, 0xd1, 0xea, 0xff, 0xb2, 0xcf, 0xe8, 0xff, 0xb0, 0xcf, 0xe8, 0xff, 0xaf, 0xcd, 0xe6, 0xff, 0xad, 0xcc, 0xe5, 0xff, 0xad, 0xcc, 0xe5, 0xff, 0xad, 0xcc, 0xe4, 0xff, 0xab, 0xcd, 0xe5, 0xff, 0xa9, 0xcb, 0xe2, 0xff, 0xa8, 0xca, 0xe2, 0xff, 0xa7, 0xc9, 0xe1, 0xff, 0xa6, 0xc8, 0xe0, 0xe9, 0xa6, 0xc7, 0xdf, 0xc1, 0xa4, 0xc4, 0xdb, 0x8f, 0x9c, 0xc3, 0xdb, 0x55, 0x99, 0xc1, 0xd6, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_2_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x2d, 0x2d, 0x11, 0x29, 0x29, 0x29, 0x37, 0x33, 0x33, 0x33, 0x5f, 0x20, 0x1e, 0x20, 0x86, 0x16, 0x15, 0x18, 0xa8, 0x29, 0x29, 0x2a, 0xc0, 0x18, 0x1b, 0x1b, 0xd3, 0x1f, 0x22, 0x24, 0xe6, 0x64, 0x5d, 0x5a, 0xee, 0x70, 0x62, 0x59, 0xf5, 0x57, 0x4d, 0x4a, 0xff, 0x52, 0x49, 0x4a, 0xff, 0x1a, 0x1e, 0x1f, 0xf5, 0x7a, 0x71, 0x6c, 0xee, 0x95, 0x88, 0x7e, 0xe6, 0x88, 0x78, 0x6b, 0xd3, 0xb0, 0x9f, 0x93, 0xc0, 0xbf, 0xb1, 0xa5, 0xa8, 0xa7, 0x98, 0x90, 0x86, 0x80, 0x73, 0x6b, 0x5f, 0xa6, 0x99, 0x8f, 0x37, 0xc3, 0xb4, 0xa5, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_2 = { +const lv_image_dsc_t img_multilang_avatar_2 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_22.c b/demos/multilang/assets/avatars/img_multilang_avatar_22.c index 6221a6d6f..30108f4b6 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_22.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_22.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_22 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_22 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_22 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_22 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_22 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_22 uint8_t img_multilang_avatar_22_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0xd2, 0x87, 0x11, 0xd9, 0xd0, 0x8f, 0x37, 0xd0, 0xcb, 0x8d, 0x5e, 0xc5, 0xc9, 0x90, 0x86, 0xce, 0xc8, 0x90, 0xa8, 0xde, 0xd8, 0x95, 0xbf, 0xe4, 0xea, 0xa5, 0xd2, 0xdd, 0xde, 0xa0, 0xe5, 0xd2, 0xc4, 0x81, 0xee, 0x8c, 0x6a, 0x11, 0xf2, 0xad, 0x93, 0x3e, 0xff, 0xea, 0xe6, 0xce, 0xff, 0xce, 0xd9, 0xd9, 0xf2, 0xd7, 0xde, 0xbc, 0xee, 0xd6, 0xc8, 0xac, 0xe5, 0xd5, 0xd2, 0xbb, 0xd2, 0xe0, 0xe5, 0xca, 0xbf, 0x65, 0x4b, 0x39, 0xa8, 0x13, 0x0b, 0x0b, 0x86, 0x30, 0x30, 0x23, 0x5e, 0x25, 0x29, 0x6f, 0x37, 0x2d, 0x2d, 0x96, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xc1, 0x7a, 0x19, 0xd8, 0xcf, 0x99, 0x55, 0xd2, 0xce, 0x95, 0x8f, 0xc7, 0xcb, 0x95, 0xc1, 0xcb, 0xcd, 0x9d, 0xe9, 0xa7, 0xa3, 0x5f, 0xff, 0xad, 0xa7, 0x59, 0xff, 0xd5, 0xd0, 0x80, 0xff, 0xdf, 0xdb, 0x8f, 0xff, 0xe5, 0xea, 0x91, 0xff, 0xbd, 0xc3, 0x7b, 0xff, 0x99, 0x9b, 0x74, 0xff, 0xc6, 0xc9, 0x95, 0xff, 0xff, 0xff, 0xbb, 0xff, 0x8f, 0x6d, 0x49, 0xff, 0x7d, 0x58, 0x1f, 0xff, 0xeb, 0xe0, 0x98, 0xff, 0xd9, 0xe1, 0xb9, 0xff, 0xd6, 0xde, 0xb1, 0xff, 0xd4, 0xd5, 0xa6, 0xff, 0xca, 0xd4, 0xb6, 0xff, 0xe1, 0xeb, 0xe4, 0xff, 0xbc, 0xba, 0xa6, 0xff, 0x2a, 0x2b, 0x19, 0xff, 0x30, 0x11, 0x15, 0xff, 0x65, 0x59, 0x8a, 0xff, 0x26, 0x45, 0xab, 0xff, 0x2b, 0x54, 0xb3, 0xe9, 0x40, 0x5c, 0xbc, 0xc1, 0x29, 0x4c, 0xab, 0x8f, 0x6f, 0xcf, 0xff, 0x55, 0x47, 0x7a, 0xcc, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_22_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x2d, 0x2d, 0x11, 0x29, 0x29, 0x29, 0x37, 0x28, 0x28, 0x28, 0x5f, 0x27, 0x27, 0x27, 0x86, 0x27, 0x28, 0x27, 0xa8, 0x27, 0x29, 0x26, 0xc0, 0x27, 0x27, 0x27, 0xd3, 0x26, 0x26, 0x27, 0xe6, 0x25, 0x25, 0x26, 0xee, 0x28, 0x27, 0x29, 0xf5, 0x2e, 0x2e, 0x30, 0xff, 0x33, 0x33, 0x34, 0xff, 0x28, 0x28, 0x26, 0xf5, 0x29, 0x29, 0x28, 0xee, 0x26, 0x26, 0x27, 0xe6, 0x25, 0x25, 0x27, 0xd3, 0x27, 0x27, 0x29, 0xc0, 0x27, 0x27, 0x27, 0xa8, 0x27, 0x27, 0x27, 0x86, 0x28, 0x28, 0x28, 0x5f, 0x29, 0x29, 0x29, 0x37, 0x2d, 0x2d, 0x2d, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_22 = { +const lv_image_dsc_t img_multilang_avatar_22 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_25.c b/demos/multilang/assets/avatars/img_multilang_avatar_25.c index 25e407019..61b33c52f 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_25.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_25.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_25 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_25 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_25 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_25 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_25 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_25 uint8_t img_multilang_avatar_25_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x69, 0x69, 0x11, 0x58, 0x66, 0x66, 0x37, 0x59, 0x69, 0x64, 0x5e, 0x5d, 0x6a, 0x66, 0x86, 0x5c, 0x68, 0x67, 0xa8, 0x5a, 0x69, 0x66, 0xbf, 0x5b, 0x69, 0x68, 0xd2, 0x5b, 0x6c, 0x68, 0xe5, 0x5c, 0x6d, 0x6a, 0xee, 0x5a, 0x6c, 0x6a, 0xf2, 0x5b, 0x6e, 0x6b, 0xff, 0x5d, 0x6e, 0x6b, 0xff, 0x5b, 0x6c, 0x6a, 0xf2, 0x5c, 0x6b, 0x69, 0xee, 0x5d, 0x6c, 0x69, 0xe5, 0x5e, 0x6d, 0x6a, 0xd2, 0x60, 0x6d, 0x6c, 0xbf, 0x61, 0x6d, 0x6b, 0xa8, 0x64, 0x6e, 0x6e, 0x86, 0x67, 0x6f, 0x6f, 0x5e, 0x66, 0x6f, 0x6f, 0x37, 0x69, 0x69, 0x69, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x66, 0x66, 0x19, 0x5a, 0x63, 0x60, 0x55, 0x57, 0x63, 0x60, 0x8f, 0x58, 0x65, 0x61, 0xc1, 0x58, 0x66, 0x62, 0xe9, 0x59, 0x67, 0x63, 0xff, 0x58, 0x67, 0x63, 0xff, 0x5a, 0x69, 0x64, 0xff, 0x5c, 0x69, 0x67, 0xff, 0x5c, 0x69, 0x67, 0xff, 0x5b, 0x69, 0x67, 0xff, 0x5c, 0x6a, 0x68, 0xff, 0x5c, 0x6c, 0x6a, 0xff, 0x5c, 0x6e, 0x6b, 0xff, 0x5c, 0x6e, 0x6a, 0xff, 0x5b, 0x6d, 0x6a, 0xff, 0x5c, 0x6d, 0x69, 0xff, 0x5b, 0x6a, 0x68, 0xff, 0x5b, 0x69, 0x67, 0xff, 0x5c, 0x6a, 0x68, 0xff, 0x5d, 0x6a, 0x68, 0xff, 0x5e, 0x6c, 0x6a, 0xff, 0x60, 0x6d, 0x6b, 0xff, 0x62, 0x6e, 0x6d, 0xff, 0x64, 0x6d, 0x6e, 0xff, 0x67, 0x6f, 0x6f, 0xff, 0x62, 0x6b, 0x6b, 0xff, 0x5e, 0x6a, 0x6a, 0xe9, 0x5c, 0x6e, 0x6c, 0xc1, 0x59, 0x73, 0x70, 0x8f, 0x57, 0x7b, 0x75, 0x55, 0x5b, 0x84, 0x7a, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_25_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0xa5, 0xb4, 0x11, 0xa6, 0xab, 0xb0, 0x37, 0xa3, 0xa9, 0xab, 0x5f, 0xad, 0xaf, 0xb2, 0x86, 0xb1, 0xb1, 0xb6, 0xa8, 0xb1, 0xb3, 0xb8, 0xc0, 0xb0, 0xb5, 0xba, 0xd3, 0xa6, 0xa8, 0xb0, 0xe6, 0xa2, 0xa6, 0xae, 0xee, 0xa6, 0xa9, 0xaf, 0xf5, 0xa2, 0xa6, 0xaa, 0xff, 0xa5, 0xa8, 0xad, 0xff, 0xa4, 0xa6, 0xab, 0xf5, 0xa3, 0xa7, 0xab, 0xee, 0xa9, 0xac, 0xb1, 0xe6, 0xa7, 0xaa, 0xb1, 0xd3, 0xa4, 0xa6, 0xb0, 0xc0, 0xa5, 0xa6, 0xae, 0xa8, 0xa3, 0xa5, 0xad, 0x86, 0xa6, 0xa9, 0xb1, 0x5f, 0xab, 0xab, 0xb4, 0x37, 0xa5, 0xa5, 0xa5, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_25 = { +const lv_image_dsc_t img_multilang_avatar_25 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_3.c b/demos/multilang/assets/avatars/img_multilang_avatar_3.c index e9846eb3f..37e08f80f 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_3.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_3.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_3 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_3 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_3 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_3 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_3 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_3 uint8_t img_multilang_avatar_3_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xd2, 0xff, 0x11, 0xc7, 0xcc, 0xf5, 0x37, 0xce, 0xd3, 0xf9, 0x5e, 0xcf, 0xd7, 0xfb, 0x86, 0xce, 0xd6, 0xfa, 0xa8, 0xcd, 0xd5, 0xf9, 0xbf, 0xca, 0xd3, 0xf7, 0xd2, 0xce, 0xd4, 0xf9, 0xe5, 0xcb, 0xd4, 0xf7, 0xee, 0xc8, 0xcf, 0xf1, 0xf2, 0xc3, 0xcc, 0xee, 0xff, 0xbe, 0xc8, 0xec, 0xff, 0xc2, 0xcc, 0xf0, 0xf2, 0xc4, 0xcd, 0xf2, 0xee, 0xc3, 0xce, 0xf0, 0xe5, 0xc4, 0xce, 0xf2, 0xd2, 0xc6, 0xd0, 0xf4, 0xbf, 0xcb, 0xd4, 0xf8, 0xa8, 0xc9, 0xd3, 0xf7, 0x86, 0xcb, 0xd6, 0xf9, 0x5e, 0xd0, 0xd9, 0xfa, 0x37, 0xd2, 0xe1, 0xff, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xd6, 0xff, 0x19, 0xd2, 0xd8, 0xff, 0x55, 0xce, 0xd5, 0xfb, 0x8f, 0xce, 0xd6, 0xfb, 0xc1, 0xce, 0xd6, 0xfb, 0xe9, 0xd0, 0xd7, 0xfd, 0xff, 0xd1, 0xd5, 0xfd, 0xff, 0xd1, 0xd5, 0xfc, 0xff, 0xd4, 0xd9, 0xff, 0xff, 0xd1, 0xd6, 0xfb, 0xff, 0xd2, 0xd7, 0xfb, 0xff, 0xd3, 0xd9, 0xfa, 0xff, 0xd3, 0xd9, 0xf8, 0xff, 0xd2, 0xda, 0xf8, 0xff, 0xd3, 0xda, 0xf7, 0xff, 0xd4, 0xdc, 0xfb, 0xff, 0xcb, 0xd4, 0xf7, 0xff, 0xcb, 0xd5, 0xf6, 0xff, 0xce, 0xd7, 0xf9, 0xff, 0xcb, 0xd4, 0xf6, 0xff, 0xcb, 0xd5, 0xf6, 0xff, 0xcb, 0xd4, 0xf6, 0xff, 0xd0, 0xd9, 0xfb, 0xff, 0xd2, 0xdc, 0xfd, 0xff, 0xd2, 0xdb, 0xfd, 0xff, 0xd3, 0xda, 0xfa, 0xff, 0xd2, 0xd9, 0xf9, 0xff, 0xcf, 0xd7, 0xf9, 0xe9, 0xcc, 0xd7, 0xf8, 0xc1, 0xcd, 0xd7, 0xf9, 0x8f, 0xcf, 0xd8, 0xf9, 0x55, 0xcc, 0xd6, 0xf4, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_3_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x87, 0xb4, 0x11, 0x86, 0x8f, 0xb0, 0x37, 0x68, 0x73, 0x8e, 0x5f, 0x6c, 0x74, 0x8c, 0x86, 0x4d, 0x51, 0x68, 0xa8, 0x32, 0x33, 0x47, 0xc0, 0x37, 0x37, 0x48, 0xd3, 0x37, 0x37, 0x48, 0xe6, 0x5b, 0x5c, 0x6d, 0xee, 0x48, 0x48, 0x59, 0xf5, 0x26, 0x28, 0x3a, 0xff, 0x2b, 0x2e, 0x42, 0xff, 0x49, 0x4d, 0x62, 0xf5, 0x2b, 0x2b, 0x44, 0xee, 0x64, 0x64, 0x7f, 0xe6, 0x74, 0x74, 0x91, 0xd3, 0x67, 0x67, 0x83, 0xc0, 0x68, 0x68, 0x82, 0xa8, 0x5b, 0x5d, 0x74, 0x86, 0x4b, 0x4d, 0x63, 0x5f, 0x2e, 0x33, 0x4a, 0x37, 0x4b, 0x4b, 0x69, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_3 = { +const lv_image_dsc_t img_multilang_avatar_3 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_4.c b/demos/multilang/assets/avatars/img_multilang_avatar_4.c index e583b782f..738a2225d 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_4.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_4.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_4 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_4 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_4 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_4 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_4 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_4 uint8_t img_multilang_avatar_4_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x3c, 0x4b, 0x11, 0x29, 0x37, 0x45, 0x37, 0x25, 0x30, 0x41, 0x5e, 0x1e, 0x2b, 0x39, 0x86, 0x1f, 0x2d, 0x3b, 0xa8, 0x21, 0x30, 0x3e, 0xbf, 0x1b, 0x2b, 0x3c, 0xd2, 0x1e, 0x2d, 0x3e, 0xe5, 0x1b, 0x2b, 0x3c, 0xee, 0x26, 0x35, 0x45, 0xf2, 0x32, 0x42, 0x52, 0xff, 0x40, 0x50, 0x60, 0xff, 0x4a, 0x5b, 0x6b, 0xf2, 0x4c, 0x5c, 0x6d, 0xee, 0x41, 0x51, 0x61, 0xe5, 0x42, 0x51, 0x63, 0xd2, 0x35, 0x44, 0x55, 0xbf, 0x24, 0x35, 0x45, 0xa8, 0x2d, 0x40, 0x4f, 0x86, 0x49, 0x5c, 0x6c, 0x5e, 0x5c, 0x73, 0x81, 0x37, 0x5a, 0x69, 0x78, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x1e, 0x33, 0x19, 0x12, 0x21, 0x2d, 0x55, 0x1c, 0x27, 0x35, 0x8f, 0x22, 0x2b, 0x38, 0xc1, 0x27, 0x33, 0x40, 0xe9, 0x26, 0x33, 0x41, 0xff, 0x2a, 0x37, 0x44, 0xff, 0x2c, 0x3a, 0x47, 0xff, 0x2f, 0x3c, 0x49, 0xff, 0x2f, 0x3d, 0x49, 0xff, 0x30, 0x3c, 0x4c, 0xff, 0x35, 0x42, 0x53, 0xff, 0x39, 0x47, 0x57, 0xff, 0x32, 0x41, 0x51, 0xff, 0x30, 0x42, 0x51, 0xff, 0x2a, 0x3f, 0x4e, 0xff, 0x29, 0x3d, 0x4c, 0xff, 0x2d, 0x3e, 0x4d, 0xff, 0x2d, 0x3e, 0x4d, 0xff, 0x3e, 0x4f, 0x5f, 0xff, 0x47, 0x58, 0x69, 0xff, 0x49, 0x5a, 0x6b, 0xff, 0x54, 0x66, 0x77, 0xff, 0x39, 0x4b, 0x5c, 0xff, 0x17, 0x2b, 0x3c, 0xff, 0x1f, 0x33, 0x44, 0xff, 0x46, 0x5d, 0x6d, 0xff, 0x55, 0x6d, 0x7b, 0xe9, 0x54, 0x6b, 0x7a, 0xc1, 0x4c, 0x63, 0x72, 0x8f, 0x45, 0x5d, 0x6c, 0x55, 0x33, 0x47, 0x5b, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_4_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0xd2, 0xd2, 0x11, 0xd0, 0xcc, 0xcc, 0x37, 0xd6, 0xd1, 0xd1, 0x5f, 0xd8, 0xd5, 0xd3, 0x86, 0xdc, 0xd7, 0xd7, 0xa8, 0xd9, 0xd5, 0xd4, 0xc0, 0xd8, 0xd3, 0xd2, 0xd3, 0xd2, 0xcf, 0xce, 0xe6, 0xd5, 0xd0, 0xcf, 0xee, 0xd8, 0xd5, 0xd4, 0xf5, 0xd8, 0xd3, 0xd2, 0xff, 0xd7, 0xd3, 0xd2, 0xff, 0xd5, 0xd1, 0xd0, 0xf5, 0xd4, 0xcf, 0xce, 0xee, 0xd5, 0xd1, 0xd1, 0xe6, 0xd3, 0xce, 0xcd, 0xd3, 0xd3, 0xcf, 0xcd, 0xc0, 0xd2, 0xce, 0xcc, 0xa8, 0xd3, 0xcd, 0xcb, 0x86, 0xc6, 0xc1, 0xc3, 0x5f, 0xc2, 0xbe, 0xbe, 0x37, 0xc3, 0xc3, 0xc3, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_4 = { +const lv_image_dsc_t img_multilang_avatar_4 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_5.c b/demos/multilang/assets/avatars/img_multilang_avatar_5.c index c52346f99..b5685cb5f 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_5.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_5.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_5 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_5 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_5 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_5 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_5 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_5 uint8_t img_multilang_avatar_5_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x1e, 0x1e, 0x11, 0x33, 0x25, 0x29, 0x37, 0x3b, 0x30, 0x33, 0x5e, 0x40, 0x37, 0x37, 0x86, 0x3b, 0x2f, 0x2d, 0xa8, 0x2c, 0x20, 0x1d, 0xbf, 0x31, 0x26, 0x22, 0xd2, 0x23, 0x18, 0x14, 0xe5, 0x36, 0x28, 0x26, 0xee, 0x4a, 0x3b, 0x3d, 0xf2, 0x61, 0x4f, 0x4f, 0xff, 0x5f, 0x4d, 0x4b, 0xff, 0x65, 0x54, 0x51, 0xf2, 0x4d, 0x3c, 0x38, 0xee, 0x30, 0x20, 0x1c, 0xe5, 0x46, 0x34, 0x33, 0xd2, 0x50, 0x3d, 0x3d, 0xbf, 0x5f, 0x4a, 0x4d, 0xa8, 0x77, 0x62, 0x64, 0x86, 0x8f, 0x7f, 0x82, 0x5e, 0x6a, 0x58, 0x61, 0x37, 0x78, 0x69, 0x69, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x51, 0x51, 0x19, 0x48, 0x39, 0x36, 0x55, 0x2e, 0x20, 0x1e, 0x8f, 0x3b, 0x2f, 0x2e, 0xc1, 0x3c, 0x31, 0x2f, 0xe9, 0x2d, 0x22, 0x20, 0xff, 0x4c, 0x40, 0x3e, 0xff, 0x37, 0x2b, 0x2c, 0xff, 0x26, 0x19, 0x1b, 0xff, 0x2d, 0x21, 0x1e, 0xff, 0x3a, 0x2f, 0x2c, 0xff, 0x2f, 0x24, 0x1f, 0xff, 0x2a, 0x1e, 0x19, 0xff, 0x32, 0x24, 0x22, 0xff, 0x44, 0x33, 0x35, 0xff, 0x56, 0x44, 0x45, 0xff, 0x5e, 0x4c, 0x4b, 0xff, 0x66, 0x55, 0x52, 0xff, 0x49, 0x38, 0x34, 0xff, 0x2b, 0x1b, 0x18, 0xff, 0x59, 0x46, 0x45, 0xff, 0x79, 0x67, 0x67, 0xff, 0x82, 0x70, 0x71, 0xff, 0x91, 0x7d, 0x80, 0xff, 0x7f, 0x71, 0x74, 0xff, 0x5a, 0x4c, 0x50, 0xff, 0x86, 0x74, 0x76, 0xff, 0x8e, 0x78, 0x77, 0xe9, 0x75, 0x5f, 0x5c, 0xc1, 0x7e, 0x6e, 0x6a, 0x8f, 0x69, 0x5d, 0x5d, 0x55, 0x47, 0x3d, 0x3d, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_5_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x87, 0x69, 0x11, 0xb0, 0x81, 0x61, 0x37, 0xae, 0x80, 0x63, 0x5f, 0xad, 0x81, 0x62, 0x86, 0xa8, 0x77, 0x59, 0xa8, 0xb5, 0x84, 0x64, 0xc0, 0x9f, 0x71, 0x58, 0xd3, 0x85, 0x56, 0x41, 0xe6, 0x7d, 0x4f, 0x38, 0xee, 0x88, 0x59, 0x43, 0xf5, 0xa1, 0x73, 0x5e, 0xff, 0xa0, 0x72, 0x5c, 0xff, 0x96, 0x69, 0x52, 0xf5, 0xab, 0x7f, 0x65, 0xee, 0xa8, 0x7f, 0x62, 0xe6, 0xa9, 0x7d, 0x64, 0xd3, 0xa7, 0x7e, 0x60, 0xc0, 0x9f, 0x77, 0x56, 0xa8, 0x94, 0x6a, 0x4c, 0x86, 0xa1, 0x78, 0x5d, 0x5f, 0x8b, 0x5c, 0x45, 0x37, 0x78, 0x5a, 0x3c, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_5 = { +const lv_image_dsc_t img_multilang_avatar_5 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_6.c b/demos/multilang/assets/avatars/img_multilang_avatar_6.c index a2eace074..4a88e5baf 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_6.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_6.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_6 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_6 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_6 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_6 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_6 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_6 uint8_t img_multilang_avatar_6_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0f, 0x2d, 0x11, 0x1b, 0x1b, 0x33, 0x37, 0x1b, 0x23, 0x36, 0x5e, 0x0d, 0x1c, 0x2f, 0x86, 0x13, 0x2d, 0x4d, 0xa8, 0x29, 0x51, 0x71, 0xbf, 0x41, 0x74, 0x95, 0xd2, 0x64, 0x9a, 0xbb, 0xe5, 0x8b, 0xb4, 0xd4, 0xee, 0x8e, 0xad, 0xcd, 0xf2, 0x60, 0x7d, 0x9d, 0xff, 0x2b, 0x49, 0x67, 0xff, 0x44, 0x64, 0x83, 0xf2, 0x8e, 0xb0, 0xd3, 0xee, 0x48, 0x66, 0x82, 0xe5, 0x08, 0x19, 0x2f, 0xd2, 0x11, 0x20, 0x35, 0xbf, 0x15, 0x21, 0x2a, 0xa8, 0x24, 0x31, 0x31, 0x86, 0x12, 0x1d, 0x25, 0x5e, 0x1b, 0x25, 0x3c, 0x37, 0x2d, 0x2d, 0x4b, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x70, 0x99, 0x19, 0x5a, 0x72, 0xa5, 0x55, 0x29, 0x3c, 0x65, 0x8f, 0x02, 0x0a, 0x21, 0xc1, 0x10, 0x0e, 0x0f, 0xe9, 0x12, 0x13, 0x04, 0xff, 0x0b, 0x0c, 0x04, 0xff, 0x00, 0x00, 0x06, 0xff, 0x27, 0x34, 0x57, 0xff, 0x5b, 0x7e, 0xaa, 0xff, 0x57, 0x82, 0xa7, 0xff, 0x5d, 0x88, 0xa8, 0xff, 0x4d, 0x72, 0x90, 0xff, 0x32, 0x4c, 0x67, 0xff, 0x41, 0x5a, 0x79, 0xff, 0x40, 0x53, 0x70, 0xff, 0x37, 0x49, 0x60, 0xff, 0x0d, 0x26, 0x41, 0xff, 0x2d, 0x48, 0x6b, 0xff, 0x18, 0x2e, 0x53, 0xff, 0x3e, 0x4a, 0x69, 0xff, 0x46, 0x4f, 0x6a, 0xff, 0x16, 0x1d, 0x32, 0xff, 0x1b, 0x23, 0x34, 0xff, 0x14, 0x1d, 0x2f, 0xff, 0x2e, 0x37, 0x54, 0xff, 0x27, 0x2e, 0x4f, 0xff, 0x14, 0x18, 0x33, 0xe9, 0x24, 0x26, 0x40, 0xc1, 0x25, 0x29, 0x43, 0x8f, 0x2a, 0x2d, 0x48, 0x55, 0x28, 0x33, 0x51, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_6_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0xd2, 0x11, 0xb4, 0xb9, 0xc2, 0x37, 0xb9, 0xbe, 0xcc, 0x5f, 0xad, 0xb2, 0xc5, 0x86, 0xa2, 0xa0, 0xb4, 0xa8, 0xb8, 0xbb, 0xcc, 0xc0, 0xc1, 0xc4, 0xd3, 0xd3, 0xce, 0xd1, 0xde, 0xe6, 0xc9, 0xcb, 0xd9, 0xee, 0xc8, 0xcc, 0xdc, 0xf5, 0xcb, 0xcc, 0xe0, 0xff, 0xba, 0xbe, 0xcc, 0xff, 0xc6, 0xce, 0xd6, 0xf5, 0xd4, 0xd9, 0xe3, 0xee, 0xc8, 0xca, 0xd4, 0xe6, 0xc3, 0xc3, 0xcf, 0xd3, 0xcb, 0xcc, 0xd8, 0xc0, 0xd1, 0xd4, 0xe0, 0xa8, 0xcd, 0xd5, 0xde, 0x86, 0xd1, 0xd9, 0xe1, 0x5f, 0xcc, 0xd5, 0xde, 0x37, 0xd2, 0xd2, 0xe1, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_6 = { +const lv_image_dsc_t img_multilang_avatar_6 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_7.c b/demos/multilang/assets/avatars/img_multilang_avatar_7.c index 901b86890..6f9c38a05 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_7.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_7.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_7 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_7 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_7 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_7 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_7 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_7 uint8_t img_multilang_avatar_7_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x5a, 0x4b, 0x11, 0x4e, 0x5c, 0x53, 0x37, 0x33, 0x43, 0x38, 0x5e, 0x37, 0x4a, 0x3c, 0x86, 0x45, 0x59, 0x4a, 0xa8, 0x31, 0x44, 0x36, 0xbf, 0x5b, 0x6d, 0x5d, 0xd2, 0x3d, 0x47, 0x35, 0xe5, 0x0d, 0x16, 0x08, 0xee, 0x04, 0x09, 0x03, 0xf2, 0x01, 0x03, 0x01, 0xff, 0x02, 0x02, 0x02, 0xff, 0x02, 0x00, 0x00, 0xf2, 0x04, 0x00, 0x00, 0xee, 0x08, 0x04, 0x04, 0xe5, 0x29, 0x2c, 0x24, 0xd2, 0x21, 0x24, 0x1c, 0xbf, 0x0f, 0x10, 0x0a, 0xa8, 0x07, 0x09, 0x05, 0x86, 0x10, 0x12, 0x10, 0x5e, 0x09, 0x09, 0x04, 0x37, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3d, 0x33, 0x19, 0x09, 0x0f, 0x09, 0x55, 0x30, 0x37, 0x2e, 0x8f, 0x32, 0x3b, 0x30, 0xc1, 0x23, 0x2c, 0x24, 0xe9, 0x17, 0x25, 0x18, 0xff, 0x1b, 0x24, 0x1b, 0xff, 0x21, 0x2d, 0x22, 0xff, 0x33, 0x40, 0x35, 0xff, 0x33, 0x3f, 0x34, 0xff, 0x25, 0x30, 0x27, 0xff, 0x1e, 0x2a, 0x1e, 0xff, 0x1f, 0x25, 0x1b, 0xff, 0x08, 0x0d, 0x06, 0xff, 0x00, 0x01, 0x01, 0xff, 0x00, 0x02, 0x02, 0xff, 0x03, 0x02, 0x02, 0xff, 0x04, 0x02, 0x02, 0xff, 0x05, 0x00, 0x01, 0xff, 0x05, 0x03, 0x02, 0xff, 0x14, 0x15, 0x13, 0xff, 0x0d, 0x0e, 0x0c, 0xff, 0x0c, 0x0d, 0x0b, 0xff, 0x04, 0x05, 0x04, 0xff, 0x05, 0x06, 0x04, 0xff, 0x03, 0x03, 0x02, 0xff, 0x00, 0x00, 0x00, 0xff, 0x1b, 0x1d, 0x1a, 0xe9, 0x1a, 0x1f, 0x19, 0xc1, 0x00, 0x01, 0x00, 0x8f, 0x06, 0x0c, 0x06, 0x55, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_7_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0f, 0x00, 0x11, 0x12, 0x0d, 0x04, 0x37, 0x15, 0x10, 0x08, 0x5f, 0x11, 0x0b, 0x05, 0x86, 0x12, 0x0c, 0x04, 0xa8, 0x12, 0x0d, 0x06, 0xc0, 0x12, 0x0d, 0x06, 0xd3, 0x15, 0x0f, 0x05, 0xe6, 0x13, 0x0d, 0x05, 0xee, 0x12, 0x0e, 0x05, 0xf5, 0x13, 0x0e, 0x05, 0xff, 0x12, 0x0d, 0x04, 0xff, 0x13, 0x0d, 0x06, 0xf5, 0x16, 0x12, 0x08, 0xee, 0x13, 0x0e, 0x05, 0xe6, 0x14, 0x0e, 0x07, 0xd3, 0x12, 0x0d, 0x06, 0xc0, 0x13, 0x0d, 0x06, 0xa8, 0x14, 0x0f, 0x07, 0x86, 0x18, 0x12, 0x08, 0x5f, 0x17, 0x17, 0x09, 0x37, 0x1e, 0x0f, 0x0f, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_7 = { +const lv_image_dsc_t img_multilang_avatar_7 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_8.c b/demos/multilang/assets/avatars/img_multilang_avatar_8.c index 66cce17d4..eb0ac43b4 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_8.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_8.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_8 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_8 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_8 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_8 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_8 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_8 uint8_t img_multilang_avatar_8_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0xc3, 0x11, 0xc2, 0xc2, 0xc7, 0x37, 0xc6, 0xc6, 0xc8, 0x5e, 0xc5, 0xc7, 0xc7, 0x86, 0xc5, 0xc6, 0xc8, 0xa8, 0xc4, 0xc5, 0xc6, 0xbf, 0xc4, 0xc7, 0xc8, 0xd2, 0xc6, 0xc8, 0xc9, 0xe5, 0xc6, 0xc8, 0xc9, 0xee, 0xc1, 0xc3, 0xc5, 0xf2, 0xbb, 0xbd, 0xbe, 0xff, 0xb3, 0xb5, 0xb5, 0xff, 0xa9, 0xab, 0xab, 0xf2, 0x9d, 0x9f, 0x9f, 0xee, 0x8f, 0x91, 0x91, 0xe5, 0x7f, 0x80, 0x80, 0xd2, 0x71, 0x74, 0x71, 0xbf, 0x5f, 0x62, 0x5e, 0xa8, 0x53, 0x53, 0x51, 0x86, 0x54, 0x54, 0x4e, 0x5e, 0x53, 0x58, 0x4e, 0x37, 0x5a, 0x5a, 0x4b, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xc1, 0xc1, 0x19, 0xbd, 0xc3, 0xc3, 0x55, 0xbd, 0xc0, 0xc2, 0x8f, 0xbc, 0xc0, 0xc2, 0xc1, 0xbe, 0xc1, 0xc2, 0xe9, 0xbf, 0xc3, 0xc4, 0xff, 0xc2, 0xc6, 0xc7, 0xff, 0xc6, 0xc8, 0xc9, 0xff, 0xc6, 0xc8, 0xc9, 0xff, 0xc6, 0xc8, 0xc9, 0xff, 0xc5, 0xc7, 0xc8, 0xff, 0xc6, 0xc8, 0xc9, 0xff, 0xc8, 0xca, 0xcb, 0xff, 0xc6, 0xc8, 0xc9, 0xff, 0xc2, 0xc4, 0xc5, 0xff, 0xbb, 0xbd, 0xbe, 0xff, 0xb3, 0xb5, 0xb5, 0xff, 0xaa, 0xac, 0xac, 0xff, 0x9e, 0xa0, 0xa0, 0xff, 0x90, 0x92, 0x92, 0xff, 0x7f, 0x81, 0x81, 0xff, 0x71, 0x74, 0x71, 0xff, 0x60, 0x63, 0x5e, 0xff, 0x53, 0x54, 0x52, 0xff, 0x55, 0x56, 0x52, 0xff, 0x54, 0x57, 0x4e, 0xff, 0x59, 0x5c, 0x52, 0xff, 0x57, 0x5a, 0x52, 0xe9, 0x54, 0x58, 0x4f, 0xc1, 0x55, 0x57, 0x4e, 0x8f, 0x57, 0x5a, 0x51, 0x55, 0x5b, 0x5b, 0x51, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_8_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0xd2, 0xd2, 0x11, 0xde, 0xd0, 0xcc, 0x37, 0xde, 0xce, 0xcc, 0x5f, 0xdc, 0xc9, 0xc9, 0x86, 0xd7, 0xc5, 0xc5, 0xa8, 0xd3, 0xc0, 0xc0, 0xc0, 0xcc, 0xbb, 0xb8, 0xd3, 0xc6, 0xb5, 0xb3, 0xe6, 0xc6, 0xb2, 0xb0, 0xee, 0xc8, 0xb4, 0xb3, 0xf5, 0xc9, 0xb5, 0xb4, 0xff, 0xc7, 0xb3, 0xb2, 0xff, 0xc6, 0xb3, 0xb1, 0xf5, 0xc7, 0xb2, 0xb1, 0xee, 0xc6, 0xb2, 0xb2, 0xe6, 0xc8, 0xb5, 0xb4, 0xd3, 0xc7, 0xb3, 0xb1, 0xc0, 0xbf, 0xab, 0xaa, 0xa8, 0xc5, 0xaf, 0xaf, 0x86, 0xc3, 0xae, 0xae, 0x5f, 0xbe, 0xa6, 0xa6, 0x37, 0xc3, 0xa5, 0xa5, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_8 = { +const lv_image_dsc_t img_multilang_avatar_8 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_9.c b/demos/multilang/assets/avatars/img_multilang_avatar_9.c index 1d9d605bd..0996004df 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_9.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_9.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_9 - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_9 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_9 + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_9 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_AVATAR_9 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_AVATAR_9 uint8_t img_multilang_avatar_9_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x87, 0x4b, 0x11, 0xa6, 0x8b, 0x53, 0x37, 0xa5, 0x8a, 0x51, 0x5e, 0xa5, 0x8a, 0x51, 0x86, 0xa5, 0x8a, 0x50, 0xa8, 0xa5, 0x89, 0x51, 0xbf, 0xa5, 0x8a, 0x51, 0xd2, 0xa4, 0x8a, 0x51, 0xe5, 0xa5, 0x8a, 0x51, 0xee, 0xa5, 0x8a, 0x51, 0xf2, 0xa5, 0x8a, 0x51, 0xff, 0xa5, 0x8a, 0x51, 0xff, 0xa5, 0x8a, 0x51, 0xf2, 0xa7, 0x8c, 0x52, 0xee, 0xa7, 0x8c, 0x53, 0xe5, 0xa7, 0x8b, 0x52, 0xd2, 0xa6, 0x8c, 0x52, 0xbf, 0xa6, 0x8b, 0x53, 0xa8, 0xa7, 0x8c, 0x53, 0x86, 0xa8, 0x8d, 0x54, 0x5e, 0xa6, 0x8b, 0x53, 0x37, 0xa5, 0x87, 0x5a, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa3, 0x8e, 0x51, 0x19, 0xa8, 0x8d, 0x54, 0x55, 0xa5, 0x89, 0x50, 0x8f, 0xa5, 0x89, 0x50, 0xc1, 0xa5, 0x89, 0x50, 0xe9, 0xa6, 0x8b, 0x52, 0xff, 0xa7, 0x8c, 0x53, 0xff, 0xa6, 0x8b, 0x52, 0xff, 0xa6, 0x8b, 0x52, 0xff, 0xa6, 0x8b, 0x52, 0xff, 0xa6, 0x8b, 0x52, 0xff, 0xa6, 0x8b, 0x52, 0xff, 0xa6, 0x8b, 0x52, 0xff, 0xa6, 0x8b, 0x52, 0xff, 0xa6, 0x8b, 0x52, 0xff, 0xa6, 0x8b, 0x52, 0xff, 0xa6, 0x8b, 0x52, 0xff, 0xa7, 0x8c, 0x53, 0xff, 0xa7, 0x8c, 0x53, 0xff, 0xa8, 0x8d, 0x54, 0xff, 0xa8, 0x8d, 0x54, 0xff, 0xa8, 0x8d, 0x54, 0xff, 0xa8, 0x8d, 0x54, 0xff, 0xa8, 0x8d, 0x54, 0xff, 0xa8, 0x8d, 0x54, 0xff, 0xa8, 0x8d, 0x54, 0xff, 0xa8, 0x8d, 0x54, 0xff, 0xa8, 0x8d, 0x54, 0xe9, 0xa7, 0x8d, 0x54, 0xc1, 0xa7, 0x8c, 0x53, 0x8f, 0xa8, 0x8d, 0x54, 0x55, 0xa3, 0x8e, 0x51, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -154,7 +154,7 @@ img_multilang_avatar_9_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0x11, 0xf1, 0xf1, 0xf5, 0x37, 0xf1, 0xf4, 0xf6, 0x5f, 0xf1, 0xf3, 0xf7, 0x86, 0xf1, 0xf2, 0xf7, 0xa8, 0xf1, 0xf4, 0xf4, 0xc0, 0xf2, 0xf5, 0xf5, 0xd3, 0xf3, 0xf6, 0xf7, 0xe6, 0xf4, 0xf6, 0xf7, 0xee, 0xf3, 0xf5, 0xf6, 0xf5, 0xf4, 0xf6, 0xf7, 0xff, 0xf4, 0xf6, 0xf7, 0xff, 0xf3, 0xf5, 0xf6, 0xf5, 0xf4, 0xf6, 0xf7, 0xee, 0xf3, 0xf6, 0xf7, 0xe6, 0xf4, 0xf6, 0xf6, 0xd3, 0xf1, 0xf4, 0xf4, 0xc0, 0xf1, 0xf4, 0xf4, 0xa8, 0xf3, 0xf5, 0xf5, 0x86, 0xf4, 0xf4, 0xf6, 0x5f, 0xf1, 0xf5, 0xf5, 0x37, 0xf0, 0xf0, 0xf0, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_avatar_9 = { +const lv_image_dsc_t img_multilang_avatar_9 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 128, diff --git a/demos/multilang/assets/emojis/img_emoji_artist_palette.c b/demos/multilang/assets/emojis/img_emoji_artist_palette.c index 5b8593c67..4cac46197 100644 --- a/demos/multilang/assets/emojis/img_emoji_artist_palette.c +++ b/demos/multilang/assets/emojis/img_emoji_artist_palette.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_ARTIST_PALETTE - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_ARTIST_PALETTE +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_ARTIST_PALETTE + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_ARTIST_PALETTE #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_ARTIST_PALETTE uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_ARTIST_PALETTE uint8_t img_emoji_artist_palette_map[] = { 0xfe, 0xfa, 0xff, 0xff, 0xf0, 0xf4, 0xf9, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xf0, 0xfa, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xfc, 0xf3, 0xe9, 0xff, 0xef, 0xff, 0xed, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xe4, 0xf7, 0xfc, 0xff, 0xcd, 0xe6, 0xf0, 0xff, 0xcb, 0xe5, 0xf3, 0xff, 0xe6, 0xf6, 0xff, 0xff, 0xfb, 0xfa, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xf0, 0xfe, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xfd, 0xfc, 0xff, 0xff, 0xf0, 0xff, 0xec, 0xff, 0xf3, 0xff, 0xea, 0xff, 0xfa, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xf2, 0xf6, 0xf7, 0xff, 0xb2, 0xd8, 0xea, 0xff, 0x82, 0xca, 0xf4, 0xff, 0x85, 0xaa, 0xee, 0xff, 0x88, 0xb4, 0xf3, 0xff, 0x89, 0xc3, 0xf7, 0xff, 0x82, 0xc7, 0xef, 0xff, 0x78, 0xbe, 0xdc, 0xff, 0x82, 0xbe, 0xd6, 0xff, 0xa5, 0xd4, 0xe9, 0xff, 0xc7, 0xed, 0xff, 0xff, 0xf2, 0xf8, 0xfd, 0xff, 0xff, 0xff, 0xfc, 0xff, @@ -45,7 +45,7 @@ img_emoji_artist_palette_map[] = { 0xff, 0xfe, 0xfb, 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xfd, 0xfc, 0xff, 0xff, 0xf3, 0xfc, 0xff, 0xff, 0xdf, 0xf8, 0xff, 0xff, 0xc2, 0xea, 0xfc, 0xff, 0xad, 0xdf, 0xf3, 0xff, 0xa7, 0xd9, 0xff, 0xff, 0xa1, 0xd2, 0xfa, 0xff, 0xac, 0xd6, 0xf9, 0xff, 0xcb, 0xec, 0xff, 0xff, 0xe8, 0xfc, 0xff, 0xff, 0xf8, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; -const lv_img_dsc_t img_emoji_artist_palette = { +const lv_image_dsc_t img_emoji_artist_palette = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 18, diff --git a/demos/multilang/assets/emojis/img_emoji_books.c b/demos/multilang/assets/emojis/img_emoji_books.c index 95b036d99..cc7ad608a 100644 --- a/demos/multilang/assets/emojis/img_emoji_books.c +++ b/demos/multilang/assets/emojis/img_emoji_books.c @@ -18,11 +18,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_BOOKS - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_BOOKS +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_BOOKS + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_BOOKS #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_BOOKS uint8_t img_emoji_books_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_BOOKS uint8_t img_emoji_books_map[] += { 0xff, 0xf6, 0xfc, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xfa, 0xf7, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xe2, 0xff, 0xfd, 0xff, 0xff, 0xf7, 0xf8, 0xff, 0xf7, 0xf0, 0xf3, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xec, 0xf3, 0xf6, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xfe, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xf9, 0xfe, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xe4, 0xff, 0xf7, 0xff, 0xfb, 0xff, 0xf9, 0xff, 0xef, 0xff, 0xff, 0xff, 0xdd, 0xd0, 0xd8, 0xff, 0x65, 0x5f, 0x60, 0xff, 0x37, 0x5e, 0x44, 0xff, 0xd5, 0x92, 0x77, 0xff, 0xe4, 0xa3, 0x8e, 0xff, 0xe6, 0xb2, 0x9b, 0xff, 0xe2, 0xbf, 0xa5, 0xff, 0xe2, 0xc7, 0xad, 0xff, 0xf1, 0xdc, 0xc6, 0xff, 0xec, 0xe5, 0xd1, 0xff, 0xdc, 0xea, 0xd8, 0xff, 0xea, 0xff, 0xf5, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xfe, 0xfa, 0xff, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xf5, 0xff, 0xf1, 0xf3, 0xdd, 0xff, 0xe7, 0xf9, 0xec, 0xff, 0xba, 0xb0, 0xb6, 0xff, 0x50, 0x47, 0x44, 0xff, 0x4e, 0x56, 0x2e, 0xff, 0xe1, 0x87, 0x4e, 0xff, 0xf4, 0x7b, 0x49, 0xff, 0xe3, 0x70, 0x3d, 0xff, 0xeb, 0x7b, 0x47, 0xff, 0xef, 0x79, 0x48, 0xff, 0xf5, 0x7e, 0x51, 0xff, 0xe4, 0x78, 0x4f, 0xff, 0xd1, 0x7b, 0x57, 0xff, 0xff, 0xbd, 0x9a, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfe, 0xff, 0xff, @@ -44,7 +45,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI 0xff, 0xf9, 0xf2, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xf4, 0xf5, 0xf9, 0xff, 0xe9, 0xee, 0xf7, 0xff, 0xeb, 0xf4, 0xfd, 0xff, 0xf8, 0xfe, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xfe, 0xff, 0xf6, 0xf9, 0xf7, 0xff, 0xfa, 0xfd, 0xfb, 0xff, 0xfd, 0xff, 0xfe, 0xff, 0xfd, 0xff, 0xfe, 0xff, 0xfd, 0xff, 0xfe, 0xff, 0xfc, 0xff, 0xfd, 0xff, 0xfd, 0xff, 0xfe, 0xff, 0xfd, 0xff, 0xfe, 0xff, 0xf7, 0xf7, 0xf7, 0xff, 0xf9, 0xf9, 0xf9, 0xff, }; -const lv_img_dsc_t img_emoji_books = { +const lv_image_dsc_t img_emoji_books = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 18, diff --git a/demos/multilang/assets/emojis/img_emoji_camera_with_flash.c b/demos/multilang/assets/emojis/img_emoji_camera_with_flash.c index 97410db86..616a2a3c4 100644 --- a/demos/multilang/assets/emojis/img_emoji_camera_with_flash.c +++ b/demos/multilang/assets/emojis/img_emoji_camera_with_flash.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_CAMERA_WITH_FLASH - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_CAMERA_WITH_FLASH +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_CAMERA_WITH_FLASH + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_CAMERA_WITH_FLASH #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_CAMERA_WITH_FLASH uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_CAMERA_WITH_FLASH uint8_t img_emoji_camera_with_flash_map[] = { 0xf1, 0xff, 0xf8, 0xff, 0xfe, 0xfa, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xf4, 0xff, 0xfc, 0xff, 0xf3, 0xff, 0xf8, 0xff, 0xfc, 0xfd, 0xf4, 0xff, 0xff, 0xf6, 0xf5, 0xff, 0xed, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xd1, 0xff, 0xf7, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xbe, 0xf3, 0xf6, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf7, 0xf7, 0xff, 0xf8, 0xff, 0xfc, 0xff, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xf5, 0xfb, 0xff, 0xff, 0xf9, 0xf7, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xd3, 0xf1, 0xff, 0xff, 0xeb, 0xf3, 0xff, 0xff, 0xc5, 0xe1, 0xec, 0xff, 0xff, 0xee, 0xff, 0xff, 0xff, 0xee, 0xff, 0xff, 0xc6, 0xe4, 0xf7, 0xff, 0xfd, 0xf9, 0xff, 0xff, 0xfa, 0xfc, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfb, 0xfb, 0xff, @@ -45,7 +45,7 @@ img_emoji_camera_with_flash_map[] = { 0xec, 0xec, 0xec, 0xff, 0xe4, 0xe4, 0xe4, 0xff, 0xe1, 0xe1, 0xe1, 0xff, 0xe5, 0xe5, 0xe5, 0xff, 0xe9, 0xe9, 0xe9, 0xff, 0xe8, 0xe8, 0xe8, 0xff, 0xe4, 0xe4, 0xe4, 0xff, 0xe3, 0xe3, 0xe3, 0xff, 0xdf, 0xdf, 0xdf, 0xff, 0xe8, 0xe8, 0xe8, 0xff, 0xe3, 0xe3, 0xe3, 0xff, 0xdf, 0xdf, 0xdf, 0xff, 0xe6, 0xe6, 0xe6, 0xff, 0xe5, 0xe5, 0xe5, 0xff, 0xe4, 0xe4, 0xe4, 0xff, 0xf0, 0xf0, 0xf0, 0xff, 0xe3, 0xe3, 0xe3, 0xff, 0xf3, 0xf3, 0xf3, 0xff, }; -const lv_img_dsc_t img_emoji_camera_with_flash = { +const lv_image_dsc_t img_emoji_camera_with_flash = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 18, diff --git a/demos/multilang/assets/emojis/img_emoji_cat_face.c b/demos/multilang/assets/emojis/img_emoji_cat_face.c index 0def8d505..0558e1906 100644 --- a/demos/multilang/assets/emojis/img_emoji_cat_face.c +++ b/demos/multilang/assets/emojis/img_emoji_cat_face.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_CAT_FACE - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_CAT_FACE +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_CAT_FACE + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_CAT_FACE #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_CAT_FACE uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_CAT_FACE uint8_t img_emoji_cat_face_map[] = { 0xd9, 0xf9, 0xf4, 0xff, 0xff, 0xf6, 0xff, 0xff, 0xe4, 0xff, 0xff, 0xff, 0xf9, 0xf2, 0xf5, 0xff, 0xee, 0xff, 0xf8, 0xff, 0xfb, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xfd, 0xfc, 0xff, 0xff, 0xe4, 0xfc, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xf7, 0xfe, 0xfb, 0xff, 0xf8, 0xff, 0xfb, 0xff, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xf5, 0xfc, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xcf, 0xff, 0xfc, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x96, 0xe4, 0xfb, 0xff, 0xa7, 0xe3, 0xff, 0xff, 0xeb, 0xf3, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xf3, 0xff, 0xf7, 0xff, 0xed, 0xfc, 0xe7, 0xff, 0xff, 0xff, 0xf6, 0xff, 0xf2, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xdb, 0xf7, 0xff, 0xff, 0x85, 0xe5, 0xfc, 0xff, 0x25, 0xdc, 0xec, 0xff, 0xec, 0xf9, 0xff, 0xff, 0xfa, 0xfd, 0xff, 0xff, @@ -45,7 +45,7 @@ img_emoji_cat_face_map[] = { 0xff, 0xf7, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xfe, 0xf8, 0xff, 0xff, 0xfd, 0xfb, 0xff, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0xfb, 0xfb, 0xff, 0xff, 0xfb, 0xfc, 0xff, 0xff, 0xfd, 0xfc, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; -const lv_img_dsc_t img_emoji_cat_face = { +const lv_image_dsc_t img_emoji_cat_face = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 18, diff --git a/demos/multilang/assets/emojis/img_emoji_deciduous_tree.c b/demos/multilang/assets/emojis/img_emoji_deciduous_tree.c index e4830bc8b..c60cef422 100644 --- a/demos/multilang/assets/emojis/img_emoji_deciduous_tree.c +++ b/demos/multilang/assets/emojis/img_emoji_deciduous_tree.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_DECIDUOUS_TREE - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_DECIDUOUS_TREE +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_DECIDUOUS_TREE + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_DECIDUOUS_TREE #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_DECIDUOUS_TREE uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_DECIDUOUS_TREE uint8_t img_emoji_deciduous_tree_map[] = { 0xfa, 0xff, 0xfc, 0xff, 0xf8, 0xff, 0xfe, 0xff, 0xfb, 0xff, 0xfe, 0xff, 0xfa, 0xf2, 0xf3, 0xff, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0xfe, 0xfc, 0xff, 0xe9, 0xf2, 0xe8, 0xff, 0xe6, 0xff, 0xf4, 0xff, 0xae, 0xef, 0xd6, 0xff, 0xdb, 0xfd, 0xec, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xfd, 0xfc, 0xff, 0xff, 0xf7, 0xfa, 0xff, 0xfb, 0xf8, 0xfa, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf7, 0xff, 0xfa, 0xff, 0xfd, 0xff, 0xf3, 0xff, 0xfc, 0xff, 0xef, 0xff, 0xfb, 0xff, 0xef, 0xff, 0xf9, 0xff, 0xd8, 0xf8, 0xe7, 0xff, 0x8b, 0xbf, 0xa8, 0xff, 0x64, 0xa9, 0x8e, 0xff, 0x62, 0xbc, 0x99, 0xff, 0x73, 0xb3, 0x96, 0xff, 0xad, 0xcb, 0xb8, 0xff, 0xf7, 0xff, 0xf5, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xfd, 0xff, 0xfe, 0xff, 0xf6, 0xf6, 0xf6, 0xff, 0xf5, 0xf2, 0xf4, 0xff, @@ -45,7 +45,7 @@ img_emoji_deciduous_tree_map[] = { 0xfb, 0xff, 0xff, 0xff, 0xf9, 0xfb, 0xfb, 0xff, 0xfc, 0xfa, 0xfa, 0xff, 0xfd, 0xfb, 0xfb, 0xff, 0xfe, 0xfb, 0xfd, 0xff, 0xe0, 0xe0, 0xe6, 0xff, 0xb0, 0xb2, 0xbd, 0xff, 0xa8, 0xae, 0xbb, 0xff, 0xa7, 0xad, 0xba, 0xff, 0xb4, 0xb6, 0xc1, 0xff, 0xe4, 0xe4, 0xea, 0xff, 0xfc, 0xf9, 0xfb, 0xff, 0xfa, 0xf8, 0xf8, 0xff, 0xff, 0xfd, 0xfd, 0xff, 0xfb, 0xfd, 0xfd, 0xff, 0xfb, 0xff, 0xff, 0xff, }; -const lv_img_dsc_t img_emoji_deciduous_tree = { +const lv_image_dsc_t img_emoji_deciduous_tree = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 16, diff --git a/demos/multilang/assets/emojis/img_emoji_dog_face.c b/demos/multilang/assets/emojis/img_emoji_dog_face.c index 1594df14d..b2fbd05c7 100644 --- a/demos/multilang/assets/emojis/img_emoji_dog_face.c +++ b/demos/multilang/assets/emojis/img_emoji_dog_face.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_DOG_FACE - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_DOG_FACE +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_DOG_FACE + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_DOG_FACE #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_DOG_FACE uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_DOG_FACE uint8_t img_emoji_dog_face_map[] = { 0xfb, 0xfd, 0xff, 0xff, 0xee, 0xf1, 0xf6, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xfc, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xf0, 0xf2, 0xec, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xfe, 0xff, 0xfa, 0xff, 0xf8, 0xfc, 0xf6, 0xff, 0xfa, 0xff, 0xfc, 0xff, 0xee, 0xfa, 0xf4, 0xff, 0xf0, 0xfe, 0xf8, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xf5, 0xf7, 0xf7, 0xff, 0xf7, 0xf9, 0xf9, 0xff, 0xfd, 0xff, 0xfe, 0xff, 0xf6, 0xfa, 0xf5, 0xff, 0xf8, 0xfc, 0xf7, 0xff, 0xfd, 0xff, 0xfc, 0xff, 0xf6, 0xfa, 0xf5, 0xff, 0xf7, 0xfa, 0xf8, 0xff, 0xfd, 0xff, 0xfe, 0xff, 0xfc, 0xfd, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, @@ -45,7 +45,7 @@ img_emoji_dog_face_map[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xfe, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xfd, 0xfe, 0xfc, 0xff, 0xfd, 0xfd, 0xfd, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; -const lv_img_dsc_t img_emoji_dog_face = { +const lv_image_dsc_t img_emoji_dog_face = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 18, diff --git a/demos/multilang/assets/emojis/img_emoji_earth_globe_europe_africa.c b/demos/multilang/assets/emojis/img_emoji_earth_globe_europe_africa.c index 67860ac93..116cd2941 100644 --- a/demos/multilang/assets/emojis/img_emoji_earth_globe_europe_africa.c +++ b/demos/multilang/assets/emojis/img_emoji_earth_globe_europe_africa.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_EARTH_GLOBE_EUROPE_AFRICA - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_EARTH_GLOBE_EUROPE_AFRICA +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_EARTH_GLOBE_EUROPE_AFRICA + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_EARTH_GLOBE_EUROPE_AFRICA #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_EARTH_GLOBE_EUROPE_AFRICA uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_EARTH_GLOBE_EUROPE_AFRICA uint8_t img_emoji_earth_globe_europe_africa_map[] = { 0xff, 0xf3, 0xec, 0xff, 0xd4, 0xff, 0xf2, 0xff, 0xff, 0xfd, 0xef, 0xff, 0xf2, 0xfd, 0xf5, 0xff, 0xff, 0xf5, 0xff, 0xff, 0xef, 0xfc, 0xff, 0xff, 0xff, 0xec, 0xf2, 0xff, 0xf6, 0xf9, 0xe9, 0xff, 0xc6, 0xe7, 0xcc, 0xff, 0xff, 0xde, 0xd3, 0xff, 0xff, 0xf4, 0xea, 0xff, 0xf2, 0xff, 0xf7, 0xff, 0xff, 0xf9, 0xf6, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0xf0, 0xf8, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xed, 0xfc, 0xff, 0xff, 0xe6, 0xed, 0xff, 0xff, 0xfd, 0xfb, 0xff, 0xff, 0xf4, 0xfa, 0xef, 0xff, 0xfb, 0xf9, 0xd0, 0xff, 0xd5, 0xca, 0x8e, 0xff, 0xd7, 0xba, 0x7d, 0xff, 0xda, 0x84, 0x56, 0xff, 0xcd, 0xaa, 0x54, 0xff, 0xe4, 0x92, 0x4b, 0xff, 0xdd, 0x91, 0x56, 0xff, 0xc6, 0xa8, 0x77, 0xff, 0xcc, 0xc3, 0xa2, 0xff, 0xe3, 0xe3, 0xd3, 0xff, 0xff, 0xfa, 0xf9, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xf6, 0xfb, 0xfa, 0xff, @@ -45,7 +45,7 @@ img_emoji_earth_globe_europe_africa_map[] = { 0xf3, 0xfb, 0xf4, 0xff, 0xec, 0xfa, 0xf4, 0xff, 0xf4, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfe, 0xf9, 0xff, 0xff, 0xfe, 0xf5, 0xff, 0xff, 0xf3, 0xe4, 0xff, 0xf1, 0xd9, 0xc5, 0xff, 0xff, 0xd1, 0xb5, 0xff, 0xff, 0xd3, 0xb6, 0xff, 0xff, 0xdc, 0xbe, 0xff, 0xff, 0xee, 0xd0, 0xff, 0xfb, 0xff, 0xec, 0xff, 0xed, 0xff, 0xf8, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; -const lv_img_dsc_t img_emoji_earth_globe_europe_africa = { +const lv_image_dsc_t img_emoji_earth_globe_europe_africa = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 19, diff --git a/demos/multilang/assets/emojis/img_emoji_flexed_biceps.c b/demos/multilang/assets/emojis/img_emoji_flexed_biceps.c index 4777d75f5..b8b0d07ce 100644 --- a/demos/multilang/assets/emojis/img_emoji_flexed_biceps.c +++ b/demos/multilang/assets/emojis/img_emoji_flexed_biceps.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_FLEXED_BICEPS - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_FLEXED_BICEPS +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_FLEXED_BICEPS + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_FLEXED_BICEPS #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_FLEXED_BICEPS uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_FLEXED_BICEPS uint8_t img_emoji_flexed_biceps_map[] = { 0xfa, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xfe, 0xff, 0xff, 0xfb, 0xfb, 0xff, 0xe9, 0xfe, 0xf6, 0xff, 0xef, 0xfd, 0xfb, 0xff, 0xff, 0xf5, 0xff, 0xff, 0xde, 0xfd, 0xff, 0xff, 0xc7, 0xf9, 0xff, 0xff, 0xc8, 0xde, 0xff, 0xff, 0xe4, 0xef, 0xff, 0xff, 0xfa, 0xfa, 0xff, 0xff, 0xf9, 0xfc, 0xff, 0xff, 0xe8, 0xf6, 0xf0, 0xff, 0xee, 0xff, 0xfb, 0xff, 0xf3, 0xff, 0xfe, 0xff, 0xf0, 0xf8, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xda, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xfd, 0xe7, 0xff, 0xff, 0x71, 0xd6, 0xef, 0xff, 0x3a, 0xc4, 0xe1, 0xff, 0x1e, 0xc8, 0xea, 0xff, 0x58, 0xd0, 0xed, 0xff, 0xbb, 0xeb, 0xfd, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xfb, 0xff, 0xff, 0xfd, 0xfb, 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xf4, 0xf6, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -45,7 +45,7 @@ img_emoji_flexed_biceps_map[] = { 0xff, 0xfe, 0xfb, 0xff, 0xf8, 0xff, 0xfe, 0xff, 0xe1, 0xfe, 0xff, 0xff, 0xe2, 0xfd, 0xff, 0xff, 0xe9, 0xf2, 0xff, 0xff, 0xe1, 0xe3, 0xff, 0xff, 0xcc, 0xdc, 0xff, 0xff, 0xbf, 0xde, 0xff, 0xff, 0xa7, 0xde, 0xf9, 0xff, 0xab, 0xdd, 0xfb, 0xff, 0xae, 0xdb, 0xfc, 0xff, 0xac, 0xdb, 0xfa, 0xff, 0xae, 0xe0, 0xf7, 0xff, 0xc2, 0xe9, 0xf8, 0xff, 0xe2, 0xf3, 0xfc, 0xff, 0xfb, 0xfc, 0xff, 0xff, 0xf3, 0xfc, 0xff, 0xff, 0xf6, 0xfe, 0xff, 0xff, }; -const lv_img_dsc_t img_emoji_flexed_biceps = { +const lv_image_dsc_t img_emoji_flexed_biceps = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 18, diff --git a/demos/multilang/assets/emojis/img_emoji_movie_camera.c b/demos/multilang/assets/emojis/img_emoji_movie_camera.c index 86a60b432..0011ba844 100644 --- a/demos/multilang/assets/emojis/img_emoji_movie_camera.c +++ b/demos/multilang/assets/emojis/img_emoji_movie_camera.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_MOVIE_CAMERA - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_MOVIE_CAMERA +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_MOVIE_CAMERA + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_MOVIE_CAMERA #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_MOVIE_CAMERA uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_MOVIE_CAMERA uint8_t img_emoji_movie_camera_map[] = { 0xff, 0xff, 0xff, 0xff, 0xf9, 0xf9, 0xf9, 0xff, 0xf3, 0xf3, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfb, 0xfb, 0xff, 0xe5, 0xe5, 0xe5, 0xff, 0xd9, 0xd9, 0xd9, 0xff, 0xe0, 0xe0, 0xe0, 0xff, 0xfa, 0xfa, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xeb, 0xeb, 0xeb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf7, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xca, 0xca, 0xca, 0xff, 0x86, 0x86, 0x86, 0xff, 0x55, 0x55, 0x55, 0xff, 0x48, 0x48, 0x48, 0xff, 0x55, 0x55, 0x55, 0xff, 0x76, 0x76, 0x76, 0xff, 0xb9, 0xb9, 0xb9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xfc, 0xfc, 0xfc, 0xff, 0xfa, 0xfa, 0xfa, 0xff, 0xfd, 0xfd, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xfc, 0xff, 0xf9, 0xf9, 0xf9, 0xff, @@ -45,7 +45,7 @@ img_emoji_movie_camera_map[] = { 0xef, 0xef, 0xef, 0xff, 0xb4, 0xb4, 0xb4, 0xff, 0xc5, 0xc5, 0xc5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xf9, 0xf9, 0xff, 0xfd, 0xfd, 0xfd, 0xff, 0xf9, 0xf9, 0xf9, 0xff, 0xfb, 0xfb, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xfa, 0xfa, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; -const lv_img_dsc_t img_emoji_movie_camera = { +const lv_image_dsc_t img_emoji_movie_camera = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 18, diff --git a/demos/multilang/assets/emojis/img_emoji_red_heart.c b/demos/multilang/assets/emojis/img_emoji_red_heart.c index 4f1ce0b76..f9214e3ed 100644 --- a/demos/multilang/assets/emojis/img_emoji_red_heart.c +++ b/demos/multilang/assets/emojis/img_emoji_red_heart.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_RED_HEART - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_RED_HEART +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_RED_HEART + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_RED_HEART #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_RED_HEART uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_RED_HEART uint8_t img_emoji_red_heart_map[] = { 0xff, 0xee, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xfb, 0xff, 0xee, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xf1, 0xfb, 0xff, 0xff, 0xfb, 0xff, 0xf2, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xea, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xfa, 0xf3, 0xfa, 0xff, 0xfb, 0xff, 0xf9, 0xff, 0xf8, 0xff, 0xf4, 0xff, 0xf6, 0xff, 0xee, 0xff, 0xfd, 0xfe, 0xf5, 0xff, 0xff, 0xf7, 0xfd, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xf8, 0xfe, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xf8, 0xfd, 0xff, 0xff, 0xd1, 0xd4, 0xff, 0xff, 0xa0, 0x9d, 0xff, 0xff, 0x97, 0x93, 0xfc, 0xff, 0x9e, 0xa2, 0xe3, 0xff, 0xca, 0xd0, 0xed, 0xff, 0xf8, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xe2, 0xff, 0xfd, 0xff, 0xf7, 0xff, 0xe9, 0xeb, 0xff, 0xff, 0xce, 0xce, 0xff, 0xff, 0xa8, 0xa9, 0xff, 0xff, 0x94, 0x98, 0xe6, 0xff, 0xb2, 0xb9, 0xf2, 0xff, 0xde, 0xe7, 0xff, 0xff, 0xed, 0xef, 0xf9, 0xff, 0xfd, 0xff, 0xff, 0xff, @@ -45,7 +45,7 @@ img_emoji_red_heart_map[] = { 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xfd, 0xff, 0xf9, 0xff, 0xfb, 0xfc, 0xf8, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xec, 0xfc, 0xff, 0xff, 0xed, 0xf9, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xfd, 0xf9, 0xf4, 0xff, 0xfe, 0xfb, 0xf7, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xfd, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; -const lv_img_dsc_t img_emoji_red_heart = { +const lv_image_dsc_t img_emoji_red_heart = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 18, diff --git a/demos/multilang/assets/emojis/img_emoji_rocket.c b/demos/multilang/assets/emojis/img_emoji_rocket.c index 7c7f03263..3ee8d5f8e 100644 --- a/demos/multilang/assets/emojis/img_emoji_rocket.c +++ b/demos/multilang/assets/emojis/img_emoji_rocket.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_ROCKET - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_ROCKET +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_ROCKET + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_ROCKET #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_ROCKET uint8_t img_emoji_rocket_map[] +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_ROCKET uint8_t img_emoji_rocket_map[] = { 0xff, 0xf8, 0xf4, 0xff, 0xff, 0xfe, 0xfb, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xf8, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xec, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xfb, 0xfb, 0xfb, 0xff, 0xf2, 0xf7, 0xf6, 0xff, 0xf5, 0xfa, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xea, 0xf0, 0xeb, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xfd, 0xf6, 0xff, 0xff, 0xee, 0xfb, 0xfd, 0xff, 0xef, 0xf4, 0xff, 0xff, 0xea, 0xe1, 0xff, 0xff, 0xfd, 0xff, 0xfe, 0xff, @@ -45,7 +45,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI 0xfd, 0xfd, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xf8, 0xfd, 0xfc, 0xff, 0xf6, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; -const lv_img_dsc_t img_emoji_rocket = { +const lv_image_dsc_t img_emoji_rocket = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 16, diff --git a/demos/multilang/assets/emojis/img_emoji_soccer_ball.c b/demos/multilang/assets/emojis/img_emoji_soccer_ball.c index 9da94480f..e6d8ea846 100644 --- a/demos/multilang/assets/emojis/img_emoji_soccer_ball.c +++ b/demos/multilang/assets/emojis/img_emoji_soccer_ball.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_EMOJI_SOCCER_BALL - #define LV_ATTRIBUTE_IMG_IMG_EMOJI_SOCCER_BALL +#ifndef LV_ATTRIBUTE_IMAGE_IMG_EMOJI_SOCCER_BALL + #define LV_ATTRIBUTE_IMAGE_IMG_EMOJI_SOCCER_BALL #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_EMOJI_SOCCER_BALL uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_EMOJI_SOCCER_BALL uint8_t img_emoji_soccer_ball_map[] = { 0xfa, 0xfc, 0xfd, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfc, 0xfe, 0xff, 0xff, 0xf5, 0xf7, 0xf8, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xee, 0xf0, 0xf1, 0xff, 0xec, 0xee, 0xef, 0xff, 0xde, 0xe0, 0xe0, 0xff, 0xc9, 0xcb, 0xcb, 0xff, 0xf4, 0xf6, 0xf6, 0xff, 0xf6, 0xf8, 0xf8, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfb, 0xfd, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xf2, 0xf4, 0xf5, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xf9, 0xfb, 0xfc, 0xff, 0xf4, 0xf6, 0xf7, 0xff, 0xe9, 0xeb, 0xec, 0xff, 0xac, 0xae, 0xaf, 0xff, 0x5a, 0x5c, 0x5d, 0xff, 0x5b, 0x5d, 0x5d, 0xff, 0x3d, 0x3f, 0x3f, 0xff, 0x62, 0x64, 0x64, 0xff, 0x97, 0x99, 0x99, 0xff, 0xeb, 0xed, 0xed, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfa, 0xfc, 0xfc, 0xff, 0xf8, 0xf8, 0xf8, 0xff, 0xfc, 0xfc, 0xfc, 0xff, @@ -45,7 +45,7 @@ img_emoji_soccer_ball_map[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf7, 0xf7, 0xff, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xed, 0xed, 0xed, 0xff, 0xf1, 0xf1, 0xf1, 0xff, 0xee, 0xf3, 0xf4, 0xff, 0xea, 0xee, 0xef, 0xff, 0xf2, 0xf6, 0xf7, 0xff, 0xf0, 0xf2, 0xf3, 0xff, 0xf1, 0xf3, 0xf4, 0xff, 0xfd, 0xfc, 0xfe, 0xff, 0xfa, 0xf9, 0xfb, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; -const lv_img_dsc_t img_emoji_soccer_ball = { +const lv_image_dsc_t img_emoji_soccer_ball = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 18, diff --git a/demos/multilang/assets/img_multilang_like.c b/demos/multilang/assets/img_multilang_like.c index e4e9b3086..7d20f6b89 100644 --- a/demos/multilang/assets/img_multilang_like.c +++ b/demos/multilang/assets/img_multilang_like.c @@ -18,11 +18,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_MULTILANG_LIKE - #define LV_ATTRIBUTE_IMG_IMG_MULTILANG_LIKE +#ifndef LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_LIKE + #define LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_LIKE #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_MULTILANG_LIKE uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_MULTILANG_LIKE uint8_t img_multilang_like_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0a, 0xff, 0xff, 0xff, 0x72, 0xff, 0xff, 0xff, 0x6a, 0xff, 0xff, 0xff, 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, 0x00, 0x00, 0x00, 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, 0x93, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -43,7 +43,7 @@ img_multilang_like_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_multilang_like = { +const lv_image_dsc_t img_multilang_like = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 20, diff --git a/demos/multilang/lv_demo_multilang.c b/demos/multilang/lv_demo_multilang.c index 5c1946d1a..ebc444be6 100644 --- a/demos/multilang/lv_demo_multilang.c +++ b/demos/multilang/lv_demo_multilang.c @@ -50,26 +50,26 @@ extern lv_font_t font_multilang_large; **********************/ #define CARD_INFO_SET(_image, _name, _description) {.image = _image, .name = _name, .description = _description} -LV_IMG_DECLARE(img_multilang_avatar_1) -LV_IMG_DECLARE(img_multilang_avatar_2) -LV_IMG_DECLARE(img_multilang_avatar_3) -LV_IMG_DECLARE(img_multilang_avatar_4) -LV_IMG_DECLARE(img_multilang_avatar_5) -LV_IMG_DECLARE(img_multilang_avatar_6) -LV_IMG_DECLARE(img_multilang_avatar_7) -LV_IMG_DECLARE(img_multilang_avatar_8) -LV_IMG_DECLARE(img_multilang_avatar_9) -LV_IMG_DECLARE(img_multilang_avatar_10) -LV_IMG_DECLARE(img_multilang_avatar_11) -LV_IMG_DECLARE(img_multilang_avatar_12) -LV_IMG_DECLARE(img_multilang_avatar_13) -LV_IMG_DECLARE(img_multilang_avatar_14) -LV_IMG_DECLARE(img_multilang_avatar_15) -LV_IMG_DECLARE(img_multilang_avatar_16) -LV_IMG_DECLARE(img_multilang_avatar_17) -LV_IMG_DECLARE(img_multilang_avatar_18) -LV_IMG_DECLARE(img_multilang_avatar_22) -LV_IMG_DECLARE(img_multilang_avatar_25) +LV_IMAGE_DECLARE(img_multilang_avatar_1) +LV_IMAGE_DECLARE(img_multilang_avatar_2) +LV_IMAGE_DECLARE(img_multilang_avatar_3) +LV_IMAGE_DECLARE(img_multilang_avatar_4) +LV_IMAGE_DECLARE(img_multilang_avatar_5) +LV_IMAGE_DECLARE(img_multilang_avatar_6) +LV_IMAGE_DECLARE(img_multilang_avatar_7) +LV_IMAGE_DECLARE(img_multilang_avatar_8) +LV_IMAGE_DECLARE(img_multilang_avatar_9) +LV_IMAGE_DECLARE(img_multilang_avatar_10) +LV_IMAGE_DECLARE(img_multilang_avatar_11) +LV_IMAGE_DECLARE(img_multilang_avatar_12) +LV_IMAGE_DECLARE(img_multilang_avatar_13) +LV_IMAGE_DECLARE(img_multilang_avatar_14) +LV_IMAGE_DECLARE(img_multilang_avatar_15) +LV_IMAGE_DECLARE(img_multilang_avatar_16) +LV_IMAGE_DECLARE(img_multilang_avatar_17) +LV_IMAGE_DECLARE(img_multilang_avatar_18) +LV_IMAGE_DECLARE(img_multilang_avatar_22) +LV_IMAGE_DECLARE(img_multilang_avatar_25) static card_info_t card_info[] = { CARD_INFO_SET(&img_multilang_avatar_5, "Zhang Wei", "对编程和技术充满热情。 开源倡导者🚀"), @@ -107,18 +107,18 @@ static const void * get_imgfont_path(const lv_font_t * font, LV_UNUSED(unicode_next); LV_UNUSED(font); - LV_IMG_DECLARE(img_emoji_artist_palette); - LV_IMG_DECLARE(img_emoji_books); - LV_IMG_DECLARE(img_emoji_camera_with_flash); - LV_IMG_DECLARE(img_emoji_cat_face); - LV_IMG_DECLARE(img_emoji_deciduous_tree); - LV_IMG_DECLARE(img_emoji_dog_face); - LV_IMG_DECLARE(img_emoji_earth_globe_europe_africa); - LV_IMG_DECLARE(img_emoji_flexed_biceps); - LV_IMG_DECLARE(img_emoji_movie_camera); - LV_IMG_DECLARE(img_emoji_red_heart); - LV_IMG_DECLARE(img_emoji_soccer_ball); - LV_IMG_DECLARE(img_emoji_rocket); + LV_IMAGE_DECLARE(img_emoji_artist_palette); + LV_IMAGE_DECLARE(img_emoji_books); + LV_IMAGE_DECLARE(img_emoji_camera_with_flash); + LV_IMAGE_DECLARE(img_emoji_cat_face); + LV_IMAGE_DECLARE(img_emoji_deciduous_tree); + LV_IMAGE_DECLARE(img_emoji_dog_face); + LV_IMAGE_DECLARE(img_emoji_earth_globe_europe_africa); + LV_IMAGE_DECLARE(img_emoji_flexed_biceps); + LV_IMAGE_DECLARE(img_emoji_movie_camera); + LV_IMAGE_DECLARE(img_emoji_red_heart); + LV_IMAGE_DECLARE(img_emoji_soccer_ball); + LV_IMAGE_DECLARE(img_emoji_rocket); *offset_y = -1; switch(unicode) { @@ -316,8 +316,8 @@ static void card_create(lv_obj_t * parent, card_info_t * info) lv_obj_add_style(card, &style_card, 0); lv_obj_clear_flag(card, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_SCROLL_CHAIN_HOR); - lv_obj_t * avatar = lv_img_create(card); - lv_img_set_src(avatar, info->image); + lv_obj_t * avatar = lv_image_create(card); + lv_image_set_src(avatar, info->image); lv_obj_set_grid_cell(avatar, LV_GRID_ALIGN_CENTER, 0, 1, LV_GRID_ALIGN_CENTER, 0, 4); lv_obj_add_style(avatar, &style_avatar, 0); @@ -332,14 +332,14 @@ static void card_create(lv_obj_t * parent, card_info_t * info) lv_obj_set_style_text_color(description, lv_color_hex(0x5b5b5b), 0); lv_obj_set_style_text_line_space(description, -3, 0); - lv_obj_t * btn = lv_btn_create(card); + lv_obj_t * btn = lv_button_create(card); lv_obj_clear_flag(card, LV_OBJ_FLAG_SCROLL_CHAIN_HOR); lv_obj_set_grid_cell(btn, LV_GRID_ALIGN_START, 2, 1, LV_GRID_ALIGN_CENTER, 3, 1); lv_obj_add_style(btn, &style_btn, 0); - LV_IMG_DECLARE(img_multilang_like); - lv_obj_t * btn_img = lv_img_create(btn); - lv_img_set_src(btn_img, &img_multilang_like); + LV_IMAGE_DECLARE(img_multilang_like); + lv_obj_t * btn_img = lv_image_create(btn); + lv_image_set_src(btn_img, &img_multilang_like); lv_obj_align(btn_img, LV_ALIGN_LEFT_MID, 30, 0); lv_obj_t * btn_label = lv_label_create(btn); diff --git a/demos/music/assets/img_lv_demo_music_btn_corner_large.c b/demos/music/assets/img_lv_demo_music_btn_corner_large.c index e8cca0312..b0241c1c4 100644 --- a/demos/music/assets/img_lv_demo_music_btn_corner_large.c +++ b/demos/music/assets/img_lv_demo_music_btn_corner_large.c @@ -5,11 +5,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_CORNER - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_CORNER +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_CORNER + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_CORNER #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_CORNER uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_CORNER uint8_t img_lv_demo_music_btn_corner_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -118,7 +118,7 @@ img_lv_demo_music_btn_corner_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_btn_corner = { +const lv_image_dsc_t img_lv_demo_music_btn_corner = { .header.always_zero = 0, .header.w = 32, .header.h = 32, diff --git a/demos/music/assets/img_lv_demo_music_btn_list_pause.c b/demos/music/assets/img_lv_demo_music_btn_list_pause.c index b76b347f6..747cb26d6 100644 --- a/demos/music/assets/img_lv_demo_music_btn_list_pause.c +++ b/demos/music/assets/img_lv_demo_music_btn_list_pause.c @@ -196,7 +196,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_btn_list_pause_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_btn_list_pause = { +lv_image_dsc_t img_lv_demo_music_btn_list_pause = { .header.always_zero = 0, .header.w = 58, .header.h = 60, diff --git a/demos/music/assets/img_lv_demo_music_btn_list_pause_large.c b/demos/music/assets/img_lv_demo_music_btn_list_pause_large.c index c18b24694..abc8aff5f 100644 --- a/demos/music/assets/img_lv_demo_music_btn_list_pause_large.c +++ b/demos/music/assets/img_lv_demo_music_btn_list_pause_large.c @@ -5,11 +5,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_LIST_PAUSE - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_LIST_PAUSE +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_LIST_PAUSE + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_LIST_PAUSE #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_LIST_PAUSE uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_LIST_PAUSE uint8_t img_lv_demo_music_btn_list_pause_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -337,7 +337,7 @@ img_lv_demo_music_btn_list_pause_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_btn_list_pause = { +const lv_image_dsc_t img_lv_demo_music_btn_list_pause = { .header.always_zero = 0, .header.w = 106, .header.h = 105, diff --git a/demos/music/assets/img_lv_demo_music_btn_list_play.c b/demos/music/assets/img_lv_demo_music_btn_list_play.c index 9d267d613..4bbcba3fc 100644 --- a/demos/music/assets/img_lv_demo_music_btn_list_play.c +++ b/demos/music/assets/img_lv_demo_music_btn_list_play.c @@ -196,7 +196,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_btn_list_play_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_btn_list_play = { +lv_image_dsc_t img_lv_demo_music_btn_list_play = { .header.always_zero = 0, .header.w = 58, .header.h = 60, diff --git a/demos/music/assets/img_lv_demo_music_btn_list_play_large.c b/demos/music/assets/img_lv_demo_music_btn_list_play_large.c index 7b87ec482..dd4bae08a 100644 --- a/demos/music/assets/img_lv_demo_music_btn_list_play_large.c +++ b/demos/music/assets/img_lv_demo_music_btn_list_play_large.c @@ -5,11 +5,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_LIST_PLAY - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_LIST_PLAY +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_LIST_PLAY + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_LIST_PLAY #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_LIST_PLAY uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_LIST_PLAY uint8_t img_lv_demo_music_btn_list_play_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -337,7 +337,7 @@ img_lv_demo_music_btn_list_play_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_btn_list_play = { +const lv_image_dsc_t img_lv_demo_music_btn_list_play = { .header.always_zero = 0, .header.w = 106, .header.h = 105, diff --git a/demos/music/assets/img_lv_demo_music_btn_loop.c b/demos/music/assets/img_lv_demo_music_btn_loop.c index 397a10bc8..b815251e5 100644 --- a/demos/music/assets/img_lv_demo_music_btn_loop.c +++ b/demos/music/assets/img_lv_demo_music_btn_loop.c @@ -88,7 +88,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_btn_loop_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_btn_loop = { +lv_image_dsc_t img_lv_demo_music_btn_loop = { .header.always_zero = 0, .header.w = 24, .header.h = 24, diff --git a/demos/music/assets/img_lv_demo_music_btn_loop_large.c b/demos/music/assets/img_lv_demo_music_btn_loop_large.c index 9705cb50d..deb063933 100644 --- a/demos/music/assets/img_lv_demo_music_btn_loop_large.c +++ b/demos/music/assets/img_lv_demo_music_btn_loop_large.c @@ -5,11 +5,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_LOOP - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_LOOP +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_LOOP + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_LOOP #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_LOOP uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_LOOP uint8_t img_lv_demo_music_btn_loop_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -130,7 +130,7 @@ img_lv_demo_music_btn_loop_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_btn_loop = { +const lv_image_dsc_t img_lv_demo_music_btn_loop = { .header.always_zero = 0, .header.w = 37, .header.h = 36, diff --git a/demos/music/assets/img_lv_demo_music_btn_next.c b/demos/music/assets/img_lv_demo_music_btn_next.c index e2c8ae1c5..c0d7dfefa 100644 --- a/demos/music/assets/img_lv_demo_music_btn_next.c +++ b/demos/music/assets/img_lv_demo_music_btn_next.c @@ -202,7 +202,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_btn_next_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_btn_next = { +lv_image_dsc_t img_lv_demo_music_btn_next = { .header.always_zero = 0, .header.w = 62, .header.h = 62, diff --git a/demos/music/assets/img_lv_demo_music_btn_next_large.c b/demos/music/assets/img_lv_demo_music_btn_next_large.c index 150264cea..13eec1e14 100644 --- a/demos/music/assets/img_lv_demo_music_btn_next_large.c +++ b/demos/music/assets/img_lv_demo_music_btn_next_large.c @@ -5,11 +5,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_NEXT - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_NEXT +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_NEXT + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_NEXT #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_NEXT uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_NEXT uint8_t img_lv_demo_music_btn_next_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -352,7 +352,7 @@ img_lv_demo_music_btn_next_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_btn_next = { +const lv_image_dsc_t img_lv_demo_music_btn_next = { .header.always_zero = 0, .header.w = 110, .header.h = 110, diff --git a/demos/music/assets/img_lv_demo_music_btn_pause.c b/demos/music/assets/img_lv_demo_music_btn_pause.c index 49ad8baca..2190781e4 100644 --- a/demos/music/assets/img_lv_demo_music_btn_pause.c +++ b/demos/music/assets/img_lv_demo_music_btn_pause.c @@ -247,7 +247,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_btn_pause_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_btn_pause = { +lv_image_dsc_t img_lv_demo_music_btn_pause = { .header.always_zero = 0, .header.w = 79, .header.h = 77, diff --git a/demos/music/assets/img_lv_demo_music_btn_pause_large.c b/demos/music/assets/img_lv_demo_music_btn_pause_large.c index 4ecd1922e..2e29b72ee 100644 --- a/demos/music/assets/img_lv_demo_music_btn_pause_large.c +++ b/demos/music/assets/img_lv_demo_music_btn_pause_large.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_PAUSE - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_PAUSE +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_PAUSE + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_PAUSE #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_PAUSE uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_PAUSE uint8_t img_lv_demo_music_btn_pause_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -449,7 +449,7 @@ img_lv_demo_music_btn_pause_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_btn_pause = { +const lv_image_dsc_t img_lv_demo_music_btn_pause = { .header.always_zero = 0, .header.w = 141, .header.h = 142, diff --git a/demos/music/assets/img_lv_demo_music_btn_play.c b/demos/music/assets/img_lv_demo_music_btn_play.c index af22fd3dc..2d1acb8ef 100644 --- a/demos/music/assets/img_lv_demo_music_btn_play.c +++ b/demos/music/assets/img_lv_demo_music_btn_play.c @@ -247,7 +247,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_btn_play_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_btn_play = { +lv_image_dsc_t img_lv_demo_music_btn_play = { .header.always_zero = 0, .header.w = 79, .header.h = 77, diff --git a/demos/music/assets/img_lv_demo_music_btn_play_large.c b/demos/music/assets/img_lv_demo_music_btn_play_large.c index aca1341ba..1d38e702b 100644 --- a/demos/music/assets/img_lv_demo_music_btn_play_large.c +++ b/demos/music/assets/img_lv_demo_music_btn_play_large.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_PLAY - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_PLAY +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_PLAY + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_PLAY #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_PLAY uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_PLAY uint8_t img_lv_demo_music_btn_play_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -449,7 +449,7 @@ img_lv_demo_music_btn_play_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_btn_play = { +const lv_image_dsc_t img_lv_demo_music_btn_play = { .header.always_zero = 0, .header.w = 141, .header.h = 142, diff --git a/demos/music/assets/img_lv_demo_music_btn_prev.c b/demos/music/assets/img_lv_demo_music_btn_prev.c index 83c2edd4e..869db3b9f 100644 --- a/demos/music/assets/img_lv_demo_music_btn_prev.c +++ b/demos/music/assets/img_lv_demo_music_btn_prev.c @@ -202,7 +202,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_btn_prev_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_btn_prev = { +lv_image_dsc_t img_lv_demo_music_btn_prev = { .header.always_zero = 0, .header.w = 62, .header.h = 62, diff --git a/demos/music/assets/img_lv_demo_music_btn_prev_large.c b/demos/music/assets/img_lv_demo_music_btn_prev_large.c index b0b3fde8e..addffd54f 100644 --- a/demos/music/assets/img_lv_demo_music_btn_prev_large.c +++ b/demos/music/assets/img_lv_demo_music_btn_prev_large.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_PREV - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_PREV +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_PREV + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_PREV #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_PREV uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_PREV uint8_t img_lv_demo_music_btn_prev_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -353,7 +353,7 @@ img_lv_demo_music_btn_prev_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_btn_prev = { +const lv_image_dsc_t img_lv_demo_music_btn_prev = { .header.always_zero = 0, .header.w = 110, .header.h = 110, diff --git a/demos/music/assets/img_lv_demo_music_btn_rnd.c b/demos/music/assets/img_lv_demo_music_btn_rnd.c index 40922e55e..30f8e9ee2 100644 --- a/demos/music/assets/img_lv_demo_music_btn_rnd.c +++ b/demos/music/assets/img_lv_demo_music_btn_rnd.c @@ -88,7 +88,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_btn_rnd_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_btn_rnd = { +lv_image_dsc_t img_lv_demo_music_btn_rnd = { .header.always_zero = 0, .header.w = 24, .header.h = 24, diff --git a/demos/music/assets/img_lv_demo_music_btn_rnd_large.c b/demos/music/assets/img_lv_demo_music_btn_rnd_large.c index 6638f4e27..7c3f0a159 100644 --- a/demos/music/assets/img_lv_demo_music_btn_rnd_large.c +++ b/demos/music/assets/img_lv_demo_music_btn_rnd_large.c @@ -5,11 +5,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_RND - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_RND +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_RND + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_RND #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_BTN_RND uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_BTN_RND uint8_t img_lv_demo_music_btn_rnd_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -130,7 +130,7 @@ img_lv_demo_music_btn_rnd_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_btn_rnd = { +const lv_image_dsc_t img_lv_demo_music_btn_rnd = { .header.always_zero = 0, .header.w = 37, .header.h = 36, diff --git a/demos/music/assets/img_lv_demo_music_corner_left.c b/demos/music/assets/img_lv_demo_music_corner_left.c index 131290880..6e2e722ad 100644 --- a/demos/music/assets/img_lv_demo_music_corner_left.c +++ b/demos/music/assets/img_lv_demo_music_corner_left.c @@ -70,7 +70,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_corner_left_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_corner_left = { +lv_image_dsc_t img_lv_demo_music_corner_left = { .header.always_zero = 0, .header.w = 18, .header.h = 18, diff --git a/demos/music/assets/img_lv_demo_music_corner_left_large.c b/demos/music/assets/img_lv_demo_music_corner_left_large.c index 7b17c9a95..336ed3ae3 100644 --- a/demos/music/assets/img_lv_demo_music_corner_left_large.c +++ b/demos/music/assets/img_lv_demo_music_corner_left_large.c @@ -7,11 +7,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_CORNER_1 - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_CORNER_1 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_CORNER_1 + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_CORNER_1 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_CORNER_1 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_CORNER_1 uint8_t img_lv_demo_music_corner_left_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -120,7 +120,7 @@ img_lv_demo_music_corner_left_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_corner_left = { +const lv_image_dsc_t img_lv_demo_music_corner_left = { .header.always_zero = 0, .header.w = 32, .header.h = 32, diff --git a/demos/music/assets/img_lv_demo_music_corner_right.c b/demos/music/assets/img_lv_demo_music_corner_right.c index 9adcfbab7..26b61634c 100644 --- a/demos/music/assets/img_lv_demo_music_corner_right.c +++ b/demos/music/assets/img_lv_demo_music_corner_right.c @@ -70,7 +70,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_corner_right_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_corner_right = { +lv_image_dsc_t img_lv_demo_music_corner_right = { .header.always_zero = 0, .header.w = 18, .header.h = 18, diff --git a/demos/music/assets/img_lv_demo_music_corner_right_large.c b/demos/music/assets/img_lv_demo_music_corner_right_large.c index 85e440a5b..20b01f4d2 100644 --- a/demos/music/assets/img_lv_demo_music_corner_right_large.c +++ b/demos/music/assets/img_lv_demo_music_corner_right_large.c @@ -7,11 +7,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_CORNER_2 - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_CORNER_2 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_CORNER_2 + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_CORNER_2 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_CORNER_2 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_CORNER_2 uint8_t img_lv_demo_music_corner_right_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -120,7 +120,7 @@ img_lv_demo_music_corner_right_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_corner_right = { +const lv_image_dsc_t img_lv_demo_music_corner_right = { .header.always_zero = 0, .header.w = 32, .header.h = 32, diff --git a/demos/music/assets/img_lv_demo_music_cover_1.c b/demos/music/assets/img_lv_demo_music_cover_1.c index 067f73a53..46e1d07dc 100644 --- a/demos/music/assets/img_lv_demo_music_cover_1.c +++ b/demos/music/assets/img_lv_demo_music_cover_1.c @@ -542,7 +542,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_cover_1_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_cover_1 = { +lv_image_dsc_t img_lv_demo_music_cover_1 = { .header.always_zero = 0, .header.w = 176, .header.h = 175, diff --git a/demos/music/assets/img_lv_demo_music_cover_1_large.c b/demos/music/assets/img_lv_demo_music_cover_1_large.c index 26c3e0500..5660247c1 100644 --- a/demos/music/assets/img_lv_demo_music_cover_1_large.c +++ b/demos/music/assets/img_lv_demo_music_cover_1_large.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_COVER_1 - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_COVER_1 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_COVER_1 + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_COVER_1 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_COVER_1 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_COVER_1 uint8_t img_lv_demo_music_cover_1_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit*/ @@ -1307,7 +1307,7 @@ img_lv_demo_music_cover_1_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_cover_1 = { +const lv_image_dsc_t img_lv_demo_music_cover_1 = { .header.always_zero = 0, .header.w = 428, .header.h = 428, diff --git a/demos/music/assets/img_lv_demo_music_cover_2.c b/demos/music/assets/img_lv_demo_music_cover_2.c index 325143767..5fffc4bbe 100644 --- a/demos/music/assets/img_lv_demo_music_cover_2.c +++ b/demos/music/assets/img_lv_demo_music_cover_2.c @@ -542,7 +542,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_cover_2_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_cover_2 = { +lv_image_dsc_t img_lv_demo_music_cover_2 = { .header.always_zero = 0, .header.w = 176, .header.h = 175, diff --git a/demos/music/assets/img_lv_demo_music_cover_2_large.c b/demos/music/assets/img_lv_demo_music_cover_2_large.c index 95cd82e38..3ddb45de3 100644 --- a/demos/music/assets/img_lv_demo_music_cover_2_large.c +++ b/demos/music/assets/img_lv_demo_music_cover_2_large.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_COVER_2 - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_COVER_2 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_COVER_2 + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_COVER_2 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_COVER_2 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_COVER_2 uint8_t img_lv_demo_music_cover_2_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit*/ @@ -1307,7 +1307,7 @@ img_lv_demo_music_cover_2_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_cover_2 = { +const lv_image_dsc_t img_lv_demo_music_cover_2 = { .header.always_zero = 0, .header.w = 428, .header.h = 428, diff --git a/demos/music/assets/img_lv_demo_music_cover_3.c b/demos/music/assets/img_lv_demo_music_cover_3.c index c44cb0b97..b42257d2f 100644 --- a/demos/music/assets/img_lv_demo_music_cover_3.c +++ b/demos/music/assets/img_lv_demo_music_cover_3.c @@ -542,7 +542,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_cover_3_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_cover_3 = { +lv_image_dsc_t img_lv_demo_music_cover_3 = { .header.always_zero = 0, .header.w = 176, .header.h = 175, diff --git a/demos/music/assets/img_lv_demo_music_cover_3_large.c b/demos/music/assets/img_lv_demo_music_cover_3_large.c index 85972f9aa..a164506c9 100644 --- a/demos/music/assets/img_lv_demo_music_cover_3_large.c +++ b/demos/music/assets/img_lv_demo_music_cover_3_large.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_COVER_3 - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_COVER_3 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_COVER_3 + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_COVER_3 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_COVER_3 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_COVER_3 uint8_t img_lv_demo_music_cover_3_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit*/ @@ -1307,7 +1307,7 @@ img_lv_demo_music_cover_3_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_cover_3 = { +const lv_image_dsc_t img_lv_demo_music_cover_3 = { .header.always_zero = 0, .header.w = 428, .header.h = 428, diff --git a/demos/music/assets/img_lv_demo_music_icon_1.c b/demos/music/assets/img_lv_demo_music_icon_1.c index 059ad7dcf..07848ae0b 100644 --- a/demos/music/assets/img_lv_demo_music_icon_1.c +++ b/demos/music/assets/img_lv_demo_music_icon_1.c @@ -89,7 +89,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_icon_1_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_icon_1 = { +lv_image_dsc_t img_lv_demo_music_icon_1 = { .header.always_zero = 0, .header.w = 24, .header.h = 24, diff --git a/demos/music/assets/img_lv_demo_music_icon_1_large.c b/demos/music/assets/img_lv_demo_music_icon_1_large.c index 5044175c0..f80326dde 100644 --- a/demos/music/assets/img_lv_demo_music_icon_1_large.c +++ b/demos/music/assets/img_lv_demo_music_icon_1_large.c @@ -7,11 +7,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_CHART - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_CHART +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_CHART + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_CHART #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_CHART uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_CHART uint8_t img_lv_demo_music_icon_1_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -114,7 +114,7 @@ img_lv_demo_music_icon_1_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_icon_1 = { +const lv_image_dsc_t img_lv_demo_music_icon_1 = { .header.always_zero = 0, .header.w = 30, .header.h = 30, diff --git a/demos/music/assets/img_lv_demo_music_icon_2.c b/demos/music/assets/img_lv_demo_music_icon_2.c index 89462e0a1..27d4624f0 100644 --- a/demos/music/assets/img_lv_demo_music_icon_2.c +++ b/demos/music/assets/img_lv_demo_music_icon_2.c @@ -89,7 +89,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_icon_2_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_icon_2 = { +lv_image_dsc_t img_lv_demo_music_icon_2 = { .header.always_zero = 0, .header.w = 24, .header.h = 24, diff --git a/demos/music/assets/img_lv_demo_music_icon_2_large.c b/demos/music/assets/img_lv_demo_music_icon_2_large.c index 05a9ac870..aff1401cf 100644 --- a/demos/music/assets/img_lv_demo_music_icon_2_large.c +++ b/demos/music/assets/img_lv_demo_music_icon_2_large.c @@ -7,11 +7,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_CHAT - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_CHAT +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_CHAT + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_CHAT #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_CHAT uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_CHAT uint8_t img_lv_demo_music_icon_2_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -117,7 +117,7 @@ img_lv_demo_music_icon_2_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_icon_2 = { +const lv_image_dsc_t img_lv_demo_music_icon_2 = { .header.always_zero = 0, .header.w = 31, .header.h = 31, diff --git a/demos/music/assets/img_lv_demo_music_icon_3.c b/demos/music/assets/img_lv_demo_music_icon_3.c index e79ba23ba..38c4f2998 100644 --- a/demos/music/assets/img_lv_demo_music_icon_3.c +++ b/demos/music/assets/img_lv_demo_music_icon_3.c @@ -89,7 +89,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_icon_3_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_icon_3 = { +lv_image_dsc_t img_lv_demo_music_icon_3 = { .header.always_zero = 0, .header.w = 24, .header.h = 24, diff --git a/demos/music/assets/img_lv_demo_music_icon_3_large.c b/demos/music/assets/img_lv_demo_music_icon_3_large.c index d359e07dd..27297e295 100644 --- a/demos/music/assets/img_lv_demo_music_icon_3_large.c +++ b/demos/music/assets/img_lv_demo_music_icon_3_large.c @@ -7,11 +7,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_DOWNLOAD - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_DOWNLOAD +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_DOWNLOAD + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_DOWNLOAD #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_DOWNLOAD uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_DOWNLOAD uint8_t img_lv_demo_music_icon_3_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -120,7 +120,7 @@ img_lv_demo_music_icon_3_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_icon_3 = { +const lv_image_dsc_t img_lv_demo_music_icon_3 = { .header.always_zero = 0, .header.w = 34, .header.h = 32, diff --git a/demos/music/assets/img_lv_demo_music_icon_4.c b/demos/music/assets/img_lv_demo_music_icon_4.c index 3ffc216e0..c36ceff63 100644 --- a/demos/music/assets/img_lv_demo_music_icon_4.c +++ b/demos/music/assets/img_lv_demo_music_icon_4.c @@ -89,7 +89,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_icon_4_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_icon_4 = { +lv_image_dsc_t img_lv_demo_music_icon_4 = { .header.always_zero = 0, .header.w = 24, .header.h = 24, diff --git a/demos/music/assets/img_lv_demo_music_icon_4_large.c b/demos/music/assets/img_lv_demo_music_icon_4_large.c index ff0474b83..a795f7de9 100644 --- a/demos/music/assets/img_lv_demo_music_icon_4_large.c +++ b/demos/music/assets/img_lv_demo_music_icon_4_large.c @@ -7,11 +7,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_HEART - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_HEART +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_HEART + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_HEART #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_HEART uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_HEART uint8_t img_lv_demo_music_icon_4_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -114,7 +114,7 @@ img_lv_demo_music_icon_4_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_icon_4 = { +const lv_image_dsc_t img_lv_demo_music_icon_4 = { .header.always_zero = 0, .header.w = 32, .header.h = 30, diff --git a/demos/music/assets/img_lv_demo_music_list_border.c b/demos/music/assets/img_lv_demo_music_list_border.c index 644c8027f..617507bea 100644 --- a/demos/music/assets/img_lv_demo_music_list_border.c +++ b/demos/music/assets/img_lv_demo_music_list_border.c @@ -28,7 +28,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_list_border_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_list_border = { +lv_image_dsc_t img_lv_demo_music_list_border = { .header.always_zero = 0, .header.w = 272, .header.h = 4, diff --git a/demos/music/assets/img_lv_demo_music_list_border_large.c b/demos/music/assets/img_lv_demo_music_list_border_large.c index c31b97fd3..b659aff60 100644 --- a/demos/music/assets/img_lv_demo_music_list_border_large.c +++ b/demos/music/assets/img_lv_demo_music_list_border_large.c @@ -7,11 +7,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_LIST_BORDER - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_LIST_BORDER +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_LIST_BORDER + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_LIST_BORDER #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_LIST_BORDER uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_LIST_BORDER uint8_t img_lv_demo_music_list_border_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -45,7 +45,7 @@ img_lv_demo_music_list_border_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_list_border = { +const lv_image_dsc_t img_lv_demo_music_list_border = { .header.always_zero = 0, .header.w = 479, .header.h = 7, diff --git a/demos/music/assets/img_lv_demo_music_logo.c b/demos/music/assets/img_lv_demo_music_logo.c index 7541b3f89..850839b1a 100644 --- a/demos/music/assets/img_lv_demo_music_logo.c +++ b/demos/music/assets/img_lv_demo_music_logo.c @@ -308,7 +308,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_logo_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_logo = { +lv_image_dsc_t img_lv_demo_music_logo = { .header.always_zero = 0, .header.w = 97, .header.h = 97, diff --git a/demos/music/assets/img_lv_demo_music_slider_knob.c b/demos/music/assets/img_lv_demo_music_slider_knob.c index a3969b9ce..7ba603a9e 100644 --- a/demos/music/assets/img_lv_demo_music_slider_knob.c +++ b/demos/music/assets/img_lv_demo_music_slider_knob.c @@ -130,7 +130,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_slider_knob_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_slider_knob = { +lv_image_dsc_t img_lv_demo_music_slider_knob = { .header.always_zero = 0, .header.w = 36, .header.h = 38, diff --git a/demos/music/assets/img_lv_demo_music_slider_knob_large.c b/demos/music/assets/img_lv_demo_music_slider_knob_large.c index bc78f422a..27fcd20c0 100644 --- a/demos/music/assets/img_lv_demo_music_slider_knob_large.c +++ b/demos/music/assets/img_lv_demo_music_slider_knob_large.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_SLIDER - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_SLIDER +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_SLIDER + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_SLIDER #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_ICN_SLIDER uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_ICN_SLIDER uint8_t img_lv_demo_music_slider_knob_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ @@ -221,7 +221,7 @@ img_lv_demo_music_slider_knob_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_slider_knob = { +const lv_image_dsc_t img_lv_demo_music_slider_knob = { .header.always_zero = 0, .header.w = 66, .header.h = 66, diff --git a/demos/music/assets/img_lv_demo_music_wave_bottom.c b/demos/music/assets/img_lv_demo_music_wave_bottom.c index ef42c468a..144ca08f8 100644 --- a/demos/music/assets/img_lv_demo_music_wave_bottom.c +++ b/demos/music/assets/img_lv_demo_music_wave_bottom.c @@ -143,7 +143,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_wave_bottom_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_wave_bottom = { +lv_image_dsc_t img_lv_demo_music_wave_bottom = { .header.always_zero = 0, .header.w = 272, .header.h = 42, diff --git a/demos/music/assets/img_lv_demo_music_wave_bottom_large.c b/demos/music/assets/img_lv_demo_music_wave_bottom_large.c index 2c618e961..bb0a29e51 100644 --- a/demos/music/assets/img_lv_demo_music_wave_bottom_large.c +++ b/demos/music/assets/img_lv_demo_music_wave_bottom_large.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_WAVE_BOTTOM - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_WAVE_BOTTOM +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_WAVE_BOTTOM + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_WAVE_BOTTOM #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_WAVE_BOTTOM uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_WAVE_BOTTOM uint8_t img_lv_demo_music_wave_bottom_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit*/ @@ -245,7 +245,7 @@ img_lv_demo_music_wave_bottom_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_wave_bottom = { +const lv_image_dsc_t img_lv_demo_music_wave_bottom = { .header.always_zero = 0, .header.w = 479, .header.h = 74, diff --git a/demos/music/assets/img_lv_demo_music_wave_top.c b/demos/music/assets/img_lv_demo_music_wave_top.c index b6d80498f..152d8ee53 100644 --- a/demos/music/assets/img_lv_demo_music_wave_top.c +++ b/demos/music/assets/img_lv_demo_music_wave_top.c @@ -143,7 +143,7 @@ const LV_ATTRIBUTE_MEM_ALIGN uint8_t img_lv_demo_music_wave_top_map[] = { #endif }; -lv_img_dsc_t img_lv_demo_music_wave_top = { +lv_image_dsc_t img_lv_demo_music_wave_top = { .header.always_zero = 0, .header.w = 272, .header.h = 42, diff --git a/demos/music/assets/img_lv_demo_music_wave_top_large.c b/demos/music/assets/img_lv_demo_music_wave_top_large.c index 2ba8e35d9..9939b9652 100644 --- a/demos/music/assets/img_lv_demo_music_wave_top_large.c +++ b/demos/music/assets/img_lv_demo_music_wave_top_large.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_WAVE_TOP - #define LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_WAVE_TOP +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_WAVE_TOP + #define LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_WAVE_TOP #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LV_DEMO_MUSIC_WAVE_TOP uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LV_DEMO_MUSIC_WAVE_TOP uint8_t img_lv_demo_music_wave_top_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit*/ @@ -245,7 +245,7 @@ img_lv_demo_music_wave_top_map[] = { #endif }; -const lv_img_dsc_t img_lv_demo_music_wave_top = { +const lv_image_dsc_t img_lv_demo_music_wave_top = { .header.always_zero = 0, .header.w = 479, .header.h = 74, diff --git a/demos/music/lv_demo_music_list.c b/demos/music/lv_demo_music_list.c index 1900fee8c..a12430516 100644 --- a/demos/music/lv_demo_music_list.c +++ b/demos/music/lv_demo_music_list.c @@ -22,7 +22,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static lv_obj_t * add_list_btn(lv_obj_t * parent, uint32_t track_id); +static lv_obj_t * add_list_button(lv_obj_t * parent, uint32_t track_id); static void btn_click_event_cb(lv_event_t * e); /********************** @@ -33,14 +33,14 @@ static const lv_font_t * font_small; static const lv_font_t * font_medium; static lv_style_t style_scrollbar; static lv_style_t style_btn; -static lv_style_t style_btn_pr; -static lv_style_t style_btn_chk; -static lv_style_t style_btn_dis; +static lv_style_t style_button_pr; +static lv_style_t style_button_chk; +static lv_style_t style_button_dis; static lv_style_t style_title; static lv_style_t style_artist; static lv_style_t style_time; -LV_IMG_DECLARE(img_lv_demo_music_btn_list_play); -LV_IMG_DECLARE(img_lv_demo_music_btn_list_pause); +LV_IMAGE_DECLARE(img_lv_demo_music_btn_list_play); +LV_IMAGE_DECLARE(img_lv_demo_music_btn_list_pause); /********************** * MACROS @@ -103,17 +103,17 @@ lv_obj_t * _lv_demo_music_list_create(lv_obj_t * parent) #else lv_style_set_pad_right(&style_btn, 20); #endif - lv_style_init(&style_btn_pr); - lv_style_set_bg_opa(&style_btn_pr, LV_OPA_COVER); - lv_style_set_bg_color(&style_btn_pr, lv_color_hex(0x4c4965)); + lv_style_init(&style_button_pr); + lv_style_set_bg_opa(&style_button_pr, LV_OPA_COVER); + lv_style_set_bg_color(&style_button_pr, lv_color_hex(0x4c4965)); - lv_style_init(&style_btn_chk); - lv_style_set_bg_opa(&style_btn_chk, LV_OPA_COVER); - lv_style_set_bg_color(&style_btn_chk, lv_color_hex(0x4c4965)); + lv_style_init(&style_button_chk); + lv_style_set_bg_opa(&style_button_chk, LV_OPA_COVER); + lv_style_set_bg_color(&style_button_chk, lv_color_hex(0x4c4965)); - lv_style_init(&style_btn_dis); - lv_style_set_text_opa(&style_btn_dis, LV_OPA_40); - lv_style_set_img_opa(&style_btn_dis, LV_OPA_40); + lv_style_init(&style_button_dis); + lv_style_set_text_opa(&style_button_dis, LV_OPA_40); + lv_style_set_image_opa(&style_button_dis, LV_OPA_40); lv_style_init(&style_title); lv_style_set_text_font(&style_title, font_medium); @@ -137,31 +137,31 @@ lv_obj_t * _lv_demo_music_list_create(lv_obj_t * parent) uint32_t track_id; for(track_id = 0; _lv_demo_music_get_title(track_id); track_id++) { - add_list_btn(list, track_id); + add_list_button(list, track_id); } #if LV_DEMO_MUSIC_SQUARE || LV_DEMO_MUSIC_ROUND lv_obj_set_scroll_snap_y(list, LV_SCROLL_SNAP_CENTER); #endif - _lv_demo_music_list_btn_check(0, true); + _lv_demo_music_list_button_check(0, true); return list; } -void _lv_demo_music_list_btn_check(uint32_t track_id, bool state) +void _lv_demo_music_list_button_check(uint32_t track_id, bool state) { lv_obj_t * btn = lv_obj_get_child(list, track_id); lv_obj_t * icon = lv_obj_get_child(btn, 0); if(state) { lv_obj_add_state(btn, LV_STATE_CHECKED); - lv_img_set_src(icon, &img_lv_demo_music_btn_list_pause); + lv_image_set_src(icon, &img_lv_demo_music_btn_list_pause); lv_obj_scroll_to_view(btn, LV_ANIM_ON); } else { lv_obj_clear_state(btn, LV_STATE_CHECKED); - lv_img_set_src(icon, &img_lv_demo_music_btn_list_play); + lv_image_set_src(icon, &img_lv_demo_music_btn_list_play); } } @@ -169,7 +169,7 @@ void _lv_demo_music_list_btn_check(uint32_t track_id, bool state) * STATIC FUNCTIONS **********************/ -static lv_obj_t * add_list_btn(lv_obj_t * parent, uint32_t track_id) +static lv_obj_t * add_list_button(lv_obj_t * parent, uint32_t track_id) { uint32_t t = _lv_demo_music_get_track_length(track_id); char time[32]; @@ -186,17 +186,17 @@ static lv_obj_t * add_list_btn(lv_obj_t * parent, uint32_t track_id) #endif lv_obj_add_style(btn, &style_btn, 0); - lv_obj_add_style(btn, &style_btn_pr, LV_STATE_PRESSED); - lv_obj_add_style(btn, &style_btn_chk, LV_STATE_CHECKED); - lv_obj_add_style(btn, &style_btn_dis, LV_STATE_DISABLED); + lv_obj_add_style(btn, &style_button_pr, LV_STATE_PRESSED); + lv_obj_add_style(btn, &style_button_chk, LV_STATE_CHECKED); + lv_obj_add_style(btn, &style_button_dis, LV_STATE_DISABLED); lv_obj_add_event(btn, btn_click_event_cb, LV_EVENT_CLICKED, NULL); if(track_id >= 3) { lv_obj_add_state(btn, LV_STATE_DISABLED); } - lv_obj_t * icon = lv_img_create(btn); - lv_img_set_src(icon, &img_lv_demo_music_btn_list_play); + lv_obj_t * icon = lv_image_create(btn); + lv_image_set_src(icon, &img_lv_demo_music_btn_list_play); lv_obj_set_grid_cell(icon, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_CENTER, 0, 2); lv_obj_t * title_label = lv_label_create(btn); @@ -214,9 +214,9 @@ static lv_obj_t * add_list_btn(lv_obj_t * parent, uint32_t track_id) lv_obj_add_style(time_label, &style_time, 0); lv_obj_set_grid_cell(time_label, LV_GRID_ALIGN_END, 2, 1, LV_GRID_ALIGN_CENTER, 0, 2); - LV_IMG_DECLARE(img_lv_demo_music_list_border); - lv_obj_t * border = lv_img_create(btn); - lv_img_set_src(border, &img_lv_demo_music_list_border); + LV_IMAGE_DECLARE(img_lv_demo_music_list_border); + lv_obj_t * border = lv_image_create(btn); + lv_image_set_src(border, &img_lv_demo_music_list_border); lv_obj_set_width(border, lv_pct(120)); lv_obj_align(border, LV_ALIGN_BOTTOM_MID, 0, 0); lv_obj_add_flag(border, LV_OBJ_FLAG_IGNORE_LAYOUT); @@ -229,7 +229,7 @@ static void btn_click_event_cb(lv_event_t * e) { lv_obj_t * btn = lv_event_get_target(e); - uint32_t idx = lv_obj_get_child_id(btn); + uint32_t idx = lv_obj_get_index(btn); _lv_demo_music_play(idx); } diff --git a/demos/music/lv_demo_music_list.h b/demos/music/lv_demo_music_list.h index 48e6e1704..874f1c2a5 100644 --- a/demos/music/lv_demo_music_list.h +++ b/demos/music/lv_demo_music_list.h @@ -28,7 +28,7 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ lv_obj_t * _lv_demo_music_list_create(lv_obj_t * parent); -void _lv_demo_music_list_btn_check(uint32_t track_id, bool state); +void _lv_demo_music_list_button_check(uint32_t track_id, bool state); /********************** * MACROS diff --git a/demos/music/lv_demo_music_main.c b/demos/music/lv_demo_music_main.c index 2c22d683a..42a7449c1 100644 --- a/demos/music/lv_demo_music_main.c +++ b/demos/music/lv_demo_music_main.c @@ -54,7 +54,7 @@ static void spectrum_anim_cb(void * a, int32_t v); static void start_anim_cb(void * a, int32_t v); static void del_counter_timer_cb(lv_event_t * e); static void spectrum_draw_event_cb(lv_event_t * e); -static lv_obj_t * album_img_create(lv_obj_t * parent); +static lv_obj_t * album_image_create(lv_obj_t * parent); static void album_gesture_event_cb(lv_event_t * e); static void play_event_click_cb(lv_event_t * e); static void prev_click_event_cb(lv_event_t * e); @@ -76,7 +76,7 @@ static lv_obj_t * title_label; static lv_obj_t * artist_label; static lv_obj_t * genre_label; static lv_obj_t * time_obj; -static lv_obj_t * album_img_obj; +static lv_obj_t * album_image_obj; static lv_obj_t * slider_obj; static uint32_t spectrum_i = 0; static uint32_t spectrum_i_pause = 0; @@ -109,9 +109,9 @@ static const uint16_t rnd_array[30] = {994, 285, 553, 11, 792, 707, 966, 641, 85 * Callback adapter function to convert parameter types to avoid compile-time * warning. */ -static void _img_set_zoom_anim_cb(void * obj, int32_t zoom) +static void _image_set_zoom_anim_cb(void * obj, int32_t zoom) { - lv_img_set_zoom((lv_obj_t *)obj, (uint16_t)zoom); + lv_image_set_zoom((lv_obj_t *)obj, (uint16_t)zoom); } /* @@ -274,22 +274,22 @@ lv_obj_t * _lv_demo_music_main_create(lv_obj_t * parent) lv_obj_fade_in(icon_box, 1000, INTRO_TIME + 1000); lv_obj_fade_in(ctrl_box, 1000, INTRO_TIME + 1000); lv_obj_fade_in(handle_box, 1000, INTRO_TIME + 1000); - lv_obj_fade_in(album_img_obj, 800, INTRO_TIME + 1000); + lv_obj_fade_in(album_image_obj, 800, INTRO_TIME + 1000); lv_obj_fade_in(spectrum_obj, 0, INTRO_TIME); lv_anim_set_path_cb(&a, lv_anim_path_ease_out); - lv_anim_set_var(&a, album_img_obj); + lv_anim_set_var(&a, album_image_obj); lv_anim_set_time(&a, 1000); lv_anim_set_delay(&a, INTRO_TIME + 1000); lv_anim_set_values(&a, 1, LV_ZOOM_NONE); - lv_anim_set_exec_cb(&a, _img_set_zoom_anim_cb); + lv_anim_set_exec_cb(&a, _image_set_zoom_anim_cb); lv_anim_set_ready_cb(&a, NULL); lv_anim_start(&a); /* Create an intro from a logo + label */ - LV_IMG_DECLARE(img_lv_demo_music_logo); - lv_obj_t * logo = lv_img_create(lv_scr_act()); - lv_img_set_src(logo, &img_lv_demo_music_logo); + LV_IMAGE_DECLARE(img_lv_demo_music_logo); + lv_obj_t * logo = lv_image_create(lv_scr_act()); + lv_image_set_src(logo, &img_lv_demo_music_logo); lv_obj_move_foreground(logo); lv_obj_t * title = lv_label_create(lv_scr_act()); @@ -373,7 +373,7 @@ void _lv_demo_music_pause(void) spectrum_i = 0; lv_anim_del(spectrum_obj, spectrum_anim_cb); lv_obj_invalidate(spectrum_obj); - lv_img_set_zoom(album_img_obj, LV_ZOOM_NONE); + lv_image_set_zoom(album_image_obj, LV_ZOOM_NONE); if(sec_counter_timer) lv_timer_pause(sec_counter_timer); lv_obj_clear_state(play_obj, LV_STATE_CHECKED); } @@ -400,7 +400,7 @@ static lv_obj_t * create_cont(lv_obj_t * parent) #else lv_obj_set_size(player, LV_HOR_RES, LV_VER_RES + LV_DEMO_MUSIC_HANDLE_SIZE * 2); #endif - lv_obj_clear_flag(player, LV_OBJ_FLAG_SNAPABLE); + lv_obj_clear_flag(player, LV_OBJ_FLAG_SNAPPABLE); lv_obj_set_style_bg_color(player, lv_color_hex(0xffffff), 0); lv_obj_set_style_border_width(player, 0, 0); @@ -445,24 +445,24 @@ static lv_obj_t * create_cont(lv_obj_t * parent) static void create_wave_images(lv_obj_t * parent) { - LV_IMG_DECLARE(img_lv_demo_music_wave_top); - LV_IMG_DECLARE(img_lv_demo_music_wave_bottom); - lv_obj_t * wave_top = lv_img_create(parent); - lv_img_set_src(wave_top, &img_lv_demo_music_wave_top); + LV_IMAGE_DECLARE(img_lv_demo_music_wave_top); + LV_IMAGE_DECLARE(img_lv_demo_music_wave_bottom); + lv_obj_t * wave_top = lv_image_create(parent); + lv_image_set_src(wave_top, &img_lv_demo_music_wave_top); lv_obj_set_width(wave_top, LV_HOR_RES); lv_obj_align(wave_top, LV_ALIGN_TOP_MID, 0, 0); lv_obj_add_flag(wave_top, LV_OBJ_FLAG_IGNORE_LAYOUT); - lv_obj_t * wave_bottom = lv_img_create(parent); - lv_img_set_src(wave_bottom, &img_lv_demo_music_wave_bottom); + lv_obj_t * wave_bottom = lv_image_create(parent); + lv_image_set_src(wave_bottom, &img_lv_demo_music_wave_bottom); lv_obj_set_width(wave_bottom, LV_HOR_RES); lv_obj_align(wave_bottom, LV_ALIGN_BOTTOM_MID, 0, 0); lv_obj_add_flag(wave_bottom, LV_OBJ_FLAG_IGNORE_LAYOUT); - LV_IMG_DECLARE(img_lv_demo_music_corner_left); - LV_IMG_DECLARE(img_lv_demo_music_corner_right); - lv_obj_t * wave_corner = lv_img_create(parent); - lv_img_set_src(wave_corner, &img_lv_demo_music_corner_left); + LV_IMAGE_DECLARE(img_lv_demo_music_corner_left); + LV_IMAGE_DECLARE(img_lv_demo_music_corner_right); + lv_obj_t * wave_corner = lv_image_create(parent); + lv_image_set_src(wave_corner, &img_lv_demo_music_corner_left); #if LV_DEMO_MUSIC_ROUND == 0 lv_obj_align(wave_corner, LV_ALIGN_BOTTOM_LEFT, 0, 0); #else @@ -470,8 +470,8 @@ static void create_wave_images(lv_obj_t * parent) #endif lv_obj_add_flag(wave_corner, LV_OBJ_FLAG_IGNORE_LAYOUT); - wave_corner = lv_img_create(parent); - lv_img_set_src(wave_corner, &img_lv_demo_music_corner_right); + wave_corner = lv_image_create(parent); + lv_image_set_src(wave_corner, &img_lv_demo_music_corner_right); #if LV_DEMO_MUSIC_ROUND == 0 lv_obj_align(wave_corner, LV_ALIGN_BOTTOM_RIGHT, 0, 0); #else @@ -519,18 +519,18 @@ static lv_obj_t * create_icon_box(lv_obj_t * parent) lv_obj_set_flex_align(cont, LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER); lv_obj_t * icon; - LV_IMG_DECLARE(img_lv_demo_music_icon_1); - LV_IMG_DECLARE(img_lv_demo_music_icon_2); - LV_IMG_DECLARE(img_lv_demo_music_icon_3); - LV_IMG_DECLARE(img_lv_demo_music_icon_4); - icon = lv_img_create(cont); - lv_img_set_src(icon, &img_lv_demo_music_icon_1); - icon = lv_img_create(cont); - lv_img_set_src(icon, &img_lv_demo_music_icon_2); - icon = lv_img_create(cont); - lv_img_set_src(icon, &img_lv_demo_music_icon_3); - icon = lv_img_create(cont); - lv_img_set_src(icon, &img_lv_demo_music_icon_4); + LV_IMAGE_DECLARE(img_lv_demo_music_icon_1); + LV_IMAGE_DECLARE(img_lv_demo_music_icon_2); + LV_IMAGE_DECLARE(img_lv_demo_music_icon_3); + LV_IMAGE_DECLARE(img_lv_demo_music_icon_4); + icon = lv_image_create(cont); + lv_image_set_src(icon, &img_lv_demo_music_icon_1); + icon = lv_image_create(cont); + lv_image_set_src(icon, &img_lv_demo_music_icon_2); + icon = lv_image_create(cont); + lv_image_set_src(icon, &img_lv_demo_music_icon_3); + icon = lv_image_create(cont); + lv_image_set_src(icon, &img_lv_demo_music_icon_4); return cont; } @@ -548,7 +548,7 @@ static lv_obj_t * create_spectrum_obj(lv_obj_t * parent) lv_obj_clear_flag(obj, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_SCROLLABLE); lv_obj_add_event(obj, spectrum_draw_event_cb, LV_EVENT_ALL, NULL); lv_obj_refresh_ext_draw_size(obj); - album_img_obj = album_img_create(obj); + album_image_obj = album_image_create(obj); return obj; } @@ -567,24 +567,24 @@ static lv_obj_t * create_ctrl_box(lv_obj_t * parent) static const lv_coord_t grid_row[] = {LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST}; lv_obj_set_grid_dsc_array(cont, grid_col, grid_row); - LV_IMG_DECLARE(img_lv_demo_music_btn_loop); - LV_IMG_DECLARE(img_lv_demo_music_btn_rnd); - LV_IMG_DECLARE(img_lv_demo_music_btn_next); - LV_IMG_DECLARE(img_lv_demo_music_btn_prev); - LV_IMG_DECLARE(img_lv_demo_music_btn_play); - LV_IMG_DECLARE(img_lv_demo_music_btn_pause); + LV_IMAGE_DECLARE(img_lv_demo_music_btn_loop); + LV_IMAGE_DECLARE(img_lv_demo_music_btn_rnd); + LV_IMAGE_DECLARE(img_lv_demo_music_btn_next); + LV_IMAGE_DECLARE(img_lv_demo_music_btn_prev); + LV_IMAGE_DECLARE(img_lv_demo_music_btn_play); + LV_IMAGE_DECLARE(img_lv_demo_music_btn_pause); lv_obj_t * icon; - icon = lv_img_create(cont); - lv_img_set_src(icon, &img_lv_demo_music_btn_rnd); + icon = lv_image_create(cont); + lv_image_set_src(icon, &img_lv_demo_music_btn_rnd); lv_obj_set_grid_cell(icon, LV_GRID_ALIGN_START, 1, 1, LV_GRID_ALIGN_CENTER, 0, 1); - icon = lv_img_create(cont); - lv_img_set_src(icon, &img_lv_demo_music_btn_loop); + icon = lv_image_create(cont); + lv_image_set_src(icon, &img_lv_demo_music_btn_loop); lv_obj_set_grid_cell(icon, LV_GRID_ALIGN_END, 5, 1, LV_GRID_ALIGN_CENTER, 0, 1); - icon = lv_img_create(cont); - lv_img_set_src(icon, &img_lv_demo_music_btn_prev); + icon = lv_image_create(cont); + lv_image_set_src(icon, &img_lv_demo_music_btn_prev); lv_obj_set_grid_cell(icon, LV_GRID_ALIGN_CENTER, 2, 1, LV_GRID_ALIGN_CENTER, 0, 1); lv_obj_add_event(icon, prev_click_event_cb, LV_EVENT_CLICKED, NULL); @@ -598,13 +598,13 @@ static lv_obj_t * create_ctrl_box(lv_obj_t * parent) lv_obj_add_flag(play_obj, LV_OBJ_FLAG_CLICKABLE); lv_obj_set_width(play_obj, img_lv_demo_music_btn_play.header.w); - icon = lv_img_create(cont); - lv_img_set_src(icon, &img_lv_demo_music_btn_next); + icon = lv_image_create(cont); + lv_image_set_src(icon, &img_lv_demo_music_btn_next); lv_obj_set_grid_cell(icon, LV_GRID_ALIGN_CENTER, 4, 1, LV_GRID_ALIGN_CENTER, 0, 1); lv_obj_add_event(icon, next_click_event_cb, LV_EVENT_CLICKED, NULL); lv_obj_add_flag(icon, LV_OBJ_FLAG_CLICKABLE); - LV_IMG_DECLARE(img_lv_demo_music_slider_knob); + LV_IMAGE_DECLARE(img_lv_demo_music_slider_knob); slider_obj = lv_slider_create(cont); lv_obj_set_style_anim_time(slider_obj, 100, 0); lv_obj_add_flag(slider_obj, LV_OBJ_FLAG_CLICKABLE); /*No input from the slider*/ @@ -616,7 +616,7 @@ static lv_obj_t * create_ctrl_box(lv_obj_t * parent) #endif lv_obj_set_grid_cell(slider_obj, LV_GRID_ALIGN_STRETCH, 1, 4, LV_GRID_ALIGN_CENTER, 1, 1); - lv_obj_set_style_bg_img_src(slider_obj, &img_lv_demo_music_slider_knob, LV_PART_KNOB); + lv_obj_set_style_bg_image_src(slider_obj, &img_lv_demo_music_slider_knob, LV_PART_KNOB); lv_obj_set_style_bg_opa(slider_obj, LV_OPA_TRANSP, LV_PART_KNOB); lv_obj_set_style_pad_all(slider_obj, 20, LV_PART_KNOB); lv_obj_set_style_bg_grad_dir(slider_obj, LV_GRAD_DIR_HOR, LV_PART_INDICATOR); @@ -676,11 +676,11 @@ static void track_load(uint32_t id) bool next = false; if((track_id + 1) % ACTIVE_TRACK_CNT == id) next = true; - _lv_demo_music_list_btn_check(track_id, false); + _lv_demo_music_list_button_check(track_id, false); track_id = id; - _lv_demo_music_list_btn_check(id, true); + _lv_demo_music_list_button_check(id, true); lv_label_set_text(title_label, _lv_demo_music_get_title(track_id)); lv_label_set_text(artist_label, _lv_demo_music_get_artist(track_id)); @@ -688,14 +688,14 @@ static void track_load(uint32_t id) lv_anim_t a; lv_anim_init(&a); - lv_anim_set_var(&a, album_img_obj); - lv_anim_set_values(&a, lv_obj_get_style_img_opa(album_img_obj, 0), LV_OPA_TRANSP); + lv_anim_set_var(&a, album_image_obj); + lv_anim_set_values(&a, lv_obj_get_style_image_opa(album_image_obj, 0), LV_OPA_TRANSP); lv_anim_set_exec_cb(&a, album_fade_anim_cb); lv_anim_set_time(&a, 500); lv_anim_start(&a); lv_anim_init(&a); - lv_anim_set_var(&a, album_img_obj); + lv_anim_set_var(&a, album_image_obj); lv_anim_set_time(&a, 500); lv_anim_set_path_cb(&a, lv_anim_path_ease_out); #if LV_DEMO_MUSIC_LANDSCAPE @@ -718,26 +718,26 @@ static void track_load(uint32_t id) lv_anim_start(&a); lv_anim_set_path_cb(&a, lv_anim_path_linear); - lv_anim_set_var(&a, album_img_obj); + lv_anim_set_var(&a, album_image_obj); lv_anim_set_time(&a, 500); lv_anim_set_values(&a, LV_ZOOM_NONE, LV_ZOOM_NONE / 2); - lv_anim_set_exec_cb(&a, _img_set_zoom_anim_cb); + lv_anim_set_exec_cb(&a, _image_set_zoom_anim_cb); lv_anim_set_ready_cb(&a, NULL); lv_anim_start(&a); - album_img_obj = album_img_create(spectrum_obj); + album_image_obj = album_image_create(spectrum_obj); lv_anim_set_path_cb(&a, lv_anim_path_overshoot); - lv_anim_set_var(&a, album_img_obj); + lv_anim_set_var(&a, album_image_obj); lv_anim_set_time(&a, 500); lv_anim_set_delay(&a, 100); lv_anim_set_values(&a, LV_ZOOM_NONE / 4, LV_ZOOM_NONE); - lv_anim_set_exec_cb(&a, _img_set_zoom_anim_cb); + lv_anim_set_exec_cb(&a, _image_set_zoom_anim_cb); lv_anim_set_ready_cb(&a, NULL); lv_anim_start(&a); lv_anim_init(&a); - lv_anim_set_var(&a, album_img_obj); + lv_anim_set_var(&a, album_image_obj); lv_anim_set_values(&a, 0, LV_OPA_COVER); lv_anim_set_exec_cb(&a, album_fade_anim_cb); lv_anim_set_time(&a, 500); @@ -809,7 +809,7 @@ static void spectrum_draw_event_cb(lv_event_t * e) #else lv_coord_t r_in = 160; #endif - r_in = (r_in * lv_img_get_zoom(album_img_obj)) >> 8; + r_in = (r_in * lv_image_get_zoom(album_image_obj)) >> 8; for(i = 0; i < BAR_CNT; i++) r[i] = r_in + min_a + 77; uint32_t s; @@ -924,7 +924,7 @@ static void spectrum_anim_cb(void * a, int32_t v) } if(spectrum[spectrum_i][0] < 4) bar_rot += dir; - lv_img_set_zoom(album_img_obj, LV_ZOOM_NONE + spectrum[spectrum_i][0]); + lv_image_set_zoom(album_image_obj, LV_ZOOM_NONE + spectrum[spectrum_i][0]); } static void start_anim_cb(void * a, int32_t v) @@ -934,33 +934,33 @@ static void start_anim_cb(void * a, int32_t v) lv_obj_invalidate(spectrum_obj); } -static lv_obj_t * album_img_create(lv_obj_t * parent) +static lv_obj_t * album_image_create(lv_obj_t * parent) { - LV_IMG_DECLARE(img_lv_demo_music_cover_1); - LV_IMG_DECLARE(img_lv_demo_music_cover_2); - LV_IMG_DECLARE(img_lv_demo_music_cover_3); + LV_IMAGE_DECLARE(img_lv_demo_music_cover_1); + LV_IMAGE_DECLARE(img_lv_demo_music_cover_2); + LV_IMAGE_DECLARE(img_lv_demo_music_cover_3); lv_obj_t * img; - img = lv_img_create(parent); + img = lv_image_create(parent); switch(track_id) { case 2: - lv_img_set_src(img, &img_lv_demo_music_cover_3); + lv_image_set_src(img, &img_lv_demo_music_cover_3); spectrum = spectrum_3; spectrum_len = sizeof(spectrum_3) / sizeof(spectrum_3[0]); break; case 1: - lv_img_set_src(img, &img_lv_demo_music_cover_2); + lv_image_set_src(img, &img_lv_demo_music_cover_2); spectrum = spectrum_2; spectrum_len = sizeof(spectrum_2) / sizeof(spectrum_2[0]); break; case 0: - lv_img_set_src(img, &img_lv_demo_music_cover_1); + lv_image_set_src(img, &img_lv_demo_music_cover_1); spectrum = spectrum_1; spectrum_len = sizeof(spectrum_1) / sizeof(spectrum_1[0]); break; } - lv_img_set_antialias(img, false); + lv_image_set_antialias(img, false); lv_obj_align(img, LV_ALIGN_CENTER, 0, 0); lv_obj_add_event(img, album_gesture_event_cb, LV_EVENT_GESTURE, NULL); lv_obj_clear_flag(img, LV_OBJ_FLAG_GESTURE_BUBBLE); @@ -1028,7 +1028,7 @@ static void stop_start_anim(lv_timer_t * t) static void album_fade_anim_cb(void * var, int32_t v) { - lv_obj_set_style_img_opa(var, v, 0); + lv_obj_set_style_image_opa(var, v, 0); } #endif /*LV_USE_DEMO_MUSIC*/ diff --git a/demos/scroll/lv_demo_scroll.c b/demos/scroll/lv_demo_scroll.c index 18155e7d1..c4f13cce0 100644 --- a/demos/scroll/lv_demo_scroll.c +++ b/demos/scroll/lv_demo_scroll.c @@ -49,16 +49,16 @@ void lv_demo_scroll(void) lv_obj_set_flex_align(panel, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER); list = lv_list_create(panel); - lv_list_add_btn(list, LV_SYMBOL_IMAGE, "Image1.png"); - lv_list_add_btn(list, LV_SYMBOL_IMAGE, "Image2.png"); - lv_list_add_btn(list, LV_SYMBOL_IMAGE, "Image3.png"); - lv_list_add_btn(list, LV_SYMBOL_IMAGE, "Image4.png"); - lv_list_add_btn(list, LV_SYMBOL_IMAGE, "Image5.png"); - lv_list_add_btn(list, LV_SYMBOL_IMAGE, "Image6.png"); - lv_list_add_btn(list, LV_SYMBOL_IMAGE, "Image7.png"); - lv_list_add_btn(list, LV_SYMBOL_IMAGE, "Image8.png"); - lv_list_add_btn(list, LV_SYMBOL_IMAGE, "Image9.png"); - lv_list_add_btn(list, LV_SYMBOL_IMAGE, "Image10.png"); + lv_list_add_button(list, LV_SYMBOL_IMAGE, "Image1.png"); + lv_list_add_button(list, LV_SYMBOL_IMAGE, "Image2.png"); + lv_list_add_button(list, LV_SYMBOL_IMAGE, "Image3.png"); + lv_list_add_button(list, LV_SYMBOL_IMAGE, "Image4.png"); + lv_list_add_button(list, LV_SYMBOL_IMAGE, "Image5.png"); + lv_list_add_button(list, LV_SYMBOL_IMAGE, "Image6.png"); + lv_list_add_button(list, LV_SYMBOL_IMAGE, "Image7.png"); + lv_list_add_button(list, LV_SYMBOL_IMAGE, "Image8.png"); + lv_list_add_button(list, LV_SYMBOL_IMAGE, "Image9.png"); + lv_list_add_button(list, LV_SYMBOL_IMAGE, "Image10.png"); switch_create(panel, "Scrollable", LV_OBJ_FLAG_SCROLLABLE, true); switch_create(panel, "Scroll chain", LV_OBJ_FLAG_SCROLL_CHAIN, true); diff --git a/demos/stress/lv_demo_stress.c b/demos/stress/lv_demo_stress.c index 759aa3b67..ab2e17621 100644 --- a/demos/stress/lv_demo_stress.c +++ b/demos/stress/lv_demo_stress.c @@ -32,7 +32,7 @@ static void obj_test_task_cb(lv_timer_t * tmr); **********************/ static lv_obj_t * main_page; static lv_obj_t * ta; -static const char * mbox_btns[] = {"Ok", "Cancel", ""}; +static const char * mbox_buttons[] = {"Ok", "Cancel", ""}; static uint32_t mem_free_start = 0; /********************** * MACROS @@ -82,7 +82,7 @@ static void obj_test_task_cb(lv_timer_t * tmr) lv_obj_set_flex_flow(main_page, LV_FLEX_FLOW_COLUMN); - obj = lv_btn_create(main_page); + obj = lv_button_create(main_page); lv_obj_set_size(obj, 100, 70); obj = lv_label_create(obj); lv_label_set_text(obj, "Multi line\n"LV_SYMBOL_OK LV_SYMBOL_CLOSE LV_SYMBOL_WIFI); @@ -106,7 +106,7 @@ static void obj_test_task_cb(lv_timer_t * tmr) break; case 2: - obj = lv_btn_create(main_page); + obj = lv_button_create(main_page); lv_obj_set_size(obj, 200, 70); /*Move to disabled state very slowly*/ @@ -137,9 +137,9 @@ static void obj_test_task_cb(lv_timer_t * tmr) break; case 4: - obj = lv_btn_create(main_page); + obj = lv_button_create(main_page); lv_obj_set_size(obj, 100, 70); - lv_obj_set_style_bg_img_src(obj, LV_SYMBOL_DUMMY"Text from\nstyle", 0); + lv_obj_set_style_bg_image_src(obj, LV_SYMBOL_DUMMY"Text from\nstyle", 0); lv_obj_del_async(obj); /*Delete on next call of `lv_task_handler` (so not now)*/ break; @@ -176,8 +176,8 @@ static void obj_test_task_cb(lv_timer_t * tmr) lv_obj_set_size(obj, LV_HOR_RES / 2, LV_VER_RES / 2); lv_obj_align(obj, LV_ALIGN_BOTTOM_RIGHT, 0, 0); lv_win_add_title(obj, "Window title"); - lv_win_add_btn(obj, LV_SYMBOL_CLOSE, 40); - lv_win_add_btn(obj, LV_SYMBOL_DOWN, 40); + lv_win_add_button(obj, LV_SYMBOL_CLOSE, 40); + lv_win_add_button(obj, LV_SYMBOL_DOWN, 40); auto_del(obj, LV_DEMO_STRESS_TIME_STEP * 3 + 5); obj = lv_calendar_create(lv_win_get_content(obj)); @@ -234,7 +234,7 @@ static void obj_test_task_cb(lv_timer_t * tmr) break; case 14: - obj = lv_msgbox_create(NULL, "Title", "Some text on the message box with average length", mbox_btns, true); + obj = lv_msgbox_create(NULL, "Title", "Some text on the message box with average length", mbox_buttons, true); lv_timer_t * msgbox_tmr = lv_timer_create(msgbox_del, LV_DEMO_STRESS_TIME_STEP * 5 + 30, obj); lv_timer_set_repeat_count(msgbox_tmr, 1); @@ -270,15 +270,15 @@ static void obj_test_task_cb(lv_timer_t * tmr) obj = lv_list_create(main_page); { lv_obj_t * b; - b = lv_list_add_btn(obj, LV_SYMBOL_OK, "1. Some very long text to scroll"); + b = lv_list_add_button(obj, LV_SYMBOL_OK, "1. Some very long text to scroll"); auto_del(b, 10); - lv_list_add_btn(obj, LV_SYMBOL_OK, "2. Some very long text to scroll"); - lv_list_add_btn(obj, LV_SYMBOL_OK, "3. Some very long text to scroll"); - b = lv_list_add_btn(obj, LV_SYMBOL_OK, "4. Some very long text to scroll"); + lv_list_add_button(obj, LV_SYMBOL_OK, "2. Some very long text to scroll"); + lv_list_add_button(obj, LV_SYMBOL_OK, "3. Some very long text to scroll"); + b = lv_list_add_button(obj, LV_SYMBOL_OK, "4. Some very long text to scroll"); auto_del(b, LV_DEMO_STRESS_TIME_STEP); - b = lv_list_add_btn(obj, LV_SYMBOL_OK, "5. Some very long text to scroll"); + b = lv_list_add_button(obj, LV_SYMBOL_OK, "5. Some very long text to scroll"); auto_del(b, LV_DEMO_STRESS_TIME_STEP + 90); - b = lv_list_add_btn(obj, LV_SYMBOL_OK, "6. Some very long text to scroll"); + b = lv_list_add_button(obj, LV_SYMBOL_OK, "6. Some very long text to scroll"); auto_del(b, LV_DEMO_STRESS_TIME_STEP + 10); lv_obj_scroll_to_view(lv_obj_get_child(obj, -1), LV_ANIM_ON); } diff --git a/demos/transform/assets/img_transform_avatar_15.c b/demos/transform/assets/img_transform_avatar_15.c index d4a201007..bb6617af7 100644 --- a/demos/transform/assets/img_transform_avatar_15.c +++ b/demos/transform/assets/img_transform_avatar_15.c @@ -17,11 +17,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_TRANSFORM_AVATAR_15 - #define LV_ATTRIBUTE_IMG_IMG_TRANSFORM_AVATAR_15 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_TRANSFORM_AVATAR_15 + #define LV_ATTRIBUTE_IMAGE_IMG_TRANSFORM_AVATAR_15 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_TRANSFORM_AVATAR_15 uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_TRANSFORM_AVATAR_15 uint8_t img_transform_avatar_15_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x0a, 0x6c, 0x66, 0x72, 0x28, 0x6f, 0x63, 0x6f, 0x40, 0x73, 0x65, 0x6d, 0x5d, 0x6b, 0x64, 0x6b, 0x87, 0x6b, 0x64, 0x6f, 0xb2, 0x62, 0x60, 0x71, 0xd1, 0x61, 0x60, 0x75, 0xe6, 0x80, 0x79, 0x8a, 0xf3, 0x9a, 0x8c, 0x94, 0xfc, 0xae, 0x9d, 0x99, 0xfc, 0xb8, 0xa8, 0x9c, 0xf3, 0xbd, 0xae, 0x9c, 0xe6, 0xbf, 0xb3, 0xa1, 0xd1, 0xbe, 0xb4, 0x9d, 0xb2, 0xb9, 0xaf, 0x9a, 0x87, 0xb4, 0xaf, 0x99, 0x5d, 0xb7, 0xb3, 0x9b, 0x40, 0xbf, 0xb8, 0x9f, 0x28, 0xcc, 0xb2, 0x99, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0xaa, 0x03, 0x66, 0x66, 0x7f, 0x0a, 0x5d, 0x60, 0x82, 0x4a, 0x5f, 0x61, 0x84, 0xa8, 0x60, 0x61, 0x7e, 0xe1, 0x61, 0x60, 0x79, 0xee, 0x63, 0x60, 0x75, 0xfa, 0x66, 0x61, 0x72, 0xff, 0x67, 0x65, 0x75, 0xff, 0x5f, 0x5e, 0x72, 0xff, 0x5f, 0x5f, 0x76, 0xff, 0x60, 0x61, 0x78, 0xff, 0x7b, 0x78, 0x88, 0xff, 0x9c, 0x91, 0x98, 0xff, 0xb0, 0x9f, 0x9d, 0xff, 0xbd, 0xaa, 0xa0, 0xff, 0xc6, 0xb3, 0xa1, 0xff, 0xc6, 0xb5, 0xa2, 0xff, 0xc0, 0xb5, 0xa2, 0xff, 0xbd, 0xb3, 0xa0, 0xff, 0xba, 0xb2, 0x9f, 0xff, 0xb6, 0xb1, 0x9d, 0xfa, 0xba, 0xb4, 0xa0, 0xee, 0xbd, 0xb6, 0xa4, 0xe1, 0xbc, 0xb6, 0xa2, 0xa8, 0xbd, 0xb6, 0xa1, 0x4a, 0xb2, 0xb2, 0x99, 0x0a, 0xaa, 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -105,7 +105,7 @@ img_transform_avatar_15_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0b, 0xd8, 0xe5, 0xeb, 0x28, 0xc0, 0xdf, 0xeb, 0x41, 0xb4, 0xd8, 0xeb, 0x5d, 0xa3, 0xce, 0xec, 0x88, 0x9c, 0xc1, 0xea, 0xb2, 0x9d, 0xbd, 0xe9, 0xd1, 0xa3, 0xc6, 0xf0, 0xe7, 0x97, 0xbc, 0xe6, 0xf4, 0x71, 0x8f, 0xba, 0xfd, 0x6b, 0x88, 0xb1, 0xfd, 0x61, 0x7d, 0xa6, 0xf4, 0x58, 0x70, 0x9b, 0xe7, 0x5b, 0x73, 0xa1, 0xd1, 0x54, 0x6b, 0x94, 0xb2, 0x4e, 0x65, 0x8e, 0x88, 0x3f, 0x52, 0x7b, 0x5d, 0x3e, 0x4e, 0x79, 0x41, 0x39, 0x52, 0x79, 0x28, 0x45, 0x45, 0x73, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_transform_avatar_15 = { +const lv_image_dsc_t img_transform_avatar_15 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 80, diff --git a/demos/transform/lv_demo_transform.c b/demos/transform/lv_demo_transform.c index f5bc9a131..11f787bda 100644 --- a/demos/transform/lv_demo_transform.c +++ b/demos/transform/lv_demo_transform.c @@ -37,7 +37,7 @@ static lv_style_t style_card; static lv_style_t style_avatar; static lv_style_t style_btn; static lv_obj_t * card_to_transform; -LV_IMG_DECLARE(img_transform_avatar_15) +LV_IMAGE_DECLARE(img_transform_avatar_15) /********************** * MACROS @@ -114,8 +114,8 @@ static lv_obj_t * card_create(void) lv_obj_add_style(card, &style_card, 0); lv_obj_clear_flag(card, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_SCROLL_CHAIN_HOR); - lv_obj_t * avatar = lv_img_create(card); - lv_img_set_src(avatar, &img_transform_avatar_15); + lv_obj_t * avatar = lv_image_create(card); + lv_image_set_src(avatar, &img_transform_avatar_15); lv_obj_set_grid_cell(avatar, LV_GRID_ALIGN_CENTER, 0, 1, LV_GRID_ALIGN_CENTER, 0, 4); lv_obj_add_style(avatar, &style_avatar, 0); @@ -124,14 +124,14 @@ static lv_obj_t * card_create(void) lv_obj_set_grid_cell(name, LV_GRID_ALIGN_START, 2, 1, LV_GRID_ALIGN_CENTER, 0, 1); lv_obj_set_style_text_font(name, &lv_font_montserrat_18, 0); - lv_obj_t * btn = lv_btn_create(card); + lv_obj_t * btn = lv_button_create(card); lv_obj_clear_flag(card, LV_OBJ_FLAG_SCROLL_CHAIN_HOR); lv_obj_set_grid_cell(btn, LV_GRID_ALIGN_START, 2, 1, LV_GRID_ALIGN_CENTER, 3, 1); lv_obj_add_style(btn, &style_btn, 0); - LV_IMG_DECLARE(img_multilang_like) - lv_obj_t * btn_img = lv_img_create(btn); - lv_img_set_src(btn_img, &img_multilang_like); + LV_IMAGE_DECLARE(img_multilang_like) + lv_obj_t * btn_img = lv_image_create(btn); + lv_image_set_src(btn_img, &img_multilang_like); lv_obj_align(btn_img, LV_ALIGN_LEFT_MID, 30, 0); lv_obj_t * btn_label = lv_label_create(btn); diff --git a/demos/widgets/assets/img_clothes.c b/demos/widgets/assets/img_clothes.c index 453b8661b..2d9642655 100644 --- a/demos/widgets/assets/img_clothes.c +++ b/demos/widgets/assets/img_clothes.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_CLOTHES - #define LV_ATTRIBUTE_IMG_IMG_CLOTHES +#ifndef LV_ATTRIBUTE_IMAGE_IMG_CLOTHES + #define LV_ATTRIBUTE_IMAGE_IMG_CLOTHES #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_CLOTHES uint8_t img_clothes_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_CLOTHES uint8_t img_clothes_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x07, 0xff, 0x50, 0xff, 0x9b, 0xff, 0xd0, 0xff, 0xe8, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xd7, 0xef, 0xd2, 0xef, 0x8d, 0xef, 0x8d, 0xef, 0xd6, 0xef, 0xfb, 0xef, 0xff, 0xef, 0xff, 0xef, 0xfb, 0xef, 0xfb, 0xef, 0xff, 0xef, 0xff, 0xef, 0xfb, 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, 0xe3, 0xff, 0xc8, 0xff, 0x9b, 0xff, 0x4f, 0xff, 0x07, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, @@ -246,7 +246,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_CLOTH #endif }; -const lv_img_dsc_t img_clothes = { +const lv_image_dsc_t img_clothes = { .header.always_zero = 0, .header.w = 56, .header.h = 56, diff --git a/demos/widgets/assets/img_demo_widgets_avatar.c b/demos/widgets/assets/img_demo_widgets_avatar.c index 645478e21..173ed80db 100644 --- a/demos/widgets/assets/img_demo_widgets_avatar.c +++ b/demos/widgets/assets/img_demo_widgets_avatar.c @@ -17,11 +17,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_DEMO_WIDGETS_AVATAR - #define LV_ATTRIBUTE_IMG_IMG_DEMO_WIDGETS_AVATAR +#ifndef LV_ATTRIBUTE_IMAGE_IMG_DEMO_WIDGETS_AVATAR + #define LV_ATTRIBUTE_IMAGE_IMG_DEMO_WIDGETS_AVATAR #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_DEMO_WIDGETS_AVATAR uint8_t +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_DEMO_WIDGETS_AVATAR uint8_t img_demo_widgets_avatar_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xe3, 0xe3, 0x09, 0xf5, 0xeb, 0xeb, 0x19, 0xf7, 0xf0, 0xe8, 0x21, 0xf9, 0xed, 0xe7, 0x2a, 0xf9, 0xed, 0xe7, 0x2a, 0xf9, 0xed, 0xe7, 0x2a, 0xf9, 0xed, 0xe7, 0x2a, 0xf7, 0xf0, 0xe8, 0x21, 0xf0, 0xf0, 0xe1, 0x11, 0xff, 0xe3, 0xe3, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xed, 0xe9, 0x3a, 0xf7, 0xec, 0xe8, 0x42, 0xf6, 0xed, 0xe6, 0x53, 0xf5, 0xec, 0xe7, 0x6b, 0xf7, 0xec, 0xe6, 0x7c, 0xf5, 0xed, 0xe7, 0x9d, 0xf7, 0xed, 0xe7, 0xb5, 0xf6, 0xec, 0xe7, 0xce, 0xf6, 0xed, 0xe7, 0xe7, 0xf6, 0xed, 0xe7, 0xf7, 0xf6, 0xed, 0xe7, 0xff, 0xf6, 0xed, 0xe7, 0xff, 0xf6, 0xed, 0xe7, 0xff, 0xf6, 0xed, 0xe7, 0xff, 0xf6, 0xed, 0xe7, 0xff, 0xf6, 0xed, 0xe7, 0xff, 0xf6, 0xed, 0xe7, 0xff, 0xf6, 0xed, 0xe7, 0xff, 0xf6, 0xed, 0xe7, 0xff, 0xf6, 0xed, 0xe7, 0xff, 0xf6, 0xed, 0xe7, 0xf7, 0xf6, 0xed, 0xe7, 0xdf, 0xf6, 0xed, 0xe7, 0xc6, 0xf6, 0xed, 0xe7, 0xad, 0xf6, 0xec, 0xe7, 0x95, 0xf6, 0xed, 0xe7, 0x74, 0xf7, 0xed, 0xe8, 0x63, 0xf5, 0xee, 0xe7, 0x4b, 0xf6, 0xed, 0xe9, 0x3a, 0xf6, 0xed, 0xe9, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -179,7 +179,7 @@ img_demo_widgets_avatar_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_demo_widgets_avatar = { +const lv_image_dsc_t img_demo_widgets_avatar = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 160, diff --git a/demos/widgets/assets/img_lvgl_logo.c b/demos/widgets/assets/img_lvgl_logo.c index eaa282575..b7c1a27af 100644 --- a/demos/widgets/assets/img_lvgl_logo.c +++ b/demos/widgets/assets/img_lvgl_logo.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_LVGL_LOGO - #define LV_ATTRIBUTE_IMG_IMG_LVGL_LOGO +#ifndef LV_ATTRIBUTE_IMAGE_IMG_LVGL_LOGO + #define LV_ATTRIBUTE_IMAGE_IMG_LVGL_LOGO #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LVGL_LOGO uint8_t img_lvgl_logo_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_LVGL_LOGO uint8_t img_lvgl_logo_map[] = { /*Pixel format: Blue: 8 bit, Green: 8 bit, Red: 8 bit, Alpha: 8 bit*/ 0xff, 0xff, 0xff, 0xff, 0xfa, 0xfa, 0xfa, 0xff, 0xeb, 0xeb, 0xeb, 0xff, 0xda, 0xda, 0xda, 0xff, 0xd2, 0xd1, 0xd1, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd1, 0xd0, 0xd0, 0xff, 0xd2, 0xd1, 0xd1, 0xff, 0xd8, 0xd8, 0xd8, 0xff, 0xe8, 0xe8, 0xe8, 0xff, 0xf8, 0xf8, 0xf8, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xf9, 0xf9, 0xff, 0xd8, 0xd8, 0xd7, 0xff, 0xa3, 0xa2, 0xa2, 0xff, 0x6e, 0x6d, 0x6d, 0xff, 0x59, 0x57, 0x57, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x56, 0x55, 0x55, 0xff, 0x58, 0x57, 0x56, 0xff, 0x68, 0x67, 0x67, 0xff, 0x99, 0x98, 0x98, 0xff, 0xcf, 0xce, 0xce, 0xff, 0xf4, 0xf4, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -57,7 +57,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_LVGL_ 0xd8, 0xd8, 0xf9, 0xff, 0xb9, 0xb9, 0xf5, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xbe, 0xbe, 0xf5, 0xff, 0xe8, 0xe8, 0xfc, 0xff, 0xfa, 0xfa, 0xfe, 0xff, 0xe4, 0xe4, 0xfb, 0xff, 0xbf, 0xbf, 0xf5, 0xff, 0xaf, 0xaf, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xae, 0xae, 0xf2, 0xff, 0xaf, 0xaf, 0xf2, 0xff, 0xb9, 0xb9, 0xf4, 0xff, 0xde, 0xde, 0xfa, 0xff, 0xfb, 0xfb, 0xfe, 0xff, 0xf5, 0xf4, 0xf4, 0xff, 0xda, 0xda, 0xda, 0xff, 0xbf, 0xbe, 0xbd, 0xff, 0xb9, 0xb7, 0xb7, 0xff, 0xb9, 0xb7, 0xb7, 0xff, 0xb9, 0xb7, 0xb7, 0xff, 0xb9, 0xb7, 0xb7, 0xff, 0xb9, 0xb7, 0xb7, 0xff, 0xba, 0xb8, 0xb8, 0xff, 0xc1, 0xc0, 0xbf, 0xff, 0xd9, 0xd9, 0xd9, 0xff, 0xf2, 0xf2, 0xf2, 0xff, 0xfd, 0xfd, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, }; -const lv_img_dsc_t img_lvgl_logo = { +const lv_image_dsc_t img_lvgl_logo = { .header.always_zero = 0, .header.w = 42, .header.h = 43, diff --git a/demos/widgets/lv_demo_widgets.c b/demos/widgets/lv_demo_widgets.c index daf07025a..b759a2ddc 100644 --- a/demos/widgets/lv_demo_widgets.c +++ b/demos/widgets/lv_demo_widgets.c @@ -169,19 +169,19 @@ void lv_demo_widgets(void) lv_obj_set_style_text_font(lv_scr_act(), font_normal, 0); if(disp_size == DISP_LARGE) { - lv_obj_t * tab_btns = lv_tabview_get_tab_btns(tv); - lv_obj_set_style_pad_left(tab_btns, LV_HOR_RES / 2, 0); - lv_obj_t * logo = lv_img_create(tab_btns); - LV_IMG_DECLARE(img_lvgl_logo); - lv_img_set_src(logo, &img_lvgl_logo); + lv_obj_t * tab_buttons = lv_tabview_get_tab_buttons(tv); + lv_obj_set_style_pad_left(tab_buttons, LV_HOR_RES / 2, 0); + lv_obj_t * logo = lv_image_create(tab_buttons); + LV_IMAGE_DECLARE(img_lvgl_logo); + lv_image_set_src(logo, &img_lvgl_logo); lv_obj_align(logo, LV_ALIGN_LEFT_MID, -LV_HOR_RES / 2 + 25, 0); - lv_obj_t * label = lv_label_create(tab_btns); + lv_obj_t * label = lv_label_create(tab_buttons); lv_obj_add_style(label, &style_title, 0); lv_label_set_text_fmt(label, "LVGL v%d.%d.%d", lv_version_major(), lv_version_minor(), lv_version_patch()); lv_obj_align_to(label, logo, LV_ALIGN_OUT_RIGHT_TOP, 10, 0); - label = lv_label_create(tab_btns); + label = lv_label_create(tab_buttons); lv_label_set_text(label, "Widgets demo"); lv_obj_add_style(label, &style_text_muted, 0); lv_obj_align_to(label, logo, LV_ALIGN_OUT_RIGHT_BOTTOM, 10, 0); @@ -206,9 +206,9 @@ static void profile_create(lv_obj_t * parent) lv_obj_t * panel1 = lv_obj_create(parent); lv_obj_set_height(panel1, LV_SIZE_CONTENT); - LV_IMG_DECLARE(img_demo_widgets_avatar); - lv_obj_t * avatar = lv_img_create(panel1); - lv_img_set_src(avatar, &img_demo_widgets_avatar); + LV_IMAGE_DECLARE(img_demo_widgets_avatar); + lv_obj_t * avatar = lv_image_create(panel1); + lv_image_set_src(avatar, &img_demo_widgets_avatar); lv_obj_t * name = lv_label_create(panel1); lv_label_set_text(name, "Elena Smith"); @@ -233,14 +233,14 @@ static void profile_create(lv_obj_t * parent) lv_obj_t * call_label = lv_label_create(panel1); lv_label_set_text(call_label, "+79 246 123 4567"); - lv_obj_t * log_out_btn = lv_btn_create(panel1); + lv_obj_t * log_out_btn = lv_button_create(panel1); lv_obj_set_height(log_out_btn, LV_SIZE_CONTENT); lv_obj_t * label = lv_label_create(log_out_btn); lv_label_set_text(label, "Log out"); lv_obj_center(label); - lv_obj_t * invite_btn = lv_btn_create(panel1); + lv_obj_t * invite_btn = lv_button_create(panel1); lv_obj_add_state(invite_btn, LV_STATE_DISABLED); lv_obj_set_height(invite_btn, LV_SIZE_CONTENT); @@ -902,7 +902,7 @@ void shop_create(lv_obj_t * parent) lv_label_set_text(title, "Top products"); lv_obj_add_style(title, &style_title, 0); - LV_IMG_DECLARE(img_clothes); + LV_IMAGE_DECLARE(img_clothes); create_shop_item(list, &img_clothes, "Blue jeans", "Clothes", "$722"); create_shop_item(list, &img_clothes, "Blue jeans", "Clothes", "$411"); create_shop_item(list, &img_clothes, "Blue jeans", "Clothes", "$917"); @@ -976,7 +976,7 @@ static void color_changer_create(lv_obj_t * parent) uint32_t i; for(i = 0; palette[i] != _LV_PALETTE_LAST; i++) { - lv_obj_t * c = lv_btn_create(color_cont); + lv_obj_t * c = lv_button_create(color_cont); lv_obj_set_style_bg_color(c, lv_palette_main(palette[i]), 0); lv_obj_set_style_radius(c, LV_RADIUS_CIRCLE, 0); lv_obj_set_style_opa(c, LV_OPA_TRANSP, 0); @@ -985,14 +985,14 @@ static void color_changer_create(lv_obj_t * parent) lv_obj_clear_flag(c, LV_OBJ_FLAG_SCROLL_ON_FOCUS); } - lv_obj_t * btn = lv_btn_create(parent); + lv_obj_t * btn = lv_button_create(parent); lv_obj_add_flag(btn, LV_OBJ_FLAG_FLOATING | LV_OBJ_FLAG_CLICKABLE); lv_obj_set_style_bg_color(btn, lv_color_white(), LV_STATE_CHECKED); lv_obj_set_style_pad_all(btn, 10, 0); lv_obj_set_style_radius(btn, LV_RADIUS_CIRCLE, 0); lv_obj_add_event(btn, color_changer_event_cb, LV_EVENT_ALL, color_cont); lv_obj_set_style_shadow_width(btn, 0, 0); - lv_obj_set_style_bg_img_src(btn, LV_SYMBOL_TINT, 0); + lv_obj_set_style_bg_image_src(btn, LV_SYMBOL_TINT, 0); if(disp_size == DISP_SMALL) { lv_obj_set_size(btn, LV_DPX(42), LV_DPX(42)); @@ -1170,8 +1170,8 @@ static lv_obj_t * create_shop_item(lv_obj_t * parent, const void * img_src, cons lv_obj_set_size(cont, LV_PCT(100), LV_SIZE_CONTENT); lv_obj_set_grid_dsc_array(cont, grid_col_dsc, grid_row_dsc); - lv_obj_t * img = lv_img_create(cont); - lv_img_set_src(img, img_src); + lv_obj_t * img = lv_image_create(cont); + lv_image_set_src(img, img_src); lv_obj_set_grid_cell(img, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 0, 2); lv_obj_t * label; diff --git a/env_support/cmsis-pack/lv_conf_cmsis.h b/env_support/cmsis-pack/lv_conf_cmsis.h index 1282b8f6a..ce8c5d7ba 100644 --- a/env_support/cmsis-pack/lv_conf_cmsis.h +++ b/env_support/cmsis-pack/lv_conf_cmsis.h @@ -291,7 +291,7 @@ *With other image decoders (e.g. PNG or JPG) caching save the continuous open/decode of images. *However the opened images consume additional RAM. *0: to disable caching*/ -#define LV_IMG_CACHE_DEF_SIZE 0 +#define LV_IMAGE_CACHE_DEF_SIZE 0 /*Number of stops allowed per gradient. Increase this to allow more stops. @@ -691,7 +691,7 @@ #define LV_IMGFONT_PATH_MAX_LEN 64 /*1: Use img cache to buffer header information*/ - #define LV_IMGFONT_USE_IMG_CACHE_HEADER 0 + #define LV_IMGFONT_USE_IMAGE_CACHE_HEADER 0 #endif /*1: Enable a published subscriber based messaging system */ diff --git a/env_support/pikascript/pika_lv_wegit.c b/env_support/pikascript/pika_lv_wegit.c index e35caa606..0f98c0b41 100644 --- a/env_support/pikascript/pika_lv_wegit.c +++ b/env_support/pikascript/pika_lv_wegit.c @@ -160,7 +160,7 @@ void pika_lvgl_bar_set_start_value(PikaObj *self, int start_value, int anim){ void pika_lvgl_btn___init__(PikaObj* self, PikaObj* parent) { lv_obj_t* lv_parent = obj_getPtr(parent, "lv_obj"); - lv_obj_t* lv_obj = lv_btn_create(lv_parent); + lv_obj_t* lv_obj = lv_button_create(lv_parent); obj_setPtr(self, "lv_obj", lv_obj); } diff --git a/examples/anim/lv_example_anim_3.c b/examples/anim/lv_example_anim_3.c index f1dc2dbd2..32b835ae6 100644 --- a/examples/anim/lv_example_anim_3.c +++ b/examples/anim/lv_example_anim_3.c @@ -26,7 +26,7 @@ struct { static int32_t anim_path_bezier3_cb(const lv_anim_t * a); static void refer_chart_cubic_bezier(void); -static void run_btn_event_handler(lv_event_t * e); +static void run_button_event_handler(lv_event_t * e); static void slider_event_cb(lv_event_t * e); static void page_obj_init(lv_obj_t * par); static void anim_x_cb(void * var, int32_t v); @@ -88,7 +88,7 @@ static void anim_x_cb(void * var, int32_t v) lv_obj_set_style_translate_x(var, v, LV_PART_MAIN); } -static void run_btn_event_handler(lv_event_t * e) +static void run_button_event_handler(lv_event_t * e) { lv_event_code_t code = lv_event_get_code(e); if(code == LV_EVENT_CLICKED) { @@ -144,8 +144,8 @@ static void page_obj_init(lv_obj_t * par) lv_obj_set_grid_cell(ginfo.p1_slider, LV_GRID_ALIGN_STRETCH, 1, 1, LV_GRID_ALIGN_START, 1, 1); lv_obj_set_grid_cell(ginfo.p2_slider, LV_GRID_ALIGN_STRETCH, 1, 1, LV_GRID_ALIGN_START, 2, 1); - ginfo.run_btn = lv_btn_create(par); - lv_obj_add_event(ginfo.run_btn, run_btn_event_handler, LV_EVENT_CLICKED, NULL); + ginfo.run_btn = lv_button_create(par); + lv_obj_add_event(ginfo.run_btn, run_button_event_handler, LV_EVENT_CLICKED, NULL); lv_obj_t * btn_label = lv_label_create(ginfo.run_btn); lv_label_set_text(btn_label, LV_SYMBOL_PLAY); lv_obj_center(btn_label); diff --git a/examples/anim/lv_example_anim_3.py b/examples/anim/lv_example_anim_3.py index 7dd8997d4..8f91c839c 100644 --- a/examples/anim/lv_example_anim_3.py +++ b/examples/anim/lv_example_anim_3.py @@ -64,12 +64,12 @@ class LvExampleAnim_3(): self.p1_slider.set_grid_cell(lv.GRID_ALIGN.STRETCH, 1, 1,lv.GRID_ALIGN.START, 1, 1) self.p2_slider.set_grid_cell(lv.GRID_ALIGN.STRETCH, 1, 1,lv.GRID_ALIGN.START, 2, 1) - self.run_btn = lv.btn(par) - self.run_btn.add_event(self.run_btn_event_handler, lv.EVENT.CLICKED, None) - btn_label = lv.label(self.run_btn) - btn_label.set_text(lv.SYMBOL.PLAY) - btn_label.center() - self.run_btn.set_grid_cell(lv.GRID_ALIGN.STRETCH, 2, 1,lv.GRID_ALIGN.STRETCH, 1, 2) + self.run_button = lv.button(par) + self.run_button.add_event(self.run_button_event_handler, lv.EVENT.CLICKED, None) + button_label = lv.label(self.run_button) + button_label.set_text(lv.SYMBOL.PLAY) + button_label.center() + self.run_button.set_grid_cell(lv.GRID_ALIGN.STRETCH, 2, 1,lv.GRID_ALIGN.STRETCH, 1, 2) self.chart = lv.chart(par) self.chart.set_style_pad_all(0, lv.PART.MAIN) @@ -103,7 +103,7 @@ class LvExampleAnim_3(): self.refer_chart_cubic_bezier() - def run_btn_event_handler(self,e): + def run_button_event_handler(self,e): code = e.get_code() if code == lv.EVENT.CLICKED: diff --git a/examples/anim/lv_example_anim_timeline_1.c b/examples/anim/lv_example_anim_timeline_1.c index 31361c465..e07d4f790 100644 --- a/examples/anim/lv_example_anim_timeline_1.c +++ b/examples/anim/lv_example_anim_timeline_1.c @@ -141,7 +141,7 @@ void lv_example_anim_timeline_1(void) lv_obj_set_flex_align(par, LV_FLEX_ALIGN_SPACE_AROUND, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER); /* create btn_start */ - lv_obj_t * btn_start = lv_btn_create(par); + lv_obj_t * btn_start = lv_button_create(par); lv_obj_add_event(btn_start, btn_start_event_handler, LV_EVENT_VALUE_CHANGED, NULL); lv_obj_add_flag(btn_start, LV_OBJ_FLAG_IGNORE_LAYOUT); lv_obj_add_flag(btn_start, LV_OBJ_FLAG_CHECKABLE); @@ -152,7 +152,7 @@ void lv_example_anim_timeline_1(void) lv_obj_center(label_start); /* create btn_del */ - lv_obj_t * btn_del = lv_btn_create(par); + lv_obj_t * btn_del = lv_button_create(par); lv_obj_add_event(btn_del, btn_del_event_handler, LV_EVENT_CLICKED, NULL); lv_obj_add_flag(btn_del, LV_OBJ_FLAG_IGNORE_LAYOUT); lv_obj_align(btn_del, LV_ALIGN_TOP_MID, 0, 20); @@ -162,7 +162,7 @@ void lv_example_anim_timeline_1(void) lv_obj_center(label_del); /* create btn_stop */ - lv_obj_t * btn_stop = lv_btn_create(par); + lv_obj_t * btn_stop = lv_button_create(par); lv_obj_add_event(btn_stop, btn_stop_event_handler, LV_EVENT_CLICKED, NULL); lv_obj_add_flag(btn_stop, LV_OBJ_FLAG_IGNORE_LAYOUT); lv_obj_align(btn_stop, LV_ALIGN_TOP_MID, 100, 20); diff --git a/examples/anim/lv_example_anim_timeline_1.py b/examples/anim/lv_example_anim_timeline_1.py index 69eba455b..7f9bc0b14 100644 --- a/examples/anim/lv_example_anim_timeline_1.py +++ b/examples/anim/lv_example_anim_timeline_1.py @@ -11,22 +11,22 @@ class LV_ExampleAnimTimeline_1(object): self.par.set_flex_flow(lv.FLEX_FLOW.ROW) self.par.set_flex_align(lv.FLEX_ALIGN.SPACE_AROUND, lv.FLEX_ALIGN.CENTER, lv.FLEX_ALIGN.CENTER) - self.btn_run = lv.btn(self.par) - self.btn_run.add_event(self.btn_run_event_handler, lv.EVENT.VALUE_CHANGED, None) - self.btn_run.add_flag(lv.obj.FLAG.IGNORE_LAYOUT) - self.btn_run.add_flag(lv.obj.FLAG.CHECKABLE) - self.btn_run.align(lv.ALIGN.TOP_MID, -50, 20) + self.button_run = lv.button(self.par) + self.button_run.add_event(self.button_run_event_handler, lv.EVENT.VALUE_CHANGED, None) + self.button_run.add_flag(lv.obj.FLAG.IGNORE_LAYOUT) + self.button_run.add_flag(lv.obj.FLAG.CHECKABLE) + self.button_run.align(lv.ALIGN.TOP_MID, -50, 20) - self.label_run = lv.label(self.btn_run) + self.label_run = lv.label(self.button_run) self.label_run.set_text("Run") self.label_run.center() - self.btn_del = lv.btn(self.par) - self.btn_del.add_event(self.btn_del_event_handler, lv.EVENT.CLICKED, None) - self.btn_del.add_flag(lv.obj.FLAG.IGNORE_LAYOUT) - self.btn_del.align(lv.ALIGN.TOP_MID, 50, 20) + self.button_del = lv.button(self.par) + self.button_del.add_event(self.button_del_event_handler, lv.EVENT.CLICKED, None) + self.button_del.add_flag(lv.obj.FLAG.IGNORE_LAYOUT) + self.button_del.align(lv.ALIGN.TOP_MID, 50, 20) - self.label_del = lv.label(self.btn_del) + self.label_del = lv.label(self.button_del) self.label_del.set_text("Stop") self.label_del.center() @@ -125,16 +125,16 @@ class LV_ExampleAnimTimeline_1(object): self.anim_timeline.set_progress(progress) - def btn_run_event_handler(self,e): - btn = e.get_target_obj() + def button_run_event_handler(self,e): + button = e.get_target_obj() if not self.anim_timeline: self.anim_timeline_create() - reverse = btn.has_state(lv.STATE.CHECKED) + reverse = button.has_state(lv.STATE.CHECKED) self.anim_timeline.set_reverse(reverse) self.anim_timeline.start() - def btn_del_event_handler(self,e): + def button_del_event_handler(self,e): if self.anim_timeline: self.anim_timeline._del() self.anim_timeline = None diff --git a/examples/assets/animimg001.c b/examples/assets/animimg001.c index a8ddd8479..7dace07eb 100644 --- a/examples/assets/animimg001.c +++ b/examples/assets/animimg001.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_ANIMIMG001 - #define LV_ATTRIBUTE_IMG_ANIMIMG001 +#ifndef LV_ATTRIBUTE_IMAGE_ANIMIMG001 + #define LV_ATTRIBUTE_IMAGE_ANIMIMG001 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG001 uint8_t animimg001_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_ANIMIMG001 uint8_t animimg001_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -532,7 +532,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG00 #endif }; -const lv_img_dsc_t animimg001 = { +const lv_image_dsc_t animimg001 = { .header.always_zero = 0, .header.w = 130, .header.h = 170, diff --git a/examples/assets/animimg002.c b/examples/assets/animimg002.c index bb8292a3c..a379f4fb3 100644 --- a/examples/assets/animimg002.c +++ b/examples/assets/animimg002.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_ANIMIMG002 - #define LV_ATTRIBUTE_IMG_ANIMIMG002 +#ifndef LV_ATTRIBUTE_IMAGE_ANIMIMG002 + #define LV_ATTRIBUTE_IMAGE_ANIMIMG002 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG002 uint8_t animimg002_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_ANIMIMG002 uint8_t animimg002_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -532,7 +532,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG00 #endif }; -const lv_img_dsc_t animimg002 = { +const lv_image_dsc_t animimg002 = { .header.always_zero = 0, .header.w = 130, .header.h = 170, diff --git a/examples/assets/animimg003.c b/examples/assets/animimg003.c index a9576bde5..5d9a0eebc 100644 --- a/examples/assets/animimg003.c +++ b/examples/assets/animimg003.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_ANIMIMG003 - #define LV_ATTRIBUTE_IMG_ANIMIMG003 +#ifndef LV_ATTRIBUTE_IMAGE_ANIMIMG003 + #define LV_ATTRIBUTE_IMAGE_ANIMIMG003 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG003 uint8_t animimg003_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_ANIMIMG003 uint8_t animimg003_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -532,7 +532,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG00 #endif }; -const lv_img_dsc_t animimg003 = { +const lv_image_dsc_t animimg003 = { .header.always_zero = 0, .header.w = 130, .header.h = 170, diff --git a/examples/assets/emoji/img_emoji_F617.c b/examples/assets/emoji/img_emoji_F617.c index b8e3f133f..f452a5c31 100644 --- a/examples/assets/emoji/img_emoji_F617.c +++ b/examples/assets/emoji/img_emoji_F617.c @@ -7,10 +7,10 @@ #ifndef LV_ATTRIBUTE_MEM_ALIGN #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_1F617 - #define LV_ATTRIBUTE_IMG_1F617 +#ifndef LV_ATTRIBUTE_IMAGE_1F617 + #define LV_ATTRIBUTE_IMAGE_1F617 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_1F617 uint8_t emoji_F617_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMAGE_1F617 uint8_t emoji_F617_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Red: 3 bit, Green: 3 bit, Blue: 2 bit*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, @@ -238,7 +238,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_1F617 uint8_t emoji_F617_map[] = { #endif }; -const lv_img_dsc_t emoji_F617 = { +const lv_image_dsc_t emoji_F617 = { .header.cf = LV_COLOR_FORMAT_NATIVE, .header.always_zero = 0, .header.w = 72, diff --git a/examples/assets/img_caret_down.c b/examples/assets/img_caret_down.c index 648e36c97..fbc55d7bf 100644 --- a/examples/assets/img_caret_down.c +++ b/examples/assets/img_caret_down.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_CARET_DOWN - #define LV_ATTRIBUTE_IMG_IMG_CARET_DOWN +#ifndef LV_ATTRIBUTE_IMAGE_IMG_CARET_DOWN + #define LV_ATTRIBUTE_IMAGE_IMG_CARET_DOWN #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_CARET_DOWN uint8_t img_caret_down_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_CARET_DOWN uint8_t img_caret_down_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ 0x49, 0x00, 0x49, 0x04, 0x25, 0x08, 0x25, 0x08, 0x25, 0x08, 0x25, 0x08, 0x25, 0x08, 0x25, 0x08, 0x25, 0x08, 0x25, 0x08, 0x25, 0x08, 0x49, 0x08, 0x92, 0x00, @@ -46,7 +46,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_CARET #endif }; -const lv_img_dsc_t img_caret_down = { +const lv_image_dsc_t img_caret_down = { .header.always_zero = 0, .header.w = 13, .header.h = 8, diff --git a/examples/assets/img_cogwheel_argb.c b/examples/assets/img_cogwheel_argb.c index 36da0eee4..eb867b485 100644 --- a/examples/assets/img_cogwheel_argb.c +++ b/examples/assets/img_cogwheel_argb.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB - #define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB +#ifndef LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_ARGB + #define LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_ARGB #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB uint8_t img_cogwheel_argb_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_ARGB uint8_t img_cogwheel_argb_map[] = { 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xfb, 0xfa, 0xf9, 0x08, 0xad, 0x9b, 0x8f, 0xff, 0x95, 0x7e, 0x6d, 0xff, 0x90, 0x7a, 0x67, 0xff, 0x92, 0x7c, 0x69, 0xff, 0x91, 0x7b, 0x69, 0xff, 0x8c, 0x75, 0x63, 0xff, 0x97, 0x83, 0x72, 0xff, 0xd1, 0xc8, 0xc0, 0x6c, 0xfe, 0xfe, 0xfe, 0x03, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xf4, 0xf2, 0xf1, 0x10, 0x9e, 0x8a, 0x79, 0xff, 0x8f, 0x78, 0x65, 0xff, 0x90, 0x79, 0x66, 0xff, 0x91, 0x7a, 0x67, 0xff, 0x8f, 0x79, 0x66, 0xff, 0x8c, 0x75, 0x63, 0xff, 0x8c, 0x76, 0x64, 0xff, 0x9f, 0x8c, 0x7d, 0xff, 0xf8, 0xf7, 0xf6, 0x08, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xfc, 0xfc, 0xfb, 0x08, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, @@ -114,7 +114,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB uint8_t img_cogw 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x03, 0xfe, 0xfe, 0xfe, 0x08, 0xfc, 0xfc, 0xfc, 0x0c, 0xfc, 0xfc, 0xfc, 0x0c, 0xfc, 0xfc, 0xfc, 0x0b, 0xfb, 0xfb, 0xfb, 0x10, 0xfa, 0xf9, 0xf9, 0x18, 0xfb, 0xfa, 0xfa, 0x13, 0xfd, 0xfd, 0xfd, 0x0b, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, }; -const lv_img_dsc_t img_cogwheel_argb = { +const lv_image_dsc_t img_cogwheel_argb = { .header.always_zero = 0, .header.w = 100, .header.h = 100, diff --git a/examples/assets/img_cogwheel_indexed16.c b/examples/assets/img_cogwheel_indexed16.c index 957efdb36..e1154e2c8 100644 --- a/examples/assets/img_cogwheel_indexed16.c +++ b/examples/assets/img_cogwheel_indexed16.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16 - #define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16 +#ifndef LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_INDEXED16 + #define LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_INDEXED16 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16 uint8_t img_cogwheel_indexed16_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_INDEXED16 uint8_t img_cogwheel_indexed16_map[] = { 0x00, 0x00, 0x00, 0x00, /*Color of index 0*/ 0x6c, 0x5e, 0x4a, 0xff, /*Color of index 1*/ 0x72, 0x64, 0x50, 0xff, /*Color of index 2*/ @@ -130,7 +130,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16 uint8_t img 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_cogwheel_indexed16 = { +const lv_image_dsc_t img_cogwheel_indexed16 = { .header.always_zero = 0, .header.w = 100, .header.h = 100, diff --git a/examples/assets/img_cogwheel_rgb.c b/examples/assets/img_cogwheel_rgb.c index 99c93b1e3..8f609ae4f 100644 --- a/examples/assets/img_cogwheel_rgb.c +++ b/examples/assets/img_cogwheel_rgb.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB - #define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB +#ifndef LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_RGB + #define LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_RGB #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB uint8_t img_cogwheel_rgb_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_RGB uint8_t img_cogwheel_rgb_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Red: 3 bit, Green: 3 bit, Blue: 2 bit*/ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x97, 0x72, 0x72, 0x72, 0x72, 0x72, 0x92, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -425,7 +425,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB uint8_t img_cogwh #endif }; -const lv_img_dsc_t img_cogwheel_rgb = { +const lv_image_dsc_t img_cogwheel_rgb = { .header.always_zero = 0, .header.w = 100, .header.h = 100, diff --git a/examples/assets/img_hand.c b/examples/assets/img_hand.c index af8257860..e1d28ca35 100644 --- a/examples/assets/img_hand.c +++ b/examples/assets/img_hand.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_HAND - #define LV_ATTRIBUTE_IMG_IMG_HAND +#ifndef LV_ATTRIBUTE_IMAGE_IMG_HAND + #define LV_ATTRIBUTE_IMAGE_IMG_HAND #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_HAND uint8_t img_hand_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMAGE_IMG_HAND uint8_t img_hand_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Alpha 8 bit, Red: 3 bit, Green: 3 bit, Blue: 2 bit*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x04, 0x6e, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x47, 0x00, 0x57, 0x25, 0x57, 0x49, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -48,7 +48,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_HAND uint8_t img_hand_map[] = #endif }; -const lv_img_dsc_t img_hand = { +const lv_image_dsc_t img_hand = { .header.always_zero = 0, .header.w = 100, .header.h = 9, diff --git a/examples/assets/img_skew_strip.c b/examples/assets/img_skew_strip.c index 78dd17e8e..0fdf51534 100644 --- a/examples/assets/img_skew_strip.c +++ b/examples/assets/img_skew_strip.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_SKEW_STRIP - #define LV_ATTRIBUTE_IMG_IMG_SKEW_STRIP +#ifndef LV_ATTRIBUTE_IMAGE_IMG_SKEW_STRIP + #define LV_ATTRIBUTE_IMAGE_IMG_SKEW_STRIP #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_SKEW_STRIP uint8_t img_skew_strip_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_SKEW_STRIP uint8_t img_skew_strip_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ 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, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 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, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 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, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, @@ -82,7 +82,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_SKEW_ #endif }; -const lv_img_dsc_t img_skew_strip = { +const lv_image_dsc_t img_skew_strip = { .header.always_zero = 0, .header.w = 80, .header.h = 20, diff --git a/examples/assets/img_star.c b/examples/assets/img_star.c index b42b2a8d3..ddf5f13e4 100644 --- a/examples/assets/img_star.c +++ b/examples/assets/img_star.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_STAR - #define LV_ATTRIBUTE_IMG_IMG_STAR +#ifndef LV_ATTRIBUTE_IMAGE_IMG_STAR + #define LV_ATTRIBUTE_IMAGE_IMG_STAR #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_STAR uint8_t img_star_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_STAR uint8_t img_star_map[] = { /*Pixel format: Blue: 8 bit, Green: 8 bit, Red: 8 bit, Alpha: 8 bit*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xd2, 0xff, 0x54, 0x43, 0xd9, 0xff, 0x23, 0x00, 0x00, 0x00, 0x00, 0x4d, 0xdb, 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, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xce, 0xff, 0xc7, 0x4c, 0xdb, 0xff, 0xac, 0x31, 0xd6, 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, @@ -43,7 +43,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_STAR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0xd7, 0xff, 0x4b, 0x40, 0xd9, 0xff, 0x70, 0x3a, 0xd8, 0xff, 0x10, 0x43, 0xda, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xdb, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xcc, 0xff, 0x00, 0x00, 0xca, 0xff, 0x10, 0x0c, 0xce, 0xff, 0x90, 0x20, 0xd3, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t img_star = { +const lv_image_dsc_t img_star = { .header.always_zero = 0, .header.w = 30, .header.h = 29, diff --git a/examples/assets/imgbtn_left.c b/examples/assets/imgbtn_left.c index 1bbedebc0..6aa849916 100644 --- a/examples/assets/imgbtn_left.c +++ b/examples/assets/imgbtn_left.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMGBTN_LEFT - #define LV_ATTRIBUTE_IMG_IMGBTN_LEFT +#ifndef LV_ATTRIBUTE_IMAGE_IMGBTN_LEFT + #define LV_ATTRIBUTE_IMAGE_IMGBTN_LEFT #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_LEFT uint8_t imgbtn_left_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMGBTN_LEFT uint8_t imgbtn_left_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x68, 0x03, 0x68, 0x14, 0x68, 0x23, @@ -172,7 +172,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_LE #endif }; -const lv_img_dsc_t imgbtn_left = { +const lv_image_dsc_t imgbtn_left = { .header.always_zero = 0, .header.w = 8, .header.h = 50, diff --git a/examples/assets/imgbtn_mid.c b/examples/assets/imgbtn_mid.c index 28b8b0ed3..242b30514 100644 --- a/examples/assets/imgbtn_mid.c +++ b/examples/assets/imgbtn_mid.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMGBTN_MID - #define LV_ATTRIBUTE_IMG_IMGBTN_MID +#ifndef LV_ATTRIBUTE_IMAGE_IMGBTN_MID + #define LV_ATTRIBUTE_IMAGE_IMGBTN_MID #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_MID uint8_t imgbtn_mid_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMGBTN_MID uint8_t imgbtn_mid_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ 0x68, 0x27, 0x68, 0x27, 0x68, 0x27, 0x68, 0x27, 0x68, 0x27, @@ -169,7 +169,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_MI #endif }; -const lv_img_dsc_t imgbtn_mid = { +const lv_image_dsc_t imgbtn_mid = { .header.always_zero = 0, .header.w = 5, .header.h = 49, diff --git a/examples/assets/imgbtn_right.c b/examples/assets/imgbtn_right.c index 42ff33ed4..1243b6ca7 100644 --- a/examples/assets/imgbtn_right.c +++ b/examples/assets/imgbtn_right.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMGBTN_RIGHT - #define LV_ATTRIBUTE_IMG_IMGBTN_RIGHT +#ifndef LV_ATTRIBUTE_IMAGE_IMGBTN_RIGHT + #define LV_ATTRIBUTE_IMAGE_IMGBTN_RIGHT #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_RIGHT uint8_t imgbtn_right_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMGBTN_RIGHT uint8_t imgbtn_right_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */ 0x68, 0x23, 0x68, 0x14, 0x68, 0x04, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -172,7 +172,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_RI #endif }; -const lv_img_dsc_t imgbtn_right = { +const lv_image_dsc_t imgbtn_right = { .header.always_zero = 0, .header.w = 8, .header.h = 50, diff --git a/examples/event/lv_example_event_1.c b/examples/event/lv_example_event_1.c index d6db60a92..c88c1cfde 100644 --- a/examples/event/lv_example_event_1.c +++ b/examples/event/lv_example_event_1.c @@ -17,7 +17,7 @@ static void event_cb(lv_event_t * e) */ void lv_example_event_1(void) { - lv_obj_t * btn = lv_btn_create(lv_scr_act()); + lv_obj_t * btn = lv_button_create(lv_scr_act()); lv_obj_set_size(btn, 100, 50); lv_obj_center(btn); lv_obj_add_event(btn, event_cb, LV_EVENT_CLICKED, NULL); diff --git a/examples/event/lv_example_event_1.py b/examples/event/lv_example_event_1.py index 8fe2526cc..39c3376ed 100644 --- a/examples/event/lv_example_event_1.py +++ b/examples/event/lv_example_event_1.py @@ -5,20 +5,20 @@ class Event_1(): # Add click event to a button # - btn = lv.btn(lv.scr_act()) - btn.set_size(100, 50) - btn.center() - btn.add_event(self.event_cb, lv.EVENT.CLICKED, None) + button = lv.button(lv.scr_act()) + button.set_size(100, 50) + button.center() + button.add_event(self.event_cb, lv.EVENT.CLICKED, None) - label = lv.label(btn) + label = lv.label(button) label.set_text("Click me!") label.center() def event_cb(self,e): print("Clicked") - btn = e.get_target_obj() - label = btn.get_child(0) + button = e.get_target_obj() + label = button.get_child(0) label.set_text(str(self.cnt)) self.cnt += 1 diff --git a/examples/event/lv_example_event_2.c b/examples/event/lv_example_event_2.c index 555b71265..a64831aea 100644 --- a/examples/event/lv_example_event_2.c +++ b/examples/event/lv_example_event_2.c @@ -29,7 +29,7 @@ static void event_cb(lv_event_t * e) */ void lv_example_event_2(void) { - lv_obj_t * btn = lv_btn_create(lv_scr_act()); + lv_obj_t * btn = lv_button_create(lv_scr_act()); lv_obj_set_size(btn, 100, 50); lv_obj_center(btn); diff --git a/examples/event/lv_example_event_2.py b/examples/event/lv_example_event_2.py index 9ab767471..43f3d326f 100644 --- a/examples/event/lv_example_event_2.py +++ b/examples/event/lv_example_event_2.py @@ -8,15 +8,15 @@ def event_cb(e,label): label.set_text("The last button event:\nLV_EVENT_LONG_PRESSED") elif code == lv.EVENT.LONG_PRESSED_REPEAT: label.set_text("The last button event:\nLV_EVENT_LONG_PRESSED_REPEAT") -btn = lv.btn(lv.scr_act()) -btn.set_size(100, 50) -btn.center() +button = lv.button(lv.scr_act()) +button.set_size(100, 50) +button.center() -btn_label = lv.label(btn) -btn_label.set_text("Click me!") -btn_label.center() +button_label = lv.label(button) +button_label.set_text("Click me!") +button_label.center() info_label = lv.label(lv.scr_act()) info_label.set_text("The last button event:\nNone") -btn.add_event(lambda e: event_cb(e,info_label), lv.EVENT.ALL, None) +button.add_event(lambda e: event_cb(e,info_label), lv.EVENT.ALL, None) diff --git a/examples/event/lv_example_event_3.c b/examples/event/lv_example_event_3.c index f64067c12..48bd2c7dc 100644 --- a/examples/event/lv_example_event_3.c +++ b/examples/event/lv_example_event_3.c @@ -29,7 +29,7 @@ void lv_example_event_3(void) uint32_t i; for(i = 0; i < 30; i++) { - lv_obj_t * btn = lv_btn_create(cont); + lv_obj_t * btn = lv_button_create(cont); lv_obj_set_size(btn, 70, 50); lv_obj_add_flag(btn, LV_OBJ_FLAG_EVENT_BUBBLE); diff --git a/examples/event/lv_example_event_3.py b/examples/event/lv_example_event_3.py index a05b299a5..132e2d49e 100644 --- a/examples/event/lv_example_event_3.py +++ b/examples/event/lv_example_event_3.py @@ -23,11 +23,11 @@ cont.center() cont.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP) for i in range(30): - btn = lv.btn(cont) - btn.set_size(70, 50) - btn.add_flag(lv.obj.FLAG.EVENT_BUBBLE) + button = lv.button(cont) + button.set_size(70, 50) + button.add_flag(lv.obj.FLAG.EVENT_BUBBLE) - label = lv.label(btn) + label = lv.label(button) label.set_text("{:d}".format(i)) label.center() diff --git a/examples/get_started/lv_example_get_started_2.c b/examples/get_started/lv_example_get_started_2.c index b1ccb5b8d..02898e0c5 100644 --- a/examples/get_started/lv_example_get_started_2.c +++ b/examples/get_started/lv_example_get_started_2.c @@ -20,7 +20,7 @@ static void btn_event_cb(lv_event_t * e) */ void lv_example_get_started_2(void) { - lv_obj_t * btn = lv_btn_create(lv_scr_act()); /*Add a button the current screen*/ + lv_obj_t * btn = lv_button_create(lv_scr_act()); /*Add a button the current screen*/ lv_obj_set_pos(btn, 10, 10); /*Set its position*/ lv_obj_set_size(btn, 120, 50); /*Set its size*/ lv_obj_add_event(btn, btn_event_cb, LV_EVENT_ALL, NULL); /*Assign a callback to the button*/ diff --git a/examples/get_started/lv_example_get_started_2.py b/examples/get_started/lv_example_get_started_2.py index 7d3cefe32..9ebf8c87b 100644 --- a/examples/get_started/lv_example_get_started_2.py +++ b/examples/get_started/lv_example_get_started_2.py @@ -5,23 +5,23 @@ class CounterBtn(): # Create a button with a label and react on click event. # - btn = lv.btn(lv.scr_act()) # Add a button the current screen - btn.set_pos(10, 10) # Set its position - btn.set_size(120, 50) # Set its size - btn.align(lv.ALIGN.CENTER,0,0) - btn.add_event(self.btn_event_cb, lv.EVENT.ALL, None) # Assign a callback to the button - label = lv.label(btn) # Add a label to the button + button = lv.button(lv.scr_act()) # Add a button the current screen + button.set_pos(10, 10) # Set its position + button.set_size(120, 50) # Set its size + button.align(lv.ALIGN.CENTER,0,0) + button.add_event(self.button_event_cb, lv.EVENT.ALL, None) # Assign a callback to the button + label = lv.label(button) # Add a label to the button label.set_text("Button") # Set the labels text label.center() - def btn_event_cb(self,e): + def button_event_cb(self,e): code = e.get_code() - btn = e.get_target_obj() + button = e.get_target_obj() if code == lv.EVENT.CLICKED: self.cnt += 1 # Get the first child of the button which is the label and change its text - label = btn.get_child(0) + label = button.get_child(0) label.set_text("Button: " + str(self.cnt)) diff --git a/examples/get_started/lv_example_get_started_3.c b/examples/get_started/lv_example_get_started_3.c index 05b5c81e6..dd22570fd 100644 --- a/examples/get_started/lv_example_get_started_3.c +++ b/examples/get_started/lv_example_get_started_3.c @@ -2,8 +2,8 @@ #if LV_USE_BTN && LV_BUILD_EXAMPLES static lv_style_t style_btn; -static lv_style_t style_btn_pressed; -static lv_style_t style_btn_red; +static lv_style_t style_button_pressed; +static lv_style_t style_button_red; static lv_color_t darken(const lv_color_filter_dsc_t * dsc, lv_color_t color, lv_opa_t opa) { @@ -31,14 +31,14 @@ static void style_init(void) *Use a color filter to simply modify all colors in this state*/ static lv_color_filter_dsc_t color_filter; lv_color_filter_dsc_init(&color_filter, darken); - lv_style_init(&style_btn_pressed); - lv_style_set_color_filter_dsc(&style_btn_pressed, &color_filter); - lv_style_set_color_filter_opa(&style_btn_pressed, LV_OPA_20); + lv_style_init(&style_button_pressed); + lv_style_set_color_filter_dsc(&style_button_pressed, &color_filter); + lv_style_set_color_filter_opa(&style_button_pressed, LV_OPA_20); /*Create a red style. Change only some colors.*/ - lv_style_init(&style_btn_red); - lv_style_set_bg_color(&style_btn_red, lv_palette_main(LV_PALETTE_RED)); - lv_style_set_bg_grad_color(&style_btn_red, lv_palette_lighten(LV_PALETTE_RED, 3)); + lv_style_init(&style_button_red); + lv_style_set_bg_color(&style_button_red, lv_palette_main(LV_PALETTE_RED)); + lv_style_set_bg_grad_color(&style_button_red, lv_palette_lighten(LV_PALETTE_RED, 3)); } /** @@ -50,7 +50,7 @@ void lv_example_get_started_3(void) style_init(); /*Create a button and use the new styles*/ - lv_obj_t * btn = lv_btn_create(lv_scr_act()); + lv_obj_t * btn = lv_button_create(lv_scr_act()); /* Remove the styles coming from the theme * Note that size and position are also stored as style properties * so lv_obj_remove_style_all will remove the set size and position too */ @@ -58,7 +58,7 @@ void lv_example_get_started_3(void) lv_obj_set_pos(btn, 10, 10); lv_obj_set_size(btn, 120, 50); lv_obj_add_style(btn, &style_btn, 0); - lv_obj_add_style(btn, &style_btn_pressed, LV_STATE_PRESSED); + lv_obj_add_style(btn, &style_button_pressed, LV_STATE_PRESSED); /*Add a label to the button*/ lv_obj_t * label = lv_label_create(btn); @@ -66,13 +66,13 @@ void lv_example_get_started_3(void) lv_obj_center(label); /*Create another button and use the red style too*/ - lv_obj_t * btn2 = lv_btn_create(lv_scr_act()); + lv_obj_t * btn2 = lv_button_create(lv_scr_act()); lv_obj_remove_style_all(btn2); /*Remove the styles coming from the theme*/ lv_obj_set_pos(btn2, 10, 80); lv_obj_set_size(btn2, 120, 50); lv_obj_add_style(btn2, &style_btn, 0); - lv_obj_add_style(btn2, &style_btn_red, 0); - lv_obj_add_style(btn2, &style_btn_pressed, LV_STATE_PRESSED); + lv_obj_add_style(btn2, &style_button_red, 0); + lv_obj_add_style(btn2, &style_button_pressed, LV_STATE_PRESSED); lv_obj_set_style_radius(btn2, LV_RADIUS_CIRCLE, 0); /*Add a local style too*/ label = lv_label_create(btn2); diff --git a/examples/get_started/lv_example_get_started_3.py b/examples/get_started/lv_example_get_started_3.py index 5d72e5f76..20c530c55 100644 --- a/examples/get_started/lv_example_get_started_3.py +++ b/examples/get_started/lv_example_get_started_3.py @@ -1,48 +1,48 @@ # # Create styles from scratch for buttons. # -style_btn = lv.style_t() -style_btn_red = lv.style_t() -style_btn_pressed = lv.style_t() +style_button = lv.style_t() +style_button_red = lv.style_t() +style_button_pressed = lv.style_t() # Create a simple button style -style_btn.init() -style_btn.set_radius(10) -style_btn.set_bg_opa(lv.OPA.COVER) -style_btn.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 3)) -style_btn.set_bg_grad_color(lv.palette_main(lv.PALETTE.GREY)) -style_btn.set_bg_grad_dir(lv.GRAD_DIR.VER) +style_button.init() +style_button.set_radius(10) +style_button.set_bg_opa(lv.OPA.COVER) +style_button.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 3)) +style_button.set_bg_grad_color(lv.palette_main(lv.PALETTE.GREY)) +style_button.set_bg_grad_dir(lv.GRAD_DIR.VER) # Add a border -style_btn.set_border_color(lv.color_white()) -style_btn.set_border_opa(lv.OPA._70) -style_btn.set_border_width(2) +style_button.set_border_color(lv.color_white()) +style_button.set_border_opa(lv.OPA._70) +style_button.set_border_width(2) # Set the text style -style_btn.set_text_color(lv.color_white()) +style_button.set_text_color(lv.color_white()) # Create a red style. Change only some colors. -style_btn_red.init() -style_btn_red.set_bg_color(lv.palette_main(lv.PALETTE.RED)) -style_btn_red.set_bg_grad_color(lv.palette_lighten(lv.PALETTE.RED, 2)) +style_button_red.init() +style_button_red.set_bg_color(lv.palette_main(lv.PALETTE.RED)) +style_button_red.set_bg_grad_color(lv.palette_lighten(lv.PALETTE.RED, 2)) # Create a style for the pressed state. -style_btn_pressed.init() -style_btn_pressed.set_bg_color(lv.palette_main(lv.PALETTE.BLUE)) -style_btn_pressed.set_bg_grad_color(lv.palette_darken(lv.PALETTE.RED, 3)) +style_button_pressed.init() +style_button_pressed.set_bg_color(lv.palette_main(lv.PALETTE.BLUE)) +style_button_pressed.set_bg_grad_color(lv.palette_darken(lv.PALETTE.RED, 3)) # Create a button and use the new styles -btn = lv.btn(lv.scr_act()) # Add a button the current screen +button = lv.button(lv.scr_act()) # Add a button the current screen # Remove the styles coming from the theme # Note that size and position are also stored as style properties # so lv_obj_remove_style_all will remove the set size and position too -btn.remove_style_all() # Remove the styles coming from the theme -btn.set_pos(10, 10) # Set its position -btn.set_size(120, 50) # Set its size -btn.add_style(style_btn, 0) -btn.add_style(style_btn_pressed, lv.STATE.PRESSED) +button.remove_style_all() # Remove the styles coming from the theme +button.set_pos(10, 10) # Set its position +button.set_size(120, 50) # Set its size +button.add_style(style_button, 0) +button.add_style(style_button_pressed, lv.STATE.PRESSED) -label = lv.label(btn) # Add a label to the button +label = lv.label(button) # Add a label to the button label.set_text("Button") # Set the labels text label.center() @@ -52,16 +52,16 @@ slider.set_width(200) # Set the wid slider.center() # Align to the center of the parent (screen) # Create another button and use the red style too -btn2 = lv.btn(lv.scr_act()) -btn2.remove_style_all() # Remove the styles coming from the theme -btn2.set_pos(10, 80) # Set its position -btn2.set_size(120, 50) # Set its size -btn2.add_style(style_btn, 0) -btn2.add_style(style_btn_red, 0) -btn2.add_style(style_btn_pressed, lv.STATE.PRESSED) -btn2.set_style_radius(lv.RADIUS_CIRCLE, 0) # Add a local style +button2 = lv.button(lv.scr_act()) +button2.remove_style_all() # Remove the styles coming from the theme +button2.set_pos(10, 80) # Set its position +button2.set_size(120, 50) # Set its size +button2.add_style(style_button, 0) +button2.add_style(style_button_red, 0) +button2.add_style(style_button_pressed, lv.STATE.PRESSED) +button2.set_style_radius(lv.RADIUS_CIRCLE, 0) # Add a local style -label = lv.label(btn2) # Add a label to the button +label = lv.label(button2) # Add a label to the button label.set_text("Button 2") # Set the labels text label.center() diff --git a/examples/layouts/flex/lv_example_flex_1.c b/examples/layouts/flex/lv_example_flex_1.c index e4a028b62..47a2d430a 100644 --- a/examples/layouts/flex/lv_example_flex_1.c +++ b/examples/layouts/flex/lv_example_flex_1.c @@ -24,7 +24,7 @@ void lv_example_flex_1(void) lv_obj_t * label; /*Add items to the row*/ - obj = lv_btn_create(cont_row); + obj = lv_button_create(cont_row); lv_obj_set_size(obj, 100, LV_PCT(100)); label = lv_label_create(obj); @@ -32,7 +32,7 @@ void lv_example_flex_1(void) lv_obj_center(label); /*Add items to the column*/ - obj = lv_btn_create(cont_col); + obj = lv_button_create(cont_col); lv_obj_set_size(obj, LV_PCT(100), LV_SIZE_CONTENT); label = lv_label_create(obj); diff --git a/examples/layouts/flex/lv_example_flex_1.py b/examples/layouts/flex/lv_example_flex_1.py index ae41de8ec..98ac26a06 100644 --- a/examples/layouts/flex/lv_example_flex_1.py +++ b/examples/layouts/flex/lv_example_flex_1.py @@ -16,7 +16,7 @@ cont_col.set_flex_flow(lv.FLEX_FLOW.COLUMN) for i in range(10): # Add items to the row - obj = lv.btn(cont_row) + obj = lv.button(cont_row) obj.set_size(100, lv.pct(100)) label = lv.label(obj) @@ -24,7 +24,7 @@ for i in range(10): label.center() # Add items to the column - obj = lv.btn(cont_col) + obj = lv.button(cont_col) obj.set_size(lv.pct(100), lv.SIZE_CONTENT) label = lv.label(obj) diff --git a/examples/layouts/grid/lv_example_grid_1.c b/examples/layouts/grid/lv_example_grid_1.c index 47fbf74a0..6dac9f3d2 100644 --- a/examples/layouts/grid/lv_example_grid_1.c +++ b/examples/layouts/grid/lv_example_grid_1.c @@ -25,7 +25,7 @@ void lv_example_grid_1(void) uint8_t col = i % 3; uint8_t row = i / 3; - obj = lv_btn_create(cont); + obj = lv_button_create(cont); /*Stretch the cell horizontally and vertically too *Set span to 1 to make the cell 1 column/row sized*/ lv_obj_set_grid_cell(obj, LV_GRID_ALIGN_STRETCH, col, 1, diff --git a/examples/layouts/grid/lv_example_grid_1.py b/examples/layouts/grid/lv_example_grid_1.py index 55a5b5bc7..0f75b136a 100644 --- a/examples/layouts/grid/lv_example_grid_1.py +++ b/examples/layouts/grid/lv_example_grid_1.py @@ -17,7 +17,7 @@ for i in range(9): col = i % 3 row = i // 3 - obj = lv.btn(cont) + obj = lv.button(cont) # Stretch the cell horizontally and vertically too # Set span to 1 to make the cell 1 column/row sized obj.set_grid_cell(lv.GRID_ALIGN.STRETCH, col, 1, diff --git a/examples/libs/bmp/lv_example_bmp_1.c b/examples/libs/bmp/lv_example_bmp_1.c index 9bead1d0f..c49775257 100644 --- a/examples/libs/bmp/lv_example_bmp_1.c +++ b/examples/libs/bmp/lv_example_bmp_1.c @@ -6,10 +6,10 @@ */ void lv_example_bmp_1(void) { - lv_obj_t * img = lv_img_create(lv_scr_act()); + lv_obj_t * img = lv_image_create(lv_scr_act()); /* Assuming a File system is attached to letter 'A' * E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */ - lv_img_set_src(img, "A:lvgl/examples/libs/bmp/example_32bit.bmp"); + lv_image_set_src(img, "A:lvgl/examples/libs/bmp/example_32bit.bmp"); lv_obj_center(img); } diff --git a/examples/libs/ffmpeg/lv_example_ffmpeg_1.c b/examples/libs/ffmpeg/lv_example_ffmpeg_1.c index 58159857a..492bf481b 100644 --- a/examples/libs/ffmpeg/lv_example_ffmpeg_1.c +++ b/examples/libs/ffmpeg/lv_example_ffmpeg_1.c @@ -8,8 +8,8 @@ */ void lv_example_ffmpeg_1(void) { - lv_obj_t * img = lv_img_create(lv_scr_act()); - lv_img_set_src(img, "./lvgl/examples/libs/ffmpeg/ffmpeg.png"); + lv_obj_t * img = lv_image_create(lv_scr_act()); + lv_image_set_src(img, "./lvgl/examples/libs/ffmpeg/ffmpeg.png"); lv_obj_center(img); } diff --git a/examples/libs/ffmpeg/lv_example_ffmpeg_1.py b/examples/libs/ffmpeg/lv_example_ffmpeg_1.py index 405a3e14a..1a5933d43 100644 --- a/examples/libs/ffmpeg/lv_example_ffmpeg_1.py +++ b/examples/libs/ffmpeg/lv_example_ffmpeg_1.py @@ -7,9 +7,9 @@ try: # # Open an image from a file # - img = lv.img(lv.scr_act()) - img.set_src("ffmpeg.png") - img.center() + image = lv.image(lv.scr_act()) + image.set_src("ffmpeg.png") + image.center() except Exception as e: print(e) # TODO diff --git a/examples/libs/gif/img_bulb_gif.c b/examples/libs/gif/img_bulb_gif.c index 28b595a79..13e47529c 100644 --- a/examples/libs/gif/img_bulb_gif.c +++ b/examples/libs/gif/img_bulb_gif.c @@ -5,11 +5,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_BULB_GIF - #define LV_ATTRIBUTE_IMG_BULB_GIF +#ifndef LV_ATTRIBUTE_IMAGE_BULB_GIF + #define LV_ATTRIBUTE_IMAGE_BULB_GIF #endif -static const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BULB_GIF uint8_t img_blub_gif_map[] = { +static const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_BULB_GIF uint8_t img_blub_gif_map[] = { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x3c, 0x00, 0x50, 0x00, 0xf7, 0x00, 0x00, 0xfa, 0xfb, 0xfb, 0xfd, 0xfd, 0xfd, 0xff, 0xff, 0xff, 0xd9, 0xec, 0xfe, 0x1e, 0x93, 0xfe, 0x23, 0x95, 0xfd, 0x5f, 0xb2, 0xff, 0x52, 0xac, 0xfe, 0xb1, 0xd8, 0xff, 0xce, 0xe7, 0xff, 0xa3, 0xd2, 0xff, 0x80, 0xc0, @@ -1118,7 +1118,7 @@ static const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BU 0x34, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x84, 0x0b, 0x00, 0x3b, }; -const lv_img_dsc_t img_bulb_gif = { +const lv_image_dsc_t img_bulb_gif = { .header.always_zero = 0, .header.w = 0, .header.h = 0, diff --git a/examples/libs/gif/lv_example_gif_1.c b/examples/libs/gif/lv_example_gif_1.c index 66f2a3db6..e19a029e9 100644 --- a/examples/libs/gif/lv_example_gif_1.c +++ b/examples/libs/gif/lv_example_gif_1.c @@ -6,7 +6,7 @@ */ void lv_example_gif_1(void) { - LV_IMG_DECLARE(img_bulb_gif); + LV_IMAGE_DECLARE(img_bulb_gif); lv_obj_t * img; img = lv_gif_create(lv_scr_act()); diff --git a/examples/libs/gif/lv_example_gif_1.py b/examples/libs/gif/lv_example_gif_1.py index f04aafd13..51af14a3c 100755 --- a/examples/libs/gif/lv_example_gif_1.py +++ b/examples/libs/gif/lv_example_gif_1.py @@ -9,19 +9,19 @@ fs_driver.fs_register(fs_drv, 'S') # # Open a GIF image from a file and a variable # -img_bulb_gif = lv.img_dsc_t( +image_bulb_gif = lv.image_dsc_t( { "header": {"always_zero": 0, "w": 0, "h": 0, "cf": lv.COLOR_FORMAT.RAW}, "data_size": 0, "data": img_bulb_gif_map, } ) -img1 = lv.gif(lv.scr_act()) -img1.set_src(img_bulb_gif) -img1.align(lv.ALIGN.RIGHT_MID, -150, 0) +image1 = lv.gif(lv.scr_act()) +image1.set_src(image_bulb_gif) +image1.align(lv.ALIGN.RIGHT_MID, -150, 0) -img2 = lv.gif(lv.scr_act()) +image2 = lv.gif(lv.scr_act()) # The File system is attached to letter 'S' -img2.set_src("S:bulb.gif") -img2.align(lv.ALIGN.RIGHT_MID, -250, 0) +image2.set_src("S:bulb.gif") +image2.align(lv.ALIGN.RIGHT_MID, -250, 0) diff --git a/examples/libs/png/img_wink_png.c b/examples/libs/png/img_wink_png.c index 47407c9e5..7c7d5d31e 100644 --- a/examples/libs/png/img_wink_png.c +++ b/examples/libs/png/img_wink_png.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_PNG_DECODER_TEST - #define LV_ATTRIBUTE_IMG_PNG_DECODER_TEST +#ifndef LV_ATTRIBUTE_IMAGE_PNG_DECODER_TEST + #define LV_ATTRIBUTE_IMAGE_PNG_DECODER_TEST #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_PNG_DECODER_TEST uint8_t img_wink_png_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_PNG_DECODER_TEST uint8_t img_wink_png_map[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x32, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1e, 0x3f, 0x88, 0xb1, 0x00, 0x00, 0x00, 0x06, 0x62, 0x4b, 0x47, 0x44, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xa0, @@ -336,7 +336,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_PNG_DECOD 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; -const lv_img_dsc_t img_wink_png = { +const lv_image_dsc_t img_wink_png = { .header.always_zero = 0, .header.w = 50, .header.h = 50, diff --git a/examples/libs/png/img_wink_png.py b/examples/libs/png/img_wink_png.py index 1dbc11d51..fec1f974d 100644 --- a/examples/libs/png/img_wink_png.py +++ b/examples/libs/png/img_wink_png.py @@ -325,13 +325,13 @@ img_wink_png_map = bytes([ 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, ]) ''' -const lv_img_dsc_t img_wink_png = { +const lv_image_dsc_t image_wink_png = { .header.always_zero = 0, .header.w = 50, .header.h = 50, .data_size = 5158, - .header.cf = LV_IMG_CF_RAW_ALPHA, - .data = img_wink_png_map, + .header.cf = LV_IMAGE_CF_RAW_ALPHA, + .data = image_wink_png_map, }; ''' diff --git a/examples/libs/png/lv_example_png_1.c b/examples/libs/png/lv_example_png_1.c index 63dbff1f7..9532a9049 100644 --- a/examples/libs/png/lv_example_png_1.c +++ b/examples/libs/png/lv_example_png_1.c @@ -6,17 +6,17 @@ */ void lv_example_png_1(void) { - LV_IMG_DECLARE(img_wink_png); + LV_IMAGE_DECLARE(img_wink_png); lv_obj_t * img; - img = lv_img_create(lv_scr_act()); - lv_img_set_src(img, &img_wink_png); + img = lv_image_create(lv_scr_act()); + lv_image_set_src(img, &img_wink_png); lv_obj_align(img, LV_ALIGN_LEFT_MID, 20, 0); - img = lv_img_create(lv_scr_act()); + img = lv_image_create(lv_scr_act()); /* Assuming a File system is attached to letter 'A' * E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */ - lv_img_set_src(img, "A:lvgl/examples/libs/png/wink.png"); + lv_image_set_src(img, "A:lvgl/examples/libs/png/wink.png"); lv_obj_align(img, LV_ALIGN_RIGHT_MID, -20, 0); } diff --git a/examples/libs/png/lv_example_png_1.py b/examples/libs/png/lv_example_png_1.py index ba866111d..659bda181 100755 --- a/examples/libs/png/lv_example_png_1.py +++ b/examples/libs/png/lv_example_png_1.py @@ -3,16 +3,16 @@ import lvgl as lv import display_driver from img_wink_png import img_wink_png_map -img_wink_png = lv.img_dsc_t( +image_wink_png = lv.image_dsc_t( { "header": {"always_zero": 0, "w": 50, "h": 50, "cf": lv.COLOR_FORMAT.RAW_ALPHA}, "data_size": 5158, "data": img_wink_png_map, } ) -img1 = lv.img(lv.scr_act()) -img1.set_src(img_wink_png) -img1.align(lv.ALIGN.RIGHT_MID, -250, 0) +image1 = lv.image(lv.scr_act()) +image1.set_src(image_wink_png) +image1.align(lv.ALIGN.RIGHT_MID, -250, 0) # Create an image from the png file try: @@ -22,11 +22,11 @@ except: print("Could not find wink.png") sys.exit() -wink_argb = lv.img_dsc_t({ +wink_argb = lv.image_dsc_t({ 'data_size': len(png_data), 'data': png_data }) -img2 = lv.img(lv.scr_act()) -img2.set_src(wink_argb) -img2.align(lv.ALIGN.RIGHT_MID, -150, 0) +image2 = lv.image(lv.scr_act()) +image2.set_src(wink_argb) +image2.align(lv.ALIGN.RIGHT_MID, -150, 0) diff --git a/examples/libs/sjpg/lv_example_sjpg_1.c b/examples/libs/sjpg/lv_example_sjpg_1.c index 1016c269e..d6dc3e5c2 100644 --- a/examples/libs/sjpg/lv_example_sjpg_1.c +++ b/examples/libs/sjpg/lv_example_sjpg_1.c @@ -8,10 +8,10 @@ void lv_example_sjpg_1(void) { lv_obj_t * wp; - wp = lv_img_create(lv_scr_act()); + wp = lv_image_create(lv_scr_act()); /* Assuming a File system is attached to letter 'A' * E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */ - lv_img_set_src(wp, "A:lvgl/examples/libs/sjpg/small_image.sjpg"); + lv_image_set_src(wp, "A:lvgl/examples/libs/sjpg/small_image.sjpg"); } #endif diff --git a/examples/libs/sjpg/lv_example_sjpg_1.py b/examples/libs/sjpg/lv_example_sjpg_1.py index d33ef9f0d..babc97edf 100755 --- a/examples/libs/sjpg/lv_example_sjpg_1.py +++ b/examples/libs/sjpg/lv_example_sjpg_1.py @@ -6,7 +6,7 @@ import fs_driver fs_drv = lv.fs_drv_t() fs_driver.fs_register(fs_drv, 'S') -wp = lv.img(lv.scr_act()) +wp = lv.image(lv.scr_act()) # The File system is attached to letter 'S' wp.set_src("S:small_image.sjpg") diff --git a/examples/others/file_explorer/lv_example_file_explorer_2.c b/examples/others/file_explorer/lv_example_file_explorer_2.c index 21bb83d86..3a9d83370 100644 --- a/examples/others/file_explorer/lv_example_file_explorer_2.c +++ b/examples/others/file_explorer/lv_example_file_explorer_2.c @@ -113,7 +113,7 @@ void lv_example_file_explorer_2(void) /*Quick access status control button*/ lv_obj_t * fe_quick_access_obj = lv_file_explorer_get_quick_access_area(file_explorer); lv_obj_t * fe_header_obj = lv_file_explorer_get_header(file_explorer); - lv_obj_t * btn = lv_btn_create(fe_header_obj); + lv_obj_t * btn = lv_button_create(fe_header_obj); lv_obj_set_style_radius(btn, 2, 0); lv_obj_set_style_pad_all(btn, 4, 0); lv_obj_align(btn, LV_ALIGN_LEFT_MID, 0, 0); diff --git a/examples/others/file_explorer/lv_example_file_explorer_2.py b/examples/others/file_explorer/lv_example_file_explorer_2.py index d317b330e..e94e2c1a6 100644 --- a/examples/others/file_explorer/lv_example_file_explorer_2.py +++ b/examples/others/file_explorer/lv_example_file_explorer_2.py @@ -14,14 +14,14 @@ def file_explorer_event_handler(e): sel_fn = obj.explorer_get_selected_file_name() print(str(cur_path) + str(sel_fn)) -def btn_event_handler(e,fe_quick_access_obj): +def button_event_handler(e,fe_quick_access_obj): code = e.get_code() - btn = e.get_target_obj() + button = e.get_target_obj() # lv_obj_t * file_explorer = lv_event_get_user_data(e); if code == lv.EVENT.VALUE_CHANGED : - if btn.has_state(lv.STATE.CHECKED) : + if button.has_state(lv.STATE.CHECKED) : fe_quick_access_obj.add_flag(lv.obj.FLAG.HIDDEN) else : fe_quick_access_obj.clear_flag(lv.obj.FLAG.HIDDEN) @@ -73,18 +73,18 @@ file_explorer.add_event(file_explorer_event_handler, lv.EVENT.ALL, None) # Quick access status control button fe_quick_access_obj = file_explorer.explorer_get_quick_access_area() fe_header_obj = file_explorer.explorer_get_header() -btn = lv.btn(fe_header_obj) -btn.set_style_radius(2, 0) -btn.set_style_pad_all(4, 0) -btn.align(lv.ALIGN.LEFT_MID, 0, 0) -btn.add_flag(lv.obj.FLAG.CHECKABLE) +button = lv.button(fe_header_obj) +button.set_style_radius(2, 0) +button.set_style_pad_all(4, 0) +button.align(lv.ALIGN.LEFT_MID, 0, 0) +button.add_flag(lv.obj.FLAG.CHECKABLE) -label = lv.label(btn) +label = lv.label(button) label.set_text(lv.SYMBOL.LIST) label.center() -btn.add_event(lambda evt: btn_event_handler(evt,fe_quick_access_obj), lv.EVENT.VALUE_CHANGED, None) -#btn.add_event(lambda evt: btn_event_handler(evt,file_explorer), lv.EVENT.VALUE_CHANGED, None) +button.add_event(lambda evt: button_event_handler(evt,fe_quick_access_obj), lv.EVENT.VALUE_CHANGED, None) +#button.add_event(lambda evt: button_event_handler(evt,file_explorer), lv.EVENT.VALUE_CHANGED, None) # Sort control opts = "NONE\nKIND" @@ -95,7 +95,7 @@ dd.set_style_pad_all(0, 0) dd.set_size(lv.pct(30), lv.SIZE_CONTENT) dd.set_options_static(opts) dd.align(lv.ALIGN.RIGHT_MID, 0, 0) -# lv_obj_align_to(dd, btn, LV_ALIGN_OUT_RIGHT_MID, 0, 0); +# lv_obj_align_to(dd, button, LV_ALIGN_OUT_RIGHT_MID, 0, 0); dd.add_event(lambda evt: dd_event_handler(evt,file_explorer), lv.EVENT.VALUE_CHANGED, None) #dd.add_event(lambda evt: dd_event_handler(evt,fe_quick_access_obj), lv.EVENT.VALUE_CHANGED, None) diff --git a/examples/others/fragment/lv_example_fragment_2.c b/examples/others/fragment/lv_example_fragment_2.c index fa5cc86d9..f05913f27 100644 --- a/examples/others/fragment/lv_example_fragment_2.c +++ b/examples/others/fragment/lv_example_fragment_2.c @@ -45,11 +45,11 @@ void lv_example_fragment_2(void) lv_obj_remove_style_all(container); lv_obj_set_grid_cell(container, LV_GRID_ALIGN_STRETCH, 0, 2, LV_GRID_ALIGN_STRETCH, 0, 1); - lv_obj_t * push_btn = lv_btn_create(root); + lv_obj_t * push_btn = lv_button_create(root); lv_obj_t * push_label = lv_label_create(push_btn); lv_label_set_text(push_label, "Push"); - lv_obj_t * pop_btn = lv_btn_create(root); + lv_obj_t * pop_btn = lv_button_create(root); lv_obj_t * pop_label = lv_label_create(pop_btn); lv_label_set_text(pop_label, "Pop"); lv_obj_set_grid_cell(push_btn, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_CENTER, 1, 1); @@ -89,7 +89,7 @@ static lv_obj_t * sample_fragment_create_obj(lv_fragment_t * self, lv_obj_t * pa fragment->label = label; lv_label_set_text_fmt(label, "The button has been pressed %d times", fragment->counter); - lv_obj_t * inc_btn = lv_btn_create(content); + lv_obj_t * inc_btn = lv_button_create(content); lv_obj_t * inc_label = lv_label_create(inc_btn); lv_label_set_text(inc_label, "+1"); lv_obj_add_event(inc_btn, sample_fragment_inc_click, LV_EVENT_CLICKED, fragment); diff --git a/examples/others/gridnav/lv_example_gridnav_1.c b/examples/others/gridnav/lv_example_gridnav_1.c index 8270e0a3c..3eeb70d93 100644 --- a/examples/others/gridnav/lv_example_gridnav_1.c +++ b/examples/others/gridnav/lv_example_gridnav_1.c @@ -25,7 +25,7 @@ void lv_example_gridnav_1(void) uint32_t i; for(i = 0; i < 10; i++) { - lv_obj_t * obj = lv_btn_create(cont1); + lv_obj_t * obj = lv_button_create(cont1); lv_obj_set_size(obj, 70, LV_SIZE_CONTENT); lv_obj_add_flag(obj, LV_OBJ_FLAG_CHECKABLE); lv_group_remove_obj(obj); /*Not needed, we use the gridnav instead*/ diff --git a/examples/others/gridnav/lv_example_gridnav_1.py b/examples/others/gridnav/lv_example_gridnav_1.py index 3b3614c8a..23ed8aaff 100644 --- a/examples/others/gridnav/lv_example_gridnav_1.py +++ b/examples/others/gridnav/lv_example_gridnav_1.py @@ -19,7 +19,7 @@ label = lv.label(cont1) label.set_text("No rollover") for i in range(10): - obj = lv.btn(cont1) + obj = lv.button(cont1) obj.set_size(70, lv.SIZE_CONTENT) obj.add_flag(lv.obj.FLAG.CHECKABLE) lv.group_remove_obj(obj) # Not needed, we use the gridnav instead diff --git a/examples/others/gridnav/lv_example_gridnav_2.c b/examples/others/gridnav/lv_example_gridnav_2.c index b757187a5..76caf41b7 100644 --- a/examples/others/gridnav/lv_example_gridnav_2.c +++ b/examples/others/gridnav/lv_example_gridnav_2.c @@ -21,7 +21,7 @@ void lv_example_gridnav_2(void) uint32_t i; for(i = 0; i < 15; i++) { lv_snprintf(buf, sizeof(buf), "File %d", i + 1); - lv_obj_t * item = lv_list_add_btn(list1, LV_SYMBOL_FILE, buf); + lv_obj_t * item = lv_list_add_button(list1, LV_SYMBOL_FILE, buf); lv_obj_set_style_bg_opa(item, 0, 0); lv_group_remove_obj(item); /*Not needed, we use the gridnav instead*/ } @@ -35,7 +35,7 @@ void lv_example_gridnav_2(void) for(i = 0; i < 15; i++) { lv_snprintf(buf, sizeof(buf), "Folder %d", i + 1); - lv_obj_t * item = lv_list_add_btn(list2, LV_SYMBOL_DIRECTORY, buf); + lv_obj_t * item = lv_list_add_button(list2, LV_SYMBOL_DIRECTORY, buf); lv_obj_set_style_bg_opa(item, 0, 0); lv_group_remove_obj(item); } diff --git a/examples/others/gridnav/lv_example_gridnav_2.py b/examples/others/gridnav/lv_example_gridnav_2.py index 684182824..5c8dcd9ef 100644 --- a/examples/others/gridnav/lv_example_gridnav_2.py +++ b/examples/others/gridnav/lv_example_gridnav_2.py @@ -13,7 +13,7 @@ lv.group_get_default().add_obj(list1) for i in range(15): item_text = "File {:d}".format(i) - item = list1.add_btn(lv.SYMBOL.FILE, item_text) + item = list1.add_button(lv.SYMBOL.FILE, item_text) item.set_style_bg_opa(0, 0) lv.group_remove_obj(item) # Not needed, we use the gridnav instead @@ -26,7 +26,7 @@ lv.group_get_default().add_obj(list2) for i in range(15): item_text = "Folder {:d}".format(i) - item = list2.add_btn(lv.SYMBOL.DIRECTORY, item_text) + item = list2.add_button(lv.SYMBOL.DIRECTORY, item_text) item.set_style_bg_opa(0, 0) lv.group_remove_obj(item) diff --git a/examples/others/gridnav/lv_example_gridnav_3.c b/examples/others/gridnav/lv_example_gridnav_3.c index cc7e485bc..3b3ecaa66 100644 --- a/examples/others/gridnav/lv_example_gridnav_3.c +++ b/examples/others/gridnav/lv_example_gridnav_3.c @@ -36,12 +36,12 @@ void lv_example_gridnav_3(void) lv_obj_t * btn; lv_obj_t * label; - btn = lv_btn_create(cont_main); + btn = lv_button_create(cont_main); lv_group_remove_obj(btn); label = lv_label_create(btn); lv_label_set_text(label, "Button 1"); - btn = lv_btn_create(cont_main); + btn = lv_button_create(cont_main); lv_group_remove_obj(btn); label = lv_label_create(btn); lv_label_set_text(label, "Button 2"); @@ -83,12 +83,12 @@ void lv_example_gridnav_3(void) lv_label_set_text(label, "Use ENTER/ESC to focus/defocus this container"); lv_obj_set_width(label, lv_pct(100)); - btn = lv_btn_create(cont_sub2); + btn = lv_button_create(cont_sub2); lv_group_remove_obj(btn); label = lv_label_create(btn); lv_label_set_text(label, "Button 3"); - btn = lv_btn_create(cont_sub2); + btn = lv_button_create(cont_sub2); lv_group_remove_obj(btn); label = lv_label_create(btn); lv_label_set_text(label, "Button 4"); diff --git a/examples/others/gridnav/lv_example_gridnav_3.py b/examples/others/gridnav/lv_example_gridnav_3.py index 43c4b1407..a58022507 100644 --- a/examples/others/gridnav/lv_example_gridnav_3.py +++ b/examples/others/gridnav/lv_example_gridnav_3.py @@ -24,14 +24,14 @@ cont_main.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP) cont_main.set_style_bg_color(lv.palette_lighten(lv.PALETTE.BLUE, 5), lv.STATE.FOCUSED) cont_main.set_size(lv.pct(80), lv.SIZE_CONTENT) -btn = lv.btn(cont_main) -lv.group_remove_obj(btn) -label = lv.label(btn) +button = lv.button(cont_main) +lv.group_remove_obj(button) +label = lv.label(button) label.set_text("Button 1") -btn = lv.btn(cont_main) -lv.group_remove_obj(btn) -label = lv.label(btn) +button = lv.button(cont_main) +lv.group_remove_obj(button) +label = lv.label(button) label.set_text("Button 2"); @@ -72,13 +72,13 @@ label = lv.label(cont_sub2) label.set_text("Use ENTER/ESC to focus/defocus this container") label.set_width(lv.pct(100)) -btn = lv.btn(cont_sub2) -lv.group_remove_obj(btn) -label = lv.label(btn) +button = lv.button(cont_sub2) +lv.group_remove_obj(button) +label = lv.label(button) label.set_text("Button 3") -btn = lv.btn(cont_sub2) -lv.group_remove_obj(btn) -label = lv.label(btn) +button = lv.button(cont_sub2) +lv.group_remove_obj(button) +label = lv.label(button) label.set_text("Button 4") diff --git a/examples/others/gridnav/lv_example_gridnav_4.c b/examples/others/gridnav/lv_example_gridnav_4.c index 4eabd3e7e..c7bd398f0 100644 --- a/examples/others/gridnav/lv_example_gridnav_4.c +++ b/examples/others/gridnav/lv_example_gridnav_4.c @@ -6,7 +6,7 @@ static void event_handler(lv_event_t * e) { lv_obj_t * obj = lv_event_get_target(e); lv_obj_t * list = lv_obj_get_parent(obj); - LV_LOG_USER("Clicked: %s", lv_list_get_btn_text(list, obj)); + LV_LOG_USER("Clicked: %s", lv_list_get_button_text(list, obj)); } /** @@ -33,12 +33,12 @@ void lv_example_gridnav_4(void) } lv_snprintf(buf, sizeof(buf), "File %d", i + 1); - lv_obj_t * item = lv_list_add_btn(list, LV_SYMBOL_FILE, buf); + lv_obj_t * item = lv_list_add_button(list, LV_SYMBOL_FILE, buf); lv_obj_add_event(item, event_handler, LV_EVENT_CLICKED, NULL); lv_group_remove_obj(item); /*The default group adds it automatically*/ } - lv_obj_t * btn = lv_btn_create(lv_scr_act()); + lv_obj_t * btn = lv_button_create(lv_scr_act()); lv_obj_align(btn, LV_ALIGN_RIGHT_MID, -10, 0); lv_obj_t * label = lv_label_create(btn); lv_label_set_text(label, "Button"); diff --git a/examples/others/gridnav/lv_example_gridnav_4.py b/examples/others/gridnav/lv_example_gridnav_4.py index e4a5ed3e9..fbd437b20 100644 --- a/examples/others/gridnav/lv_example_gridnav_4.py +++ b/examples/others/gridnav/lv_example_gridnav_4.py @@ -1,7 +1,7 @@ def event_handler(e): obj = e.get_target_obj() list = obj.get_parent() - print("Clicked: " + list.get_btn_text(obj)) + print("Clicked: " + list.get_button_text(obj)) # @@ -25,12 +25,12 @@ for i in range(20): txt = "File {:d}".format(i + 1) #lv_snprintf(buf, sizeof(buf), "File %d", i + 1); - item = list.add_btn(lv.SYMBOL.FILE, txt) + item = list.add_button(lv.SYMBOL.FILE, txt) item.add_event(event_handler, lv.EVENT.CLICKED, None) lv.group_remove_obj(item) # The default group adds it automatically -btn = lv.btn(lv.scr_act()) -btn.align(lv.ALIGN.RIGHT_MID, 0, -10) -label = lv.label(btn) +button = lv.button(lv.scr_act()) +button.align(lv.ALIGN.RIGHT_MID, 0, -10) +label = lv.label(button) label.set_text("Button") diff --git a/examples/others/imgfont/lv_example_imgfont_1.c b/examples/others/imgfont/lv_example_imgfont_1.c index b99eb12cb..1421384f4 100644 --- a/examples/others/imgfont/lv_example_imgfont_1.c +++ b/examples/others/imgfont/lv_example_imgfont_1.c @@ -4,7 +4,7 @@ #if LV_BUILD_EXAMPLES #if LV_USE_IMGFONT -LV_IMG_DECLARE(emoji_F617) +LV_IMAGE_DECLARE(emoji_F617) char path_buf[128]; static const void * get_imgfont_path(const lv_font_t * font, uint32_t unicode, uint32_t unicode_next, lv_coord_t * offset_y, void * user_data) diff --git a/examples/others/msg/lv_example_msg_2.c b/examples/others/msg/lv_example_msg_2.c index d1434aa92..34ad4883d 100644 --- a/examples/others/msg/lv_example_msg_2.c +++ b/examples/others/msg/lv_example_msg_2.c @@ -40,7 +40,7 @@ void lv_example_msg_2(void) lv_obj_t * label; /*Create a log out button which will be active only when logged in*/ - btn = lv_btn_create(lv_scr_act()); + btn = lv_button_create(lv_scr_act()); lv_obj_set_pos(btn, 240, 10); lv_obj_add_event(btn, log_out_event_cb, LV_EVENT_ALL, NULL); lv_msg_subscribe_obj(MSG_LOGIN_OK, btn, NULL); @@ -59,7 +59,7 @@ void lv_example_msg_2(void) lv_msg_subscribe_obj(MSG_LOG_OUT, label, NULL); /*Create button which will be active only when logged in*/ - btn = lv_btn_create(lv_scr_act()); + btn = lv_button_create(lv_scr_act()); lv_obj_set_pos(btn, 10, 80); lv_obj_add_event(btn, start_engine_msg_event_cb, LV_EVENT_MSG_RECEIVED, NULL); lv_obj_add_flag(btn, LV_OBJ_FLAG_CHECKABLE); diff --git a/examples/others/msg/lv_example_msg_2.py b/examples/others/msg/lv_example_msg_2.py index 978ad77db..fa40db092 100644 --- a/examples/others/msg/lv_example_msg_2.py +++ b/examples/others/msg/lv_example_msg_2.py @@ -51,22 +51,22 @@ def log_out_event_cb(e): lv.msg_send(MSG_LOG_OUT, None) elif code == lv.EVENT.MSG_RECEIVED: m = e.get_msg() - btn = e.get_target_obj() + button = e.get_target_obj() id = m.get_id() if id == MSG_LOGIN_OK: - btn.clear_state(lv.STATE.DISABLED) + button.clear_state(lv.STATE.DISABLED) elif id == MSG_LOG_OUT: - btn.add_state(lv.STATE.DISABLED) + button.add_state(lv.STATE.DISABLED) def start_engine_msg_event_cb(e): m = e.get_msg() - btn = e.get_target_obj() + button = e.get_target_obj() id = m.get_id() if id == MSG_LOGIN_OK: - btn.clear_state(lv.STATE.DISABLED) + button.clear_state(lv.STATE.DISABLED) elif id == MSG_LOG_OUT: - btn.add_state(lv.STATE.DISABLED) + button.add_state(lv.STATE.DISABLED) def info_label_msg_event_cb(e): @@ -109,13 +109,13 @@ kb = lv.keyboard(lv.scr_act()) kb.set_textarea(ta) # Create a log out button which will be active only when logged in -btn = lv.btn(lv.scr_act()) -btn.set_pos(240, 10) -btn.add_event(log_out_event_cb, lv.EVENT.ALL, None) -lv.msg_subscribe_obj(MSG_LOGIN_OK, btn, None) -lv.msg_subscribe_obj(MSG_LOG_OUT, btn, None) +button = lv.button(lv.scr_act()) +button.set_pos(240, 10) +button.add_event(log_out_event_cb, lv.EVENT.ALL, None) +lv.msg_subscribe_obj(MSG_LOGIN_OK, button, None) +lv.msg_subscribe_obj(MSG_LOG_OUT, button, None) -label = lv.label(btn); +label = lv.label(button); label.set_text("LOG OUT") # Create a label to show info @@ -128,14 +128,14 @@ lv.msg_subscribe_obj(MSG_LOGIN_OK, label, None) lv.msg_subscribe_obj(MSG_LOG_OUT, label, None) #Create button which will be active only when logged in -btn = lv.btn(lv.scr_act()) -btn.set_pos(10, 80) -btn.add_event(start_engine_msg_event_cb, lv.EVENT.MSG_RECEIVED, None) -btn.add_flag(lv.obj.FLAG.CHECKABLE) -lv.msg_subscribe_obj(MSG_LOGIN_OK, btn, None) -lv.msg_subscribe_obj(MSG_LOG_OUT, btn, None) +button = lv.button(lv.scr_act()) +button.set_pos(10, 80) +button.add_event(start_engine_msg_event_cb, lv.EVENT.MSG_RECEIVED, None) +button.add_flag(lv.obj.FLAG.CHECKABLE) +lv.msg_subscribe_obj(MSG_LOGIN_OK, button, None) +lv.msg_subscribe_obj(MSG_LOG_OUT, button, None) -label = lv.label(btn) +label = lv.label(button) label.set_text("START ENGINE") lv.msg_send(MSG_LOG_OUT, None) diff --git a/examples/others/msg/lv_example_msg_3.c b/examples/others/msg/lv_example_msg_3.c index 1dcf405ae..27038abf5 100644 --- a/examples/others/msg/lv_example_msg_3.c +++ b/examples/others/msg/lv_example_msg_3.c @@ -27,7 +27,7 @@ void lv_example_msg_3(void) lv_obj_t * label; /*Up button*/ - btn = lv_btn_create(panel); + btn = lv_button_create(panel); lv_obj_set_flex_grow(btn, 1); lv_obj_add_event(btn, btn_event_cb, LV_EVENT_ALL, NULL); label = lv_label_create(btn); @@ -43,7 +43,7 @@ void lv_example_msg_3(void) lv_obj_add_event(label, label_event_cb, LV_EVENT_MSG_RECEIVED, NULL); /*Down button*/ - btn = lv_btn_create(panel); + btn = lv_button_create(panel); lv_obj_set_flex_grow(btn, 1); lv_obj_add_event(btn, btn_event_cb, LV_EVENT_ALL, NULL); label = lv_label_create(btn); diff --git a/examples/others/msg/lv_example_msg_3.py b/examples/others/msg/lv_example_msg_3.py index 436316547..1c4f89690 100644 --- a/examples/others/msg/lv_example_msg_3.py +++ b/examples/others/msg/lv_example_msg_3.py @@ -28,10 +28,10 @@ class LV_Example_Msg_2: panel.set_flex_align(lv.FLEX_ALIGN.SPACE_BETWEEN, lv.FLEX_ALIGN.CENTER, lv.FLEX_ALIGN.START) # Up button - btn = lv.btn(panel) - btn.set_flex_grow(1) - btn.add_event(self.btn_event_cb, lv.EVENT.ALL, None) - label = lv.label(btn) + button = lv.button(panel) + button.set_flex_grow(1) + button.add_event(self.button_event_cb, lv.EVENT.ALL, None) + label = lv.label(button) label.set_text(lv.SYMBOL.LEFT) label.center() @@ -44,10 +44,10 @@ class LV_Example_Msg_2: label.add_event(self.label_event_cb, lv.EVENT.MSG_RECEIVED, None) # Down button - btn = lv.btn(panel) - btn.set_flex_grow(1) - btn.add_event(self.btn_event_cb, lv.EVENT.ALL, None) - label = lv.label(btn) + button = lv.button(panel) + button.set_flex_grow(1) + button.add_event(self.button_event_cb, lv.EVENT.ALL, None) + label = lv.label(button) label.set_text(lv.SYMBOL.RIGHT) label.center() @@ -83,11 +83,11 @@ class LV_Example_Msg_2: if self.value != old_value: lv.msg_send(MSG_UPDATE, NewValue(self.value)); - def btn_event_cb(self,e): - btn = e.get_target_obj() + def button_event_cb(self,e): + button = e.get_target_obj() code = e.get_code() if code == lv.EVENT.CLICKED or code == lv.EVENT.LONG_PRESSED_REPEAT: - if btn.get_index() == 0: # rst object is the dec. button + if button.get_index() == 0: # rst object is the dec. button lv.msg_send(MSG_DEC, None) else : lv.msg_send(MSG_INC, None) diff --git a/examples/others/snapshot/lv_example_snapshot_1.c b/examples/others/snapshot/lv_example_snapshot_1.c index f62c59832..26767d26b 100644 --- a/examples/others/snapshot/lv_example_snapshot_1.c +++ b/examples/others/snapshot/lv_example_snapshot_1.c @@ -7,7 +7,7 @@ static void event_cb(lv_event_t * e) lv_obj_t * img = lv_event_get_target(e); if(snapshot_obj) { - lv_img_dsc_t * snapshot = (void *)lv_img_get_src(snapshot_obj); + lv_image_dsc_t * snapshot = (void *)lv_image_get_src(snapshot_obj); if(snapshot) { lv_snapshot_free(snapshot); } @@ -16,22 +16,22 @@ static void event_cb(lv_event_t * e) snapshot = lv_snapshot_take(img->parent, LV_COLOR_FORMAT_ARGB8888); if(snapshot == NULL) return; - lv_img_set_src(snapshot_obj, snapshot); + lv_image_set_src(snapshot_obj, snapshot); } } void lv_example_snapshot_1(void) { - LV_IMG_DECLARE(img_star); + LV_IMAGE_DECLARE(img_star); lv_obj_t * root = lv_scr_act(); lv_obj_set_style_bg_color(root, lv_palette_main(LV_PALETTE_LIGHT_BLUE), 0); /*Create an image object to show snapshot*/ - lv_obj_t * snapshot_obj = lv_img_create(root); + lv_obj_t * snapshot_obj = lv_image_create(root); lv_obj_set_style_bg_color(snapshot_obj, lv_palette_main(LV_PALETTE_PURPLE), 0); lv_obj_set_style_bg_opa(snapshot_obj, LV_OPA_100, 0); - lv_img_set_zoom(snapshot_obj, 128); - lv_img_set_angle(snapshot_obj, 300); + lv_image_set_zoom(snapshot_obj, 128); + lv_image_set_angle(snapshot_obj, 300); /*Create the container and its children*/ lv_obj_t * container = lv_obj_create(root); @@ -44,8 +44,8 @@ void lv_example_snapshot_1(void) lv_obj_t * img; int i; for(i = 0; i < 4; i++) { - img = lv_img_create(container); - lv_img_set_src(img, &img_star); + img = lv_image_create(container); + lv_image_set_src(img, &img_star); lv_obj_set_style_bg_color(img, lv_color_black(), 0); lv_obj_set_style_bg_opa(img, LV_OPA_COVER, 0); // lv_obj_set_style_transform_zoom(img, 400, LV_STATE_PRESSED); diff --git a/examples/others/snapshot/lv_example_snapshot_1.py b/examples/others/snapshot/lv_example_snapshot_1.py index 575a975ae..6098a67fe 100644 --- a/examples/others/snapshot/lv_example_snapshot_1.py +++ b/examples/others/snapshot/lv_example_snapshot_1.py @@ -18,19 +18,19 @@ except: print("Could not find star.png") sys.exit() -img_star = lv.img_dsc_t({ +image_star = lv.image_dsc_t({ 'data_size': len(png_data), 'data': png_data }) def event_cb(e, snapshot_obj): - img = e.get_target_obj() + image = e.get_target_obj() if snapshot_obj: # no need to free the old source for snapshot_obj, gc will free it for us. # take a new snapshot, overwrite the old one - dsc = lv.snapshot_take(img.get_parent(), lv.COLOR_FORMAT.NATIVE_ALPHA) + dsc = lv.snapshot_take(image.get_parent(), lv.COLOR_FORMAT.NATIVE_ALPHA) snapshot_obj.set_src(dsc) gc.collect() @@ -41,7 +41,7 @@ root = lv.scr_act() root.set_style_bg_color(lv.palette_main(lv.PALETTE.LIGHT_BLUE), 0) # Create an image object to show snapshot -snapshot_obj = lv.img(root) +snapshot_obj = lv.image(root) snapshot_obj.set_style_bg_color(lv.palette_main(lv.PALETTE.PURPLE), 0) snapshot_obj.set_style_bg_opa(lv.OPA.COVER, 0) snapshot_obj.set_zoom(128) @@ -55,11 +55,11 @@ container.set_flex_align(lv.FLEX_ALIGN.SPACE_EVENLY, lv.FLEX_ALIGN.CENTER, lv.FL container.set_style_radius(50, 0) for i in range(4): - img = lv.img(container) - img.set_src(img_star) - img.set_style_bg_color(lv.palette_main(lv.PALETTE.GREY), 0) - img.set_style_bg_opa(lv.OPA.COVER, 0) - img.set_style_transform_zoom(400, lv.STATE.PRESSED) - img.add_flag(img.FLAG.CLICKABLE) - img.add_event(lambda e: event_cb(e, snapshot_obj), lv.EVENT.PRESSED, None) - img.add_event(lambda e: event_cb(e, snapshot_obj), lv.EVENT.RELEASED, None) + image = lv.image(container) + image.set_src(image_star) + image.set_style_bg_color(lv.palette_main(lv.PALETTE.GREY), 0) + image.set_style_bg_opa(lv.OPA.COVER, 0) + image.set_style_transform_zoom(400, lv.STATE.PRESSED) + image.add_flag(image.FLAG.CLICKABLE) + image.add_event(lambda e: event_cb(e, snapshot_obj), lv.EVENT.PRESSED, None) + image.add_event(lambda e: event_cb(e, snapshot_obj), lv.EVENT.RELEASED, None) diff --git a/examples/porting/lv_port_indev_template.c b/examples/porting/lv_port_indev_template.c index 85330b789..04f488be4 100644 --- a/examples/porting/lv_port_indev_template.c +++ b/examples/porting/lv_port_indev_template.c @@ -106,8 +106,8 @@ void lv_port_indev_init(void) lv_indev_set_read_cb(indev_mouse, mouse_read); /*Set cursor. For simplicity set a HOME symbol now.*/ - lv_obj_t * mouse_cursor = lv_img_create(lv_scr_act()); - lv_img_set_src(mouse_cursor, LV_SYMBOL_HOME); + lv_obj_t * mouse_cursor = lv_image_create(lv_scr_act()); + lv_image_set_src(mouse_cursor, LV_SYMBOL_HOME); lv_indev_set_cursor(indev_mouse, mouse_cursor); /*------------------ diff --git a/examples/scroll/lv_example_scroll_1.c b/examples/scroll/lv_example_scroll_1.c index 4f7e12147..8ce8c3862 100644 --- a/examples/scroll/lv_example_scroll_1.c +++ b/examples/scroll/lv_example_scroll_1.c @@ -25,7 +25,7 @@ void lv_example_scroll_1(void) lv_obj_set_pos(child, 160, 80); lv_obj_set_size(child, 80, 80); - lv_obj_t * child2 = lv_btn_create(child); + lv_obj_t * child2 = lv_button_create(child); lv_obj_set_size(child2, 100, 50); label = lv_label_create(child2); diff --git a/examples/scroll/lv_example_scroll_1.py b/examples/scroll/lv_example_scroll_1.py index 21844cef2..1449cd694 100644 --- a/examples/scroll/lv_example_scroll_1.py +++ b/examples/scroll/lv_example_scroll_1.py @@ -17,7 +17,7 @@ child = lv.obj(panel) child.set_pos(160, 80) child.set_size(80, 80) -child2 = lv.btn(child) +child2 = lv.button(child) child2.set_size(100, 50) label = lv.label(child2) diff --git a/examples/scroll/lv_example_scroll_2.c b/examples/scroll/lv_example_scroll_2.c index ef0a451d8..2081a22f0 100644 --- a/examples/scroll/lv_example_scroll_2.c +++ b/examples/scroll/lv_example_scroll_2.c @@ -27,7 +27,7 @@ void lv_example_scroll_2(void) uint32_t i; for(i = 0; i < 10; i++) { - lv_obj_t * btn = lv_btn_create(panel); + lv_obj_t * btn = lv_button_create(panel); lv_obj_set_size(btn, 150, lv_pct(100)); lv_obj_t * label = lv_label_create(btn); diff --git a/examples/scroll/lv_example_scroll_2.py b/examples/scroll/lv_example_scroll_2.py index a29839d13..8235165aa 100644 --- a/examples/scroll/lv_example_scroll_2.py +++ b/examples/scroll/lv_example_scroll_2.py @@ -22,13 +22,13 @@ panel.set_flex_flow(lv.FLEX_FLOW.ROW) panel.center() for i in range(10): - btn = lv.btn(panel) - btn.set_size(150, 100) + button = lv.button(panel) + button.set_size(150, 100) - label = lv.label(btn) + label = lv.label(button) if i == 3: label.set_text("Panel {:d}\nno snap".format(i)) - btn.clear_flag(lv.obj.FLAG.SNAPPABLE) + button.clear_flag(lv.obj.FLAG.SNAPPABLE) else: label.set_text("Panel {:d}".format(i)) label.center() diff --git a/examples/scroll/lv_example_scroll_3.c b/examples/scroll/lv_example_scroll_3.c index 83ff22270..51308c8a1 100644 --- a/examples/scroll/lv_example_scroll_3.c +++ b/examples/scroll/lv_example_scroll_3.c @@ -3,7 +3,7 @@ static uint32_t btn_cnt = 1; -static void float_btn_event_cb(lv_event_t * e) +static void float_button_event_cb(lv_event_t * e) { lv_event_code_t code = lv_event_get_code(e); lv_obj_t * float_btn = lv_event_get_target(e); @@ -12,7 +12,7 @@ static void float_btn_event_cb(lv_event_t * e) lv_obj_t * list = lv_event_get_user_data(e); char buf[32]; lv_snprintf(buf, sizeof(buf), "Track %d", (int)btn_cnt); - lv_obj_t * list_btn = lv_list_add_btn(list, LV_SYMBOL_AUDIO, buf); + lv_obj_t * list_btn = lv_list_add_button(list, LV_SYMBOL_AUDIO, buf); btn_cnt++; lv_obj_move_foreground(float_btn); @@ -33,16 +33,16 @@ void lv_example_scroll_3(void) for(btn_cnt = 1; btn_cnt <= 2; btn_cnt++) { char buf[32]; lv_snprintf(buf, sizeof(buf), "Track %d", (int)btn_cnt); - lv_list_add_btn(list, LV_SYMBOL_AUDIO, buf); + lv_list_add_button(list, LV_SYMBOL_AUDIO, buf); } - lv_obj_t * float_btn = lv_btn_create(list); + lv_obj_t * float_btn = lv_button_create(list); lv_obj_set_size(float_btn, 50, 50); lv_obj_add_flag(float_btn, LV_OBJ_FLAG_FLOATING); lv_obj_align(float_btn, LV_ALIGN_BOTTOM_RIGHT, 0, -lv_obj_get_style_pad_right(list, LV_PART_MAIN)); - lv_obj_add_event(float_btn, float_btn_event_cb, LV_EVENT_ALL, list); + lv_obj_add_event(float_btn, float_button_event_cb, LV_EVENT_ALL, list); lv_obj_set_style_radius(float_btn, LV_RADIUS_CIRCLE, 0); - lv_obj_set_style_bg_img_src(float_btn, LV_SYMBOL_PLUS, 0); + lv_obj_set_style_bg_image_src(float_btn, LV_SYMBOL_PLUS, 0); lv_obj_set_style_text_font(float_btn, lv_theme_get_font_large(float_btn), 0); } diff --git a/examples/scroll/lv_example_scroll_3.py b/examples/scroll/lv_example_scroll_3.py index dcbfe2834..0bff286cf 100644 --- a/examples/scroll/lv_example_scroll_3.py +++ b/examples/scroll/lv_example_scroll_3.py @@ -1,6 +1,6 @@ class ScrollExample_3(): def __init__(self): - self.btn_cnt = 1 + self.button_cnt = 1 # # Create a list with a floating button # @@ -9,29 +9,29 @@ class ScrollExample_3(): list.set_size(280, 220) list.center() - for btn_cnt in range(2): - list.add_btn(lv.SYMBOL.AUDIO,"Track {:d}".format(btn_cnt)) + for button_cnt in range(2): + list.add_button(lv.SYMBOL.AUDIO,"Track {:d}".format(button_cnt)) - float_btn = lv.btn(list) - float_btn.set_size(50, 50) - float_btn.add_flag(lv.obj.FLAG.FLOATING) - float_btn.align(lv.ALIGN.BOTTOM_RIGHT, 0, -list.get_style_pad_right(lv.PART.MAIN)) - float_btn.add_event(lambda evt: self.float_btn_event_cb(evt,list), lv.EVENT.ALL, None) - float_btn.set_style_radius(lv.RADIUS_CIRCLE, 0) - float_btn.set_style_bg_img_src(lv.SYMBOL.PLUS, 0) - float_btn.set_style_text_font(lv.theme_get_font_large(float_btn), 0) + float_button = lv.button(list) + float_button.set_size(50, 50) + float_button.add_flag(lv.obj.FLAG.FLOATING) + float_button.align(lv.ALIGN.BOTTOM_RIGHT, 0, -list.get_style_pad_right(lv.PART.MAIN)) + float_button.add_event(lambda evt: self.float_button_event_cb(evt,list), lv.EVENT.ALL, None) + float_button.set_style_radius(lv.RADIUS_CIRCLE, 0) + float_button.set_style_bg_image_src(lv.SYMBOL.PLUS, 0) + float_button.set_style_text_font(lv.theme_get_font_large(float_button), 0) - def float_btn_event_cb(self,e,list): + def float_button_event_cb(self,e,list): code = e.get_code() - float_btn = e.get_target_obj() + float_button = e.get_target_obj() if code == lv.EVENT.CLICKED: - list_btn = list.add_btn(lv.SYMBOL.AUDIO, "Track {:d}".format(self.btn_cnt)) - self.btn_cnt += 1 + list_button = list.add_button(lv.SYMBOL.AUDIO, "Track {:d}".format(self.button_cnt)) + self.button_cnt += 1 - float_btn.move_foreground() + float_button.move_foreground() - list_btn.scroll_to_view(lv.ANIM.ON) + list_button.scroll_to_view(lv.ANIM.ON) scroll_example_3 = ScrollExample_3() diff --git a/examples/scroll/lv_example_scroll_6.c b/examples/scroll/lv_example_scroll_6.c index d0c2e5b12..9b6538149 100644 --- a/examples/scroll/lv_example_scroll_6.c +++ b/examples/scroll/lv_example_scroll_6.c @@ -63,7 +63,7 @@ void lv_example_scroll_6(void) uint32_t i; for(i = 0; i < 20; i++) { - lv_obj_t * btn = lv_btn_create(cont); + lv_obj_t * btn = lv_button_create(cont); lv_obj_set_width(btn, lv_pct(100)); lv_obj_t * label = lv_label_create(btn); diff --git a/examples/scroll/lv_example_scroll_6.py b/examples/scroll/lv_example_scroll_6.py index 16d351add..0b423958f 100644 --- a/examples/scroll/lv_example_scroll_6.py +++ b/examples/scroll/lv_example_scroll_6.py @@ -54,10 +54,10 @@ cont.set_scroll_snap_y(lv.SCROLL_SNAP.CENTER) cont.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) for i in range(20): - btn = lv.btn(cont) - btn.set_width(lv.pct(100)) + button = lv.button(cont) + button.set_width(lv.pct(100)) - label = lv.label(btn) + label = lv.label(button) label.set_text("Button " + str(i)) # Update the buttons position manually for first* diff --git a/examples/styles/lv_example_style_14.c b/examples/styles/lv_example_style_14.c index cdb208639..4e032a5db 100644 --- a/examples/styles/lv_example_style_14.c +++ b/examples/styles/lv_example_style_14.c @@ -10,7 +10,7 @@ static void new_theme_apply_cb(lv_theme_t * th, lv_obj_t * obj) { LV_UNUSED(th); - if(lv_obj_check_type(obj, &lv_btn_class)) { + if(lv_obj_check_type(obj, &lv_button_class)) { lv_obj_add_style(obj, &style_btn, 0); } } @@ -46,7 +46,7 @@ void lv_example_style_14(void) lv_obj_t * btn; lv_obj_t * label; - btn = lv_btn_create(lv_scr_act()); + btn = lv_button_create(lv_scr_act()); lv_obj_align(btn, LV_ALIGN_TOP_MID, 0, 20); label = lv_label_create(btn); @@ -54,7 +54,7 @@ void lv_example_style_14(void) new_theme_init_and_set(); - btn = lv_btn_create(lv_scr_act()); + btn = lv_button_create(lv_scr_act()); lv_obj_align(btn, LV_ALIGN_BOTTOM_MID, 0, -20); label = lv_label_create(btn); diff --git a/examples/styles/lv_example_style_14.py b/examples/styles/lv_example_style_14.py index fbb5702d9..fa6407ab3 100644 --- a/examples/styles/lv_example_style_14.py +++ b/examples/styles/lv_example_style_14.py @@ -6,11 +6,11 @@ class NewTheme(lv.theme_t): def __init__(self): super().__init__() # Initialize the styles - self.style_btn = lv.style_t() - self.style_btn.init() - self.style_btn.set_bg_color(lv.palette_main(lv.PALETTE.GREEN)) - self.style_btn.set_border_color(lv.palette_darken(lv.PALETTE.GREEN, 3)) - self.style_btn.set_border_width(3) + self.style_button = lv.style_t() + self.style_button.init() + self.style_button.set_bg_color(lv.palette_main(lv.PALETTE.GREEN)) + self.style_button.set_border_color(lv.palette_darken(lv.PALETTE.GREEN, 3)) + self.style_button.set_border_width(3) # This theme is based on active theme th_act = lv.theme_get_from_obj(lv.scr_act()) @@ -25,24 +25,24 @@ class ExampleStyle_14: # Extending the current theme # - btn = lv.btn(lv.scr_act()) - btn.align(lv.ALIGN.TOP_MID, 0, 20) + button = lv.button(lv.scr_act()) + button.align(lv.ALIGN.TOP_MID, 0, 20) - label = lv.label(btn) + label = lv.label(button) label.set_text("Original theme") self.new_theme_init_and_set() - btn = lv.btn(lv.scr_act()) - btn.align(lv.ALIGN.BOTTOM_MID, 0, -20) + button = lv.button(lv.scr_act()) + button.align(lv.ALIGN.BOTTOM_MID, 0, -20) - label = lv.label(btn) + label = lv.label(button) label.set_text("New theme") def new_theme_apply_cb(self, th, obj): print(th,obj) - if obj.get_class() == lv.btn_class: - obj.add_style(self.th_new.style_btn, 0) + if obj.get_class() == lv.button_class: + obj.add_style(self.th_new.style_button, 0) def new_theme_init_and_set(self): print("new_theme_init_and_set") diff --git a/examples/styles/lv_example_style_15.c b/examples/styles/lv_example_style_15.c index cab321f71..9e31fecf8 100644 --- a/examples/styles/lv_example_style_15.c +++ b/examples/styles/lv_example_style_15.c @@ -12,7 +12,7 @@ void lv_example_style_15(void) lv_obj_t * label; /*Normal button*/ - btn = lv_btn_create(lv_scr_act()); + btn = lv_button_create(lv_scr_act()); lv_obj_set_size(btn, 100, 40); lv_obj_align(btn, LV_ALIGN_CENTER, 0, -70); @@ -22,7 +22,7 @@ void lv_example_style_15(void) /*Set opacity *The button and the label is rendered to a layer first and that layer is blended*/ - btn = lv_btn_create(lv_scr_act()); + btn = lv_button_create(lv_scr_act()); lv_obj_set_size(btn, 100, 40); lv_obj_set_style_opa(btn, LV_OPA_50, 0); lv_obj_align(btn, LV_ALIGN_CENTER, 0, 0); @@ -33,7 +33,7 @@ void lv_example_style_15(void) /*Set transformations *The button and the label is rendered to a layer first and that layer is transformed*/ - btn = lv_btn_create(lv_scr_act()); + btn = lv_button_create(lv_scr_act()); lv_obj_set_size(btn, 100, 40); lv_obj_set_style_transform_angle(btn, 150, 0); /*15 deg*/ lv_obj_set_style_transform_zoom(btn, 256 + 64, 0); /*1.25x*/ diff --git a/examples/styles/lv_example_style_15.py b/examples/styles/lv_example_style_15.py index bca6a9cd8..c7887e655 100644 --- a/examples/styles/lv_example_style_15.py +++ b/examples/styles/lv_example_style_15.py @@ -3,37 +3,37 @@ # # Normal button -btn = lv.btn(lv.scr_act()) -btn.set_size(100, 40) -btn.align(lv.ALIGN.CENTER, 0, -70) +button = lv.button(lv.scr_act()) +button.set_size(100, 40) +button.align(lv.ALIGN.CENTER, 0, -70) -label = lv.label(btn) +label = lv.label(button) label.set_text("Normal") label.center() # Set opacity # The button and the label is rendered to a layer first and that layer is blended -btn = lv.btn(lv.scr_act()) -btn.set_size(100, 40) -btn.set_style_opa(lv.OPA._50, 0) -btn.align(lv.ALIGN.CENTER, 0, 0) +button = lv.button(lv.scr_act()) +button.set_size(100, 40) +button.set_style_opa(lv.OPA._50, 0) +button.align(lv.ALIGN.CENTER, 0, 0) -label = lv.label(btn) +label = lv.label(button) label.set_text("Opa:50%") label.center() # Set transformations # The button and the label is rendered to a layer first and that layer is transformed -btn = lv.btn(lv.scr_act()) -btn.set_size(100, 40) -btn.set_style_transform_angle(150, 0) # 15 deg -btn.set_style_transform_zoom(256 + 64, 0) # 1.25x -btn.set_style_transform_pivot_x(50, 0) -btn.set_style_transform_pivot_y(20, 0) -btn.set_style_opa(lv.OPA._50, 0) -btn.align(lv.ALIGN.CENTER, 0, 70) +button = lv.button(lv.scr_act()) +button.set_size(100, 40) +button.set_style_transform_angle(150, 0) # 15 deg +button.set_style_transform_zoom(256 + 64, 0) # 1.25x +button.set_style_transform_pivot_x(50, 0) +button.set_style_transform_pivot_y(20, 0) +button.set_style_opa(lv.OPA._50, 0) +button.align(lv.ALIGN.CENTER, 0, 70) -label = lv.label(btn) +label = lv.label(button) label.set_text("Transf.") label.center() diff --git a/examples/styles/lv_example_style_6.c b/examples/styles/lv_example_style_6.c index 3c6fdb947..49b355a03 100644 --- a/examples/styles/lv_example_style_6.c +++ b/examples/styles/lv_example_style_6.c @@ -16,16 +16,16 @@ void lv_example_style_6(void) lv_style_set_border_width(&style, 2); lv_style_set_border_color(&style, lv_palette_main(LV_PALETTE_BLUE)); - lv_style_set_img_recolor(&style, lv_palette_main(LV_PALETTE_BLUE)); - lv_style_set_img_recolor_opa(&style, LV_OPA_50); + lv_style_set_image_recolor(&style, lv_palette_main(LV_PALETTE_BLUE)); + lv_style_set_image_recolor_opa(&style, LV_OPA_50); lv_style_set_transform_angle(&style, 300); /*Create an object with the new style*/ - lv_obj_t * obj = lv_img_create(lv_scr_act()); + lv_obj_t * obj = lv_image_create(lv_scr_act()); lv_obj_add_style(obj, &style, 0); - LV_IMG_DECLARE(img_cogwheel_argb); - lv_img_set_src(obj, &img_cogwheel_argb); + LV_IMAGE_DECLARE(img_cogwheel_argb); + lv_image_set_src(obj, &img_cogwheel_argb); lv_obj_center(obj); } diff --git a/examples/styles/lv_example_style_6.py b/examples/styles/lv_example_style_6.py index 4aeb55086..87aaf40ae 100644 --- a/examples/styles/lv_example_style_6.py +++ b/examples/styles/lv_example_style_6.py @@ -6,7 +6,7 @@ except: print("Could not find img_cogwheel_argb.png") sys.exit() -img_cogwheel_argb = lv.img_dsc_t({ +image_cogwheel_argb = lv.image_dsc_t({ 'data_size': len(png_data), 'data': png_data }) @@ -24,14 +24,14 @@ style.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 3)) style.set_border_width(2) style.set_border_color(lv.palette_main(lv.PALETTE.BLUE)) -style.set_img_recolor(lv.palette_main(lv.PALETTE.BLUE)) -style.set_img_recolor_opa(lv.OPA._50) +style.set_image_recolor(lv.palette_main(lv.PALETTE.BLUE)) +style.set_image_recolor_opa(lv.OPA._50) style.set_transform_angle(300) # Create an object with the new style -obj = lv.img(lv.scr_act()) +obj = lv.image(lv.scr_act()) obj.add_style(style, 0) -obj.set_src(img_cogwheel_argb) +obj.set_src(image_cogwheel_argb) obj.center() diff --git a/examples/widgets/animimg/lv_example_animimg_1.c b/examples/widgets/animimg/lv_example_animimg_1.c index 4341b6fec..7a827c4c6 100644 --- a/examples/widgets/animimg/lv_example_animimg_1.c +++ b/examples/widgets/animimg/lv_example_animimg_1.c @@ -1,10 +1,10 @@ #include "../../lv_examples.h" #if LV_USE_ANIMIMG && LV_BUILD_EXAMPLES -LV_IMG_DECLARE(animimg001) -LV_IMG_DECLARE(animimg002) -LV_IMG_DECLARE(animimg003) +LV_IMAGE_DECLARE(animimg001) +LV_IMAGE_DECLARE(animimg002) +LV_IMAGE_DECLARE(animimg003) -static const lv_img_dsc_t * anim_imgs[3] = { +static const lv_image_dsc_t * anim_imgs[3] = { &animimg001, &animimg002, &animimg003, diff --git a/examples/widgets/animimg/lv_example_animimg_1.py b/examples/widgets/animimg/lv_example_animimg_1.py index 093529ed9..29156bbae 100644 --- a/examples/widgets/animimg/lv_example_animimg_1.py +++ b/examples/widgets/animimg/lv_example_animimg_1.py @@ -1,4 +1,4 @@ -anim_imgs = [None]*3 +anim_images = [None]*3 # Create an image from the png file try: with open('../../assets/animimg001.png','rb') as f: @@ -7,7 +7,7 @@ except: print("Could not find animimg001.png") sys.exit() -anim_imgs[0] = lv.img_dsc_t({ +anim_images[0] = lv.image_dsc_t({ 'data_size': len(anim001_data), 'data': anim001_data }) @@ -19,7 +19,7 @@ except: print("Could not find animimg002.png") sys.exit() -anim_imgs[1] = lv.img_dsc_t({ +anim_images[1] = lv.image_dsc_t({ 'data_size': len(anim002_data), 'data': anim002_data }) @@ -31,17 +31,17 @@ except: print("Could not find animimg003.png") sys.exit() -anim_imgs[2] = lv.img_dsc_t({ +anim_images[2] = lv.image_dsc_t({ 'data_size': len(anim003_data), 'data': anim003_data }) -animimg0 = lv.animimg(lv.scr_act()) -animimg0.center() -animimg0.set_src(anim_imgs, 3) -animimg0.set_duration(1000) -animimg0.set_repeat_count(lv.ANIM_REPEAT_INFINITE) -animimg0.start() +animimage0 = lv.animimg(lv.scr_act()) +animimage0.center() +animimage0.set_src(anim_images, 3) +animimage0.set_duration(1000) +animimage0.set_repeat_count(lv.ANIM_REPEAT_INFINITE) +animimage0.start() diff --git a/examples/widgets/bar/lv_example_bar_4.c b/examples/widgets/bar/lv_example_bar_4.c index f9abdf93f..14af01c6f 100644 --- a/examples/widgets/bar/lv_example_bar_4.c +++ b/examples/widgets/bar/lv_example_bar_4.c @@ -6,13 +6,13 @@ */ void lv_example_bar_4(void) { - LV_IMG_DECLARE(img_skew_strip); + LV_IMAGE_DECLARE(img_skew_strip); static lv_style_t style_indic; lv_style_init(&style_indic); - lv_style_set_bg_img_src(&style_indic, &img_skew_strip); - lv_style_set_bg_img_tiled(&style_indic, true); - lv_style_set_bg_img_opa(&style_indic, LV_OPA_30); + lv_style_set_bg_image_src(&style_indic, &img_skew_strip); + lv_style_set_bg_image_tiled(&style_indic, true); + lv_style_set_bg_image_opa(&style_indic, LV_OPA_30); lv_obj_t * bar = lv_bar_create(lv_scr_act()); lv_obj_add_style(bar, &style_indic, LV_PART_INDICATOR); diff --git a/examples/widgets/bar/lv_example_bar_4.py b/examples/widgets/bar/lv_example_bar_4.py index 070dd21f5..2d860f33b 100644 --- a/examples/widgets/bar/lv_example_bar_4.py +++ b/examples/widgets/bar/lv_example_bar_4.py @@ -6,7 +6,7 @@ except: print("Could not find img_strip.png") sys.exit() -img_skew_strip_dsc = lv.img_dsc_t({ +image_skew_strip_dsc = lv.image_dsc_t({ 'data_size': len(png_data), 'data': png_data }) @@ -18,9 +18,9 @@ img_skew_strip_dsc = lv.img_dsc_t({ style_indic = lv.style_t() style_indic.init() -style_indic.set_bg_img_src(img_skew_strip_dsc) -style_indic.set_bg_img_tiled(True) -style_indic.set_bg_img_opa(lv.OPA._30) +style_indic.set_bg_image_src(image_skew_strip_dsc) +style_indic.set_bg_image_tiled(True) +style_indic.set_bg_image_opa(lv.OPA._30) bar = lv.bar(lv.scr_act()) bar.add_style(style_indic, lv.PART.INDICATOR) diff --git a/examples/widgets/btn/lv_example_btn_1.c b/examples/widgets/btn/lv_example_btn_1.c index 203c92e76..2ce93c18d 100644 --- a/examples/widgets/btn/lv_example_btn_1.c +++ b/examples/widgets/btn/lv_example_btn_1.c @@ -13,11 +13,11 @@ static void event_handler(lv_event_t * e) } } -void lv_example_btn_1(void) +void lv_example_button_1(void) { lv_obj_t * label; - lv_obj_t * btn1 = lv_btn_create(lv_scr_act()); + lv_obj_t * btn1 = lv_button_create(lv_scr_act()); lv_obj_add_event(btn1, event_handler, LV_EVENT_ALL, NULL); lv_obj_align(btn1, LV_ALIGN_CENTER, 0, -40); lv_obj_clear_flag(btn1, LV_OBJ_FLAG_PRESS_LOCK); @@ -26,7 +26,7 @@ void lv_example_btn_1(void) lv_label_set_text(label, "Button"); lv_obj_center(label); - lv_obj_t * btn2 = lv_btn_create(lv_scr_act()); + lv_obj_t * btn2 = lv_button_create(lv_scr_act()); lv_obj_add_event(btn2, event_handler, LV_EVENT_ALL, NULL); lv_obj_align(btn2, LV_ALIGN_CENTER, 0, 40); lv_obj_add_flag(btn2, LV_OBJ_FLAG_CHECKABLE); diff --git a/examples/widgets/btn/lv_example_btn_1.py b/examples/widgets/btn/lv_example_btn_1.py index 261e22d09..7bf373cb9 100644 --- a/examples/widgets/btn/lv_example_btn_1.py +++ b/examples/widgets/btn/lv_example_btn_1.py @@ -7,26 +7,26 @@ def event_handler(evt): print("Value changed seen") # create a simple button -btn1 = lv.btn(lv.scr_act()) +button1 = lv.button(lv.scr_act()) # attach the callback -btn1.add_event(event_handler,lv.EVENT.ALL, None) +button1.add_event(event_handler,lv.EVENT.ALL, None) -btn1.align(lv.ALIGN.CENTER,0,-40) -label=lv.label(btn1) +button1.align(lv.ALIGN.CENTER,0,-40) +label=lv.label(button1) label.set_text("Button") # create a toggle button -btn2 = lv.btn(lv.scr_act()) +button2 = lv.button(lv.scr_act()) # attach the callback -#btn2.add_event(event_handler,lv.EVENT.VALUE_CHANGED,None) -btn2.add_event(event_handler,lv.EVENT.ALL, None) +#button2.add_event(event_handler,lv.EVENT.VALUE_CHANGED,None) +button2.add_event(event_handler,lv.EVENT.ALL, None) -btn2.align(lv.ALIGN.CENTER,0,40) -btn2.add_flag(lv.obj.FLAG.CHECKABLE) -btn2.set_height(lv.SIZE_CONTENT) +button2.align(lv.ALIGN.CENTER,0,40) +button2.add_flag(lv.obj.FLAG.CHECKABLE) +button2.set_height(lv.SIZE_CONTENT) -label=lv.label(btn2) +label=lv.label(button2) label.set_text("Toggle") label.center() diff --git a/examples/widgets/btn/lv_example_btn_2.c b/examples/widgets/btn/lv_example_btn_2.c index fc32a6c13..c43abaaa2 100644 --- a/examples/widgets/btn/lv_example_btn_2.c +++ b/examples/widgets/btn/lv_example_btn_2.c @@ -4,7 +4,7 @@ /** * Style a button from scratch */ -void lv_example_btn_2(void) +void lv_example_button_2(void) { /*Init the style for the default state*/ static lv_style_t style; @@ -51,7 +51,7 @@ void lv_example_btn_2(void) lv_style_set_transition(&style_pr, &trans); - lv_obj_t * btn1 = lv_btn_create(lv_scr_act()); + lv_obj_t * btn1 = lv_button_create(lv_scr_act()); lv_obj_remove_style_all(btn1); /*Remove the style coming from the theme*/ lv_obj_add_style(btn1, &style, 0); lv_obj_add_style(btn1, &style_pr, LV_STATE_PRESSED); diff --git a/examples/widgets/btn/lv_example_btn_2.py b/examples/widgets/btn/lv_example_btn_2.py index a0a535468..18372e3fd 100644 --- a/examples/widgets/btn/lv_example_btn_2.py +++ b/examples/widgets/btn/lv_example_btn_2.py @@ -47,14 +47,14 @@ trans.init(props, lv.anim_t.path_linear, 300, 0, None) style_pr.set_transition(trans) -btn1 = lv.btn(lv.scr_act()) -btn1.remove_style_all() # Remove the style coming from the theme -btn1.add_style(style, 0) -btn1.add_style(style_pr, lv.STATE.PRESSED) -btn1.set_size(lv.SIZE_CONTENT, lv.SIZE_CONTENT) -btn1.center() +button1 = lv.button(lv.scr_act()) +button1.remove_style_all() # Remove the style coming from the theme +button1.add_style(style, 0) +button1.add_style(style_pr, lv.STATE.PRESSED) +button1.set_size(lv.SIZE_CONTENT, lv.SIZE_CONTENT) +button1.center() -label = lv.label(btn1) +label = lv.label(button1) label.set_text("Button") label.center() diff --git a/examples/widgets/btn/lv_example_btn_3.c b/examples/widgets/btn/lv_example_btn_3.c index 24d76c340..c4b94742c 100644 --- a/examples/widgets/btn/lv_example_btn_3.c +++ b/examples/widgets/btn/lv_example_btn_3.c @@ -4,7 +4,7 @@ /** * Create a style transition on a button to act like a gum when clicked */ -void lv_example_btn_3(void) +void lv_example_button_3(void) { /*Properties to transition*/ static lv_style_prop_t props[] = { @@ -34,7 +34,7 @@ void lv_example_btn_3(void) lv_style_set_text_letter_space(&style_pr, 10); lv_style_set_transition(&style_pr, &transition_dsc_pr); - lv_obj_t * btn1 = lv_btn_create(lv_scr_act()); + lv_obj_t * btn1 = lv_button_create(lv_scr_act()); lv_obj_align(btn1, LV_ALIGN_CENTER, 0, -80); lv_obj_add_style(btn1, &style_pr, LV_STATE_PRESSED); lv_obj_add_style(btn1, &style_def, 0); diff --git a/examples/widgets/btn/lv_example_btn_3.py b/examples/widgets/btn/lv_example_btn_3.py index ec664a6ec..ad9d1d525 100644 --- a/examples/widgets/btn/lv_example_btn_3.py +++ b/examples/widgets/btn/lv_example_btn_3.py @@ -28,11 +28,11 @@ style_pr.set_transform_height(-10) style_pr.set_text_letter_space(10) style_pr.set_transition(transition_dsc_pr) -btn1 = lv.btn(lv.scr_act()) -btn1.align(lv.ALIGN.CENTER, 0, -80) -btn1.add_style(style_pr, lv.STATE.PRESSED) -btn1.add_style(style_def, 0) +button1 = lv.button(lv.scr_act()) +button1.align(lv.ALIGN.CENTER, 0, -80) +button1.add_style(style_pr, lv.STATE.PRESSED) +button1.add_style(style_def, 0) -label = lv.label(btn1) +label = lv.label(button1) label.set_text("Gum") diff --git a/examples/widgets/btnmatrix/lv_example_btnmatrix_1.c b/examples/widgets/btnmatrix/lv_example_btnmatrix_1.c index 004066164..65983eb23 100644 --- a/examples/widgets/btnmatrix/lv_example_btnmatrix_1.c +++ b/examples/widgets/btnmatrix/lv_example_btnmatrix_1.c @@ -6,8 +6,8 @@ static void event_handler(lv_event_t * e) lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target(e); if(code == LV_EVENT_VALUE_CHANGED) { - uint32_t id = lv_btnmatrix_get_selected_btn(obj); - const char * txt = lv_btnmatrix_get_btn_text(obj, id); + uint32_t id = lv_buttonmatrix_get_selected_button(obj); + const char * txt = lv_buttonmatrix_get_button_text(obj, id); LV_UNUSED(txt); LV_LOG_USER("%s was pressed\n", txt); } @@ -19,13 +19,13 @@ static const char * btnm_map[] = {"1", "2", "3", "4", "5", "\n", "Action1", "Action2", "" }; -void lv_example_btnmatrix_1(void) +void lv_example_buttonmatrix_1(void) { - lv_obj_t * btnm1 = lv_btnmatrix_create(lv_scr_act()); - lv_btnmatrix_set_map(btnm1, btnm_map); - lv_btnmatrix_set_btn_width(btnm1, 10, 2); /*Make "Action1" twice as wide as "Action2"*/ - lv_btnmatrix_set_btn_ctrl(btnm1, 10, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_set_btn_ctrl(btnm1, 11, LV_BTNMATRIX_CTRL_CHECKED); + lv_obj_t * btnm1 = lv_buttonmatrix_create(lv_scr_act()); + lv_buttonmatrix_set_map(btnm1, btnm_map); + lv_buttonmatrix_set_button_width(btnm1, 10, 2); /*Make "Action1" twice as wide as "Action2"*/ + lv_buttonmatrix_set_button_ctrl(btnm1, 10, LV_BUTTONMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_button_ctrl(btnm1, 11, LV_BUTTONMATRIX_CTRL_CHECKED); lv_obj_align(btnm1, LV_ALIGN_CENTER, 0, 0); lv_obj_add_event(btnm1, event_handler, LV_EVENT_ALL, NULL); } diff --git a/examples/widgets/btnmatrix/lv_example_btnmatrix_1.py b/examples/widgets/btnmatrix/lv_example_btnmatrix_1.py index 7d7c13755..262d64fc3 100644 --- a/examples/widgets/btnmatrix/lv_example_btnmatrix_1.py +++ b/examples/widgets/btnmatrix/lv_example_btnmatrix_1.py @@ -3,22 +3,22 @@ def event_handler(e): obj = e.get_target_obj() if code == lv.EVENT.VALUE_CHANGED : - id = obj.get_selected_btn() - txt = obj.get_btn_text(id) + id = obj.get_selected_button() + txt = obj.get_button_text(id) print("%s was pressed"%txt) -btnm_map = ["1", "2", "3", "4", "5", "\n", +buttonm_map = ["1", "2", "3", "4", "5", "\n", "6", "7", "8", "9", "0", "\n", "Action1", "Action2", ""] -btnm1 = lv.btnmatrix(lv.scr_act()) -btnm1.set_map(btnm_map) -btnm1.set_btn_width(10, 2) # Make "Action1" twice as wide as "Action2" -btnm1.set_btn_ctrl(10, lv.btnmatrix.CTRL.CHECKABLE) -btnm1.set_btn_ctrl(11, lv.btnmatrix.CTRL.CHECKED) -btnm1.align(lv.ALIGN.CENTER, 0, 0) -btnm1.add_event(event_handler, lv.EVENT.ALL, None) +buttonm1 = lv.buttonmatrix(lv.scr_act()) +buttonm1.set_map(buttonm_map) +buttonm1.set_button_width(10, 2) # Make "Action1" twice as wide as "Action2" +buttonm1.set_button_ctrl(10, lv.buttonmatrix.CTRL.CHECKABLE) +buttonm1.set_button_ctrl(11, lv.buttonmatrix.CTRL.CHECKED) +buttonm1.align(lv.ALIGN.CENTER, 0, 0) +buttonm1.add_event(event_handler, lv.EVENT.ALL, None) #endif diff --git a/examples/widgets/btnmatrix/lv_example_btnmatrix_2.c b/examples/widgets/btnmatrix/lv_example_btnmatrix_2.c index db1b725b2..52686ceaf 100644 --- a/examples/widgets/btnmatrix/lv_example_btnmatrix_2.c +++ b/examples/widgets/btnmatrix/lv_example_btnmatrix_2.c @@ -10,7 +10,7 @@ static void event_cb(lv_event_t * e) /*When the button matrix draws the buttons...*/ if(base_dsc->part == LV_PART_ITEMS) { bool pressed = false; - if(lv_btnmatrix_get_selected_btn(obj) == base_dsc->id1 && lv_obj_has_state(obj, LV_STATE_PRESSED)) { + if(lv_buttonmatrix_get_selected_button(obj) == base_dsc->id1 && lv_obj_has_state(obj, LV_STATE_PRESSED)) { pressed = true; } @@ -46,9 +46,9 @@ static void event_cb(lv_event_t * e) label_draw_dsc->opa = 0; } if(draw_task->type == LV_DRAW_TASK_TYPE_FILL) { - LV_IMG_DECLARE(img_star); - lv_img_header_t header; - lv_res_t res = lv_img_decoder_get_info(&img_star, &header); + LV_IMAGE_DECLARE(img_star); + lv_image_header_t header; + lv_res_t res = lv_image_decoder_get_info(&img_star, &header); if(res != LV_RES_OK) return; lv_area_t a; @@ -58,13 +58,13 @@ static void event_cb(lv_event_t * e) a.y2 = header.h - 1; lv_area_align(&draw_task->area, &a, LV_ALIGN_CENTER, 0, 0); - lv_draw_img_dsc_t img_draw_dsc; - lv_draw_img_dsc_init(&img_draw_dsc); + lv_draw_image_dsc_t img_draw_dsc; + lv_draw_image_dsc_init(&img_draw_dsc); img_draw_dsc.src = &img_star; img_draw_dsc.recolor = lv_color_black(); if(pressed) img_draw_dsc.recolor_opa = LV_OPA_30; - lv_draw_img(base_dsc->layer, &img_draw_dsc, &a); + lv_draw_image(base_dsc->layer, &img_draw_dsc, &a); } } @@ -74,9 +74,9 @@ static void event_cb(lv_event_t * e) /** * Add custom drawer to the button matrix to customize buttons one by one */ -void lv_example_btnmatrix_2(void) +void lv_example_buttonmatrix_2(void) { - lv_obj_t * btnm = lv_btnmatrix_create(lv_scr_act()); + lv_obj_t * btnm = lv_buttonmatrix_create(lv_scr_act()); lv_obj_add_event(btnm, event_cb, LV_EVENT_DRAW_TASK_ADDED, NULL); lv_obj_add_flag(btnm, LV_OBJ_FLAG_SEND_DRAW_TASK_EVENTS); lv_obj_center(btnm); diff --git a/examples/widgets/btnmatrix/lv_example_btnmatrix_3.c b/examples/widgets/btnmatrix/lv_example_btnmatrix_3.c index 68a0a7be5..9c3ac2a92 100644 --- a/examples/widgets/btnmatrix/lv_example_btnmatrix_3.c +++ b/examples/widgets/btnmatrix/lv_example_btnmatrix_3.c @@ -4,27 +4,27 @@ static void event_cb(lv_event_t * e) { lv_obj_t * obj = lv_event_get_target(e); - uint32_t id = lv_btnmatrix_get_selected_btn(obj); + uint32_t id = lv_buttonmatrix_get_selected_button(obj); bool prev = id == 0; bool next = id == 6; if(prev || next) { /*Find the checked button*/ uint32_t i; for(i = 1; i < 7; i++) { - if(lv_btnmatrix_has_btn_ctrl(obj, i, LV_BTNMATRIX_CTRL_CHECKED)) break; + if(lv_buttonmatrix_has_button_ctrl(obj, i, LV_BUTTONMATRIX_CTRL_CHECKED)) break; } if(prev && i > 1) i--; else if(next && i < 5) i++; - lv_btnmatrix_set_btn_ctrl(obj, i, LV_BTNMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(obj, i, LV_BUTTONMATRIX_CTRL_CHECKED); } } /** * Make a button group (pagination) */ -void lv_example_btnmatrix_3(void) +void lv_example_buttonmatrix_3(void) { static lv_style_t style_bg; lv_style_init(&style_bg); @@ -46,20 +46,20 @@ void lv_example_btnmatrix_3(void) static const char * map[] = {LV_SYMBOL_LEFT, "1", "2", "3", "4", "5", LV_SYMBOL_RIGHT, ""}; - lv_obj_t * btnm = lv_btnmatrix_create(lv_scr_act()); - lv_btnmatrix_set_map(btnm, map); + lv_obj_t * btnm = lv_buttonmatrix_create(lv_scr_act()); + lv_buttonmatrix_set_map(btnm, map); lv_obj_add_style(btnm, &style_bg, 0); lv_obj_add_style(btnm, &style_btn, LV_PART_ITEMS); lv_obj_add_event(btnm, event_cb, LV_EVENT_VALUE_CHANGED, NULL); lv_obj_set_size(btnm, 225, 35); /*Allow selecting on one number at time*/ - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_clear_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_clear_btn_ctrl(btnm, 6, LV_BTNMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_clear_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_clear_button_ctrl(btnm, 6, LV_BUTTONMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_set_one_checked(btnm, true); - lv_btnmatrix_set_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_one_checked(btnm, true); + lv_buttonmatrix_set_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_CHECKED); lv_obj_center(btnm); diff --git a/examples/widgets/btnmatrix/lv_example_btnmatrix_3.py b/examples/widgets/btnmatrix/lv_example_btnmatrix_3.py index 22a91f5cf..0bc3fd784 100644 --- a/examples/widgets/btnmatrix/lv_example_btnmatrix_3.py +++ b/examples/widgets/btnmatrix/lv_example_btnmatrix_3.py @@ -1,6 +1,6 @@ def event_cb(e): obj = e.get_target_obj() - id = obj.get_selected_btn() + id = obj.get_selected_button() if id == 0: prev = True else: @@ -12,14 +12,14 @@ def event_cb(e): if prev or next: # Find the checked butto for i in range(7): - if obj.has_btn_ctrl(i, lv.btnmatrix.CTRL.CHECKED): + if obj.has_button_ctrl(i, lv.buttonmatrix.CTRL.CHECKED): break if prev and i > 1: i-=1 elif next and i < 5: i+=1 - obj.set_btn_ctrl(i, lv.btnmatrix.CTRL.CHECKED) + obj.set_button_ctrl(i, lv.buttonmatrix.CTRL.CHECKED) # # Make a button group @@ -34,31 +34,31 @@ style_bg.set_radius(lv.RADIUS_CIRCLE) style_bg.set_border_width(0) -style_btn = lv.style_t() -style_btn.init() -style_btn.set_radius(0) -style_btn.set_border_width(1) -style_btn.set_border_opa(lv.OPA._50) -style_btn.set_border_color(lv.palette_main(lv.PALETTE.GREY)) -style_btn.set_border_side(lv.BORDER_SIDE.INTERNAL) -style_btn.set_radius(0) +style_button = lv.style_t() +style_button.init() +style_button.set_radius(0) +style_button.set_border_width(1) +style_button.set_border_opa(lv.OPA._50) +style_button.set_border_color(lv.palette_main(lv.PALETTE.GREY)) +style_button.set_border_side(lv.BORDER_SIDE.INTERNAL) +style_button.set_radius(0) map = [lv.SYMBOL.LEFT,"1","2", "3", "4", "5",lv.SYMBOL.RIGHT, ""] -btnm = lv.btnmatrix(lv.scr_act()) -btnm.set_map(map) -btnm.add_style(style_bg, 0) -btnm.add_style(style_btn, lv.PART.ITEMS) -btnm.add_event(event_cb, lv.EVENT.VALUE_CHANGED, None) -btnm.set_size(225, 35) +buttonm = lv.buttonmatrix(lv.scr_act()) +buttonm.set_map(map) +buttonm.add_style(style_bg, 0) +buttonm.add_style(style_button, lv.PART.ITEMS) +buttonm.add_event(event_cb, lv.EVENT.VALUE_CHANGED, None) +buttonm.set_size(225, 35) # Allow selecting on one number at time -btnm.set_btn_ctrl_all(lv.btnmatrix.CTRL.CHECKABLE) -btnm.clear_btn_ctrl(0, lv.btnmatrix.CTRL.CHECKABLE) -btnm.clear_btn_ctrl(6, lv.btnmatrix.CTRL.CHECKABLE) +buttonm.set_button_ctrl_all(lv.buttonmatrix.CTRL.CHECKABLE) +buttonm.clear_button_ctrl(0, lv.buttonmatrix.CTRL.CHECKABLE) +buttonm.clear_button_ctrl(6, lv.buttonmatrix.CTRL.CHECKABLE) -btnm.set_one_checked(True) -btnm.set_btn_ctrl(1, lv.btnmatrix.CTRL.CHECKED) +buttonm.set_one_checked(True) +buttonm.set_button_ctrl(1, lv.buttonmatrix.CTRL.CHECKED) -btnm.center() +buttonm.center() diff --git a/examples/widgets/canvas/lv_example_canvas_1.c b/examples/widgets/canvas/lv_example_canvas_1.c index dfdd07efc..50bf167dd 100644 --- a/examples/widgets/canvas/lv_example_canvas_1.c +++ b/examples/widgets/canvas/lv_example_canvas_1.c @@ -52,7 +52,7 @@ void lv_example_canvas_1(void) *So copy the current image to buffer and rotate it to the canvas*/ static uint8_t cbuf_tmp[LV_CANVAS_BUF_SIZE_TRUE_COLOR(CANVAS_WIDTH, CANVAS_HEIGHT)]; lv_memcpy(cbuf_tmp, cbuf, sizeof(cbuf_tmp)); - lv_img_dsc_t img; + lv_image_dsc_t img; img.data = (void *)cbuf_tmp; img.header.cf = LV_COLOR_FORMAT_NATIVE; img.header.w = CANVAS_WIDTH; @@ -62,15 +62,15 @@ void lv_example_canvas_1(void) lv_canvas_fill_bg(canvas, lv_palette_lighten(LV_PALETTE_GREY, 1), LV_OPA_COVER); - lv_draw_img_dsc_t img_dsc; - lv_draw_img_dsc_init(&img_dsc); + lv_draw_image_dsc_t img_dsc; + lv_draw_image_dsc_init(&img_dsc); img_dsc.angle = 120; img_dsc.src = &img; img_dsc.pivot.x = CANVAS_WIDTH / 2; img_dsc.pivot.y = CANVAS_HEIGHT / 2; lv_area_t coords_img = {0, 0, CANVAS_WIDTH - 1, CANVAS_HEIGHT - 1}; - lv_draw_img(&layer, &img_dsc, &coords_img); + lv_draw_image(&layer, &img_dsc, &coords_img); lv_canvas_finish_layer(canvas, &layer); } diff --git a/examples/widgets/canvas/lv_example_canvas_1.py b/examples/widgets/canvas/lv_example_canvas_1.py index 16de3b4f2..e68830bf7 100644 --- a/examples/widgets/canvas/lv_example_canvas_1.py +++ b/examples/widgets/canvas/lv_example_canvas_1.py @@ -1,6 +1,6 @@ _CANVAS_WIDTH = 200 _CANVAS_HEIGHT = 150 -LV_IMG_ZOOM_NONE = 256 +LV_IMAGE_ZOOM_NONE = 256 rect_dsc = lv.draw_rect_dsc_t() rect_dsc.init() @@ -60,28 +60,28 @@ canvas.finish_layer(layer) # Test the rotation. It requires another buffer where the original image is stored. # So copy the current image to buffer and rotate it to the canvas -img = lv.img_dsc_t() +image = lv.image_dsc_t() -img.data = cbuf[:] -img.header.cf = lv.COLOR_FORMAT.NATIVE -img.header.w = _CANVAS_WIDTH -img.header.h = _CANVAS_HEIGHT +image.data = cbuf[:] +image.header.cf = lv.COLOR_FORMAT.NATIVE +image.header.w = _CANVAS_WIDTH +image.header.h = _CANVAS_HEIGHT canvas.fill_bg(lv.palette_lighten(lv.PALETTE.GREY, 3), lv.OPA.COVER) -img_dsc = lv.draw_img_dsc_t() -img_dsc.init(); -img_dsc.angle = 120; -img_dsc.src = img; -img_dsc.pivot.x = _CANVAS_WIDTH // 2; -img_dsc.pivot.y = _CANVAS_HEIGHT // 2; +image_dsc = lv.draw_image_dsc_t() +image_dsc.init(); +image_dsc.angle = 120; +image_dsc.src = image; +image_dsc.pivot.x = _CANVAS_WIDTH // 2; +image_dsc.pivot.y = _CANVAS_HEIGHT // 2; -coords_img = lv.area_t() -coords_img.x1 = 0 -coords_img.y1 = 0 -coords_img.x2 = _CANVAS_WIDTH - 1 -coords_img.y2 = _CANVAS_HEIGHT - 1 +coords_image = lv.area_t() +coords_image.x1 = 0 +coords_image.y1 = 0 +coords_image.x2 = _CANVAS_WIDTH - 1 +coords_image.y2 = _CANVAS_HEIGHT - 1 -lv.draw_img(layer, img_dsc, coords_img) +lv.draw_image(layer, image_dsc, coords_image) diff --git a/examples/widgets/canvas/lv_example_canvas_6.c b/examples/widgets/canvas/lv_example_canvas_6.c index a14e588d9..9a2eb68c3 100644 --- a/examples/widgets/canvas/lv_example_canvas_6.c +++ b/examples/widgets/canvas/lv_example_canvas_6.c @@ -21,14 +21,14 @@ void lv_example_canvas_6(void) lv_layer_t layer; lv_canvas_init_layer(canvas, &layer); - LV_IMG_DECLARE(img_star); - lv_draw_img_dsc_t dsc; - lv_draw_img_dsc_init(&dsc); + LV_IMAGE_DECLARE(img_star); + lv_draw_image_dsc_t dsc; + lv_draw_image_dsc_init(&dsc); dsc.src = &img_star; lv_area_t coords = {10, 10, 10 + img_star.header.w - 1, 10 + img_star.header.h - 1}; - lv_draw_img(&layer, &dsc, &coords); + lv_draw_image(&layer, &dsc, &coords); lv_canvas_finish_layer(canvas, &layer); diff --git a/examples/widgets/canvas/lv_example_canvas_6.py b/examples/widgets/canvas/lv_example_canvas_6.py index 7b6d976fd..48d5e43ed 100644 --- a/examples/widgets/canvas/lv_example_canvas_6.py +++ b/examples/widgets/canvas/lv_example_canvas_6.py @@ -11,7 +11,7 @@ except: print("Could not find star.png") sys.exit() -img_star_argb = lv.img_dsc_t({ +image_star_argb = lv.image_dsc_t({ 'data_size': len(png_data), 'data': png_data }) @@ -29,9 +29,9 @@ canvas.set_buffer(cbuf, CANVAS_WIDTH, CANVAS_HEIGHT, lv.COLOR_FORMAT.NATIVE) canvas.fill_bg(lv.color_hex3(0xccc), lv.OPA.COVER) canvas.center() -dsc = lv.draw_img_dsc_t() +dsc = lv.draw_image_dsc_t() dsc.init() -dsc.src = img_star_argb +dsc.src = image_star_argb @@ -45,6 +45,6 @@ coords.y2 = 5 + 28 layer = lv.layer_t() canvas.init_layer(layer); -lv.draw_img(layer, dsc, coords) +lv.draw_image(layer, dsc, coords) canvas.finish_layer(layer) diff --git a/examples/widgets/chart/lv_example_chart_4.c b/examples/widgets/chart/lv_example_chart_4.c index d96b1a51e..6d4fdc62c 100644 --- a/examples/widgets/chart/lv_example_chart_4.c +++ b/examples/widgets/chart/lv_example_chart_4.c @@ -36,8 +36,8 @@ static void event_cb(lv_event_t * e) draw_rect_dsc.bg_color = lv_color_black(); draw_rect_dsc.bg_opa = LV_OPA_50; draw_rect_dsc.radius = 3; - draw_rect_dsc.bg_img_src = buf; - draw_rect_dsc.bg_img_recolor = lv_color_white(); + draw_rect_dsc.bg_image_src = buf; + draw_rect_dsc.bg_image_recolor = lv_color_white(); lv_area_t a; a.x1 = chart->coords.x1 + p.x - 20; diff --git a/examples/widgets/chart/lv_example_chart_4.py b/examples/widgets/chart/lv_example_chart_4.py index 13462fd0f..452d9e9a8 100644 --- a/examples/widgets/chart/lv_example_chart_4.py +++ b/examples/widgets/chart/lv_example_chart_4.py @@ -37,8 +37,8 @@ def event_cb(e): draw_rect_dsc.bg_color = lv.color_black() draw_rect_dsc.bg_opa = lv.OPA._50 draw_rect_dsc.radius = 3 - draw_rect_dsc.bg_img_src = buf - draw_rect_dsc.bg_img_recolor = lv.color_white() + draw_rect_dsc.bg_image_src = buf + draw_rect_dsc.bg_image_recolor = lv.color_white() coords = lv.area_t() chart.get_coords(coords) diff --git a/examples/widgets/checkbox/lv_example_checkbox_2.c b/examples/widgets/checkbox/lv_example_checkbox_2.c index 70056d44e..a3dd3c43e 100644 --- a/examples/widgets/checkbox/lv_example_checkbox_2.c +++ b/examples/widgets/checkbox/lv_example_checkbox_2.c @@ -49,7 +49,7 @@ void lv_example_checkbox_2(void) lv_style_set_radius(&style_radio, LV_RADIUS_CIRCLE); lv_style_init(&style_radio_chk); - lv_style_set_bg_img_src(&style_radio_chk, NULL); + lv_style_set_bg_image_src(&style_radio_chk, NULL); uint32_t i; char buf[32]; diff --git a/examples/widgets/checkbox/lv_example_checkbox_2.py b/examples/widgets/checkbox/lv_example_checkbox_2.py index f6f9ca01d..e146b7e1d 100644 --- a/examples/widgets/checkbox/lv_example_checkbox_2.py +++ b/examples/widgets/checkbox/lv_example_checkbox_2.py @@ -19,7 +19,7 @@ class LV_Example_Checkbox_2: self.style_radio_chk = lv.style_t() self.style_radio_chk.init() self.style_radio_chk.init() - self.style_radio_chk.set_bg_img_src(None) + self.style_radio_chk.set_bg_image_src(None) self.cont1 = lv.obj(lv.scr_act()) self.cont1.set_flex_flow(lv.FLEX_FLOW.COLUMN) diff --git a/examples/widgets/dropdown/lv_example_dropdown_3.c b/examples/widgets/dropdown/lv_example_dropdown_3.c index cda86f911..3dd948708 100644 --- a/examples/widgets/dropdown/lv_example_dropdown_3.c +++ b/examples/widgets/dropdown/lv_example_dropdown_3.c @@ -30,7 +30,7 @@ void lv_example_dropdown_3(void) lv_dropdown_set_text(dropdown, "Menu"); /*Use a custom image as down icon and flip it when the list is opened*/ - LV_IMG_DECLARE(img_caret_down) + LV_IMAGE_DECLARE(img_caret_down) lv_dropdown_set_symbol(dropdown, &img_caret_down); lv_obj_set_style_transform_angle(dropdown, 1800, LV_PART_INDICATOR | LV_STATE_CHECKED); diff --git a/examples/widgets/dropdown/lv_example_dropdown_3.py b/examples/widgets/dropdown/lv_example_dropdown_3.py index 7a170e352..279dd364e 100644 --- a/examples/widgets/dropdown/lv_example_dropdown_3.py +++ b/examples/widgets/dropdown/lv_example_dropdown_3.py @@ -3,10 +3,10 @@ try: with open('../../assets/img_caret_down.png','rb') as f: png_data = f.read() except: - print("Could not find img_caret_down.png") + print("Could not find image_caret_down.png") sys.exit() -img_caret_down_argb = lv.img_dsc_t({ +image_caret_down_argb = lv.image_dsc_t({ 'data_size': len(png_data), 'data': png_data }) @@ -35,8 +35,8 @@ dropdown.set_options("\n".join([ dropdown.set_text("Menu") # Use a custom image as down icon and flip it when the list is opened -# LV_IMG_DECLARE(img_caret_down) -dropdown.set_symbol(img_caret_down_argb) +# LV_IMAGE_DECLARE(image_caret_down) +dropdown.set_symbol(image_caret_down_argb) dropdown.set_style_transform_angle(1800, lv.PART.INDICATOR | lv.STATE.CHECKED) # In a menu we don't need to show the last clicked item diff --git a/examples/widgets/img/lv_example_img_1.c b/examples/widgets/img/lv_example_img_1.c index 76ef1f41e..758def21d 100644 --- a/examples/widgets/img/lv_example_img_1.c +++ b/examples/widgets/img/lv_example_img_1.c @@ -2,16 +2,16 @@ #if LV_USE_IMG && LV_BUILD_EXAMPLES -void lv_example_img_1(void) +void lv_example_image_1(void) { - LV_IMG_DECLARE(img_cogwheel_argb); - lv_obj_t * img1 = lv_img_create(lv_scr_act()); - lv_img_set_src(img1, &img_cogwheel_argb); + LV_IMAGE_DECLARE(img_cogwheel_argb); + lv_obj_t * img1 = lv_image_create(lv_scr_act()); + lv_image_set_src(img1, &img_cogwheel_argb); lv_obj_align(img1, LV_ALIGN_CENTER, 0, -20); lv_obj_set_size(img1, 200, 200); - lv_obj_t * img2 = lv_img_create(lv_scr_act()); - lv_img_set_src(img2, LV_SYMBOL_OK "Accept"); + lv_obj_t * img2 = lv_image_create(lv_scr_act()); + lv_image_set_src(img2, LV_SYMBOL_OK "Accept"); lv_obj_align_to(img2, img1, LV_ALIGN_OUT_BOTTOM_MID, 0, 20); } diff --git a/examples/widgets/img/lv_example_img_1.py b/examples/widgets/img/lv_example_img_1.py index aa0677d93..4897fdf0e 100644 --- a/examples/widgets/img/lv_example_img_1.py +++ b/examples/widgets/img/lv_example_img_1.py @@ -5,22 +5,22 @@ import display_driver # Create an image from the png file try: - with open('../../assets/img_cogwheel_argb.png','rb') as f: + with open('../../assets/image_cogwheel_argb.png','rb') as f: png_data = f.read() except: - print("Could not find img_cogwheel_argb.png") + print("Could not find image_cogwheel_argb.png") sys.exit() -img_cogwheel_argb = lv.img_dsc_t({ +image_cogwheel_argb = lv.image_dsc_t({ 'data_size': len(png_data), 'data': png_data }) -img1 = lv.img(lv.scr_act()) -img1.set_src(img_cogwheel_argb) -img1.align(lv.ALIGN.CENTER, 0, -20) -img1.set_size(200, 200) +image1 = lv.image(lv.scr_act()) +image1.set_src(image_cogwheel_argb) +image1.align(lv.ALIGN.CENTER, 0, -20) +image1.set_size(200, 200) -img2 = lv.img(lv.scr_act()) -img2.set_src(lv.SYMBOL.OK + "Accept") -img2.align_to(img1, lv.ALIGN.OUT_BOTTOM_MID, 0, 20) +image2 = lv.image(lv.scr_act()) +image2.set_src(lv.SYMBOL.OK + "Accept") +image2.align_to(image1, lv.ALIGN.OUT_BOTTOM_MID, 0, 20) diff --git a/examples/widgets/img/lv_example_img_2.c b/examples/widgets/img/lv_example_img_2.c index 50f74106b..3e60540c4 100644 --- a/examples/widgets/img/lv_example_img_2.c +++ b/examples/widgets/img/lv_example_img_2.c @@ -11,7 +11,7 @@ static lv_obj_t * img1; /** * Demonstrate runtime image re-coloring */ -void lv_example_img_2(void) +void lv_example_image_2(void) { /*Create 4 sliders to adjust RGB color and re-color intensity*/ red_slider = create_slider(lv_palette_main(LV_PALETTE_RED)); @@ -30,9 +30,9 @@ void lv_example_img_2(void) lv_obj_align_to(intense_slider, blue_slider, LV_ALIGN_OUT_RIGHT_MID, 25, 0); /*Now create the actual image*/ - LV_IMG_DECLARE(img_cogwheel_argb) - img1 = lv_img_create(lv_scr_act()); - lv_img_set_src(img1, &img_cogwheel_argb); + LV_IMAGE_DECLARE(img_cogwheel_argb) + img1 = lv_image_create(lv_scr_act()); + lv_image_set_src(img1, &img_cogwheel_argb); lv_obj_align(img1, LV_ALIGN_RIGHT_MID, -20, 0); lv_obj_send_event(intense_slider, LV_EVENT_VALUE_CHANGED, NULL); @@ -46,8 +46,8 @@ static void slider_event_cb(lv_event_t * e) lv_color_t color = lv_color_make(lv_slider_get_value(red_slider), lv_slider_get_value(green_slider), lv_slider_get_value(blue_slider)); lv_opa_t intense = lv_slider_get_value(intense_slider); - lv_obj_set_style_img_recolor_opa(img1, intense, 0); - lv_obj_set_style_img_recolor(img1, color, 0); + lv_obj_set_style_image_recolor_opa(img1, intense, 0); + lv_obj_set_style_image_recolor(img1, color, 0); } static lv_obj_t * create_slider(lv_color_t color) diff --git a/examples/widgets/img/lv_example_img_2.py b/examples/widgets/img/lv_example_img_2.py index bc8316fb8..9a8c6d65b 100644 --- a/examples/widgets/img/lv_example_img_2.py +++ b/examples/widgets/img/lv_example_img_2.py @@ -5,13 +5,13 @@ import display_driver # Create an image from the png file try: - with open('../../assets/img_cogwheel_argb.png','rb') as f: + with open('../../assets/image_cogwheel_argb.png','rb') as f: png_data = f.read() except: - print("Could not find img_cogwheel_argb.png") + print("Could not find image_cogwheel_argb.png") sys.exit() -img_cogwheel_argb = lv.img_dsc_t({ +image_cogwheel_argb = lv.image_dsc_t({ 'data_size': len(png_data), 'data': png_data }) @@ -29,8 +29,8 @@ def slider_event_cb(e): # Recolor the image based on the sliders' values color = lv.color_make(red_slider.get_value(), green_slider.get_value(), blue_slider.get_value()) intense = intense_slider.get_value() - img1.set_style_img_recolor_opa(intense, 0) - img1.set_style_img_recolor(color, 0) + image1.set_style_image_recolor_opa(intense, 0) + image1.set_style_image_recolor(color, 0) # # Demonstrate runtime image re-coloring @@ -52,9 +52,9 @@ blue_slider.align_to(green_slider, lv.ALIGN.OUT_RIGHT_MID, 25, 0) intense_slider.align_to(blue_slider, lv.ALIGN.OUT_RIGHT_MID, 25, 0) # Now create the actual image -img1 = lv.img(lv.scr_act()) -img1.set_src(img_cogwheel_argb) -img1.align(lv.ALIGN.RIGHT_MID, -20, 0) +image1 = lv.image(lv.scr_act()) +image1.set_src(image_cogwheel_argb) +image1.align(lv.ALIGN.RIGHT_MID, -20, 0) intense_slider.send_event(lv.EVENT.VALUE_CHANGED, None) diff --git a/examples/widgets/img/lv_example_img_3.c b/examples/widgets/img/lv_example_img_3.c index aa5b5f3b8..c24d19e2a 100644 --- a/examples/widgets/img/lv_example_img_3.c +++ b/examples/widgets/img/lv_example_img_3.c @@ -3,27 +3,27 @@ static void set_angle(void * img, int32_t v) { - lv_img_set_angle(img, v); + lv_image_set_angle(img, v); } static void set_zoom(void * img, int32_t v) { - lv_img_set_zoom(img, v); + lv_image_set_zoom(img, v); } /** * Show transformations (zoom and rotation) using a pivot point. */ -void lv_example_img_3(void) +void lv_example_image_3(void) { - LV_IMG_DECLARE(img_cogwheel_argb); + LV_IMAGE_DECLARE(img_cogwheel_argb); /*Now create the actual image*/ - lv_obj_t * img = lv_img_create(lv_scr_act()); - lv_img_set_src(img, &img_cogwheel_argb); + lv_obj_t * img = lv_image_create(lv_scr_act()); + lv_image_set_src(img, &img_cogwheel_argb); lv_obj_align(img, LV_ALIGN_CENTER, 50, 50); - lv_img_set_pivot(img, 0, 0); /*Rotate around the top left corner*/ + lv_image_set_pivot(img, 0, 0); /*Rotate around the top left corner*/ lv_anim_t a; lv_anim_init(&a); diff --git a/examples/widgets/img/lv_example_img_3.py b/examples/widgets/img/lv_example_img_3.py index c96a36042..5b17894c0 100644 --- a/examples/widgets/img/lv_example_img_3.py +++ b/examples/widgets/img/lv_example_img_3.py @@ -5,22 +5,22 @@ import display_driver # Create an image from the png file try: - with open('../../assets/img_cogwheel_argb.png','rb') as f: + with open('../../assets/image_cogwheel_argb.png','rb') as f: png_data = f.read() except: - print("Could not find img_cogwheel_argb.png") + print("Could not find image_cogwheel_argb.png") sys.exit() -img_cogwheel_argb = lv.img_dsc_t({ +image_cogwheel_argb = lv.image_dsc_t({ 'data_size': len(png_data), 'data': png_data }) -def set_angle(img, v): - img.set_angle(v) +def set_angle(image, v): + image.set_angle(v) -def set_zoom(img, v): - img.set_zoom(v) +def set_zoom(image, v): + image.set_zoom(v) # @@ -28,15 +28,15 @@ def set_zoom(img, v): # # Now create the actual image -img = lv.img(lv.scr_act()) -img.set_src(img_cogwheel_argb) -img.align(lv.ALIGN.CENTER, 50, 50) -img.set_pivot(0, 0) # Rotate around the top left corner +image = lv.image(lv.scr_act()) +image.set_src(image_cogwheel_argb) +image.align(lv.ALIGN.CENTER, 50, 50) +image.set_pivot(0, 0) # Rotate around the top left corner a1 = lv.anim_t() a1.init() -a1.set_var(img) -a1.set_custom_exec_cb(lambda a,val: set_angle(img,val)) +a1.set_var(image) +a1.set_custom_exec_cb(lambda a,val: set_angle(image,val)) a1.set_values(0, 3600) a1.set_time(5000) a1.set_repeat_count(lv.ANIM_REPEAT_INFINITE) @@ -44,8 +44,8 @@ lv.anim_t.start(a1) a2 = lv.anim_t() a2.init() -a2.set_var(img) -a2.set_custom_exec_cb(lambda a,val: set_zoom(img,val)) +a2.set_var(image) +a2.set_custom_exec_cb(lambda a,val: set_zoom(image,val)) a2.set_values(128, 256) a2.set_time(5000) a2.set_playback_time(3000) diff --git a/examples/widgets/img/lv_example_img_4.c b/examples/widgets/img/lv_example_img_4.c index 3abc021f2..5081f8637 100644 --- a/examples/widgets/img/lv_example_img_4.c +++ b/examples/widgets/img/lv_example_img_4.c @@ -3,26 +3,26 @@ static void ofs_y_anim(void * img, int32_t v) { - lv_img_set_offset_y(img, v); + lv_image_set_offset_y(img, v); } /** * Image styling and offset */ -void lv_example_img_4(void) +void lv_example_image_4(void) { - LV_IMG_DECLARE(img_skew_strip); + LV_IMAGE_DECLARE(img_skew_strip); static lv_style_t style; lv_style_init(&style); lv_style_set_bg_color(&style, lv_palette_main(LV_PALETTE_YELLOW)); lv_style_set_bg_opa(&style, LV_OPA_COVER); - lv_style_set_img_recolor_opa(&style, LV_OPA_COVER); - lv_style_set_img_recolor(&style, lv_color_black()); + lv_style_set_image_recolor_opa(&style, LV_OPA_COVER); + lv_style_set_image_recolor(&style, lv_color_black()); - lv_obj_t * img = lv_img_create(lv_scr_act()); + lv_obj_t * img = lv_image_create(lv_scr_act()); lv_obj_add_style(img, &style, 0); - lv_img_set_src(img, &img_skew_strip); + lv_image_set_src(img, &img_skew_strip); lv_obj_set_size(img, 150, 100); lv_obj_center(img); diff --git a/examples/widgets/img/lv_example_img_4.py b/examples/widgets/img/lv_example_img_4.py index 459c3ec09..477c52786 100644 --- a/examples/widgets/img/lv_example_img_4.py +++ b/examples/widgets/img/lv_example_img_4.py @@ -1,7 +1,7 @@ -def ofs_y_anim(img, v): - img.set_offset_y(v) - # print(img,v) +def ofs_y_anim(image, v): + image.set_offset_y(v) + # print(image,v) # Create an image from the png file try: @@ -11,7 +11,7 @@ except: print("Could not find img_skew_strip.png") sys.exit() -img_skew_strip = lv.img_dsc_t({ +image_skew_strip = lv.image_dsc_t({ 'data_size': len(png_data), 'data': png_data }) @@ -24,22 +24,22 @@ style = lv.style_t() style.init() style.set_bg_color(lv.palette_main(lv.PALETTE.YELLOW)) style.set_bg_opa(lv.OPA.COVER) -style.set_img_recolor_opa(lv.OPA.COVER) -style.set_img_recolor(lv.color_black()) +style.set_image_recolor_opa(lv.OPA.COVER) +style.set_image_recolor(lv.color_black()) -img = lv.img(lv.scr_act()) -img.add_style(style, 0) -img.set_src(img_skew_strip) -img.set_size(150, 100) -img.center() +image = lv.image(lv.scr_act()) +image.add_style(style, 0) +image.set_src(image_skew_strip) +image.set_size(150, 100) +image.center() a = lv.anim_t() a.init() -a.set_var(img) +a.set_var(image) a.set_values(0, 100) a.set_time(3000) a.set_playback_time(500) a.set_repeat_count(lv.ANIM_REPEAT_INFINITE) -a.set_custom_exec_cb(lambda a,val: ofs_y_anim(img,val)) +a.set_custom_exec_cb(lambda a,val: ofs_y_anim(image,val)) lv.anim_t.start(a) diff --git a/examples/widgets/imgbtn/lv_example_imgbtn_1.c b/examples/widgets/imgbtn/lv_example_imgbtn_1.c index 4fcb62e42..982a602e7 100644 --- a/examples/widgets/imgbtn/lv_example_imgbtn_1.c +++ b/examples/widgets/imgbtn/lv_example_imgbtn_1.c @@ -3,12 +3,12 @@ void lv_example_imgbtn_1(void) { - LV_IMG_DECLARE(imgbtn_left); - LV_IMG_DECLARE(imgbtn_right); - LV_IMG_DECLARE(imgbtn_mid); + LV_IMAGE_DECLARE(imgbtn_left); + LV_IMAGE_DECLARE(imgbtn_right); + LV_IMAGE_DECLARE(imgbtn_mid); /*Create a transition animation on width transformation and recolor.*/ - static lv_style_prop_t tr_prop[] = {LV_STYLE_TRANSFORM_WIDTH, LV_STYLE_IMG_RECOLOR_OPA, 0}; + static lv_style_prop_t tr_prop[] = {LV_STYLE_TRANSFORM_WIDTH, LV_STYLE_IMAGE_RECOLOR_OPA, 0}; static lv_style_transition_dsc_t tr; lv_style_transition_dsc_init(&tr, tr_prop, lv_anim_path_linear, 200, 0, NULL); @@ -20,8 +20,8 @@ void lv_example_imgbtn_1(void) /*Darken the button when pressed and make it wider*/ static lv_style_t style_pr; lv_style_init(&style_pr); - lv_style_set_img_recolor_opa(&style_pr, LV_OPA_30); - lv_style_set_img_recolor(&style_pr, lv_color_black()); + lv_style_set_image_recolor_opa(&style_pr, LV_OPA_30); + lv_style_set_image_recolor(&style_pr, lv_color_black()); lv_style_set_transform_width(&style_pr, 20); /*Create an image button*/ diff --git a/examples/widgets/imgbtn/lv_example_imgbtn_1.py b/examples/widgets/imgbtn/lv_example_imgbtn_1.py index 09bd7933f..8f0de2166 100644 --- a/examples/widgets/imgbtn/lv_example_imgbtn_1.py +++ b/examples/widgets/imgbtn/lv_example_imgbtn_1.py @@ -6,7 +6,7 @@ except: print("Could not find imgbtn_left.png") sys.exit() -imgbtn_left_dsc = lv.img_dsc_t({ +imgbtn_left_dsc = lv.image_dsc_t({ 'data_size': len(imgbtn_left_data), 'data': imgbtn_left_data }) @@ -18,7 +18,7 @@ except: print("Could not find imgbtn_mid.png") sys.exit() -imgbtn_mid_dsc = lv.img_dsc_t({ +imgbtn_mid_dsc = lv.image_dsc_t({ 'data_size': len(imgbtn_mid_data), 'data': imgbtn_mid_data }) @@ -27,16 +27,16 @@ try: with open('../../assets/imgbtn_right.png','rb') as f: imgbtn_right_data = f.read() except: - print("Could not find imgbtn_right.png") + print("Could not find imgtn_right.png") sys.exit() -imgbtn_right_dsc = lv.img_dsc_t({ +imgbtn_right_dsc = lv.image_dsc_t({ 'data_size': len(imgbtn_right_data), 'data': imgbtn_right_data }) # Create a transition animation on width transformation and recolor. -tr_prop = [lv.STYLE.TRANSFORM_WIDTH, lv.STYLE.IMG_RECOLOR_OPA, 0] +tr_prop = [lv.STYLE.TRANSFORM_WIDTH, lv.STYLE.IMAGE_RECOLOR_OPA, 0] tr = lv.style_transition_dsc_t() tr.init(tr_prop, lv.anim_t.path_linear, 200, 0, None) @@ -48,8 +48,8 @@ style_def.set_transition(tr) # Darken the button when pressed and make it wider style_pr = lv.style_t() style_pr.init() -style_pr.set_img_recolor_opa(lv.OPA._30) -style_pr.set_img_recolor(lv.color_black()) +style_pr.set_image_recolor_opa(lv.OPA._30) +style_pr.set_image_recolor(lv.color_black()) style_pr.set_transform_width(20) # Create an image button diff --git a/examples/widgets/keyboard/lv_example_keyboard_2.c b/examples/widgets/keyboard/lv_example_keyboard_2.c index 03dd11dc9..10f8a72ae 100644 --- a/examples/widgets/keyboard/lv_example_keyboard_2.c +++ b/examples/widgets/keyboard/lv_example_keyboard_2.c @@ -11,11 +11,11 @@ void lv_example_keyboard_2(void) }; /*Set the relative width of the buttons and other controls*/ - static const lv_btnmatrix_ctrl_t kb_ctrl[] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 2, LV_BTNMATRIX_CTRL_HIDDEN | 2, 6, LV_BTNMATRIX_CTRL_HIDDEN | 2, 2 - }; + static const lv_buttonmatrix_ctrl_t kb_ctrl[] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 2, LV_BUTTONMATRIX_CTRL_HIDDEN | 2, 6, LV_BUTTONMATRIX_CTRL_HIDDEN | 2, 2 + }; /*Create a keyboard and add the new map as USER_1 mode*/ lv_obj_t * kb = lv_keyboard_create(lv_scr_act()); diff --git a/examples/widgets/keyboard/lv_example_keyboard_2.py b/examples/widgets/keyboard/lv_example_keyboard_2.py index 1bcac0d05..54858c39b 100644 --- a/examples/widgets/keyboard/lv_example_keyboard_2.py +++ b/examples/widgets/keyboard/lv_example_keyboard_2.py @@ -8,7 +8,7 @@ kb_map = ["A", "Z", "E", "R", "T", "Y", "U", "I", "O", "P", lv.SYMBOL.BACKSPACE, kb_ctrl = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 2, lv.btnmatrix.CTRL.HIDDEN | 2, 6, lv.btnmatrix.CTRL.HIDDEN | 2, 2] + 2, lv.buttonmatrix.CTRL.HIDDEN | 2, 6, lv.buttonmatrix.CTRL.HIDDEN | 2, 2] # Create a keyboard and add the new map as USER_1 mode kb = lv.keyboard(lv.scr_act()) diff --git a/examples/widgets/list/lv_example_list_1.c b/examples/widgets/list/lv_example_list_1.c index 767d66cc8..cb6c1cc6d 100644 --- a/examples/widgets/list/lv_example_list_1.c +++ b/examples/widgets/list/lv_example_list_1.c @@ -8,7 +8,7 @@ static void event_handler(lv_event_t * e) lv_obj_t * obj = lv_event_get_target(e); if(code == LV_EVENT_CLICKED) { LV_UNUSED(obj); - LV_LOG_USER("Clicked: %s", lv_list_get_btn_text(list1, obj)); + LV_LOG_USER("Clicked: %s", lv_list_get_button_text(list1, obj)); } } void lv_example_list_1(void) @@ -21,31 +21,31 @@ void lv_example_list_1(void) /*Add buttons to the list*/ lv_obj_t * btn; lv_list_add_text(list1, "File"); - btn = lv_list_add_btn(list1, LV_SYMBOL_FILE, "New"); + btn = lv_list_add_button(list1, LV_SYMBOL_FILE, "New"); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); - btn = lv_list_add_btn(list1, LV_SYMBOL_DIRECTORY, "Open"); + btn = lv_list_add_button(list1, LV_SYMBOL_DIRECTORY, "Open"); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); - btn = lv_list_add_btn(list1, LV_SYMBOL_SAVE, "Save"); + btn = lv_list_add_button(list1, LV_SYMBOL_SAVE, "Save"); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); - btn = lv_list_add_btn(list1, LV_SYMBOL_CLOSE, "Delete"); + btn = lv_list_add_button(list1, LV_SYMBOL_CLOSE, "Delete"); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); - btn = lv_list_add_btn(list1, LV_SYMBOL_EDIT, "Edit"); + btn = lv_list_add_button(list1, LV_SYMBOL_EDIT, "Edit"); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); lv_list_add_text(list1, "Connectivity"); - btn = lv_list_add_btn(list1, LV_SYMBOL_BLUETOOTH, "Bluetooth"); + btn = lv_list_add_button(list1, LV_SYMBOL_BLUETOOTH, "Bluetooth"); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); - btn = lv_list_add_btn(list1, LV_SYMBOL_GPS, "Navigation"); + btn = lv_list_add_button(list1, LV_SYMBOL_GPS, "Navigation"); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); - btn = lv_list_add_btn(list1, LV_SYMBOL_USB, "USB"); + btn = lv_list_add_button(list1, LV_SYMBOL_USB, "USB"); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); - btn = lv_list_add_btn(list1, LV_SYMBOL_BATTERY_FULL, "Battery"); + btn = lv_list_add_button(list1, LV_SYMBOL_BATTERY_FULL, "Battery"); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); lv_list_add_text(list1, "Exit"); - btn = lv_list_add_btn(list1, LV_SYMBOL_OK, "Apply"); + btn = lv_list_add_button(list1, LV_SYMBOL_OK, "Apply"); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); - btn = lv_list_add_btn(list1, LV_SYMBOL_CLOSE, "Close"); + btn = lv_list_add_button(list1, LV_SYMBOL_CLOSE, "Close"); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); } diff --git a/examples/widgets/list/lv_example_list_1.py b/examples/widgets/list/lv_example_list_1.py index 1ea1182c9..11bdee17c 100644 --- a/examples/widgets/list/lv_example_list_1.py +++ b/examples/widgets/list/lv_example_list_1.py @@ -2,7 +2,7 @@ def event_handler(e): code = e.get_code() obj = e.get_target_obj() if code == lv.EVENT.CLICKED: - print("Clicked: list1." + list1.get_btn_text(obj)) + print("Clicked: list1." + list1.get_button_text(obj)) # Create a list list1 = lv.list(lv.scr_act()) @@ -11,30 +11,30 @@ list1.center() # Add buttons to the list list1.add_text("File") -btn_new = list1.add_btn(lv.SYMBOL.FILE, "New") -btn_new.add_event(event_handler,lv.EVENT.ALL, None) -btn_open = list1.add_btn(lv.SYMBOL.DIRECTORY, "Open") -btn_open.add_event(event_handler,lv.EVENT.ALL, None) -btn_save = list1.add_btn(lv.SYMBOL.SAVE, "Save") -btn_save.add_event(event_handler,lv.EVENT.ALL, None) -btn_delete = list1.add_btn(lv.SYMBOL.CLOSE, "Delete") -btn_delete.add_event(event_handler,lv.EVENT.ALL, None) -btn_edit = list1.add_btn(lv.SYMBOL.EDIT, "Edit") -btn_edit.add_event(event_handler,lv.EVENT.ALL, None) +button_new = list1.add_button(lv.SYMBOL.FILE, "New") +button_new.add_event(event_handler,lv.EVENT.ALL, None) +button_open = list1.add_button(lv.SYMBOL.DIRECTORY, "Open") +button_open.add_event(event_handler,lv.EVENT.ALL, None) +button_save = list1.add_button(lv.SYMBOL.SAVE, "Save") +button_save.add_event(event_handler,lv.EVENT.ALL, None) +button_delete = list1.add_button(lv.SYMBOL.CLOSE, "Delete") +button_delete.add_event(event_handler,lv.EVENT.ALL, None) +button_edit = list1.add_button(lv.SYMBOL.EDIT, "Edit") +button_edit.add_event(event_handler,lv.EVENT.ALL, None) list1.add_text("Connectivity") -btn_bluetooth = list1.add_btn(lv.SYMBOL.BLUETOOTH, "Bluetooth") -btn_bluetooth.add_event(event_handler,lv.EVENT.ALL, None) -btn_navig = list1.add_btn(lv.SYMBOL.GPS, "Navigation") -btn_navig.add_event(event_handler,lv.EVENT.ALL, None) -btn_USB = list1.add_btn(lv.SYMBOL.USB, "USB") -btn_USB.add_event(event_handler,lv.EVENT.ALL, None) -btn_battery = list1.add_btn(lv.SYMBOL.BATTERY_FULL, "Battery") -btn_battery.add_event(event_handler,lv.EVENT.ALL, None) +button_bluetooth = list1.add_button(lv.SYMBOL.BLUETOOTH, "Bluetooth") +button_bluetooth.add_event(event_handler,lv.EVENT.ALL, None) +button_navig = list1.add_button(lv.SYMBOL.GPS, "Navigation") +button_navig.add_event(event_handler,lv.EVENT.ALL, None) +button_USB = list1.add_button(lv.SYMBOL.USB, "USB") +button_USB.add_event(event_handler,lv.EVENT.ALL, None) +button_battery = list1.add_button(lv.SYMBOL.BATTERY_FULL, "Battery") +button_battery.add_event(event_handler,lv.EVENT.ALL, None) list1.add_text("Exit") -btn_apply = list1.add_btn(lv.SYMBOL.OK, "Apply") -btn_apply.add_event(event_handler,lv.EVENT.ALL, None) -btn_close = list1.add_btn(lv.SYMBOL.CLOSE, "Close") -btn_close.add_event(event_handler,lv.EVENT.ALL, None) +button_apply = list1.add_button(lv.SYMBOL.OK, "Apply") +button_apply.add_event(event_handler,lv.EVENT.ALL, None) +button_close = list1.add_button(lv.SYMBOL.CLOSE, "Close") +button_close.add_event(event_handler,lv.EVENT.ALL, None) diff --git a/examples/widgets/list/lv_example_list_2.c b/examples/widgets/list/lv_example_list_2.c index e17538cfb..1ab15b834 100644 --- a/examples/widgets/list/lv_example_list_2.c +++ b/examples/widgets/list/lv_example_list_2.c @@ -14,7 +14,7 @@ static void event_handler(lv_event_t * e) lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target(e); if(code == LV_EVENT_CLICKED) { - LV_LOG_USER("Clicked: %s", lv_list_get_btn_text(list1, obj)); + LV_LOG_USER("Clicked: %s", lv_list_get_button_text(list1, obj)); if(currentButton == obj) { currentButton = NULL; @@ -123,7 +123,7 @@ void lv_example_list_2(void) lv_obj_t * btn; int i; for(i = 0; i < 15; i++) { - btn = lv_btn_create(list1); + btn = lv_button_create(list1); lv_obj_set_width(btn, lv_pct(50)); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); @@ -141,27 +141,27 @@ void lv_example_list_2(void) lv_obj_align(list2, LV_ALIGN_TOP_RIGHT, 0, 0); lv_obj_set_flex_flow(list2, LV_FLEX_FLOW_COLUMN); - btn = lv_list_add_btn(list2, NULL, "Top"); + btn = lv_list_add_button(list2, NULL, "Top"); lv_obj_add_event(btn, event_handler_top, LV_EVENT_ALL, NULL); lv_group_remove_obj(btn); - btn = lv_list_add_btn(list2, LV_SYMBOL_UP, "Up"); + btn = lv_list_add_button(list2, LV_SYMBOL_UP, "Up"); lv_obj_add_event(btn, event_handler_up, LV_EVENT_ALL, NULL); lv_group_remove_obj(btn); - btn = lv_list_add_btn(list2, LV_SYMBOL_LEFT, "Center"); + btn = lv_list_add_button(list2, LV_SYMBOL_LEFT, "Center"); lv_obj_add_event(btn, event_handler_center, LV_EVENT_ALL, NULL); lv_group_remove_obj(btn); - btn = lv_list_add_btn(list2, LV_SYMBOL_DOWN, "Down"); + btn = lv_list_add_button(list2, LV_SYMBOL_DOWN, "Down"); lv_obj_add_event(btn, event_handler_dn, LV_EVENT_ALL, NULL); lv_group_remove_obj(btn); - btn = lv_list_add_btn(list2, NULL, "Bottom"); + btn = lv_list_add_button(list2, NULL, "Bottom"); lv_obj_add_event(btn, event_handler_bottom, LV_EVENT_ALL, NULL); lv_group_remove_obj(btn); - btn = lv_list_add_btn(list2, LV_SYMBOL_SHUFFLE, "Shuffle"); + btn = lv_list_add_button(list2, LV_SYMBOL_SHUFFLE, "Shuffle"); lv_obj_add_event(btn, event_handler_swap, LV_EVENT_ALL, NULL); lv_group_remove_obj(btn); } diff --git a/examples/widgets/list/lv_example_list_2.py b/examples/widgets/list/lv_example_list_2.py index 2f840de60..78013572d 100644 --- a/examples/widgets/list/lv_example_list_2.py +++ b/examples/widgets/list/lv_example_list_2.py @@ -96,10 +96,10 @@ list1.set_size(lv.pct(60), lv.pct(100)) list1.set_style_pad_row( 5, 0) for i in range(15): - btn = lv.btn(list1) - btn.set_width(lv.pct(100)) - btn.add_event( event_handler, lv.EVENT.CLICKED, None) - lab = lv.label(btn) + button = lv.button(list1) + button.set_width(lv.pct(100)) + button.add_event( event_handler, lv.EVENT.CLICKED, None) + lab = lv.label(button) lab.set_text("Item " + str(i)) #Select the first button by default @@ -112,26 +112,26 @@ list2.set_size(lv.pct(40), lv.pct(100)) list2.align(lv.ALIGN.TOP_RIGHT, 0, 0) list2.set_flex_flow(lv.FLEX_FLOW.COLUMN) -btn = list2.add_btn(None, "Top") -btn.add_event(event_handler_top, lv.EVENT.ALL, None) -lv.group_remove_obj(btn) +button = list2.add_button(None, "Top") +button.add_event(event_handler_top, lv.EVENT.ALL, None) +lv.group_remove_obj(button) -btn = list2.add_btn(lv.SYMBOL.UP, "Up") -btn.add_event(event_handler_up, lv.EVENT.ALL, None) -lv.group_remove_obj(btn) +button = list2.add_button(lv.SYMBOL.UP, "Up") +button.add_event(event_handler_up, lv.EVENT.ALL, None) +lv.group_remove_obj(button) -btn = list2.add_btn(lv.SYMBOL.LEFT, "Center") -btn.add_event(event_handler_center, lv.EVENT.ALL, None) -lv.group_remove_obj(btn) +button = list2.add_button(lv.SYMBOL.LEFT, "Center") +button.add_event(event_handler_center, lv.EVENT.ALL, None) +lv.group_remove_obj(button) -btn = list2.add_btn(lv.SYMBOL.DOWN, "Down") -btn.add_event(event_handler_dn, lv.EVENT.ALL, None) -lv.group_remove_obj(btn) +button = list2.add_button(lv.SYMBOL.DOWN, "Down") +button.add_event(event_handler_dn, lv.EVENT.ALL, None) +lv.group_remove_obj(button) -btn = list2.add_btn(None, "Bottom") -btn.add_event(event_handler_bottom, lv.EVENT.ALL, None) -lv.group_remove_obj(btn) +button = list2.add_button(None, "Bottom") +button.add_event(event_handler_bottom, lv.EVENT.ALL, None) +lv.group_remove_obj(button) -btn = list2.add_btn(lv.SYMBOL.SHUFFLE, "Shuffle") -btn.add_event(event_handler_swap, lv.EVENT.ALL, None) -lv.group_remove_obj(btn) +button = list2.add_button(lv.SYMBOL.SHUFFLE, "Shuffle") +button.add_event(event_handler_swap, lv.EVENT.ALL, None) +lv.group_remove_obj(button) diff --git a/examples/widgets/list/test.py b/examples/widgets/list/test.py index 5d6ff5cce..f1dd3c179 100755 --- a/examples/widgets/list/test.py +++ b/examples/widgets/list/test.py @@ -5,7 +5,7 @@ def event_handler(e): code = e.get_code() obj = e.get_target_obj() if code == lv.EVENT.CLICKED: - print("Clicked: list1." + list1.get_btn_text(obj)) + print("Clicked: list1." + list1.get_button_text(obj)) # Create a list list1 = lv.list(lv.scr_act()) @@ -14,30 +14,30 @@ list1.center() # Add buttons to the list list1.add_text("File") -btn_new = list1.add_btn(lv.SYMBOL.FILE, "New") -btn_new.add_event(event_handler,lv.EVENT.ALL, None) -btn_open = list1.add_btn(lv.SYMBOL.DIRECTORY, "Open") -btn_open.add_event(event_handler,lv.EVENT.ALL, None) -btn_save = list1.add_btn(lv.SYMBOL.SAVE, "Save") -btn_save.add_event(event_handler,lv.EVENT.ALL, None) -btn_delete = list1.add_btn(lv.SYMBOL.CLOSE, "Delete") -btn_delete.add_event(event_handler,lv.EVENT.ALL, None) -btn_edit = list1.add_btn(lv.SYMBOL.EDIT, "Edit") -btn_edit.add_event(event_handler,lv.EVENT.ALL, None) +button_new = list1.add_button(lv.SYMBOL.FILE, "New") +button_new.add_event(event_handler,lv.EVENT.ALL, None) +button_open = list1.add_button(lv.SYMBOL.DIRECTORY, "Open") +button_open.add_event(event_handler,lv.EVENT.ALL, None) +button_save = list1.add_button(lv.SYMBOL.SAVE, "Save") +button_save.add_event(event_handler,lv.EVENT.ALL, None) +button_delete = list1.add_button(lv.SYMBOL.CLOSE, "Delete") +button_delete.add_event(event_handler,lv.EVENT.ALL, None) +button_edit = list1.add_button(lv.SYMBOL.EDIT, "Edit") +button_edit.add_event(event_handler,lv.EVENT.ALL, None) list1.add_text("Connectivity") -btn_bluetooth = list1.add_btn(lv.SYMBOL.BLUETOOTH, "Bluetooth") -btn_bluetooth.add_event(event_handler,lv.EVENT.ALL, None) -btn_navig = list1.add_btn(lv.SYMBOL.GPS, "Navigation") -btn_navig.add_event(event_handler,lv.EVENT.ALL, None) -btn_USB = list1.add_btn(lv.SYMBOL.USB, "USB") -btn_USB.add_event(event_handler,lv.EVENT.ALL, None) -btn_battery = list1.add_btn(lv.SYMBOL.BATTERY_FULL, "Battery") -btn_battery.add_event(event_handler,lv.EVENT.ALL, None) +button_bluetooth = list1.add_button(lv.SYMBOL.BLUETOOTH, "Bluetooth") +button_bluetooth.add_event(event_handler,lv.EVENT.ALL, None) +button_navig = list1.add_button(lv.SYMBOL.GPS, "Navigation") +button_navig.add_event(event_handler,lv.EVENT.ALL, None) +button_USB = list1.add_button(lv.SYMBOL.USB, "USB") +button_USB.add_event(event_handler,lv.EVENT.ALL, None) +button_battery = list1.add_button(lv.SYMBOL.BATTERY_FULL, "Battery") +button_battery.add_event(event_handler,lv.EVENT.ALL, None) list1.add_text("Exit") -btn_apply = list1.add_btn(lv.SYMBOL.OK, "Apply") -btn_apply.add_event(event_handler,lv.EVENT.ALL, None) -btn_close = list1.add_btn(lv.SYMBOL.CLOSE, "Close") -btn_close.add_event(event_handler,lv.EVENT.ALL, None) +button_apply = list1.add_button(lv.SYMBOL.OK, "Apply") +button_apply.add_event(event_handler,lv.EVENT.ALL, None) +button_close = list1.add_button(lv.SYMBOL.CLOSE, "Close") +button_close.add_event(event_handler,lv.EVENT.ALL, None) diff --git a/examples/widgets/lv_example_widgets.h b/examples/widgets/lv_example_widgets.h index bb6571982..fe0a0c24b 100644 --- a/examples/widgets/lv_example_widgets.h +++ b/examples/widgets/lv_example_widgets.h @@ -37,13 +37,13 @@ void lv_example_bar_4(void); void lv_example_bar_5(void); void lv_example_bar_6(void); -void lv_example_btn_1(void); -void lv_example_btn_2(void); -void lv_example_btn_3(void); +void lv_example_button_1(void); +void lv_example_button_2(void); +void lv_example_button_3(void); -void lv_example_btnmatrix_1(void); -void lv_example_btnmatrix_2(void); -void lv_example_btnmatrix_3(void); +void lv_example_buttonmatrix_1(void); +void lv_example_buttonmatrix_2(void); +void lv_example_buttonmatrix_3(void); void lv_example_calendar_1(void); @@ -72,10 +72,10 @@ void lv_example_dropdown_1(void); void lv_example_dropdown_2(void); void lv_example_dropdown_3(void); -void lv_example_img_1(void); -void lv_example_img_2(void); -void lv_example_img_3(void); -void lv_example_img_4(void); +void lv_example_image_1(void); +void lv_example_image_2(void); +void lv_example_image_3(void); +void lv_example_image_4(void); void lv_example_imgbtn_1(void); diff --git a/examples/widgets/menu/lv_example_menu_2.c b/examples/widgets/menu/lv_example_menu_2.c index 4ab48d24b..0acefc2a3 100644 --- a/examples/widgets/menu/lv_example_menu_2.c +++ b/examples/widgets/menu/lv_example_menu_2.c @@ -6,7 +6,7 @@ static void back_event_handler(lv_event_t * e) lv_obj_t * obj = lv_event_get_target(e); lv_obj_t * menu = lv_event_get_user_data(e); - if(lv_menu_back_btn_is_root(menu, obj)) { + if(lv_menu_back_button_is_root(menu, obj)) { lv_obj_t * mbox1 = lv_msgbox_create(NULL, "Hello", "Root back btn click.", NULL, true); lv_obj_center(mbox1); } @@ -15,7 +15,7 @@ static void back_event_handler(lv_event_t * e) void lv_example_menu_2(void) { lv_obj_t * menu = lv_menu_create(lv_scr_act()); - lv_menu_set_mode_root_back_btn(menu, LV_MENU_ROOT_BACK_BTN_ENABLED); + lv_menu_set_mode_root_back_button(menu, LV_MENU_ROOT_BACK_BUTTON_ENABLED); lv_obj_add_event(menu, back_event_handler, LV_EVENT_CLICKED, menu); lv_obj_set_size(menu, lv_disp_get_hor_res(NULL), lv_disp_get_ver_res(NULL)); lv_obj_center(menu); diff --git a/examples/widgets/menu/lv_example_menu_2.py b/examples/widgets/menu/lv_example_menu_2.py index 42896f66b..421916203 100644 --- a/examples/widgets/menu/lv_example_menu_2.py +++ b/examples/widgets/menu/lv_example_menu_2.py @@ -1,12 +1,12 @@ def back_event_handler(e): obj = e.get_target_obj() - if menu.back_btn_is_root(obj): - mbox1 = lv.msgbox(lv.scr_act(), "Hello", "Root back btn click.", None, True) + if menu.back_button_is_root(obj): + mbox1 = lv.msgbox(lv.scr_act(), "Hello", "Root back button click.", None, True) mbox1.center() # Create a menu object menu = lv.menu(lv.scr_act()) -menu.set_mode_root_back_btn(lv.menu.ROOT_BACK_BTN.ENABLED) +menu.set_mode_root_back_button(lv.menu.ROOT_BACK_BUTTON.ENABLED) menu.add_event(back_event_handler, lv.EVENT.CLICKED, None) menu.set_size(320, 240) menu.center() diff --git a/examples/widgets/menu/lv_example_menu_3.c b/examples/widgets/menu/lv_example_menu_3.c index 7c0603fd7..deba698b6 100644 --- a/examples/widgets/menu/lv_example_menu_3.c +++ b/examples/widgets/menu/lv_example_menu_3.c @@ -9,9 +9,9 @@ void lv_example_menu_3(void) lv_obj_center(menu); /*Modify the header*/ - lv_obj_t * back_btn = lv_menu_get_main_header_back_btn(menu); - lv_obj_t * back_btn_label = lv_label_create(back_btn); - lv_label_set_text(back_btn_label, "Back"); + lv_obj_t * back_btn = lv_menu_get_main_header_back_button(menu); + lv_obj_t * back_button_label = lv_label_create(back_btn); + lv_label_set_text(back_button_label, "Back"); lv_obj_t * cont; lv_obj_t * label; diff --git a/examples/widgets/menu/lv_example_menu_4.c b/examples/widgets/menu/lv_example_menu_4.c index 96020e3f8..e5db82e34 100644 --- a/examples/widgets/menu/lv_example_menu_4.c +++ b/examples/widgets/menu/lv_example_menu_4.c @@ -5,7 +5,7 @@ static uint32_t btn_cnt = 1; static lv_obj_t * main_page; static lv_obj_t * menu; -static void float_btn_event_cb(lv_event_t * e) +static void float_button_event_cb(lv_event_t * e) { LV_UNUSED(e); @@ -56,13 +56,13 @@ void lv_example_menu_4(void) lv_menu_set_page(menu, main_page); /*Create floating btn*/ - lv_obj_t * float_btn = lv_btn_create(lv_scr_act()); + lv_obj_t * float_btn = lv_button_create(lv_scr_act()); lv_obj_set_size(float_btn, 50, 50); lv_obj_add_flag(float_btn, LV_OBJ_FLAG_FLOATING); lv_obj_align(float_btn, LV_ALIGN_BOTTOM_RIGHT, -10, -10); - lv_obj_add_event(float_btn, float_btn_event_cb, LV_EVENT_CLICKED, menu); + lv_obj_add_event(float_btn, float_button_event_cb, LV_EVENT_CLICKED, menu); lv_obj_set_style_radius(float_btn, LV_RADIUS_CIRCLE, 0); - lv_obj_set_style_bg_img_src(float_btn, LV_SYMBOL_PLUS, 0); + lv_obj_set_style_bg_image_src(float_btn, LV_SYMBOL_PLUS, 0); lv_obj_set_style_text_font(float_btn, lv_theme_get_font_large(float_btn), 0); } diff --git a/examples/widgets/menu/lv_example_menu_4.py b/examples/widgets/menu/lv_example_menu_4.py index ce4517e39..e93aa59a9 100644 --- a/examples/widgets/menu/lv_example_menu_4.py +++ b/examples/widgets/menu/lv_example_menu_4.py @@ -1,18 +1,18 @@ -btn_cnt = 1 +button_cnt = 1 -def float_btn_event_cb(e): - global btn_cnt - btn_cnt += 1 +def float_button_event_cb(e): + global button_cnt + button_cnt += 1 sub_page = lv.menu_page(menu, None) cont = lv.menu_cont(sub_page) label = lv.label(cont) - label.set_text("Hello, I am hiding inside {:d}".format(btn_cnt)) + label.set_text("Hello, I am hiding inside {:d}".format(button_cnt)) cont = lv.menu_cont(main_page) label = lv.label(cont) - label.set_text("Item {:d}".format(btn_cnt)) + label.set_text("Item {:d}".format(button_cnt)) menu.set_load_page_event(cont, sub_page) # Create a menu object @@ -37,11 +37,11 @@ menu.set_load_page_event(cont, sub_page) menu.set_page(main_page) -float_btn = lv.btn(lv.scr_act()) -float_btn.set_size(50, 50) -float_btn.add_flag(lv.obj.FLAG.FLOATING) -float_btn.align(lv.ALIGN.BOTTOM_RIGHT, -10, -10) -float_btn.add_event(float_btn_event_cb, lv.EVENT.CLICKED, None) -float_btn.set_style_radius(lv.RADIUS_CIRCLE, 0) -float_btn.set_style_bg_img_src(lv.SYMBOL.PLUS, 0) -float_btn.set_style_text_font(lv.theme_get_font_large(float_btn), 0) \ No newline at end of file +float_button = lv.button(lv.scr_act()) +float_button.set_size(50, 50) +float_button.add_flag(lv.obj.FLAG.FLOATING) +float_button.align(lv.ALIGN.BOTTOM_RIGHT, -10, -10) +float_button.add_event(float_button_event_cb, lv.EVENT.CLICKED, None) +float_button.set_style_radius(lv.RADIUS_CIRCLE, 0) +float_button.set_style_bg_image_src(lv.SYMBOL.PLUS, 0) +float_button.set_style_text_font(lv.theme_get_font_large(float_button), 0) \ No newline at end of file diff --git a/examples/widgets/menu/lv_example_menu_5.c b/examples/widgets/menu/lv_example_menu_5.c index f79c20a83..7f54bfd1e 100644 --- a/examples/widgets/menu/lv_example_menu_5.c +++ b/examples/widgets/menu/lv_example_menu_5.c @@ -28,7 +28,7 @@ void lv_example_menu_5(void) else { lv_obj_set_style_bg_color(menu, lv_color_darken(lv_obj_get_style_bg_color(menu, 0), 50), 0); } - lv_menu_set_mode_root_back_btn(menu, LV_MENU_ROOT_BACK_BTN_ENABLED); + lv_menu_set_mode_root_back_button(menu, LV_MENU_ROOT_BACK_BUTTON_ENABLED); lv_obj_add_event(menu, back_event_handler, LV_EVENT_CLICKED, menu); lv_obj_set_size(menu, lv_disp_get_hor_res(NULL), lv_disp_get_ver_res(NULL)); lv_obj_center(menu); @@ -116,7 +116,7 @@ static void back_event_handler(lv_event_t * e) lv_obj_t * obj = lv_event_get_target(e); lv_obj_t * menu = lv_event_get_user_data(e); - if(lv_menu_back_btn_is_root(menu, obj)) { + if(lv_menu_back_button_is_root(menu, obj)) { lv_obj_t * mbox1 = lv_msgbox_create(NULL, "Hello", "Root back btn click.", NULL, true); lv_obj_center(mbox1); } @@ -151,8 +151,8 @@ static lv_obj_t * create_text(lv_obj_t * parent, const char * icon, const char * lv_obj_t * label = NULL; if(icon) { - img = lv_img_create(obj); - lv_img_set_src(img, icon); + img = lv_image_create(obj); + lv_image_set_src(img, icon); } if(txt) { diff --git a/examples/widgets/menu/lv_example_menu_5.py b/examples/widgets/menu/lv_example_menu_5.py index 05026ca77..c142530db 100644 --- a/examples/widgets/menu/lv_example_menu_5.py +++ b/examples/widgets/menu/lv_example_menu_5.py @@ -4,12 +4,12 @@ def create_text(parent, icon, txt, builder_variant): obj = lv.menu_cont(parent) - img = None + image = None label = None if icon : - img = lv.img(obj) - img.set_src(icon) + image = lv.image(obj) + image.set_src(icon) if txt : label = lv.label(obj) @@ -18,8 +18,8 @@ def create_text(parent, icon, txt, builder_variant): label.set_flex_grow(1) if builder_variant == LV_MENU_ITEM_BUILDER_VARIANT_2 and icon and txt : - img.add_flag(lv.obj.FLAG.FLEX_IN_NEW_TRACK) - img.swap(label) + image.add_flag(lv.obj.FLAG.FLEX_IN_NEW_TRACK) + image.swap(label) return obj @@ -56,8 +56,8 @@ def back_event_handler(e,menu): obj = e.get_target_obj() # menu = lv_event_get_user_data(e); - if menu.back_btn_is_root(obj) : - mbox1 = lv.msgbox(None, "Hello", "Root back btn click.", None, True) + if menu.back_button_is_root(obj) : + mbox1 = lv.msgbox(None, "Hello", "Root back button click.", None, True) mbox1.center() def switch_handler(e,menu): @@ -86,7 +86,7 @@ else : menu.set_style_bg_color(menu.get_style_bg_color(0).darken(50),0) -menu.set_mode_root_back_btn(lv.menu.ROOT_BACK_BTN.ENABLED) +menu.set_mode_root_back_button(lv.menu.ROOT_BACK_BUTTON.ENABLED) menu.add_event(lambda evt: back_event_handler(evt,menu), lv.EVENT.CLICKED, None) menu.set_size(lv.pct(100), lv.pct(100)) menu.center() diff --git a/examples/widgets/meter/lv_example_meter_3.c b/examples/widgets/meter/lv_example_meter_3.c index 0160dfc42..3ef81a9c0 100644 --- a/examples/widgets/meter/lv_example_meter_3.c +++ b/examples/widgets/meter/lv_example_meter_3.c @@ -46,11 +46,11 @@ void lv_example_meter_3(void) lv_meter_set_scale_major_ticks(meter, 5, 2, 20, lv_color_black(), 10); lv_meter_set_scale_range(meter, 0, 59, 354, 270); - LV_IMG_DECLARE(img_hand) + LV_IMAGE_DECLARE(img_hand) /*Add a the hands from images*/ - lv_meter_indicator_t * indic_min = lv_meter_add_needle_img(meter, &img_hand, 5, 5); - lv_meter_indicator_t * indic_hour = lv_meter_add_needle_img(meter, &img_hand, 5, 5); + lv_meter_indicator_t * indic_min = lv_meter_add_needle_image(meter, &img_hand, 5, 5); + lv_meter_indicator_t * indic_hour = lv_meter_add_needle_image(meter, &img_hand, 5, 5); lv_obj_add_event(meter, tick_label_event, LV_EVENT_DRAW_PART_BEGIN, NULL); diff --git a/examples/widgets/msgbox/lv_example_msgbox_1.c b/examples/widgets/msgbox/lv_example_msgbox_1.c index 1299ca0dd..260d895c1 100644 --- a/examples/widgets/msgbox/lv_example_msgbox_1.c +++ b/examples/widgets/msgbox/lv_example_msgbox_1.c @@ -5,14 +5,14 @@ static void event_cb(lv_event_t * e) { lv_obj_t * obj = lv_event_get_target(e); LV_UNUSED(obj); - LV_LOG_USER("Button %s clicked", lv_msgbox_get_active_btn_text(obj)); + LV_LOG_USER("Button %s clicked", lv_msgbox_get_active_button_text(obj)); } void lv_example_msgbox_1(void) { - static const char * btns[] = {"Apply", "Close", ""}; + static const char * buttons[] = {"Apply", "Close", ""}; - lv_obj_t * mbox1 = lv_msgbox_create(NULL, "Hello", "This is a message box with two buttons.", btns, true); + lv_obj_t * mbox1 = lv_msgbox_create(NULL, "Hello", "This is a message box with two buttons.", buttons, true); lv_obj_add_event(mbox1, event_cb, LV_EVENT_VALUE_CHANGED, NULL); lv_obj_center(mbox1); } diff --git a/examples/widgets/msgbox/lv_example_msgbox_1.py b/examples/widgets/msgbox/lv_example_msgbox_1.py index 894537347..49cf053b6 100644 --- a/examples/widgets/msgbox/lv_example_msgbox_1.py +++ b/examples/widgets/msgbox/lv_example_msgbox_1.py @@ -1,10 +1,10 @@ def event_cb(e): mbox = e.get_target_obj() - print("Button %s clicked" % mbox.get_active_btn_text()) + print("Button %s clicked" % mbox.get_active_button_text()) -btns = ["Apply", "Close", ""] +buttons = ["Apply", "Close", ""] -mbox1 = lv.msgbox(lv.scr_act(), "Hello", "This is a message box with two buttons.", btns, True) +mbox1 = lv.msgbox(lv.scr_act(), "Hello", "This is a message box with two buttons.", buttons, True) mbox1.add_event(event_cb, lv.EVENT.VALUE_CHANGED, None) mbox1.center() diff --git a/examples/widgets/spinbox/lv_example_spinbox_1.c b/examples/widgets/spinbox/lv_example_spinbox_1.c index e158fa681..6f3dd8084 100644 --- a/examples/widgets/spinbox/lv_example_spinbox_1.c +++ b/examples/widgets/spinbox/lv_example_spinbox_1.c @@ -32,16 +32,16 @@ void lv_example_spinbox_1(void) lv_coord_t h = lv_obj_get_height(spinbox); - lv_obj_t * btn = lv_btn_create(lv_scr_act()); + lv_obj_t * btn = lv_button_create(lv_scr_act()); lv_obj_set_size(btn, h, h); lv_obj_align_to(btn, spinbox, LV_ALIGN_OUT_RIGHT_MID, 5, 0); - lv_obj_set_style_bg_img_src(btn, LV_SYMBOL_PLUS, 0); + lv_obj_set_style_bg_image_src(btn, LV_SYMBOL_PLUS, 0); lv_obj_add_event(btn, lv_spinbox_increment_event_cb, LV_EVENT_ALL, NULL); - btn = lv_btn_create(lv_scr_act()); + btn = lv_button_create(lv_scr_act()); lv_obj_set_size(btn, h, h); lv_obj_align_to(btn, spinbox, LV_ALIGN_OUT_LEFT_MID, -5, 0); - lv_obj_set_style_bg_img_src(btn, LV_SYMBOL_MINUS, 0); + lv_obj_set_style_bg_image_src(btn, LV_SYMBOL_MINUS, 0); lv_obj_add_event(btn, lv_spinbox_decrement_event_cb, LV_EVENT_ALL, NULL); } diff --git a/examples/widgets/spinbox/lv_example_spinbox_1.py b/examples/widgets/spinbox/lv_example_spinbox_1.py index 767bacc6e..4f5986b08 100644 --- a/examples/widgets/spinbox/lv_example_spinbox_1.py +++ b/examples/widgets/spinbox/lv_example_spinbox_1.py @@ -17,14 +17,14 @@ spinbox.center() h = spinbox.get_height() -btn = lv.btn(lv.scr_act()) -btn.set_size(h, h) -btn.align_to(spinbox, lv.ALIGN.OUT_RIGHT_MID, 5, 0) -btn.set_style_bg_img_src(lv.SYMBOL.PLUS, 0) -btn.add_event(increment_event_cb, lv.EVENT.ALL, None) +button = lv.button(lv.scr_act()) +button.set_size(h, h) +button.align_to(spinbox, lv.ALIGN.OUT_RIGHT_MID, 5, 0) +button.set_style_bg_image_src(lv.SYMBOL.PLUS, 0) +button.add_event(increment_event_cb, lv.EVENT.ALL, None) -btn = lv.btn(lv.scr_act()) -btn.set_size(h, h) -btn.align_to(spinbox, lv.ALIGN.OUT_LEFT_MID, -5, 0) -btn.set_style_bg_img_src(lv.SYMBOL.MINUS, 0) -btn.add_event(decrement_event_cb, lv.EVENT.ALL, None) +button = lv.button(lv.scr_act()) +button.set_size(h, h) +button.align_to(spinbox, lv.ALIGN.OUT_LEFT_MID, -5, 0) +button.set_style_bg_image_src(lv.SYMBOL.MINUS, 0) +button.add_event(decrement_event_cb, lv.EVENT.ALL, None) diff --git a/examples/widgets/tabview/lv_example_tabview_2.c b/examples/widgets/tabview/lv_example_tabview_2.c index 79f306b06..8e1f474fd 100644 --- a/examples/widgets/tabview/lv_example_tabview_2.c +++ b/examples/widgets/tabview/lv_example_tabview_2.c @@ -9,10 +9,10 @@ void lv_example_tabview_2(void) lv_obj_set_style_bg_color(tabview, lv_palette_lighten(LV_PALETTE_RED, 2), 0); - lv_obj_t * tab_btns = lv_tabview_get_tab_btns(tabview); - lv_obj_set_style_bg_color(tab_btns, lv_palette_darken(LV_PALETTE_GREY, 3), 0); - lv_obj_set_style_text_color(tab_btns, lv_palette_lighten(LV_PALETTE_GREY, 5), 0); - lv_obj_set_style_border_side(tab_btns, LV_BORDER_SIDE_RIGHT, LV_PART_ITEMS | LV_STATE_CHECKED); + lv_obj_t * tab_buttons = lv_tabview_get_tab_buttons(tabview); + lv_obj_set_style_bg_color(tab_buttons, lv_palette_darken(LV_PALETTE_GREY, 3), 0); + lv_obj_set_style_text_color(tab_buttons, lv_palette_lighten(LV_PALETTE_GREY, 5), 0); + lv_obj_set_style_border_side(tab_buttons, LV_BORDER_SIDE_RIGHT, LV_PART_ITEMS | LV_STATE_CHECKED); /*Add 3 tabs (the tabs are page (lv_page) and can be scrolled*/ diff --git a/examples/widgets/tabview/lv_example_tabview_2.py b/examples/widgets/tabview/lv_example_tabview_2.py index 681aed3db..c6dca3c90 100644 --- a/examples/widgets/tabview/lv_example_tabview_2.py +++ b/examples/widgets/tabview/lv_example_tabview_2.py @@ -4,10 +4,10 @@ tabview = lv.tabview(lv.scr_act(), lv.DIR.LEFT, 80) tabview.set_style_bg_color(lv.palette_lighten(lv.PALETTE.RED, 2), 0) -tab_btns = tabview.get_tab_btns() -tab_btns.set_style_bg_color(lv.palette_darken(lv.PALETTE.GREY, 3), 0) -tab_btns.set_style_text_color(lv.palette_lighten(lv.PALETTE.GREY, 5), 0) -tab_btns.set_style_border_side(lv.BORDER_SIDE.RIGHT, lv.PART.ITEMS | lv.STATE.CHECKED) +tab_buttons = tabview.get_tab_buttons() +tab_buttons.set_style_bg_color(lv.palette_darken(lv.PALETTE.GREY, 3), 0) +tab_buttons.set_style_text_color(lv.palette_lighten(lv.PALETTE.GREY, 5), 0) +tab_buttons.set_style_border_side(lv.BORDER_SIDE.RIGHT, lv.PART.ITEMS | lv.STATE.CHECKED) # Add 3 tabs (the tabs are page (lv_page) and can be scrolled diff --git a/examples/widgets/textarea/lv_example_textarea_1.c b/examples/widgets/textarea/lv_example_textarea_1.c index 019adab3b..6f2112934 100644 --- a/examples/widgets/textarea/lv_example_textarea_1.c +++ b/examples/widgets/textarea/lv_example_textarea_1.c @@ -12,7 +12,7 @@ static void btnm_event_handler(lv_event_t * e) { lv_obj_t * obj = lv_event_get_target(e); lv_obj_t * ta = lv_event_get_user_data(e); - const char * txt = lv_btnmatrix_get_btn_text(obj, lv_btnmatrix_get_selected_btn(obj)); + const char * txt = lv_buttonmatrix_get_button_text(obj, lv_buttonmatrix_get_selected_button(obj)); if(strcmp(txt, LV_SYMBOL_BACKSPACE) == 0) lv_textarea_del_char(ta); else if(strcmp(txt, LV_SYMBOL_NEW_LINE) == 0) lv_obj_send_event(ta, LV_EVENT_READY, NULL); @@ -34,12 +34,12 @@ void lv_example_textarea_1(void) LV_SYMBOL_BACKSPACE, "0", LV_SYMBOL_NEW_LINE, "" }; - lv_obj_t * btnm = lv_btnmatrix_create(lv_scr_act()); + lv_obj_t * btnm = lv_buttonmatrix_create(lv_scr_act()); lv_obj_set_size(btnm, 200, 150); lv_obj_align(btnm, LV_ALIGN_BOTTOM_MID, 0, -10); lv_obj_add_event(btnm, btnm_event_handler, LV_EVENT_VALUE_CHANGED, ta); lv_obj_clear_flag(btnm, LV_OBJ_FLAG_CLICK_FOCUSABLE); /*To keep the text area focused on button clicks*/ - lv_btnmatrix_set_map(btnm, btnm_map); + lv_buttonmatrix_set_map(btnm, btnm_map); } #endif diff --git a/examples/widgets/textarea/lv_example_textarea_1.py b/examples/widgets/textarea/lv_example_textarea_1.py index 32f9bb3eb..f6e67e4ba 100644 --- a/examples/widgets/textarea/lv_example_textarea_1.py +++ b/examples/widgets/textarea/lv_example_textarea_1.py @@ -2,9 +2,9 @@ def textarea_event_handler(e, ta): print("Enter was pressed. The current text is: " + ta.get_text()) -def btnm_event_handler(e, ta): +def buttonm_event_handler(e, ta): obj = e.get_target_obj() - txt = obj.get_btn_text(obj.get_selected_btn()) + txt = obj.get_button_text(obj.get_selected_button()) if txt == lv.SYMBOL.BACKSPACE: ta.del_char() elif txt == lv.SYMBOL.NEW_LINE: @@ -19,14 +19,14 @@ ta.align(lv.ALIGN.TOP_MID, 0, 10) ta.add_event(lambda e: textarea_event_handler(e, ta), lv.EVENT.READY, None) ta.add_state(lv.STATE.FOCUSED) # To be sure the cursor is visible -btnm_map = ["1", "2", "3", "\n", +buttonm_map = ["1", "2", "3", "\n", "4", "5", "6", "\n", "7", "8", "9", "\n", lv.SYMBOL.BACKSPACE, "0", lv.SYMBOL.NEW_LINE, ""] -btnm = lv.btnmatrix(lv.scr_act()) -btnm.set_size(200, 150) -btnm.align(lv.ALIGN.BOTTOM_MID, 0, -10) -btnm.add_event(lambda e: btnm_event_handler(e, ta), lv.EVENT.VALUE_CHANGED, None) -btnm.clear_flag(lv.obj.FLAG.CLICK_FOCUSABLE) # To keep the text area focused on button clicks -btnm.set_map(btnm_map) +buttonm = lv.buttonmatrix(lv.scr_act()) +buttonm.set_size(200, 150) +buttonm.align(lv.ALIGN.BOTTOM_MID, 0, -10) +buttonm.add_event(lambda e: buttonm_event_handler(e, ta), lv.EVENT.VALUE_CHANGED, None) +buttonm.clear_flag(lv.obj.FLAG.CLICK_FOCUSABLE) # To keep the text area focused on button clicks +buttonm.set_map(buttonm_map) diff --git a/examples/widgets/tileview/lv_example_tileview_1.c b/examples/widgets/tileview/lv_example_tileview_1.c index 8f91d2799..fe2dce4a5 100644 --- a/examples/widgets/tileview/lv_example_tileview_1.c +++ b/examples/widgets/tileview/lv_example_tileview_1.c @@ -20,7 +20,7 @@ void lv_example_tileview_1(void) /*Tile2: a button*/ lv_obj_t * tile2 = lv_tileview_add_tile(tv, 0, 1, LV_DIR_TOP | LV_DIR_RIGHT); - lv_obj_t * btn = lv_btn_create(tile2); + lv_obj_t * btn = lv_button_create(tile2); label = lv_label_create(btn); lv_label_set_text(label, "Scroll up or right"); @@ -33,16 +33,16 @@ void lv_example_tileview_1(void) lv_obj_t * list = lv_list_create(tile3); lv_obj_set_size(list, LV_PCT(100), LV_PCT(100)); - lv_list_add_btn(list, NULL, "One"); - lv_list_add_btn(list, NULL, "Two"); - lv_list_add_btn(list, NULL, "Three"); - lv_list_add_btn(list, NULL, "Four"); - lv_list_add_btn(list, NULL, "Five"); - lv_list_add_btn(list, NULL, "Six"); - lv_list_add_btn(list, NULL, "Seven"); - lv_list_add_btn(list, NULL, "Eight"); - lv_list_add_btn(list, NULL, "Nine"); - lv_list_add_btn(list, NULL, "Ten"); + lv_list_add_button(list, NULL, "One"); + lv_list_add_button(list, NULL, "Two"); + lv_list_add_button(list, NULL, "Three"); + lv_list_add_button(list, NULL, "Four"); + lv_list_add_button(list, NULL, "Five"); + lv_list_add_button(list, NULL, "Six"); + lv_list_add_button(list, NULL, "Seven"); + lv_list_add_button(list, NULL, "Eight"); + lv_list_add_button(list, NULL, "Nine"); + lv_list_add_button(list, NULL, "Ten"); } diff --git a/examples/widgets/tileview/lv_example_tileview_1.py b/examples/widgets/tileview/lv_example_tileview_1.py index bed3cb63e..eea6d32e8 100644 --- a/examples/widgets/tileview/lv_example_tileview_1.py +++ b/examples/widgets/tileview/lv_example_tileview_1.py @@ -14,26 +14,26 @@ label.center() # Tile2: a button tile2 = tv.add_tile(0, 1, lv.DIR.TOP | lv.DIR.RIGHT) -btn = lv.btn(tile2) +button = lv.button(tile2) -label = lv.label(btn) +label = lv.label(button) label.set_text("Scroll up or right") -btn.set_size(lv.SIZE_CONTENT, lv.SIZE_CONTENT) -btn.center() +button.set_size(lv.SIZE_CONTENT, lv.SIZE_CONTENT) +button.center() # Tile3: a list tile3 = tv.add_tile(1, 1, lv.DIR.LEFT) list = lv.list(tile3) list.set_size(lv.pct(100), lv.pct(100)) -list.add_btn(None, "One") -list.add_btn(None, "Two") -list.add_btn(None, "Three") -list.add_btn(None, "Four") -list.add_btn(None, "Five") -list.add_btn(None, "Six") -list.add_btn(None, "Seven") -list.add_btn(None, "Eight") -list.add_btn(None, "Nine") -list.add_btn(None, "Ten") +list.add_button(None, "One") +list.add_button(None, "Two") +list.add_button(None, "Three") +list.add_button(None, "Four") +list.add_button(None, "Five") +list.add_button(None, "Six") +list.add_button(None, "Seven") +list.add_button(None, "Eight") +list.add_button(None, "Nine") +list.add_button(None, "Ten") diff --git a/examples/widgets/win/lv_example_win_1.c b/examples/widgets/win/lv_example_win_1.c index e5f427f7d..1f64f8b4a 100644 --- a/examples/widgets/win/lv_example_win_1.c +++ b/examples/widgets/win/lv_example_win_1.c @@ -13,15 +13,15 @@ void lv_example_win_1(void) { lv_obj_t * win = lv_win_create(lv_scr_act()); lv_obj_t * btn; - btn = lv_win_add_btn(win, LV_SYMBOL_LEFT, 40); + btn = lv_win_add_button(win, LV_SYMBOL_LEFT, 40); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); lv_win_add_title(win, "A title"); - btn = lv_win_add_btn(win, LV_SYMBOL_RIGHT, 40); + btn = lv_win_add_button(win, LV_SYMBOL_RIGHT, 40); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); - btn = lv_win_add_btn(win, LV_SYMBOL_CLOSE, 60); + btn = lv_win_add_button(win, LV_SYMBOL_CLOSE, 60); lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL); lv_obj_t * cont = lv_win_get_content(win); /*Content can be added here*/ diff --git a/examples/widgets/win/lv_example_win_1.py b/examples/widgets/win/lv_example_win_1.py index 56b8a2157..bc3002248 100644 --- a/examples/widgets/win/lv_example_win_1.py +++ b/examples/widgets/win/lv_example_win_1.py @@ -2,17 +2,17 @@ def event_handler(e): code = e.get_code() obj = e.get_target_obj() if code == lv.EVENT.CLICKED: - print("Button {:d} clicked".format(obj.get_child_id())) + print("Button {:d} clicked".format(obj.get_index())) win = lv.win(lv.scr_act()) -btn1 = win.add_btn(lv.SYMBOL.LEFT, 40) -btn1.add_event(event_handler, lv.EVENT.ALL, None) +button1 = win.add_button(lv.SYMBOL.LEFT, 40) +button1.add_event(event_handler, lv.EVENT.ALL, None) win.add_title("A title") -btn2=win.add_btn(lv.SYMBOL.RIGHT, 40) -btn2.add_event(event_handler, lv.EVENT.ALL, None) -btn3 = win.add_btn(lv.SYMBOL.CLOSE, 60) -btn3.add_event(event_handler, lv.EVENT.ALL, None) +button2=win.add_button(lv.SYMBOL.RIGHT, 40) +button2.add_event(event_handler, lv.EVENT.ALL, None) +button3 = win.add_button(lv.SYMBOL.CLOSE, 60) +button3.add_event(event_handler, lv.EVENT.ALL, None) cont = win.get_content() # Content can be added here label = lv.label(cont) diff --git a/lv_conf_template.h b/lv_conf_template.h index 2d265eb63..da57a63aa 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -252,7 +252,7 @@ *With other image decoders (e.g. PNG or JPG) caching save the continuous open/decode of images. *However the opened images consume additional RAM. *0: to disable caching*/ -#define LV_IMG_CACHE_DEF_SIZE 0 +#define LV_IMAGE_CACHE_DEF_SIZE 0 /*Number of stops allowed per gradient. Increase this to allow more stops. @@ -680,7 +680,7 @@ #define LV_IMGFONT_PATH_MAX_LEN 64 /*1: Use img cache to buffer header information*/ - #define LV_IMGFONT_USE_IMG_CACHE_HEADER 0 + #define LV_IMGFONT_USE_IMAGE_CACHE_HEADER 0 #endif /*1: Enable a published subscriber based messaging system */ diff --git a/lvgl.h b/lvgl.h index 85443530d..cb499623a 100644 --- a/lvgl.h +++ b/lvgl.h @@ -46,17 +46,17 @@ extern "C" { #include "src/font/lv_font_loader.h" #include "src/font/lv_font_fmt_txt.h" -#include "src/widgets/animimg/lv_animimg.h" +#include "src/widgets/animimage/lv_animimage.h" #include "src/widgets/arc/lv_arc.h" #include "src/widgets/bar/lv_bar.h" -#include "src/widgets/btn/lv_btn.h" -#include "src/widgets/btnmatrix/lv_btnmatrix.h" +#include "src/widgets/button/lv_button.h" +#include "src/widgets/buttonmatrix/lv_buttonmatrix.h" #include "src/widgets/calendar/lv_calendar.h" #include "src/widgets/canvas/lv_canvas.h" #include "src/widgets/chart/lv_chart.h" #include "src/widgets/checkbox/lv_checkbox.h" #include "src/widgets/dropdown/lv_dropdown.h" -#include "src/widgets/img/lv_img.h" +#include "src/widgets/image/lv_image.h" #include "src/widgets/imgbtn/lv_imgbtn.h" #include "src/widgets/keyboard/lv_keyboard.h" #include "src/widgets/label/lv_label.h" diff --git a/scripts/jpg_to_sjpg.py b/scripts/jpg_to_sjpg.py index 86fa38010..05eaaa1c5 100755 --- a/scripts/jpg_to_sjpg.py +++ b/scripts/jpg_to_sjpg.py @@ -113,7 +113,7 @@ for i in range(len(sjpeg)): new_line_threshold = 0 -c_code = c_code + "\n};\n\nlv_img_dsc_t " +c_code = c_code + "\n};\n\nlv_image_dsc_t " c_code = c_code + OUTPUT_FILE_NAME + " = {\n" c_code = c_code + "\t.header.always_zero = 0,\n" c_code = c_code + "\t.header.w = " + str(width) + ",\n" diff --git a/scripts/style_api_gen.py b/scripts/style_api_gen.py index c2333e8fd..ff309d374 100755 --- a/scripts/style_api_gen.py +++ b/scripts/style_api_gen.py @@ -151,7 +151,7 @@ props = [ {'name': 'BG_IMG_SRC', 'style_type': 'ptr', 'var_type': 'const void *', 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 1, - 'dsc': "Set a background image. Can be a pointer to `lv_img_dsc_t`, a path to a file or an `LV_SYMBOL_...`"}, + 'dsc': "Set a background image. Can be a pointer to `lv_image_dsc_t`, a path to a file or an `LV_SYMBOL_...`"}, {'name': 'BG_IMG_OPA', 'style_type': 'num', 'var_type': 'lv_opa_t', 'default':'`LV_OPA_COVER`', 'inherited': 0, 'layout': 0, 'ext_draw': 0, @@ -289,7 +289,7 @@ props = [ {'name': 'ARC_IMG_SRC', 'style_type': 'ptr', 'var_type': 'const void *', 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0, - 'dsc': "Set an image from which the arc will be masked out. It's useful to display complex effects on the arcs. Can be a pointer to `lv_img_dsc_t` or a path to a file"}, + 'dsc': "Set an image from which the arc will be masked out. It's useful to display complex effects on the arcs. Can be a pointer to `lv_image_dsc_t` or a path to a file"}, {'section': 'Text', 'dsc':'Properties to describe the properties of text. All these properties are inherited.' }, {'name': 'TEXT_COLOR', diff --git a/src/core/lv_global.h b/src/core/lv_global.h index c7d20ec6b..ced447f35 100644 --- a/src/core/lv_global.h +++ b/src/core/lv_global.h @@ -17,7 +17,7 @@ extern "C" { #include -#include "../draw/lv_img_cache.h" +#include "../draw/lv_image_cache.h" #include "../draw/lv_draw.h" #if LV_USE_DRAW_SW #include "../draw/sw/lv_draw_sw.h" @@ -101,12 +101,12 @@ typedef struct _lv_global_t { lv_draw_buf_handlers_t draw_buf_handlers; lv_ll_t img_decoder_ll; - lv_img_cache_manager_t img_cache_mgr; -#if LV_IMG_CACHE_DEF_SIZE + lv_image_cache_manager_t img_cache_mgr; +#if LV_IMAGE_CACHE_DEF_SIZE uint16_t img_cache_entry_cnt; - _lv_img_cache_entry_t * img_cache_array; + _lv_image_cache_entry_t * img_cache_array; #else - _lv_img_cache_entry_t img_cache_single; + _lv_image_cache_entry_t img_cache_single; #endif lv_draw_global_info_t draw_info; @@ -180,7 +180,7 @@ typedef struct _lv_global_t { #endif #if LV_USE_FILE_EXPLORER != 0 - lv_style_t fe_list_btn_style; + lv_style_t fe_list_button_style; #endif #if LV_USE_SYSMON && LV_USE_PERF_MONITOR diff --git a/src/core/lv_obj.c b/src/core/lv_obj.c index 503c363fe..84ea0bb41 100644 --- a/src/core/lv_obj.c +++ b/src/core/lv_obj.c @@ -409,7 +409,7 @@ static void lv_obj_draw(lv_event_t * e) lv_draw_rect_dsc_t draw_dsc; lv_draw_rect_dsc_init(&draw_dsc); draw_dsc.bg_opa = LV_OPA_TRANSP; - draw_dsc.bg_img_opa = LV_OPA_TRANSP; + draw_dsc.bg_image_opa = LV_OPA_TRANSP; draw_dsc.outline_opa = LV_OPA_TRANSP; draw_dsc.shadow_opa = LV_OPA_TRANSP; lv_obj_init_draw_rect_dsc(obj, LV_PART_MAIN, &draw_dsc); diff --git a/src/core/lv_obj_draw.c b/src/core/lv_obj_draw.c index c779cd0dc..c391f6204 100644 --- a/src/core/lv_obj_draw.c +++ b/src/core/lv_obj_draw.c @@ -46,7 +46,7 @@ void lv_obj_init_draw_rect_dsc(lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t if(part != LV_PART_MAIN) { if(opa <= LV_OPA_MIN) { draw_dsc->bg_opa = LV_OPA_TRANSP; - draw_dsc->bg_img_opa = LV_OPA_TRANSP; + draw_dsc->bg_image_opa = LV_OPA_TRANSP; draw_dsc->border_opa = LV_OPA_TRANSP; draw_dsc->outline_opa = LV_OPA_TRANSP; draw_dsc->shadow_opa = LV_OPA_TRANSP; @@ -101,19 +101,19 @@ void lv_obj_init_draw_rect_dsc(lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t } } - if(draw_dsc->bg_img_opa != LV_OPA_TRANSP) { - draw_dsc->bg_img_src = lv_obj_get_style_bg_img_src(obj, part); - if(draw_dsc->bg_img_src) { - draw_dsc->bg_img_opa = lv_obj_get_style_bg_img_opa(obj, part); - if(draw_dsc->bg_img_opa > LV_OPA_MIN) { - if(lv_img_src_get_type(draw_dsc->bg_img_src) == LV_IMG_SRC_SYMBOL) { - draw_dsc->bg_img_symbol_font = lv_obj_get_style_text_font(obj, part); - draw_dsc->bg_img_recolor = lv_obj_get_style_text_color_filtered(obj, part); + if(draw_dsc->bg_image_opa != LV_OPA_TRANSP) { + draw_dsc->bg_image_src = lv_obj_get_style_bg_image_src(obj, part); + if(draw_dsc->bg_image_src) { + draw_dsc->bg_image_opa = lv_obj_get_style_bg_image_opa(obj, part); + if(draw_dsc->bg_image_opa > LV_OPA_MIN) { + if(lv_image_src_get_type(draw_dsc->bg_image_src) == LV_IMAGE_SRC_SYMBOL) { + draw_dsc->bg_image_symbol_font = lv_obj_get_style_text_font(obj, part); + draw_dsc->bg_image_recolor = lv_obj_get_style_text_color_filtered(obj, part); } else { - draw_dsc->bg_img_recolor = lv_obj_get_style_bg_img_recolor_filtered(obj, part); - draw_dsc->bg_img_recolor_opa = lv_obj_get_style_bg_img_recolor_opa(obj, part); - draw_dsc->bg_img_tiled = lv_obj_get_style_bg_img_tiled(obj, part); + draw_dsc->bg_image_recolor = lv_obj_get_style_bg_image_recolor_filtered(obj, part); + draw_dsc->bg_image_recolor_opa = lv_obj_get_style_bg_image_recolor_opa(obj, part); + draw_dsc->bg_image_tiled = lv_obj_get_style_bg_image_tiled(obj, part); } } } @@ -136,7 +136,7 @@ void lv_obj_init_draw_rect_dsc(lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t if(opa < LV_OPA_MAX) { draw_dsc->bg_opa = LV_OPA_MIX2(draw_dsc->bg_opa, opa); - draw_dsc->bg_img_opa = LV_OPA_MIX2(draw_dsc->bg_img_opa, opa); + draw_dsc->bg_image_opa = LV_OPA_MIX2(draw_dsc->bg_image_opa, opa); draw_dsc->border_opa = LV_OPA_MIX2(draw_dsc->border_opa, opa); draw_dsc->shadow_opa = LV_OPA_MIX2(draw_dsc->shadow_opa, opa); draw_dsc->outline_opa = LV_OPA_MIX2(draw_dsc->outline_opa, opa); @@ -172,12 +172,12 @@ void lv_obj_init_draw_label_dsc(lv_obj_t * obj, uint32_t part, lv_draw_label_dsc draw_dsc->align = lv_obj_get_style_text_align(obj, part); } -void lv_obj_init_draw_img_dsc(lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t * draw_dsc) +void lv_obj_init_draw_image_dsc(lv_obj_t * obj, uint32_t part, lv_draw_image_dsc_t * draw_dsc) { draw_dsc->base.obj = obj; draw_dsc->base.part = part; - draw_dsc->opa = lv_obj_get_style_img_opa(obj, part); + draw_dsc->opa = lv_obj_get_style_image_opa(obj, part); if(draw_dsc->opa <= LV_OPA_MIN) return; lv_opa_t opa = lv_obj_get_style_opa_recursive(obj, part); @@ -191,8 +191,8 @@ void lv_obj_init_draw_img_dsc(lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t * draw_dsc->pivot.x = lv_area_get_width(&obj->coords) / 2; draw_dsc->pivot.y = lv_area_get_height(&obj->coords) / 2; - draw_dsc->recolor_opa = lv_obj_get_style_img_recolor_opa(obj, part); - draw_dsc->recolor = lv_obj_get_style_img_recolor_filtered(obj, part); + draw_dsc->recolor_opa = lv_obj_get_style_image_recolor_opa(obj, part); + draw_dsc->recolor = lv_obj_get_style_image_recolor_filtered(obj, part); if(part != LV_PART_MAIN) draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part); } @@ -245,7 +245,7 @@ void lv_obj_init_draw_arc_dsc(lv_obj_t * obj, uint32_t part, lv_draw_arc_dsc_t * if(draw_dsc->opa <= LV_OPA_MIN) return; draw_dsc->color = lv_obj_get_style_arc_color_filtered(obj, part); - draw_dsc->img_src = lv_obj_get_style_arc_img_src(obj, part); + draw_dsc->img_src = lv_obj_get_style_arc_image_src(obj, part); draw_dsc->rounded = lv_obj_get_style_arc_rounded(obj, part); } diff --git a/src/core/lv_obj_draw.h b/src/core/lv_obj_draw.h index cfecb1b0e..a6aa97fd2 100644 --- a/src/core/lv_obj_draw.h +++ b/src/core/lv_obj_draw.h @@ -65,7 +65,7 @@ void lv_obj_init_draw_label_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_l * @param draw_dsc the descriptor to initialize. * Should be initialized with `lv_draw_image_dsc_init(draw_dsc)`. */ -void lv_obj_init_draw_img_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t * draw_dsc); +void lv_obj_init_draw_image_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_image_dsc_t * draw_dsc); /** diff --git a/src/core/lv_obj_style.c b/src/core/lv_obj_style.c index a0fd57b5f..ef988c873 100644 --- a/src/core/lv_obj_style.c +++ b/src/core/lv_obj_style.c @@ -334,7 +334,7 @@ static inline lv_style_value_t lv_style_prop_get_default_inlined(lv_style_prop_t case LV_STYLE_ARC_COLOR: case LV_STYLE_LINE_COLOR: case LV_STYLE_TEXT_COLOR: - case LV_STYLE_IMG_RECOLOR: + case LV_STYLE_IMAGE_RECOLOR: return (lv_style_value_t) { .color = white }; @@ -342,8 +342,8 @@ static inline lv_style_value_t lv_style_prop_get_default_inlined(lv_style_prop_t case LV_STYLE_OPA_LAYERED: case LV_STYLE_BORDER_OPA: case LV_STYLE_TEXT_OPA: - case LV_STYLE_IMG_OPA: - case LV_STYLE_BG_IMG_OPA: + case LV_STYLE_IMAGE_OPA: + case LV_STYLE_BG_IMAGE_OPA: case LV_STYLE_OUTLINE_OPA: case LV_STYLE_SHADOW_OPA: case LV_STYLE_LINE_OPA: @@ -950,7 +950,7 @@ static void trans_anim_cb(void * _tr, int32_t v) case LV_STYLE_TEXT_COLOR: case LV_STYLE_SHADOW_COLOR: case LV_STYLE_OUTLINE_COLOR: - case LV_STYLE_IMG_RECOLOR: + case LV_STYLE_IMAGE_RECOLOR: if(v <= 0) value_final.color = tr->start_value.color; else if(v >= 255) value_final.color = tr->end_value.color; else value_final.color = lv_color_mix(tr->end_value.color, tr->start_value.color, v); diff --git a/src/core/lv_obj_style_gen.c b/src/core/lv_obj_style_gen.c index 50c0c203b..9275f30b5 100644 --- a/src/core/lv_obj_style_gen.c +++ b/src/core/lv_obj_style_gen.c @@ -290,44 +290,44 @@ void lv_obj_set_style_bg_dither_mode(struct _lv_obj_t * obj, lv_dither_mode_t va lv_obj_set_local_style_prop(obj, LV_STYLE_BG_DITHER_MODE, v, selector); } -void lv_obj_set_style_bg_img_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector) +void lv_obj_set_style_bg_image_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector) { lv_style_value_t v = { .ptr = value }; - lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_SRC, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMAGE_SRC, v, selector); } -void lv_obj_set_style_bg_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +void lv_obj_set_style_bg_image_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) { lv_style_value_t v = { .num = (int32_t)value }; - lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_OPA, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMAGE_OPA, v, selector); } -void lv_obj_set_style_bg_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +void lv_obj_set_style_bg_image_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) { lv_style_value_t v = { .color = value }; - lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_RECOLOR, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMAGE_RECOLOR, v, selector); } -void lv_obj_set_style_bg_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +void lv_obj_set_style_bg_image_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) { lv_style_value_t v = { .num = (int32_t)value }; - lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_RECOLOR_OPA, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMAGE_RECOLOR_OPA, v, selector); } -void lv_obj_set_style_bg_img_tiled(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector) +void lv_obj_set_style_bg_image_tiled(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector) { lv_style_value_t v = { .num = (int32_t)value }; - lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMG_TILED, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_BG_IMAGE_TILED, v, selector); } void lv_obj_set_style_border_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) @@ -450,28 +450,28 @@ void lv_obj_set_style_shadow_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_styl lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_OPA, v, selector); } -void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +void lv_obj_set_style_image_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) { lv_style_value_t v = { .num = (int32_t)value }; - lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_OPA, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_IMAGE_OPA, v, selector); } -void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) +void lv_obj_set_style_image_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) { lv_style_value_t v = { .color = value }; - lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_IMAGE_RECOLOR, v, selector); } -void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) +void lv_obj_set_style_image_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) { lv_style_value_t v = { .num = (int32_t)value }; - lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_OPA, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_IMAGE_RECOLOR_OPA, v, selector); } void lv_obj_set_style_line_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) @@ -554,12 +554,12 @@ void lv_obj_set_style_arc_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_s lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_OPA, v, selector); } -void lv_obj_set_style_arc_img_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector) +void lv_obj_set_style_arc_image_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector) { lv_style_value_t v = { .ptr = value }; - lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_IMG_SRC, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_IMAGE_SRC, v, selector); } void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector) @@ -650,7 +650,8 @@ void lv_obj_set_style_opa_layered(struct _lv_obj_t * obj, lv_opa_t value, lv_sty lv_obj_set_local_style_prop(obj, LV_STYLE_OPA_LAYERED, v, selector); } -void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector) +void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, + lv_style_selector_t selector) { lv_style_value_t v = { .ptr = value diff --git a/src/core/lv_obj_style_gen.h b/src/core/lv_obj_style_gen.h index 023768aa8..f56c1ae72 100644 --- a/src/core/lv_obj_style_gen.h +++ b/src/core/lv_obj_style_gen.h @@ -237,40 +237,40 @@ static inline lv_dither_mode_t lv_obj_get_style_bg_dither_mode(const struct _lv_ return (lv_dither_mode_t)v.num; } -static inline const void * lv_obj_get_style_bg_img_src(const struct _lv_obj_t * obj, uint32_t part) +static inline const void * lv_obj_get_style_bg_image_src(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_SRC); + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_SRC); return (const void *)v.ptr; } -static inline lv_opa_t lv_obj_get_style_bg_img_opa(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_opa_t lv_obj_get_style_bg_image_opa(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_OPA); + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_OPA); return (lv_opa_t)v.num; } -static inline lv_color_t lv_obj_get_style_bg_img_recolor(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_color_t lv_obj_get_style_bg_image_recolor(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_RECOLOR); + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_RECOLOR); return v.color; } -static inline lv_color_t lv_obj_get_style_bg_img_recolor_filtered(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_color_t lv_obj_get_style_bg_image_recolor_filtered(const struct _lv_obj_t * obj, uint32_t part) { lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, - LV_STYLE_BG_IMG_RECOLOR)); + LV_STYLE_BG_IMAGE_RECOLOR)); return v.color; } -static inline lv_opa_t lv_obj_get_style_bg_img_recolor_opa(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_opa_t lv_obj_get_style_bg_image_recolor_opa(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_RECOLOR_OPA); + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_RECOLOR_OPA); return (lv_opa_t)v.num; } -static inline bool lv_obj_get_style_bg_img_tiled(const struct _lv_obj_t * obj, uint32_t part) +static inline bool lv_obj_get_style_bg_image_tiled(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_TILED); + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_TILED); return (bool)v.num; } @@ -385,28 +385,28 @@ static inline lv_opa_t lv_obj_get_style_shadow_opa(const struct _lv_obj_t * obj, return (lv_opa_t)v.num; } -static inline lv_opa_t lv_obj_get_style_img_opa(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_opa_t lv_obj_get_style_image_opa(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_OPA); + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_OPA); return (lv_opa_t)v.num; } -static inline lv_color_t lv_obj_get_style_img_recolor(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_color_t lv_obj_get_style_image_recolor(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR); + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_RECOLOR); return v.color; } -static inline lv_color_t lv_obj_get_style_img_recolor_filtered(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_color_t lv_obj_get_style_image_recolor_filtered(const struct _lv_obj_t * obj, uint32_t part) { lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, - LV_STYLE_IMG_RECOLOR)); + LV_STYLE_IMAGE_RECOLOR)); return v.color; } -static inline lv_opa_t lv_obj_get_style_img_recolor_opa(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_opa_t lv_obj_get_style_image_recolor_opa(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR_OPA); + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_RECOLOR_OPA); return (lv_opa_t)v.num; } @@ -482,9 +482,9 @@ static inline lv_opa_t lv_obj_get_style_arc_opa(const struct _lv_obj_t * obj, ui return (lv_opa_t)v.num; } -static inline const void * lv_obj_get_style_arc_img_src(const struct _lv_obj_t * obj, uint32_t part) +static inline const void * lv_obj_get_style_arc_image_src(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_IMG_SRC); + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_IMAGE_SRC); return (const void *)v.ptr; } @@ -740,11 +740,11 @@ void lv_obj_set_style_bg_main_stop(struct _lv_obj_t * obj, lv_coord_t value, lv_ void lv_obj_set_style_bg_grad_stop(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); void lv_obj_set_style_bg_grad(struct _lv_obj_t * obj, const lv_grad_dsc_t * value, lv_style_selector_t selector); void lv_obj_set_style_bg_dither_mode(struct _lv_obj_t * obj, lv_dither_mode_t value, lv_style_selector_t selector); -void lv_obj_set_style_bg_img_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector); -void lv_obj_set_style_bg_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); -void lv_obj_set_style_bg_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector); -void lv_obj_set_style_bg_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); -void lv_obj_set_style_bg_img_tiled(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector); +void lv_obj_set_style_bg_image_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector); +void lv_obj_set_style_bg_image_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); +void lv_obj_set_style_bg_image_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector); +void lv_obj_set_style_bg_image_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); +void lv_obj_set_style_bg_image_tiled(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector); void lv_obj_set_style_border_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector); void lv_obj_set_style_border_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); void lv_obj_set_style_border_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); @@ -760,9 +760,9 @@ void lv_obj_set_style_shadow_ofs_y(struct _lv_obj_t * obj, lv_coord_t value, lv_ void lv_obj_set_style_shadow_spread(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); void lv_obj_set_style_shadow_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector); void lv_obj_set_style_shadow_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); -void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); -void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector); -void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); +void lv_obj_set_style_image_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); +void lv_obj_set_style_image_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector); +void lv_obj_set_style_image_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); void lv_obj_set_style_line_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); void lv_obj_set_style_line_dash_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); void lv_obj_set_style_line_dash_gap(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); @@ -773,7 +773,7 @@ void lv_obj_set_style_arc_width(struct _lv_obj_t * obj, lv_coord_t value, lv_sty void lv_obj_set_style_arc_rounded(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector); void lv_obj_set_style_arc_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector); void lv_obj_set_style_arc_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); -void lv_obj_set_style_arc_img_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector); +void lv_obj_set_style_arc_image_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector); void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector); void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); void lv_obj_set_style_text_font(struct _lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector); diff --git a/src/core/lv_refr.c b/src/core/lv_refr.c index 83ade47f5..e07ee4f35 100644 --- a/src/core/lv_refr.c +++ b/src/core/lv_refr.c @@ -169,8 +169,8 @@ void lv_obj_redraw(lv_layer_t * layer, lv_obj_t * obj) mask_draw_dsc.radius = radius; mask_draw_dsc.area = obj->coords; - lv_draw_img_dsc_t img_draw_dsc; - lv_draw_img_dsc_init(&img_draw_dsc); + lv_draw_image_dsc_t img_draw_dsc; + lv_draw_image_dsc_init(&img_draw_dsc); int32_t short_side = LV_MIN(lv_area_get_width(&obj->coords), lv_area_get_height(&obj->coords)); int32_t rout = LV_MIN(radius, short_side >> 1); @@ -836,8 +836,8 @@ void refr_obj(lv_layer_t * layer, lv_obj_t * obj) area_need_alpha ? LV_COLOR_FORMAT_ARGB8888 : LV_COLOR_FORMAT_NATIVE, &layer_area_act); lv_obj_redraw(new_layer, obj); - lv_draw_img_dsc_t layer_draw_dsc; - lv_draw_img_dsc_init(&layer_draw_dsc); + lv_draw_image_dsc_t layer_draw_dsc; + lv_draw_image_dsc_init(&layer_draw_dsc); layer_draw_dsc.pivot.x = obj->coords.x1 + lv_obj_get_style_transform_pivot_x(obj, 0) - new_layer->draw_buf_ofs.x; layer_draw_dsc.pivot.y = obj->coords.y1 + lv_obj_get_style_transform_pivot_y(obj, 0) - new_layer->draw_buf_ofs.y; diff --git a/src/draw/lv_draw.c b/src/draw/lv_draw.c index 88c0e197e..865b2c089 100644 --- a/src/draw/lv_draw.c +++ b/src/draw/lv_draw.c @@ -152,8 +152,8 @@ bool lv_draw_dispatch_layer(struct _lv_disp_t * disp, lv_layer_t * layer) /*If it was layer drawing free the layer too*/ if(t->type == LV_DRAW_TASK_TYPE_LAYER) { - lv_draw_img_dsc_t * draw_img_dsc = t->draw_dsc; - lv_layer_t * layer_drawn = (lv_layer_t *)draw_img_dsc->src; + lv_draw_image_dsc_t * draw_image_dsc = t->draw_dsc; + lv_layer_t * layer_drawn = (lv_layer_t *)draw_image_dsc->src; if(lv_draw_buf_get_buf(&layer_drawn->draw_buf)) { uint32_t layer_size_byte = layer_drawn->draw_buf.height * lv_draw_buf_width_to_stride(layer_drawn->draw_buf.width, @@ -204,7 +204,7 @@ bool lv_draw_dispatch_layer(struct _lv_disp_t * disp, lv_layer_t * layer) lv_draw_task_t * t_src = layer->parent->draw_task_head; while(t_src) { if(t_src->type == LV_DRAW_TASK_TYPE_LAYER && t_src->state == LV_DRAW_TASK_STATE_WAITING) { - lv_draw_img_dsc_t * draw_dsc = t_src->draw_dsc; + lv_draw_image_dsc_t * draw_dsc = t_src->draw_dsc; if(draw_dsc->src == layer) { t_src->state = LV_DRAW_TASK_STATE_QUEUED; lv_draw_dispatch_request(); diff --git a/src/draw/lv_draw.h b/src/draw/lv_draw.h index 73fef3574..4be17ca88 100644 --- a/src/draw/lv_draw.h +++ b/src/draw/lv_draw.h @@ -18,8 +18,8 @@ extern "C" { #include "../misc/lv_style.h" #include "../misc/lv_txt.h" #include "../misc/lv_profiler.h" -#include "lv_img_decoder.h" -#include "lv_img_cache.h" +#include "lv_image_decoder.h" +#include "lv_image_cache.h" #include "../osal/lv_os.h" #include "lv_draw_buf.h" @@ -32,7 +32,7 @@ extern "C" { * TYPEDEFS **********************/ -struct _lv_draw_img_dsc_t; +struct _lv_draw_image_dsc_t; struct _lv_disp_t; typedef enum { @@ -247,7 +247,7 @@ void * lv_draw_layer_alloc_buf(lv_layer_t * layer); *********************/ #include "lv_draw_rect.h" #include "lv_draw_label.h" -#include "lv_draw_img.h" +#include "lv_draw_image.h" #include "lv_draw_arc.h" #include "lv_draw_line.h" #include "lv_draw_triangle.h" diff --git a/src/draw/lv_draw_img.c b/src/draw/lv_draw_image.c similarity index 64% rename from src/draw/lv_draw_img.c rename to src/draw/lv_draw_image.c index 3040a11d5..77f661ae2 100644 --- a/src/draw/lv_draw_img.c +++ b/src/draw/lv_draw_image.c @@ -6,8 +6,8 @@ /********************* * INCLUDES *********************/ -#include "lv_draw_img.h" -#include "lv_img_cache.h" +#include "lv_draw_image.h" +#include "lv_image_cache.h" #include "../disp/lv_disp.h" #include "../misc/lv_log.h" #include "../misc/lv_math.h" @@ -39,9 +39,9 @@ * GLOBAL FUNCTIONS **********************/ -void lv_draw_img_dsc_init(lv_draw_img_dsc_t * dsc) +void lv_draw_image_dsc_init(lv_draw_image_dsc_t * dsc) { - lv_memzero(dsc, sizeof(lv_draw_img_dsc_t)); + lv_memzero(dsc, sizeof(lv_draw_image_dsc_t)); dsc->recolor = lv_color_black(); dsc->opa = LV_OPA_COVER; dsc->zoom = LV_ZOOM_NONE; @@ -49,7 +49,7 @@ void lv_draw_img_dsc_init(lv_draw_img_dsc_t * dsc) } -void lv_draw_layer(lv_layer_t * layer, const lv_draw_img_dsc_t * dsc, const lv_area_t * coords) +void lv_draw_layer(lv_layer_t * layer, const lv_draw_image_dsc_t * dsc, const lv_area_t * coords) { lv_draw_task_t * t = lv_draw_add_task(layer, coords); @@ -65,7 +65,7 @@ void lv_draw_layer(lv_layer_t * layer, const lv_draw_img_dsc_t * dsc, const lv_a } -void lv_draw_img(lv_layer_t * layer, const lv_draw_img_dsc_t * dsc, const lv_area_t * coords) +void lv_draw_image(lv_layer_t * layer, const lv_draw_image_dsc_t * dsc, const lv_area_t * coords) { if(dsc->src == NULL) { LV_LOG_WARN("Image draw: src is NULL"); @@ -76,17 +76,17 @@ void lv_draw_img(lv_layer_t * layer, const lv_draw_img_dsc_t * dsc, const lv_are LV_PROFILER_BEGIN; - lv_draw_img_dsc_t * new_img_dsc = lv_malloc(sizeof(*dsc)); - lv_memcpy(new_img_dsc, dsc, sizeof(*dsc)); - lv_res_t res = lv_img_decoder_get_info(new_img_dsc->src, &new_img_dsc->header); + lv_draw_image_dsc_t * new_image_dsc = lv_malloc(sizeof(*dsc)); + lv_memcpy(new_image_dsc, dsc, sizeof(*dsc)); + lv_res_t res = lv_image_decoder_get_info(new_image_dsc->src, &new_image_dsc->header); if(res != LV_RES_OK) { LV_LOG_WARN("Couldn't get info about the image"); - lv_free(new_img_dsc); + lv_free(new_image_dsc); return; } lv_draw_task_t * t = lv_draw_add_task(layer, coords); - t->draw_dsc = new_img_dsc; + t->draw_dsc = new_image_dsc; t->type = LV_DRAW_TASK_TYPE_IMAGE; lv_draw_finalize_task_creation(layer, t); @@ -96,30 +96,30 @@ void lv_draw_img(lv_layer_t * layer, const lv_draw_img_dsc_t * dsc, const lv_are /** * Get the type of an image source * @param src pointer to an image source: - * - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code) + * - pointer to an 'lv_image_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. LV_SYMBOL_CLOSE) - * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN + * @return type of the image source LV_IMAGE_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN */ -lv_img_src_t lv_img_src_get_type(const void * src) +lv_image_src_t lv_image_src_get_type(const void * src) { - lv_img_src_t img_src_type = LV_IMG_SRC_UNKNOWN; + lv_image_src_t img_src_type = LV_IMAGE_SRC_UNKNOWN; if(src == NULL) return img_src_type; const uint8_t * u8_p = 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_IMAGE_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_IMAGE_SRC_SYMBOL; /*Symbols begins after 0x7F*/ } else { - img_src_type = LV_IMG_SRC_VARIABLE; /*`lv_img_dsc_t` is draw to the first byte < 0x20*/ + img_src_type = LV_IMAGE_SRC_VARIABLE; /*`lv_image_dsc_t` is draw to the first byte < 0x20*/ } - if(LV_IMG_SRC_UNKNOWN == img_src_type) { + if(LV_IMAGE_SRC_UNKNOWN == img_src_type) { LV_LOG_WARN("unknown image type"); } diff --git a/src/draw/lv_draw_img.h b/src/draw/lv_draw_image.h similarity index 61% rename from src/draw/lv_draw_img.h rename to src/draw/lv_draw_image.h index 4bf56bc49..e14a8d866 100644 --- a/src/draw/lv_draw_img.h +++ b/src/draw/lv_draw_image.h @@ -3,8 +3,8 @@ * */ -#ifndef LV_DRAW_IMG_H -#define LV_DRAW_IMG_H +#ifndef LV_DRAW_IMAGE_H +#define LV_DRAW_IMAGE_H #ifdef __cplusplus extern "C" { @@ -14,8 +14,8 @@ extern "C" { * INCLUDES *********************/ #include "lv_draw.h" -#include "lv_img_decoder.h" -#include "lv_img_buf.h" +#include "lv_image_decoder.h" +#include "lv_image_buf.h" #include "../misc/lv_style.h" /********************* @@ -34,13 +34,13 @@ typedef struct { lv_color_t alpha_color; const lv_color32_t * palette; uint32_t palette_size : 9; -} lv_draw_img_sup_t; +} lv_draw_image_sup_t; -typedef struct _lv_draw_img_dsc_t { +typedef struct _lv_draw_image_dsc_t { lv_draw_dsc_base_t base; const void * src; - lv_img_header_t header; + lv_image_header_t header; lv_coord_t angle; @@ -56,8 +56,8 @@ typedef struct _lv_draw_img_dsc_t { int32_t frame_id; uint16_t antialias : 1; - lv_draw_img_sup_t * sup; -} lv_draw_img_dsc_t; + lv_draw_image_sup_t * sup; +} lv_draw_image_dsc_t; struct _lv_layer_t; @@ -65,32 +65,32 @@ struct _lv_layer_t; * GLOBAL PROTOTYPES **********************/ -void lv_draw_img_dsc_init(lv_draw_img_dsc_t * dsc); +void lv_draw_image_dsc_init(lv_draw_image_dsc_t * dsc); /** * Draw an image * @param draw_ctx pointer to the current draw context - * @param dsc pointer to an initialized `lv_draw_img_dsc_t` variable + * @param dsc pointer to an initialized `lv_draw_image_dsc_t` variable * @param coords the coordinates of the image * @param src pointer to a lv_color_t array which contains the pixels of the image */ -void lv_draw_img(struct _lv_layer_t * layer, const lv_draw_img_dsc_t * dsc, const lv_area_t * coords); +void lv_draw_image(struct _lv_layer_t * layer, const lv_draw_image_dsc_t * dsc, const lv_area_t * coords); -void lv_draw_layer(struct _lv_layer_t * layer, const lv_draw_img_dsc_t * dsc, const lv_area_t * coords); +void lv_draw_layer(struct _lv_layer_t * layer, const lv_draw_image_dsc_t * dsc, const lv_area_t * coords); /** * Get the type of an image source * @param src pointer to an image source: - * - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code) + * - pointer to an 'lv_image_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. LV_SYMBOL_CLOSE) - * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN + * @return type of the image source LV_IMAGE_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN */ -lv_img_src_t lv_img_src_get_type(const void * src); +lv_image_src_t lv_image_src_get_type(const void * src); #ifdef __cplusplus } /*extern "C"*/ #endif -#endif /*LV_DRAW_IMG_H*/ +#endif /*LV_DRAW_IMAGE_H*/ diff --git a/src/draw/lv_draw_rect.c b/src/draw/lv_draw_rect.c index 223ceac99..376187cd5 100644 --- a/src/draw/lv_draw_rect.c +++ b/src/draw/lv_draw_rect.c @@ -46,9 +46,9 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc) dsc->bg_grad.stops_count = 2; dsc->border_color = lv_color_black(); dsc->shadow_color = lv_color_black(); - dsc->bg_img_symbol_font = LV_FONT_DEFAULT; + dsc->bg_image_symbol_font = LV_FONT_DEFAULT; dsc->bg_opa = LV_OPA_COVER; - dsc->bg_img_opa = LV_OPA_COVER; + dsc->bg_image_opa = LV_OPA_COVER; dsc->outline_opa = LV_OPA_COVER; dsc->border_opa = LV_OPA_COVER; dsc->shadow_opa = LV_OPA_COVER; @@ -74,7 +74,7 @@ void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t * dsc) dsc->opa = LV_OPA_COVER; } -void lv_draw_bg_img_dsc_init(lv_draw_bg_img_dsc_t * dsc) +void lv_draw_bg_image_dsc_init(lv_draw_bg_image_dsc_t * dsc) { lv_memzero(dsc, sizeof(*dsc)); dsc->opa = LV_OPA_COVER; @@ -104,7 +104,7 @@ void lv_draw_rect(lv_layer_t * layer, const lv_draw_rect_dsc_t * dsc, const lv_a if(dsc->bg_opa <= LV_OPA_MIN) has_fill = false; else has_fill = true; - if(dsc->bg_img_opa <= LV_OPA_MIN || dsc->bg_img_src == NULL) has_bg_img = false; + if(dsc->bg_image_opa <= LV_OPA_MIN || dsc->bg_image_src == NULL) has_bg_img = false; else has_bg_img = true; if(dsc->border_opa <= LV_OPA_MIN || dsc->border_width == 0 || dsc->border_post == true) has_border = false; @@ -175,13 +175,13 @@ void lv_draw_rect(lv_layer_t * layer, const lv_draw_rect_dsc_t * dsc, const lv_a t = lv_draw_add_task(layer, coords); - lv_img_src_t src_type = lv_img_src_get_type(dsc->bg_img_src); + lv_image_src_t src_type = lv_image_src_get_type(dsc->bg_image_src); lv_res_t res = LV_RES_OK; - lv_img_header_t header; - if(src_type == LV_IMG_SRC_VARIABLE || src_type == LV_IMG_SRC_FILE) { - res = lv_img_decoder_get_info(dsc->bg_img_src, &header); + lv_image_header_t header; + if(src_type == LV_IMAGE_SRC_VARIABLE || src_type == LV_IMAGE_SRC_FILE) { + res = lv_image_decoder_get_info(dsc->bg_image_src, &header); } - else if(src_type == LV_IMG_SRC_UNKNOWN) { + else if(src_type == LV_IMAGE_SRC_UNKNOWN) { res = LV_RES_INV; } else { @@ -189,17 +189,17 @@ void lv_draw_rect(lv_layer_t * layer, const lv_draw_rect_dsc_t * dsc, const lv_a } if(res == LV_RES_OK) { - lv_draw_bg_img_dsc_t * bg_img_dsc = lv_malloc(sizeof(lv_draw_bg_img_dsc_t)); - t->draw_dsc = bg_img_dsc; - bg_img_dsc->base = dsc->base; - bg_img_dsc->radius = dsc->radius; - bg_img_dsc->src = dsc->bg_img_src; - bg_img_dsc->font = dsc->bg_img_symbol_font; - bg_img_dsc->opa = dsc->bg_img_opa; - bg_img_dsc->recolor = dsc->bg_img_recolor; - bg_img_dsc->recolor_opa = dsc->bg_img_recolor_opa; - bg_img_dsc->tiled = dsc->bg_img_tiled; - bg_img_dsc->img_header = header; + lv_draw_bg_image_dsc_t * bg_image_dsc = lv_malloc(sizeof(lv_draw_bg_image_dsc_t)); + t->draw_dsc = bg_image_dsc; + bg_image_dsc->base = dsc->base; + bg_image_dsc->radius = dsc->radius; + bg_image_dsc->src = dsc->bg_image_src; + bg_image_dsc->font = dsc->bg_image_symbol_font; + bg_image_dsc->opa = dsc->bg_image_opa; + bg_image_dsc->recolor = dsc->bg_image_recolor; + bg_image_dsc->recolor_opa = dsc->bg_image_recolor_opa; + bg_image_dsc->tiled = dsc->bg_image_tiled; + bg_image_dsc->img_header = header; t->type = LV_DRAW_TASK_TYPE_BG_IMG; lv_draw_finalize_task_creation(layer, t); } diff --git a/src/draw/lv_draw_rect.h b/src/draw/lv_draw_rect.h index 64c6bf234..8e82c335f 100644 --- a/src/draw/lv_draw_rect.h +++ b/src/draw/lv_draw_rect.h @@ -40,12 +40,12 @@ typedef struct { lv_grad_dsc_t bg_grad; /*Background img*/ - const void * bg_img_src; - const void * bg_img_symbol_font; - lv_color_t bg_img_recolor; - lv_opa_t bg_img_opa; - lv_opa_t bg_img_recolor_opa; - uint8_t bg_img_tiled; + const void * bg_image_src; + const void * bg_image_symbol_font; + lv_color_t bg_image_recolor; + lv_opa_t bg_image_opa; + lv_opa_t bg_image_recolor_opa; + uint8_t bg_image_tiled; /*Border*/ lv_color_t border_color; @@ -89,9 +89,9 @@ typedef struct { lv_color_t recolor; lv_opa_t opa; lv_opa_t recolor_opa; - lv_img_header_t img_header; /*To make it easier for draw_unit to decide if they can draw this image */ + lv_image_header_t img_header; /*To make it easier for draw_unit to decide if they can draw this image */ uint8_t tiled : 1; -} lv_draw_bg_img_dsc_t; +} lv_draw_bg_image_dsc_t; typedef struct { lv_draw_dsc_base_t base; @@ -131,7 +131,7 @@ void lv_draw_border_dsc_init(lv_draw_border_dsc_t * dsc); void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t * dsc); -void lv_draw_bg_img_dsc_init(lv_draw_bg_img_dsc_t * dsc); +void lv_draw_bg_image_dsc_init(lv_draw_bg_image_dsc_t * dsc); /** diff --git a/src/draw/lv_img_buf.c b/src/draw/lv_image_buf.c similarity index 82% rename from src/draw/lv_img_buf.c rename to src/draw/lv_image_buf.c index ac74815c5..2fb224f0d 100644 --- a/src/draw/lv_img_buf.c +++ b/src/draw/lv_image_buf.c @@ -1,5 +1,5 @@ /** - * @file lv_img_buf.c + * @file lv_image_buf.c * */ @@ -8,8 +8,8 @@ *********************/ #include #include -#include "lv_img_buf.h" -#include "lv_draw_img.h" +#include "lv_image_buf.h" +#include "lv_draw_image.h" #include "../misc/lv_math.h" #include "../misc/lv_log.h" #include "../stdlib/lv_mem.h" @@ -39,7 +39,7 @@ * GLOBAL FUNCTIONS **********************/ -void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color32_t c) +void lv_image_buf_set_palette(lv_image_dsc_t * dsc, uint8_t id, lv_color32_t c) { if(dsc->header.cf < LV_COLOR_FORMAT_I1 || dsc->header.cf > LV_COLOR_FORMAT_I8) { LV_LOG_WARN("Not indexed color format"); @@ -49,7 +49,7 @@ void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color32_t c) lv_memcpy(&buf[id * sizeof(c)], &c, sizeof(c)); } -void lv_img_buf_free(lv_img_dsc_t * dsc) +void lv_image_buf_free(lv_image_dsc_t * dsc) { if(dsc != NULL) { if(dsc->data != NULL) @@ -59,8 +59,8 @@ void lv_img_buf_free(lv_img_dsc_t * dsc) } } -void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t h, lv_coord_t angle, uint16_t zoom, - const lv_point_t * pivot) +void _lv_image_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t h, lv_coord_t angle, uint16_t zoom, + const lv_point_t * pivot) { if(angle == 0 && zoom == LV_ZOOM_NONE) { res->x1 = 0; diff --git a/src/draw/lv_img_buf.h b/src/draw/lv_image_buf.h similarity index 60% rename from src/draw/lv_img_buf.h rename to src/draw/lv_image_buf.h index d128bf352..e38be06e6 100644 --- a/src/draw/lv_img_buf.h +++ b/src/draw/lv_image_buf.h @@ -1,10 +1,10 @@ /** - * @file lv_img_buf.h + * @file lv_image_buf.h * */ -#ifndef LV_IMG_BUF_H -#define LV_IMG_BUF_H +#ifndef LV_IMAGE_BUF_H +#define LV_IMAGE_BUF_H #ifdef __cplusplus extern "C" { @@ -21,21 +21,21 @@ extern "C" { * DEFINES *********************/ -#define LV_IMG_BUF_SIZE_TRUE_COLOR(w, h) ((LV_COLOR_DEPTH / 8) * (w) * (h)) -#define LV_IMG_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) ((LV_COLOR_DEPTH / 8) * (w) * (h)) -#define LV_IMG_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) (_LV_COLOR_NATIVE_WITH_ALPHA_SIZE * (w) * (h)) +#define LV_IMAGE_BUF_SIZE_TRUE_COLOR(w, h) ((LV_COLOR_DEPTH / 8) * (w) * (h)) +#define LV_IMAGE_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) ((LV_COLOR_DEPTH / 8) * (w) * (h)) +#define LV_IMAGE_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) (_LV_COLOR_NATIVE_WITH_ALPHA_SIZE * (w) * (h)) /*+ 1: to be sure no fractional row*/ -#define LV_IMG_BUF_SIZE_ALPHA_1BIT(w, h) (((((w) + 7) / 8) * (h))) -#define LV_IMG_BUF_SIZE_ALPHA_2BIT(w, h) (((((w) + 3) / 4) * (h))) -#define LV_IMG_BUF_SIZE_ALPHA_4BIT(w, h) (((((w) + 1 ) / 2) * (h))) -#define LV_IMG_BUF_SIZE_ALPHA_8BIT(w, h) (((w) * (h))) +#define LV_IMAGE_BUF_SIZE_ALPHA_1BIT(w, h) (((((w) + 7) / 8) * (h))) +#define LV_IMAGE_BUF_SIZE_ALPHA_2BIT(w, h) (((((w) + 3) / 4) * (h))) +#define LV_IMAGE_BUF_SIZE_ALPHA_4BIT(w, h) (((((w) + 1 ) / 2) * (h))) +#define LV_IMAGE_BUF_SIZE_ALPHA_8BIT(w, h) (((w) * (h))) /*4 * X: for palette*/ -#define LV_IMG_BUF_SIZE_INDEXED_1BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_1BIT((w), (h)) + 4 * 2) -#define LV_IMG_BUF_SIZE_INDEXED_2BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_2BIT((w), (h)) + 4 * 4) -#define LV_IMG_BUF_SIZE_INDEXED_4BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_4BIT((w), (h)) + 4 * 16) -#define LV_IMG_BUF_SIZE_INDEXED_8BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_8BIT((w), (h)) + 4 * 256) +#define LV_IMAGE_BUF_SIZE_INDEXED_1BIT(w, h) (LV_IMAGE_BUF_SIZE_ALPHA_1BIT((w), (h)) + 4 * 2) +#define LV_IMAGE_BUF_SIZE_INDEXED_2BIT(w, h) (LV_IMAGE_BUF_SIZE_ALPHA_2BIT((w), (h)) + 4 * 4) +#define LV_IMAGE_BUF_SIZE_INDEXED_4BIT(w, h) (LV_IMAGE_BUF_SIZE_ALPHA_4BIT((w), (h)) + 4 * 16) +#define LV_IMAGE_BUF_SIZE_INDEXED_8BIT(w, h) (LV_IMAGE_BUF_SIZE_ALPHA_8BIT((w), (h)) + 4 * 256) #define _LV_ZOOM_INV_UPSCALE 5 @@ -44,7 +44,7 @@ extern "C" { **********************/ /** * 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 + * For more info see `lv_image_get_src_type()` in lv_img.c * On big endian systems the order is reversed so cf and always_zero must be at * the end of the struct. */ @@ -58,7 +58,7 @@ typedef struct { non-printable character*/ uint32_t cf : 5; /*Color format: See `lv_color_format_t`*/ -} lv_img_header_t; +} lv_image_header_t; #else typedef struct { uint32_t cf : 5; /*Color format: See `lv_color_format_t`*/ @@ -73,38 +73,38 @@ typedef struct { uint32_t h: 16; uint32_t stride: 16; /*Number of bytes in a row*/ uint32_t reserved_2: 16; /*Reserved to be used later*/ -} lv_img_header_t; +} lv_image_header_t; #endif /** Image header it is compatible with * the result from image converter utility*/ typedef struct { - lv_img_header_t header; /**< A header describing the basics of the image*/ + lv_image_header_t header; /**< A header describing the basics of the image*/ uint32_t data_size; /**< Size of the image in bytes*/ const uint8_t * data; /**< Pointer to the data of the image*/ -} lv_img_dsc_t; +} lv_image_dsc_t; /********************** * GLOBAL PROTOTYPES **********************/ /** - * Set the palette color of an indexed image. Valid only for `LV_IMG_CF_INDEXED1/2/4/8` + * Set the palette color of an indexed image. Valid only for `LV_IMAGE_CF_INDEXED1/2/4/8` * @param dsc pointer to an image descriptor * @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 + * - for `LV_IMAGE_CF_INDEXED1`: 0..1 + * - for `LV_IMAGE_CF_INDEXED2`: 0..3 + * - for `LV_IMAGE_CF_INDEXED4`: 0..15 + * - for `LV_IMAGE_CF_INDEXED8`: 0..255 * @param c the color to set in lv_color32_t format */ -void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color32_t c); +void lv_image_buf_set_palette(lv_image_dsc_t * dsc, uint8_t id, lv_color32_t c); /** * Free an allocated image buffer * @param dsc image buffer to free */ -void lv_img_buf_free(lv_img_dsc_t * dsc); +void lv_image_buf_free(lv_image_dsc_t * dsc); /** * Get the area of a rectangle if its rotated and scaled @@ -115,8 +115,8 @@ void lv_img_buf_free(lv_img_dsc_t * dsc); * @param zoom zoom, (256 no zoom) * @param pivot x,y pivot coordinates of rotation */ -void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t h, lv_coord_t angle, uint16_t zoom, - const lv_point_t * pivot); +void _lv_image_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t h, lv_coord_t angle, uint16_t zoom, + const lv_point_t * pivot); /********************** * MACROS @@ -126,4 +126,4 @@ void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t } /*extern "C"*/ #endif -#endif /*LV_IMG_BUF_H*/ +#endif /*LV_IMAGE_BUF_H*/ diff --git a/src/draw/lv_img_cache.c b/src/draw/lv_image_cache.c similarity index 66% rename from src/draw/lv_img_cache.c rename to src/draw/lv_image_cache.c index 985d68620..ccf9cb4d7 100644 --- a/src/draw/lv_img_cache.c +++ b/src/draw/lv_image_cache.c @@ -1,12 +1,12 @@ /** - * @file lv_img_cache.c + * @file lv_image_cache.c * */ /********************* * INCLUDES *********************/ -#include "lv_img_cache.h" +#include "lv_image_cache.h" #include "../stdlib/lv_string.h" #include "../core/lv_global.h" @@ -35,31 +35,31 @@ * GLOBAL FUNCTIONS **********************/ -void lv_img_cache_manager_init(lv_img_cache_manager_t * manager) +void lv_image_cache_manager_init(lv_image_cache_manager_t * manager) { LV_ASSERT_NULL(manager); - lv_memzero(manager, sizeof(lv_img_cache_manager_t)); + lv_memzero(manager, sizeof(lv_image_cache_manager_t)); } -void lv_img_cache_manager_apply(const lv_img_cache_manager_t * manager) +void lv_image_cache_manager_apply(const lv_image_cache_manager_t * manager) { LV_ASSERT_NULL(manager); - lv_memcpy(&img_cache_manager, manager, sizeof(lv_img_cache_manager_t)); + lv_memcpy(&img_cache_manager, manager, sizeof(lv_image_cache_manager_t)); } -_lv_img_cache_entry_t * _lv_img_cache_open(const void * src, lv_color_t color, int32_t frame_id) +_lv_image_cache_entry_t * _lv_image_cache_open(const void * src, lv_color_t color, int32_t frame_id) { LV_ASSERT_NULL(img_cache_manager.open_cb); return img_cache_manager.open_cb(src, color, frame_id); } -void lv_img_cache_set_size(uint16_t new_entry_cnt) +void lv_image_cache_set_size(uint16_t new_entry_cnt) { LV_ASSERT_NULL(img_cache_manager.set_size_cb); img_cache_manager.set_size_cb(new_entry_cnt); } -void lv_img_cache_invalidate_src(const void * src) +void lv_image_cache_invalidate_src(const void * src) { LV_ASSERT_NULL(img_cache_manager.invalidate_src_cb); img_cache_manager.invalidate_src_cb(src); diff --git a/src/draw/lv_img_cache.h b/src/draw/lv_image_cache.h similarity index 70% rename from src/draw/lv_img_cache.h rename to src/draw/lv_image_cache.h index 5ecb5fcd2..40ebdd7de 100644 --- a/src/draw/lv_img_cache.h +++ b/src/draw/lv_image_cache.h @@ -1,10 +1,10 @@ /** - * @file lv_img_cache.h + * @file lv_image_cache.h * */ -#ifndef LV_IMG_CACHE_H -#define LV_IMG_CACHE_H +#ifndef LV_IMAGE_CACHE_H +#define LV_IMAGE_CACHE_H #ifdef __cplusplus extern "C" { @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#include "lv_img_decoder.h" +#include "lv_image_decoder.h" /********************* * DEFINES @@ -29,15 +29,15 @@ extern "C" { * To avoid repeating this heavy load images can be cached. */ typedef struct { - lv_img_decoder_dsc_t dec_dsc; /**< Image information*/ + lv_image_decoder_dsc_t dec_dsc; /**< Image information*/ void * user_data; /**< Image cache entry user data*/ -} _lv_img_cache_entry_t; +} _lv_image_cache_entry_t; typedef struct { - _lv_img_cache_entry_t * (*open_cb)(const void * src, lv_color_t color, int32_t frame_id); + _lv_image_cache_entry_t * (*open_cb)(const void * src, lv_color_t color, int32_t frame_id); void (*set_size_cb)(uint16_t new_entry_cnt); void (*invalidate_src_cb)(const void * src); -} lv_img_cache_manager_t; +} lv_image_cache_manager_t; /********************** * GLOBAL PROTOTYPES @@ -47,24 +47,24 @@ typedef struct { * Initialize the img cache manager * @param manager Pointer to the img cache manager */ -void lv_img_cache_manager_init(lv_img_cache_manager_t * manager); +void lv_image_cache_manager_init(lv_image_cache_manager_t * manager); /** * Apply the img cache manager * @param manager Pointer to the img cache manager */ -void lv_img_cache_manager_apply(const lv_img_cache_manager_t * manager); +void lv_image_cache_manager_apply(const lv_image_cache_manager_t * manager); /** * Open an image using the image decoder interface and cache it. * The image will be left open meaning if the image decoder open callback allocated memory then it will remain. * The image is closed if a new image is opened and the new image takes its place in the cache. - * @param src source of the image. Path to file or pointer to an `lv_img_dsc_t` variable - * @param color The color of the image with `LV_IMG_CF_ALPHA_...` + * @param src source of the image. Path to file or pointer to an `lv_image_dsc_t` variable + * @param color The color of the image with `LV_IMAGE_CF_ALPHA_...` * @param frame_id the index of the frame. Used only with animated images, set 0 for normal images * @return pointer to the cache entry or NULL if can open the image */ -_lv_img_cache_entry_t * _lv_img_cache_open(const void * src, lv_color_t color, int32_t frame_id); +_lv_image_cache_entry_t * _lv_image_cache_open(const void * src, lv_color_t color, int32_t frame_id); /** * Set the number of images to be cached. @@ -72,14 +72,14 @@ _lv_img_cache_entry_t * _lv_img_cache_open(const void * src, lv_color_t color, i * E.g. if 20 PNG or JPG images are open in the RAM they consume memory while opened in the cache. * @param new_entry_cnt number of image to cache */ -void lv_img_cache_set_size(uint16_t new_entry_cnt); +void lv_image_cache_set_size(uint16_t new_entry_cnt); /** * Invalidate an image source in the cache. * Useful if the image source is updated therefore it needs to be cached again. - * @param src an image source path to a file or pointer to an `lv_img_dsc_t` variable. + * @param src an image source path to a file or pointer to an `lv_image_dsc_t` variable. */ -void lv_img_cache_invalidate_src(const void * src); +void lv_image_cache_invalidate_src(const void * src); /********************** * MACROS @@ -89,4 +89,4 @@ void lv_img_cache_invalidate_src(const void * src); } /*extern "C"*/ #endif -#endif /*LV_IMG_CACHE_H*/ +#endif /*LV_IMAGE_CACHE_H*/ diff --git a/src/draw/lv_img_cache_builtin.c b/src/draw/lv_image_cache_builtin.c similarity index 59% rename from src/draw/lv_img_cache_builtin.c rename to src/draw/lv_image_cache_builtin.c index 8a7cdfa93..e7fb297ac 100644 --- a/src/draw/lv_img_cache_builtin.c +++ b/src/draw/lv_image_cache_builtin.c @@ -1,15 +1,15 @@ /** - * @file lv_img_cache_builtin.c + * @file lv_image_cache_builtin.c * */ /********************* * INCLUDES *********************/ -#include "lv_img_cache.h" -#include "lv_img_cache_builtin.h" -#include "lv_img_decoder.h" -#include "lv_draw_img.h" +#include "lv_image_cache.h" +#include "lv_image_cache_builtin.h" +#include "lv_image_decoder.h" +#include "lv_draw_image.h" #include "../tick/lv_tick.h" #include "../misc/lv_assert.h" #include "../core/lv_global.h" @@ -18,29 +18,29 @@ /********************* * DEFINES *********************/ -#if LV_IMG_CACHE_DEF_SIZE +#if LV_IMAGE_CACHE_DEF_SIZE #define entry_cnt LV_GLOBAL_DEFAULT()->img_cache_entry_cnt - #define _img_cache_array LV_GLOBAL_DEFAULT()->img_cache_array + #define _image_cache_array LV_GLOBAL_DEFAULT()->img_cache_array #else - #define _img_cache_single LV_GLOBAL_DEFAULT()->img_cache_single + #define _image_cache_single LV_GLOBAL_DEFAULT()->img_cache_single #endif /** Count the cache entries's life. Add `time_to_open` to `life` when the entry is used. - * Decrement all lifes by one every in every ::lv_img_cache_open. + * Decrement all lifes by one every in every ::lv_image_cache_open. * If life == 0 the entry can be reused*/ #define CACHE_GET_LIFE(entry) ((lv_intptr_t)((entry)->user_data)) #define CACHE_SET_LIFE(entry, v) ((entry)->user_data = (void*)((lv_intptr_t)(v))) /*Decrement life with this value on every open*/ -#define LV_IMG_CACHE_AGING 1 +#define LV_IMAGE_CACHE_AGING 1 /*Boost life by this factor (multiply time_to_open with this value)*/ -#define LV_IMG_CACHE_LIFE_GAIN 1 +#define LV_IMAGE_CACHE_LIFE_GAIN 1 /*Don't let life to be greater than this limit because it would require a lot of time to * "die" from very high values*/ -#define LV_IMG_CACHE_LIFE_LIMIT 1000 +#define LV_IMAGE_CACHE_LIFE_LIMIT 1000 /********************** * TYPEDEFS @@ -50,12 +50,12 @@ * STATIC PROTOTYPES **********************/ -static _lv_img_cache_entry_t * _lv_img_cache_open_builtin(const void * src, lv_color_t color, int32_t frame_id); -static void lv_img_cache_set_size_builtin(uint16_t new_entry_cnt); -static void lv_img_cache_invalidate_src_builtin(const void * src); +static _lv_image_cache_entry_t * _lv_image_cache_open_builtin(const void * src, lv_color_t color, int32_t frame_id); +static void lv_image_cache_set_size_builtin(uint16_t new_entry_cnt); +static void lv_image_cache_invalidate_src_builtin(const void * src); -#if LV_IMG_CACHE_DEF_SIZE - static bool lv_img_cache_match(const void * src1, const void * src2); +#if LV_IMAGE_CACHE_DEF_SIZE + static bool lv_image_cache_match(const void * src1, const void * src2); #endif /********************** @@ -70,18 +70,18 @@ static void lv_img_cache_invalidate_src_builtin(const void * src); * GLOBAL FUNCTIONS **********************/ -void _lv_img_cache_builtin_init(void) +void _lv_image_cache_builtin_init(void) { -#if LV_IMG_CACHE_DEF_SIZE - lv_img_cache_set_size_builtin(LV_IMG_CACHE_DEF_SIZE); +#if LV_IMAGE_CACHE_DEF_SIZE + lv_image_cache_set_size_builtin(LV_IMAGE_CACHE_DEF_SIZE); #endif - lv_img_cache_manager_t manager; - lv_img_cache_manager_init(&manager); - manager.open_cb = _lv_img_cache_open_builtin; - manager.set_size_cb = lv_img_cache_set_size_builtin; - manager.invalidate_src_cb = lv_img_cache_invalidate_src_builtin; - lv_img_cache_manager_apply(&manager); + lv_image_cache_manager_t manager; + lv_image_cache_manager_init(&manager); + manager.open_cb = _lv_image_cache_open_builtin; + manager.set_size_cb = lv_image_cache_set_size_builtin; + manager.invalidate_src_cb = lv_image_cache_invalidate_src_builtin; + lv_image_cache_manager_apply(&manager); } /********************** @@ -92,43 +92,43 @@ void _lv_img_cache_builtin_init(void) * Open an image using the image decoder interface and cache it. * The image will be left open meaning if the image decoder open callback allocated memory then it will remain. * The image is closed if a new image is opened and the new image takes its place in the cache. - * @param src source of the image. Path to file or pointer to an `lv_img_dsc_t` variable - * @param color color The color of the image with `LV_IMG_CF_ALPHA_...` + * @param src source of the image. Path to file or pointer to an `lv_image_dsc_t` variable + * @param color color The color of the image with `LV_IMAGE_CF_ALPHA_...` * @return pointer to the cache entry or NULL if can open the image */ -static _lv_img_cache_entry_t * _lv_img_cache_open_builtin(const void * src, lv_color_t color, int32_t frame_id) +static _lv_image_cache_entry_t * _lv_image_cache_open_builtin(const void * src, lv_color_t color, int32_t frame_id) { /*Is the image cached?*/ - _lv_img_cache_entry_t * cached_src = NULL; + _lv_image_cache_entry_t * cached_src = NULL; -#if LV_IMG_CACHE_DEF_SIZE +#if LV_IMAGE_CACHE_DEF_SIZE if(entry_cnt == 0) { LV_LOG_WARN("the cache size is 0"); return NULL; } - _lv_img_cache_entry_t * cache = _img_cache_array; + _lv_image_cache_entry_t * cache = _image_cache_array; /*Decrement all lifes. Make the entries older*/ uint16_t i; for(i = 0; i < entry_cnt; i++) { int32_t life = CACHE_GET_LIFE(&cache[i]); - if(life > INT32_MIN + LV_IMG_CACHE_AGING) { - CACHE_SET_LIFE(&cache[i], life - LV_IMG_CACHE_AGING); + if(life > INT32_MIN + LV_IMAGE_CACHE_AGING) { + CACHE_SET_LIFE(&cache[i], life - LV_IMAGE_CACHE_AGING); } } for(i = 0; i < entry_cnt; i++) { if(lv_color_eq(color, cache[i].dec_dsc.color) && frame_id == cache[i].dec_dsc.frame_id && - lv_img_cache_match(src, cache[i].dec_dsc.src)) { + lv_image_cache_match(src, cache[i].dec_dsc.src)) { /*If opened increment its life. *Image difficult to open should live longer to keep avoid frequent their recaching. *Therefore increase `life` with `time_to_open`*/ cached_src = &cache[i]; int32_t life = CACHE_GET_LIFE(cached_src); - CACHE_SET_LIFE(cached_src, life + cached_src->dec_dsc.time_to_open * LV_IMG_CACHE_LIFE_GAIN); - if(CACHE_GET_LIFE(cached_src) > LV_IMG_CACHE_LIFE_LIMIT) CACHE_SET_LIFE(cached_src, LV_IMG_CACHE_LIFE_LIMIT); + CACHE_SET_LIFE(cached_src, life + cached_src->dec_dsc.time_to_open * LV_IMAGE_CACHE_LIFE_GAIN); + if(CACHE_GET_LIFE(cached_src) > LV_IMAGE_CACHE_LIFE_LIMIT) CACHE_SET_LIFE(cached_src, LV_IMAGE_CACHE_LIFE_LIMIT); LV_LOG_TRACE("image source found in the cache"); break; } @@ -147,21 +147,21 @@ static _lv_img_cache_entry_t * _lv_img_cache_open_builtin(const void * src, lv_c /*Close the decoder to reuse if it was opened (has a valid source)*/ if(cached_src->dec_dsc.src) { - lv_img_decoder_close(&cached_src->dec_dsc); + lv_image_decoder_close(&cached_src->dec_dsc); LV_LOG_INFO("image draw: cache miss, close and reuse an entry"); } else { LV_LOG_INFO("image draw: cache miss, cached to an empty entry"); } #else - cached_src = &(_img_cache_single); + cached_src = &(_image_cache_single); #endif /*Open the image and measure the time to open*/ uint32_t t_start = lv_tick_get(); - lv_res_t open_res = lv_img_decoder_open(&cached_src->dec_dsc, src, color, frame_id); + lv_res_t open_res = lv_image_decoder_open(&cached_src->dec_dsc, src, color, frame_id); if(open_res == LV_RES_INV) { LV_LOG_WARN("Image draw cannot open the image resource"); - lv_memzero(cached_src, sizeof(_lv_img_cache_entry_t)); + lv_memzero(cached_src, sizeof(_lv_image_cache_entry_t)); CACHE_SET_LIFE(cached_src, INT32_MIN); /*Make the empty entry very "weak" to force its us*/ return NULL; } @@ -184,65 +184,65 @@ static _lv_img_cache_entry_t * _lv_img_cache_open_builtin(const void * src, lv_c * E.g. if 20 PNG or JPG images are open in the RAM they consume memory while opened in the cache. * @param new_entry_cnt number of image to cache */ -static void lv_img_cache_set_size_builtin(uint16_t new_entry_cnt) +static void lv_image_cache_set_size_builtin(uint16_t new_entry_cnt) { -#if LV_IMG_CACHE_DEF_SIZE == 0 +#if LV_IMAGE_CACHE_DEF_SIZE == 0 LV_UNUSED(new_entry_cnt); - LV_LOG_WARN("Can't change cache size because it's disabled by LV_IMG_CACHE_DEF_SIZE = 0"); + LV_LOG_WARN("Can't change cache size because it's disabled by LV_IMAGE_CACHE_DEF_SIZE = 0"); #else - if(_img_cache_array != NULL) { + if(_image_cache_array != NULL) { /*Clean the cache before free it*/ - lv_img_cache_invalidate_src_builtin(NULL); - lv_free(_img_cache_array); + lv_image_cache_invalidate_src_builtin(NULL); + lv_free(_image_cache_array); } /*Reallocate the cache*/ - _img_cache_array = lv_malloc(sizeof(_lv_img_cache_entry_t) * new_entry_cnt); - LV_ASSERT_MALLOC(_img_cache_array); - if(_img_cache_array == NULL) { + _image_cache_array = lv_malloc(sizeof(_lv_image_cache_entry_t) * new_entry_cnt); + LV_ASSERT_MALLOC(_image_cache_array); + if(_image_cache_array == NULL) { entry_cnt = 0; return; } entry_cnt = new_entry_cnt; /*Clean the cache*/ - lv_memzero(_img_cache_array, entry_cnt * sizeof(_lv_img_cache_entry_t)); + lv_memzero(_image_cache_array, entry_cnt * sizeof(_lv_image_cache_entry_t)); #endif } /** * Invalidate an image source in the cache. * Useful if the image source is updated therefore it needs to be cached again. - * @param src an image source path to a file or pointer to an `lv_img_dsc_t` variable. + * @param src an image source path to a file or pointer to an `lv_image_dsc_t` variable. */ -static void lv_img_cache_invalidate_src_builtin(const void * src) +static void lv_image_cache_invalidate_src_builtin(const void * src) { LV_UNUSED(src); -#if LV_IMG_CACHE_DEF_SIZE - _lv_img_cache_entry_t * cache = _img_cache_array; +#if LV_IMAGE_CACHE_DEF_SIZE + _lv_image_cache_entry_t * cache = _image_cache_array; uint16_t i; for(i = 0; i < entry_cnt; i++) { - if(src == NULL || lv_img_cache_match(src, cache[i].dec_dsc.src)) { + if(src == NULL || lv_image_cache_match(src, cache[i].dec_dsc.src)) { if(cache[i].dec_dsc.src != NULL) { - lv_img_decoder_close(&cache[i].dec_dsc); + lv_image_decoder_close(&cache[i].dec_dsc); } - lv_memzero(&cache[i], sizeof(_lv_img_cache_entry_t)); + lv_memzero(&cache[i], sizeof(_lv_image_cache_entry_t)); } } #endif } -#if LV_IMG_CACHE_DEF_SIZE -static bool lv_img_cache_match(const void * src1, const void * src2) +#if LV_IMAGE_CACHE_DEF_SIZE +static bool lv_image_cache_match(const void * src1, const void * src2) { - lv_img_src_t src_type = lv_img_src_get_type(src1); - if(src_type == LV_IMG_SRC_VARIABLE) + lv_image_src_t src_type = lv_image_src_get_type(src1); + if(src_type == LV_IMAGE_SRC_VARIABLE) return src1 == src2; - if(src_type != LV_IMG_SRC_FILE) + if(src_type != LV_IMAGE_SRC_FILE) return false; - if(lv_img_src_get_type(src2) != LV_IMG_SRC_FILE) + if(lv_image_src_get_type(src2) != LV_IMAGE_SRC_FILE) return false; return strcmp(src1, src2) == 0; } diff --git a/src/draw/lv_img_cache_builtin.h b/src/draw/lv_image_cache_builtin.h similarity index 70% rename from src/draw/lv_img_cache_builtin.h rename to src/draw/lv_image_cache_builtin.h index 9e4c50297..ca55beffe 100644 --- a/src/draw/lv_img_cache_builtin.h +++ b/src/draw/lv_image_cache_builtin.h @@ -1,10 +1,10 @@ /** - * @file lv_img_cache_builtin.h + * @file lv_image_cache_builtin.h * */ -#ifndef LV_IMG_CACHE_BUILTIN_H -#define LV_IMG_CACHE_BUILTIN_H +#ifndef LV_IMAGE_CACHE_BUILTIN_H +#define LV_IMAGE_CACHE_BUILTIN_H #ifdef __cplusplus extern "C" { @@ -26,7 +26,7 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ -void _lv_img_cache_builtin_init(void); +void _lv_image_cache_builtin_init(void); /********************** * MACROS @@ -36,4 +36,4 @@ void _lv_img_cache_builtin_init(void); } /*extern "C"*/ #endif -#endif /*LV_IMG_CACHE_BUILTIN_H*/ +#endif /*LV_IMAGE_CACHE_BUILTIN_H*/ diff --git a/src/draw/lv_img_decoder.c b/src/draw/lv_image_decoder.c similarity index 78% rename from src/draw/lv_img_decoder.c rename to src/draw/lv_image_decoder.c index 379d05709..4ef24e44b 100644 --- a/src/draw/lv_img_decoder.c +++ b/src/draw/lv_image_decoder.c @@ -1,14 +1,14 @@ /** - * @file lv_img_decoder.c + * @file lv_image_decoder.c * */ /********************* * INCLUDES *********************/ -#include "lv_img_decoder.h" +#include "lv_image_decoder.h" #include "../misc/lv_assert.h" -#include "../draw/lv_draw_img.h" +#include "../draw/lv_draw_image.h" #include "../misc/lv_ll.h" #include "../stdlib/lv_string.h" #include "../core/lv_global.h" @@ -27,7 +27,7 @@ typedef struct { lv_color32_t * palette; uint8_t * img_data; lv_opa_t * opa; -} lv_img_decoder_built_in_data_t; +} lv_image_decoder_built_in_data_t; /********************** * STATIC PROTOTYPES @@ -36,7 +36,7 @@ static lv_res_t decode_indexed_line(lv_color_format_t color_format, const lv_col lv_coord_t y, lv_coord_t w_px, const uint8_t * in, lv_color32_t * out); -static uint32_t img_width_to_stride(lv_img_header_t * header); +static uint32_t img_width_to_stride(lv_image_header_t * header); static lv_fs_res_t fs_read_file_at(lv_fs_file_t * f, uint32_t pos, uint8_t * buff, uint32_t btr, uint32_t * br); /********************** @@ -54,24 +54,24 @@ static lv_fs_res_t fs_read_file_at(lv_fs_file_t * f, uint32_t pos, uint8_t * buf /** * Initialize the image decoder module */ -void _lv_img_decoder_init(void) +void _lv_image_decoder_init(void) { - _lv_ll_init(img_decoder_ll_p, sizeof(lv_img_decoder_t)); + _lv_ll_init(img_decoder_ll_p, sizeof(lv_image_decoder_t)); - lv_img_decoder_t * decoder; + lv_image_decoder_t * decoder; /*Create a decoder for the built in color format*/ - decoder = lv_img_decoder_create(); + decoder = lv_image_decoder_create(); LV_ASSERT_MALLOC(decoder); if(decoder == NULL) { LV_LOG_WARN("out of memory"); 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_get_area_cb(decoder, lv_img_decoder_built_in_get_area); - lv_img_decoder_set_close_cb(decoder, lv_img_decoder_built_in_close); + lv_image_decoder_set_info_cb(decoder, lv_image_decoder_built_in_info); + lv_image_decoder_set_open_cb(decoder, lv_image_decoder_built_in_open); + lv_image_decoder_set_get_area_cb(decoder, lv_image_decoder_built_in_get_area); + lv_image_decoder_set_close_cb(decoder, lv_image_decoder_built_in_close); } /** @@ -81,20 +81,20 @@ void _lv_img_decoder_init(void) * @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 void * src, lv_img_header_t * header) +lv_res_t lv_image_decoder_get_info(const void * src, lv_image_header_t * header) { - lv_memzero(header, sizeof(lv_img_header_t)); + lv_memzero(header, sizeof(lv_image_header_t)); if(src == NULL) return LV_RES_INV; - lv_img_src_t src_type = lv_img_src_get_type(src); - if(src_type == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = src; + lv_image_src_t src_type = lv_image_src_get_type(src); + if(src_type == LV_IMAGE_SRC_VARIABLE) { + const lv_image_dsc_t * img_dsc = src; if(img_dsc->data == NULL) return LV_RES_INV; } lv_res_t res = LV_RES_INV; - lv_img_decoder_t * d; + lv_image_decoder_t * d; _LV_LL_READ(img_decoder_ll_p, d) { if(d->info_cb) { res = d->info_cb(d, src, header); @@ -108,14 +108,14 @@ lv_res_t lv_img_decoder_get_info(const void * src, lv_img_header_t * header) return res; } -lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, lv_color_t color, int32_t frame_id) +lv_res_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src, lv_color_t color, int32_t frame_id) { - lv_memzero(dsc, sizeof(lv_img_decoder_dsc_t)); + lv_memzero(dsc, sizeof(lv_image_decoder_dsc_t)); if(src == NULL) return LV_RES_INV; - lv_img_src_t src_type = lv_img_src_get_type(src); - if(src_type == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = src; + lv_image_src_t src_type = lv_image_src_get_type(src); + if(src_type == LV_IMAGE_SRC_VARIABLE) { + const lv_image_dsc_t * img_dsc = src; if(img_dsc->data == NULL) return LV_RES_INV; } @@ -123,7 +123,7 @@ lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, lv_co dsc->src_type = src_type; dsc->frame_id = frame_id; - if(dsc->src_type == LV_IMG_SRC_FILE) { + if(dsc->src_type == LV_IMAGE_SRC_FILE) { size_t fnlen = lv_strlen(src); dsc->src = lv_malloc(fnlen + 1); LV_ASSERT_MALLOC(dsc->src); @@ -139,7 +139,7 @@ lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, lv_co lv_res_t res = LV_RES_INV; - lv_img_decoder_t * decoder; + lv_image_decoder_t * decoder; _LV_LL_READ(img_decoder_ll_p, decoder) { /*Info and Open callbacks are required*/ if(decoder->info_cb == NULL || decoder->open_cb == NULL) continue; @@ -156,7 +156,7 @@ lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, lv_co if(res == LV_RES_OK) return res; /*Prepare for the next loop*/ - lv_memzero(&dsc->header, sizeof(lv_img_header_t)); + lv_memzero(&dsc->header, sizeof(lv_image_header_t)); dsc->error_msg = NULL; dsc->img_data = NULL; @@ -164,7 +164,7 @@ lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, lv_co dsc->time_to_open = 0; } - if(dsc->src_type == LV_IMG_SRC_FILE) + if(dsc->src_type == LV_IMAGE_SRC_FILE) lv_free((void *)dsc->src); return res; @@ -172,14 +172,14 @@ lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, lv_co /** * Read a line from an opened image - * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open` + * @param dsc pointer to `lv_image_decoder_dsc_t` used in `lv_image_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_get_area(lv_img_decoder_dsc_t * dsc, const lv_area_t * full_area, lv_area_t * decoded_area) +lv_res_t lv_image_decoder_get_area(lv_image_decoder_dsc_t * dsc, const lv_area_t * full_area, lv_area_t * decoded_area) { lv_res_t res = LV_RES_INV; if(dsc->decoder->get_area_cb) res = dsc->decoder->get_area_cb(dsc->decoder, dsc, full_area, decoded_area); @@ -189,14 +189,14 @@ lv_res_t lv_img_decoder_get_area(lv_img_decoder_dsc_t * dsc, const lv_area_t * f /** * Close a decoding session - * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open` + * @param dsc pointer to `lv_image_decoder_dsc_t` used in `lv_image_decoder_open` */ -void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc) +void lv_image_decoder_close(lv_image_decoder_dsc_t * dsc) { if(dsc->decoder) { if(dsc->decoder->close_cb) dsc->decoder->close_cb(dsc->decoder, dsc); - if(dsc->src_type == LV_IMG_SRC_FILE) { + if(dsc->src_type == LV_IMAGE_SRC_FILE) { lv_free((void *)dsc->src); dsc->src = NULL; } @@ -207,14 +207,14 @@ 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) +lv_image_decoder_t * lv_image_decoder_create(void) { - lv_img_decoder_t * decoder; + lv_image_decoder_t * decoder; decoder = _lv_ll_ins_head(img_decoder_ll_p); LV_ASSERT_MALLOC(decoder); if(decoder == NULL) return NULL; - lv_memzero(decoder, sizeof(lv_img_decoder_t)); + lv_memzero(decoder, sizeof(lv_image_decoder_t)); return decoder; } @@ -223,7 +223,7 @@ 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) +void lv_image_decoder_delete(lv_image_decoder_t * decoder) { _lv_ll_remove(img_decoder_ll_p, decoder); lv_free(decoder); @@ -232,9 +232,9 @@ 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) + * @param info_cb a function to collect info about an image (fill an `lv_image_header_t` struct) */ -void lv_img_decoder_set_info_cb(lv_img_decoder_t * decoder, lv_img_decoder_info_f_t info_cb) +void lv_image_decoder_set_info_cb(lv_image_decoder_t * decoder, lv_image_decoder_info_f_t info_cb) { decoder->info_cb = info_cb; } @@ -244,7 +244,7 @@ void lv_img_decoder_set_info_cb(lv_img_decoder_t * decoder, lv_img_decoder_info_ * @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) +void lv_image_decoder_set_open_cb(lv_image_decoder_t * decoder, lv_image_decoder_open_f_t open_cb) { decoder->open_cb = open_cb; } @@ -254,7 +254,7 @@ void lv_img_decoder_set_open_cb(lv_img_decoder_t * decoder, lv_img_decoder_open_ * @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_get_area_cb(lv_img_decoder_t * decoder, lv_img_decoder_get_area_cb_t read_line_cb) +void lv_image_decoder_set_get_area_cb(lv_image_decoder_t * decoder, lv_image_decoder_get_area_cb_t read_line_cb) { decoder->get_area_cb = read_line_cb; } @@ -264,7 +264,7 @@ void lv_img_decoder_set_get_area_cb(lv_img_decoder_t * decoder, lv_img_decoder_g * @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_image_decoder_set_close_cb(lv_image_decoder_t * decoder, lv_image_decoder_close_f_t close_cb) { decoder->close_cb = close_cb; } @@ -272,22 +272,22 @@ void lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_clos /** * Get info about a built-in image * @param decoder the decoder where this function belongs - * @param src the image source: pointer to an `lv_img_dsc_t` variable, a file path or a symbol + * @param src the image source: pointer to an `lv_image_dsc_t` variable, a file path or a symbol * @param header store the image data here * @return LV_RES_OK: the info is successfully stored in `header`; LV_RES_INV: unknown format or other error. */ -lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header) +lv_res_t lv_image_decoder_built_in_info(lv_image_decoder_t * decoder, const void * src, lv_image_header_t * header) { LV_UNUSED(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; - header->h = ((lv_img_dsc_t *)src)->header.h; - header->cf = ((lv_img_dsc_t *)src)->header.cf; - header->stride = ((lv_img_dsc_t *)src)->header.stride; + lv_image_src_t src_type = lv_image_src_get_type(src); + if(src_type == LV_IMAGE_SRC_VARIABLE) { + header->w = ((lv_image_dsc_t *)src)->header.w; + header->h = ((lv_image_dsc_t *)src)->header.h; + header->cf = ((lv_image_dsc_t *)src)->header.cf; + header->stride = ((lv_image_dsc_t *)src)->header.stride; } - else if(src_type == LV_IMG_SRC_FILE) { + else if(src_type == LV_IMAGE_SRC_FILE) { /*Support only "*.bin" files*/ if(strcmp(lv_fs_get_ext(src), "bin")) return LV_RES_INV; @@ -295,15 +295,15 @@ lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * s lv_fs_res_t res = lv_fs_open(&f, src, LV_FS_MODE_RD); if(res == LV_FS_RES_OK) { uint32_t rn; - res = lv_fs_read(&f, header, sizeof(lv_img_header_t), &rn); + res = lv_fs_read(&f, header, sizeof(lv_image_header_t), &rn); lv_fs_close(&f); - if(res != LV_FS_RES_OK || rn != sizeof(lv_img_header_t)) { + if(res != LV_FS_RES_OK || rn != sizeof(lv_image_header_t)) { LV_LOG_WARN("Image get info get read file header"); return LV_RES_INV; } } } - else if(src_type == LV_IMG_SRC_SYMBOL) { + else if(src_type == LV_IMAGE_SRC_SYMBOL) { /*The size depend on the font but it is unknown here. It should be handled outside of the *function*/ header->w = 1; @@ -319,18 +319,18 @@ lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * s return LV_RES_OK; } -static lv_img_decoder_built_in_data_t * get_decoder_data(lv_img_decoder_dsc_t * dsc) +static lv_image_decoder_built_in_data_t * get_decoder_data(lv_image_decoder_dsc_t * dsc) { - lv_img_decoder_built_in_data_t * data = dsc->user_data; + lv_image_decoder_built_in_data_t * data = dsc->user_data; if(data == NULL) { - data = lv_malloc(sizeof(lv_img_decoder_built_in_data_t)); + data = lv_malloc(sizeof(lv_image_decoder_built_in_data_t)); LV_ASSERT_MALLOC(data); if(data == NULL) { LV_LOG_ERROR("out of memory"); return NULL; } - lv_memzero(data, sizeof(lv_img_decoder_built_in_data_t)); + lv_memzero(data, sizeof(lv_image_decoder_built_in_data_t)); dsc->user_data = data; } @@ -343,11 +343,11 @@ static lv_img_decoder_built_in_data_t * get_decoder_data(lv_img_decoder_dsc_t * * @param dsc pointer to decoder descriptor. `src`, `color` are already initialized in it. * @return LV_RES_OK: the info is successfully stored in `header`; LV_RES_INV: unknown format or other error. */ -lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +lv_res_t lv_image_decoder_built_in_open(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc) { LV_UNUSED(decoder); /*Open the file if it's a file*/ - if(dsc->src_type == LV_IMG_SRC_FILE) { + if(dsc->src_type == LV_IMAGE_SRC_FILE) { /*Support only "*.bin" files*/ if(strcmp(lv_fs_get_ext(dsc->src), "bin")) return LV_RES_INV; @@ -359,7 +359,7 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder } /*If the file was open successfully save the file descriptor*/ - lv_img_decoder_built_in_data_t * decoder_data = get_decoder_data(dsc); + lv_image_decoder_built_in_data_t * decoder_data = get_decoder_data(dsc); if(decoder_data == NULL) { return LV_RES_INV; } @@ -379,7 +379,7 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder } uint32_t rn; - res = fs_read_file_at(&f, sizeof(lv_img_header_t), (uint8_t *)palette, sizeof(lv_color32_t) * size, &rn); + res = fs_read_file_at(&f, sizeof(lv_image_header_t), (uint8_t *)palette, sizeof(lv_color32_t) * size, &rn); if(res != LV_FS_RES_OK || rn != sizeof(lv_color32_t) * size) { LV_LOG_WARN("Built-in image decoder can't read the palette"); lv_free(palette); @@ -408,7 +408,7 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder } uint32_t rn; - res = fs_read_file_at(&f, sizeof(lv_img_header_t), data, len, &rn); + res = fs_read_file_at(&f, sizeof(lv_image_header_t), data, len, &rn); if(res != LV_FS_RES_OK || rn != len) { LV_LOG_WARN("Built-in image decoder can't read the palette"); lv_free(data); @@ -425,9 +425,9 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder return LV_RES_OK; } - if(dsc->src_type == LV_IMG_SRC_VARIABLE) { + if(dsc->src_type == LV_IMAGE_SRC_VARIABLE) { /*The variables should have valid data*/ - lv_img_dsc_t * img_dsc = (lv_img_dsc_t *)dsc->src; + lv_image_dsc_t * img_dsc = (lv_image_dsc_t *)dsc->src; if(img_dsc->data == NULL) { return LV_RES_INV; } @@ -435,7 +435,7 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder lv_color_format_t cf = img_dsc->header.cf; if(LV_COLOR_FORMAT_IS_INDEXED(cf)) { /*Need decoder data to store converted image*/ - lv_img_decoder_built_in_data_t * decoder_data = get_decoder_data(dsc); + lv_image_decoder_built_in_data_t * decoder_data = get_decoder_data(dsc); if(decoder_data == NULL) { return LV_RES_INV; } @@ -466,7 +466,7 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder else { /*In case of uncompressed formats the image stored in the ROM/RAM. *So simply give its pointer*/ - dsc->img_data = ((lv_img_dsc_t *)dsc->src)->data; + dsc->img_data = ((lv_image_dsc_t *)dsc->src)->data; } return LV_RES_OK; @@ -480,12 +480,12 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder * @param decoder pointer to the decoder the function associated with * @param dsc pointer to decoder descriptor */ -void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +void lv_image_decoder_built_in_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc) { LV_UNUSED(decoder); /*Unused*/ - lv_img_decoder_built_in_data_t * decoder_data = dsc->user_data; + lv_image_decoder_built_in_data_t * decoder_data = dsc->user_data; if(decoder_data) { - if(dsc->src_type == LV_IMG_SRC_FILE) { + if(dsc->src_type == LV_IMAGE_SRC_FILE) { lv_fs_close(&decoder_data->f); } @@ -495,8 +495,8 @@ void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_ds } } -lv_res_t lv_img_decoder_built_in_get_area(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, - const lv_area_t * full_area, lv_area_t * decoded_area) +lv_res_t lv_image_decoder_built_in_get_area(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, + const lv_area_t * full_area, lv_area_t * decoded_area) { LV_UNUSED(decoder); /*Unused*/ @@ -512,12 +512,12 @@ lv_res_t lv_img_decoder_built_in_get_area(lv_img_decoder_t * decoder, lv_img_dec } lv_res_t res = LV_RES_INV; - lv_img_decoder_built_in_data_t * decoder_data = dsc->user_data; + lv_image_decoder_built_in_data_t * decoder_data = dsc->user_data; lv_fs_file_t * f = &decoder_data->f; uint32_t bpp = lv_color_format_get_bpp(cf); lv_coord_t w_px = lv_area_get_width(full_area); uint8_t * img_data = NULL; - uint32_t offset = sizeof(lv_img_header_t); /*All image starts with image header*/ + uint32_t offset = sizeof(lv_image_header_t); /*All image starts with image header*/ /*We only support read line by line for now*/ if(decoded_area->y1 == LV_COORD_MIN) { @@ -593,7 +593,7 @@ lv_res_t lv_img_decoder_built_in_get_area(lv_img_decoder_t * decoder, lv_img_dec } /*Now the A8 mask*/ - offset = sizeof(lv_img_header_t); + offset = sizeof(lv_image_header_t); offset += dsc->header.h * dsc->header.w * bpp / 8; /*Move to A8 map*/ offset += decoded_area->y1 * dsc->header.w * 1; /*Move to y1*/ offset += decoded_area->x1 * 1; /*Move to x1*/ @@ -673,7 +673,7 @@ static lv_res_t decode_indexed_line(lv_color_format_t color_format, const lv_col return LV_RES_OK; } -static uint32_t img_width_to_stride(lv_img_header_t * header) +static uint32_t img_width_to_stride(lv_image_header_t * header) { if(header->cf == LV_COLOR_FORMAT_RGB565A8) { return header->w * 2; diff --git a/src/draw/lv_img_decoder.h b/src/draw/lv_image_decoder.h similarity index 61% rename from src/draw/lv_img_decoder.h rename to src/draw/lv_image_decoder.h index 3b92a072a..e80b9e0b4 100644 --- a/src/draw/lv_img_decoder.h +++ b/src/draw/lv_image_decoder.h @@ -1,10 +1,10 @@ /** - * @file lv_img_decoder.h + * @file lv_image_decoder.h * */ -#ifndef LV_IMG_DECODER_H -#define LV_IMG_DECODER_H +#ifndef LV_IMAGE_DECODER_H +#define LV_IMAGE_DECODER_H #ifdef __cplusplus extern "C" { @@ -16,7 +16,7 @@ extern "C" { #include "../lv_conf_internal.h" #include -#include "lv_img_buf.h" +#include "lv_image_buf.h" #include "../misc/lv_fs.h" #include "../misc/lv_types.h" #include "../misc/lv_area.h" @@ -31,39 +31,40 @@ extern "C" { /** * Source of image.*/ -enum _lv_img_src_t { - LV_IMG_SRC_VARIABLE, /** Binary/C variable*/ - LV_IMG_SRC_FILE, /** File in filesystem*/ - LV_IMG_SRC_SYMBOL, /** Symbol (@ref lv_symbol_def.h)*/ - LV_IMG_SRC_UNKNOWN, /** Unknown source*/ +enum _lv_image_src_t { + LV_IMAGE_SRC_VARIABLE, /** Binary/C variable*/ + LV_IMAGE_SRC_FILE, /** File in filesystem*/ + LV_IMAGE_SRC_SYMBOL, /** Symbol (@ref lv_symbol_def.h)*/ + LV_IMAGE_SRC_UNKNOWN, /** Unknown source*/ }; #ifdef DOXYGEN -typedef _lv_img_src_t lv_img_src_t; +typedef _lv_image_src_t lv_image_src_t; #else -typedef uint8_t lv_img_src_t; +typedef uint8_t lv_image_src_t; #endif /*DOXYGEN*/ /*Decoder function definitions*/ -struct _lv_img_decoder_dsc_t; -struct _lv_img_decoder_t; +struct _lv_image_decoder_dsc_t; +struct _lv_image_decoder_t; /** * 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) + * `lv_image_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_t * decoder, const void * src, - lv_img_header_t * header); +typedef lv_res_t (*lv_image_decoder_info_f_t)(struct _lv_image_decoder_t * decoder, const void * src, + lv_image_header_t * header); /** * Open an image for decoding. Prepare it as it is required to read it later * @param decoder pointer to the decoder the function associated with * @param dsc pointer to decoder descriptor. `src`, `color` are already initialized in it. */ -typedef lv_res_t (*lv_img_decoder_open_f_t)(struct _lv_img_decoder_t * decoder, struct _lv_img_decoder_dsc_t * dsc); +typedef lv_res_t (*lv_image_decoder_open_f_t)(struct _lv_image_decoder_t * decoder, + struct _lv_image_decoder_dsc_t * dsc); /** * Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`. @@ -76,32 +77,33 @@ typedef lv_res_t (*lv_img_decoder_open_f_t)(struct _lv_img_decoder_t * decoder, * @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_get_area_cb_t)(struct _lv_img_decoder_t * decoder, struct _lv_img_decoder_dsc_t * dsc, - const lv_area_t * full_area, lv_area_t * decoded_area); +typedef lv_res_t (*lv_image_decoder_get_area_cb_t)(struct _lv_image_decoder_t * decoder, + struct _lv_image_decoder_dsc_t * dsc, + const lv_area_t * full_area, lv_area_t * decoded_area); /** * Close the pending decoding. Free resources etc. * @param decoder pointer to the decoder the function associated with * @param dsc pointer to decoder descriptor */ -typedef void (*lv_img_decoder_close_f_t)(struct _lv_img_decoder_t * decoder, struct _lv_img_decoder_dsc_t * dsc); +typedef void (*lv_image_decoder_close_f_t)(struct _lv_image_decoder_t * decoder, struct _lv_image_decoder_dsc_t * dsc); -typedef struct _lv_img_decoder_t { - lv_img_decoder_info_f_t info_cb; - lv_img_decoder_open_f_t open_cb; - lv_img_decoder_get_area_cb_t get_area_cb; - lv_img_decoder_close_f_t close_cb; +typedef struct _lv_image_decoder_t { + lv_image_decoder_info_f_t info_cb; + lv_image_decoder_open_f_t open_cb; + lv_image_decoder_get_area_cb_t get_area_cb; + lv_image_decoder_close_f_t close_cb; void * user_data; -} lv_img_decoder_t; +} lv_image_decoder_t; /**Describe an image decoding session. Stores data about the decoding*/ -typedef struct _lv_img_decoder_dsc_t { +typedef struct _lv_image_decoder_dsc_t { /**The decoder which was able to open the image source*/ - lv_img_decoder_t * decoder; + lv_image_decoder_t * decoder; - /**The image source. A file path like "S:my_img.png" or pointer to an `lv_img_dsc_t` variable*/ + /**The image source. A file path like "S:my_img.png" or pointer to an `lv_image_dsc_t` variable*/ const void * src; /**Color to draw the image. Used when the image has alpha channel only*/ @@ -111,10 +113,10 @@ typedef struct _lv_img_decoder_dsc_t { int32_t frame_id; /**Type of the source: file or variable. Can be set in `open` function if required*/ - lv_img_src_t src_type; + lv_image_src_t src_type; /**Info about the opened image: color format, size, etc. MUST be set in `open` function*/ - lv_img_header_t header; + lv_image_header_t header; /** Pointer to a buffer where the image's data (pixels) are stored in a decoded, plain format. * MUST be set in `open` function*/ @@ -124,7 +126,7 @@ typedef struct _lv_img_decoder_dsc_t { uint32_t palette_size; /** How much time did it take to open the image. [ms] - * If not set `lv_img_cache` will measure and set the time to open*/ + * If not set `lv_image_cache` will measure and set the time to open*/ uint32_t time_to_open; /**A text to display instead of the image when the image can't be opened. @@ -133,7 +135,7 @@ typedef struct _lv_img_decoder_dsc_t { /**Store any custom data here is required*/ void * user_data; -} lv_img_decoder_dsc_t; +} lv_image_decoder_dsc_t; /********************** * GLOBAL PROTOTYPES @@ -142,103 +144,103 @@ typedef struct _lv_img_decoder_dsc_t { /** * Initialize the image decoder module */ -void _lv_img_decoder_init(void); +void _lv_image_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_drv_register()`) - * 2) Variable: Pointer to an `lv_img_dsc_t` variable + * 2) Variable: Pointer to an `lv_image_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 void * src, lv_img_header_t * header); +lv_res_t lv_image_decoder_get_info(const void * src, lv_image_header_t * header); /** * Open an image. * Try the created image decoders one by one. Once one is able to open the image that decoder is saved in `dsc` - * @param dsc describes a decoding session. Simply a pointer to an `lv_img_decoder_dsc_t` variable. + * @param dsc describes a decoding session. Simply a pointer to an `lv_image_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_drv_register())`) - * 2) Variable: Pointer to an `lv_img_dsc_t` variable + * 2) Variable: Pointer to an `lv_image_dsc_t` variable * 3) Symbol: E.g. `LV_SYMBOL_OK` - * @param color The color of the image with `LV_IMG_CF_ALPHA_...` + * @param color The color of the image with `LV_IMAGE_CF_ALPHA_...` * @param frame_id the index of the frame. Used only with animated images, set 0 for normal images * @return LV_RES_OK: opened the image. `dsc->img_data` and `dsc->header` are set. * LV_RES_INV: none of the registered image decoders were able to open the image. */ -lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, lv_color_t color, int32_t frame_id); +lv_res_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src, lv_color_t color, int32_t frame_id); /** * Read a line from an opened image - * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open` + * @param dsc pointer to `lv_image_decoder_dsc_t` used in `lv_image_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_get_area(lv_img_decoder_dsc_t * dsc, const lv_area_t * full_area, lv_area_t * decoded_area); +lv_res_t lv_image_decoder_get_area(lv_image_decoder_dsc_t * dsc, const lv_area_t * full_area, lv_area_t * decoded_area); /** * Close a decoding session - * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open` + * @param dsc pointer to `lv_image_decoder_dsc_t` used in `lv_image_decoder_open` */ -void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc); +void lv_image_decoder_close(lv_image_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); +lv_image_decoder_t * lv_image_decoder_create(void); /** * Delete an image decoder * @param decoder pointer to an image decoder */ -void lv_img_decoder_delete(lv_img_decoder_t * decoder); +void lv_image_decoder_delete(lv_image_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) + * @param info_cb a function to collect info about an image (fill an `lv_image_header_t` struct) */ -void lv_img_decoder_set_info_cb(lv_img_decoder_t * decoder, lv_img_decoder_info_f_t info_cb); +void lv_image_decoder_set_info_cb(lv_image_decoder_t * decoder, lv_image_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); +void lv_image_decoder_set_open_cb(lv_image_decoder_t * decoder, lv_image_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_get_area_cb(lv_img_decoder_t * decoder, lv_img_decoder_get_area_cb_t read_line_cb); +void lv_image_decoder_set_get_area_cb(lv_image_decoder_t * decoder, lv_image_decoder_get_area_cb_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_image_decoder_set_close_cb(lv_image_decoder_t * decoder, lv_image_decoder_close_f_t close_cb); /** * Get info about a built-in image * @param decoder the decoder where this function belongs - * @param src the image source: pointer to an `lv_img_dsc_t` variable, a file path or a symbol + * @param src the image source: pointer to an `lv_image_dsc_t` variable, a file path or a symbol * @param header store the image data here * @return LV_RES_OK: the info is successfully stored in `header`; LV_RES_INV: unknown format or other error. */ -lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header); +lv_res_t lv_image_decoder_built_in_info(lv_image_decoder_t * decoder, const void * src, lv_image_header_t * header); -lv_res_t lv_img_decoder_built_in_get_area(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, - const lv_area_t * full_area, lv_area_t * decoded_area); +lv_res_t lv_image_decoder_built_in_get_area(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, + const lv_area_t * full_area, lv_area_t * decoded_area); /** * Open a built in image @@ -246,14 +248,14 @@ lv_res_t lv_img_decoder_built_in_get_area(lv_img_decoder_t * decoder, lv_img_dec * @param dsc pointer to decoder descriptor. `src`, `style` are already initialized in it. * @return LV_RES_OK: the info is successfully stored in `header`; LV_RES_INV: unknown format or other error. */ -lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc); +lv_res_t lv_image_decoder_built_in_open(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); /** * Close the pending decoding. Free resources etc. * @param decoder pointer to the decoder the function associated with * @param dsc pointer to decoder descriptor */ -void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc); +void lv_image_decoder_built_in_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); /********************** * MACROS @@ -263,4 +265,4 @@ void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_ds } /*extern "C"*/ #endif -#endif /*LV_IMG_DECODER_H*/ +#endif /*LV_IMAGE_DECODER_H*/ diff --git a/src/draw/sw/lv_draw_sw.c b/src/draw/sw/lv_draw_sw.c index c9a14dbf8..d8a150312 100644 --- a/src/draw/sw/lv_draw_sw.c +++ b/src/draw/sw/lv_draw_sw.c @@ -148,13 +148,13 @@ static void execute_drawing(lv_draw_sw_unit_t * u) lv_draw_sw_box_shadow((lv_draw_unit_t *)u, t->draw_dsc, &t->area); break; case LV_DRAW_TASK_TYPE_BG_IMG: - lv_draw_sw_bg_img((lv_draw_unit_t *)u, t->draw_dsc, &t->area); + lv_draw_sw_bg_image((lv_draw_unit_t *)u, t->draw_dsc, &t->area); break; case LV_DRAW_TASK_TYPE_LABEL: lv_draw_sw_label((lv_draw_unit_t *)u, t->draw_dsc, &t->area); break; case LV_DRAW_TASK_TYPE_IMAGE: - lv_draw_sw_img((lv_draw_unit_t *)u, t->draw_dsc, &t->area); + lv_draw_sw_image((lv_draw_unit_t *)u, t->draw_dsc, &t->area); break; case LV_DRAW_TASK_TYPE_ARC: lv_draw_sw_arc((lv_draw_unit_t *)u, t->draw_dsc, &t->area); diff --git a/src/draw/sw/lv_draw_sw.h b/src/draw/sw/lv_draw_sw.h index 64c9ad222..fb760daed 100644 --- a/src/draw/sw/lv_draw_sw.h +++ b/src/draw/sw/lv_draw_sw.h @@ -53,8 +53,8 @@ typedef struct { void lv_draw_sw_init(void); -LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img(lv_draw_unit_t * draw_unit, const lv_draw_img_dsc_t * draw_dsc, - const lv_area_t * coords); +LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_image(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, + const lv_area_t * coords); void lv_draw_sw_fill(lv_draw_unit_t * draw_unit, const lv_draw_fill_dsc_t * dsc, const lv_area_t * coords); @@ -62,7 +62,7 @@ void lv_draw_sw_border(lv_draw_unit_t * draw_unit, const lv_draw_border_dsc_t * void lv_draw_sw_box_shadow(lv_draw_unit_t * draw_unit, const lv_draw_box_shadow_dsc_t * dsc, const lv_area_t * coords); -void lv_draw_sw_bg_img(lv_draw_unit_t * draw_unit, const lv_draw_bg_img_dsc_t * dsc, const lv_area_t * coords); +void lv_draw_sw_bg_image(lv_draw_unit_t * draw_unit, const lv_draw_bg_image_dsc_t * dsc, const lv_area_t * coords); void lv_draw_sw_label(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * dsc, const lv_area_t * coords); @@ -70,7 +70,7 @@ void lv_draw_sw_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * dsc, c LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_line(lv_draw_unit_t * draw_unit, const lv_draw_line_dsc_t * dsc); -void lv_draw_sw_layer(lv_draw_unit_t * draw_unit, const lv_draw_img_dsc_t * draw_dsc, const lv_area_t * coords); +void lv_draw_sw_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * coords); void lv_draw_sw_triangle(lv_draw_unit_t * draw_unit, const lv_draw_triangle_dsc_t * dsc); @@ -78,7 +78,7 @@ void lv_draw_sw_mask_rect(lv_draw_unit_t * draw_unit, const lv_draw_mask_rect_ds void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_area, const void * src_buf, lv_coord_t src_w, lv_coord_t src_h, - const lv_draw_img_dsc_t * draw_dsc, const lv_draw_img_sup_t * sup, lv_color_format_t cf, void * dest_buf); + const lv_draw_image_dsc_t * draw_dsc, const lv_draw_image_sup_t * sup, lv_color_format_t cf, void * dest_buf); /*********************** * GLOBAL VARIABLES diff --git a/src/draw/sw/lv_draw_sw_arc.c b/src/draw/sw/lv_draw_sw_arc.c index f5e51a341..249a1c147 100644 --- a/src/draw/sw/lv_draw_sw_arc.c +++ b/src/draw/sw/lv_draw_sw_arc.c @@ -124,8 +124,8 @@ void lv_draw_sw_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * dsc, c blend_dsc.color = dsc->color; } else { - lv_img_decoder_dsc_t decoder_dsc; - lv_img_decoder_open(&decoder_dsc, dsc->img_src, dsc->color, 0); + lv_image_decoder_dsc_t decoder_dsc; + lv_image_decoder_open(&decoder_dsc, dsc->img_src, dsc->color, 0); img_area.x1 = 0; img_area.y1 = 0; img_area.x2 = decoder_dsc.header.w - 1; diff --git a/src/draw/sw/lv_draw_sw_bg_img.c b/src/draw/sw/lv_draw_sw_bg_img.c index b3c65c1a4..25b593c4e 100644 --- a/src/draw/sw/lv_draw_sw_bg_img.c +++ b/src/draw/sw/lv_draw_sw_bg_img.c @@ -40,7 +40,7 @@ * GLOBAL FUNCTIONS **********************/ -void lv_draw_sw_bg_img(lv_draw_unit_t * draw_unit, const lv_draw_bg_img_dsc_t * dsc, const lv_area_t * coords) +void lv_draw_sw_bg_image(lv_draw_unit_t * draw_unit, const lv_draw_bg_image_dsc_t * dsc, const lv_area_t * coords) { if(dsc->src == NULL) return; if(dsc->opa <= LV_OPA_MIN) return; @@ -53,8 +53,8 @@ void lv_draw_sw_bg_img(lv_draw_unit_t * draw_unit, const lv_draw_bg_img_dsc_t * const lv_area_t * clip_area_ori = draw_unit->clip_area; draw_unit->clip_area = &clip_area; - lv_img_src_t src_type = lv_img_src_get_type(dsc->src); - if(src_type == LV_IMG_SRC_SYMBOL) { + lv_image_src_t src_type = lv_image_src_get_type(dsc->src); + if(src_type == LV_IMAGE_SRC_SYMBOL) { lv_point_t size; lv_txt_get_size(&size, dsc->src, dsc->font, 0, 0, LV_COORD_MAX, LV_TEXT_FLAG_NONE); lv_area_t a; @@ -72,8 +72,8 @@ void lv_draw_sw_bg_img(lv_draw_unit_t * draw_unit, const lv_draw_bg_img_dsc_t * lv_draw_sw_label(draw_unit, &label_draw_dsc, &a); } else { - lv_draw_img_dsc_t img_dsc; - lv_draw_img_dsc_init(&img_dsc); + lv_draw_image_dsc_t img_dsc; + lv_draw_image_dsc_init(&img_dsc); img_dsc.recolor = dsc->recolor; img_dsc.recolor_opa = dsc->recolor_opa; img_dsc.opa = dsc->opa; @@ -87,7 +87,7 @@ void lv_draw_sw_bg_img(lv_draw_unit_t * draw_unit, const lv_draw_bg_img_dsc_t * area.x2 = area.x1 + dsc->img_header.w - 1; area.y2 = area.y1 + dsc->img_header.h - 1; - lv_draw_sw_img(draw_unit, &img_dsc, &area); + lv_draw_sw_image(draw_unit, &img_dsc, &area); } else { lv_area_t area; @@ -99,7 +99,7 @@ void lv_draw_sw_bg_img(lv_draw_unit_t * draw_unit, const lv_draw_bg_img_dsc_t * area.x1 = coords->x1; area.x2 = area.x1 + dsc->img_header.w - 1; for(; area.x1 <= coords->x2; area.x1 += dsc->img_header.w, area.x2 += dsc->img_header.w) { - lv_draw_sw_img(draw_unit, &img_dsc, &area); + lv_draw_sw_image(draw_unit, &img_dsc, &area); } } } diff --git a/src/draw/sw/lv_draw_sw_img.c b/src/draw/sw/lv_draw_sw_img.c index 927a88a62..e83dd25b2 100644 --- a/src/draw/sw/lv_draw_sw_img.c +++ b/src/draw/sw/lv_draw_sw_img.c @@ -9,7 +9,7 @@ #include "lv_draw_sw.h" #if LV_USE_DRAW_SW -#include "../lv_img_cache.h" +#include "../lv_image_cache.h" #include "../../disp/lv_disp.h" #include "../../disp/lv_disp_private.h" #include "../../misc/lv_log.h" @@ -31,8 +31,8 @@ /********************** * STATIC PROTOTYPES **********************/ -static void img_draw_core(lv_draw_unit_t * draw_unit, const lv_draw_img_dsc_t * draw_dsc, const lv_area_t * draw_area, - const lv_img_decoder_dsc_t * src, lv_draw_img_sup_t * sup, const lv_area_t * img_coords); +static void img_draw_core(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * draw_area, + const lv_image_decoder_dsc_t * src, lv_draw_image_sup_t * sup, const lv_area_t * img_coords); /********************** * STATIC VARIABLES @@ -46,7 +46,7 @@ static void img_draw_core(lv_draw_unit_t * draw_unit, const lv_draw_img_dsc_t * * GLOBAL FUNCTIONS **********************/ -void lv_draw_sw_layer(lv_draw_unit_t * draw_unit, const lv_draw_img_dsc_t * draw_dsc, const lv_area_t * coords) +void lv_draw_sw_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * coords) { lv_layer_t * layer_to_draw = (lv_layer_t *)draw_dsc->src; @@ -54,7 +54,7 @@ void lv_draw_sw_layer(lv_draw_unit_t * draw_unit, const lv_draw_img_dsc_t * draw *In this case just return. */ if(layer_to_draw->draw_buf.buf == NULL) return; - lv_img_dsc_t img_dsc; + lv_image_dsc_t img_dsc; img_dsc.header.w = layer_to_draw->draw_buf.width; img_dsc.header.h = layer_to_draw->draw_buf.height; img_dsc.header.cf = layer_to_draw->draw_buf.color_format; @@ -62,11 +62,11 @@ void lv_draw_sw_layer(lv_draw_unit_t * draw_unit, const lv_draw_img_dsc_t * draw img_dsc.header.always_zero = 0; img_dsc.data = lv_draw_buf_get_buf(&layer_to_draw->draw_buf); - lv_draw_img_dsc_t new_draw_dsc; - lv_memcpy(&new_draw_dsc, draw_dsc, sizeof(lv_draw_img_dsc_t)); + lv_draw_image_dsc_t new_draw_dsc; + lv_memcpy(&new_draw_dsc, draw_dsc, sizeof(lv_draw_image_dsc_t)); new_draw_dsc.src = &img_dsc; - lv_draw_sw_img(draw_unit, &new_draw_dsc, coords); + lv_draw_sw_image(draw_unit, &new_draw_dsc, coords); #if LV_USE_LAYER_DEBUG || LV_USE_PARALLEL_DRAW_DEBUG lv_area_t area_rot; @@ -75,7 +75,7 @@ void lv_draw_sw_layer(lv_draw_unit_t * draw_unit, const lv_draw_img_dsc_t * draw int32_t w = lv_area_get_width(coords); int32_t h = lv_area_get_height(coords); - _lv_img_buf_get_transformed_area(&area_rot, w, h, draw_dsc->angle, draw_dsc->zoom, &draw_dsc->pivot); + _lv_image_buf_get_transformed_area(&area_rot, w, h, draw_dsc->angle, draw_dsc->zoom, &draw_dsc->pivot); area_rot.x1 += coords->x1; area_rot.y1 += coords->y1; @@ -145,8 +145,8 @@ void lv_draw_sw_layer(lv_draw_unit_t * draw_unit, const lv_draw_img_dsc_t * draw -LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img(lv_draw_unit_t * draw_unit, const lv_draw_img_dsc_t * draw_dsc, - const lv_area_t * coords) +LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_image(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, + const lv_area_t * coords) { lv_area_t transformed_area; lv_area_copy(&transformed_area, coords); @@ -154,7 +154,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img(lv_draw_unit_t * draw_unit, const lv_d int32_t w = lv_area_get_width(coords); int32_t h = lv_area_get_height(coords); - _lv_img_buf_get_transformed_area(&transformed_area, w, h, draw_dsc->angle, draw_dsc->zoom, &draw_dsc->pivot); + _lv_image_buf_get_transformed_area(&transformed_area, w, h, draw_dsc->angle, draw_dsc->zoom, &draw_dsc->pivot); transformed_area.x1 += coords->x1; transformed_area.y1 += coords->y1; @@ -168,14 +168,14 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img(lv_draw_unit_t * draw_unit, const lv_d return; } - lv_img_decoder_dsc_t decoder_dsc; - lv_res_t res = lv_img_decoder_open(&decoder_dsc, draw_dsc->src, draw_dsc->recolor, -1); + lv_image_decoder_dsc_t decoder_dsc; + lv_res_t res = lv_image_decoder_open(&decoder_dsc, draw_dsc->src, draw_dsc->recolor, -1); if(res != LV_RES_OK) { LV_LOG_ERROR("Failed to open image"); return; } - lv_draw_img_sup_t sup; + lv_draw_image_sup_t sup; sup.alpha_color = draw_dsc->recolor; sup.palette = decoder_dsc.palette; sup.palette_size = decoder_dsc.palette_size; @@ -197,7 +197,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img(lv_draw_unit_t * draw_unit, const lv_d relative_decoded_area.y2 = LV_COORD_MIN; res = LV_RES_OK; while(res == LV_RES_OK) { - res = lv_img_decoder_get_area(&decoder_dsc, &relative_full_area_to_decode, &relative_decoded_area); + res = lv_image_decoder_get_area(&decoder_dsc, &relative_full_area_to_decode, &relative_decoded_area); lv_area_t absolute_decoded_area = relative_decoded_area; lv_area_move(&absolute_decoded_area, coords->x1, coords->y1); @@ -212,17 +212,17 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img(lv_draw_unit_t * draw_unit, const lv_d } } - lv_img_decoder_close(&decoder_dsc); + lv_image_decoder_close(&decoder_dsc); } -static void img_draw_core(lv_draw_unit_t * draw_unit, const lv_draw_img_dsc_t * draw_dsc, const lv_area_t * draw_area, - const lv_img_decoder_dsc_t * src, lv_draw_img_sup_t * sup, const lv_area_t * img_coords) +static void img_draw_core(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * draw_area, + const lv_image_decoder_dsc_t * src, lv_draw_image_sup_t * sup, const lv_area_t * img_coords) { bool transformed = draw_dsc->angle != 0 || draw_dsc->zoom != LV_ZOOM_NONE ? true : false; lv_draw_sw_blend_dsc_t blend_dsc; const uint8_t * src_buf = src->img_data; - const lv_img_header_t * header = &src->header; + const lv_image_header_t * header = &src->header; uint32_t img_stride = header->stride; lv_color_format_t cf = header->cf; diff --git a/src/draw/sw/lv_draw_sw_letter.c b/src/draw/sw/lv_draw_sw_letter.c index 5f4a19f46..65215bc81 100644 --- a/src/draw/sw/lv_draw_sw_letter.c +++ b/src/draw/sw/lv_draw_sw_letter.c @@ -91,13 +91,13 @@ LV_ATTRIBUTE_FAST_MEM static void draw_letter_cb(lv_draw_unit_t * draw_unit, lv_ } else if(glyph_draw_dsc->format == LV_DRAW_LETTER_BITMAP_FORMAT_IMAGE) { #if LV_USE_IMGFONT - lv_draw_img_dsc_t img_dsc; - lv_draw_img_dsc_init(&img_dsc); + lv_draw_image_dsc_t img_dsc; + lv_draw_image_dsc_init(&img_dsc); img_dsc.angle = 0; img_dsc.zoom = LV_ZOOM_NONE; img_dsc.opa = glyph_draw_dsc->opa; img_dsc.src = glyph_draw_dsc->bitmap; - lv_draw_sw_img(draw_unit, &img_dsc, glyph_draw_dsc->letter_coords); + lv_draw_sw_image(draw_unit, &img_dsc, glyph_draw_dsc->letter_coords); #endif } } diff --git a/src/draw/sw/lv_draw_sw_transform.c b/src/draw/sw/lv_draw_sw_transform.c index 494559721..c540d6e00 100644 --- a/src/draw/sw/lv_draw_sw_transform.c +++ b/src/draw/sw/lv_draw_sw_transform.c @@ -80,7 +80,7 @@ static void transform_a8(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_area, const void * src_buf, lv_coord_t src_w, lv_coord_t src_h, - const lv_draw_img_dsc_t * draw_dsc, const lv_draw_img_sup_t * sup, lv_color_format_t src_cf, void * dest_buf) + const lv_draw_image_dsc_t * draw_dsc, const lv_draw_image_sup_t * sup, lv_color_format_t src_cf, void * dest_buf) { LV_UNUSED(draw_unit); LV_UNUSED(sup); diff --git a/src/libs/barcode/lv_barcode.c b/src/libs/barcode/lv_barcode.c index 04efaa609..c180503da 100644 --- a/src/libs/barcode/lv_barcode.c +++ b/src/libs/barcode/lv_barcode.c @@ -176,8 +176,8 @@ static void lv_barcode_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj { LV_UNUSED(class_p); - lv_img_dsc_t * img = lv_canvas_get_img(obj); - lv_img_cache_invalidate_src(img); + lv_image_dsc_t * img = lv_canvas_get_image(obj); + lv_image_cache_invalidate_src(img); if(!img->data) { LV_LOG_INFO("canvas buffer is NULL"); @@ -195,7 +195,7 @@ static bool lv_barcode_change_buf_size(lv_obj_t * obj, lv_coord_t w) LV_ASSERT_NULL(obj); LV_ASSERT(w > 0); - lv_img_dsc_t * img = lv_canvas_get_img(obj); + lv_image_dsc_t * img = lv_canvas_get_image(obj); void * buf = (void *)img->data; uint32_t buf_size = LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w, 1); diff --git a/src/libs/bmp/lv_bmp.c b/src/libs/bmp/lv_bmp.c index f547bbc8f..b7984dc3a 100644 --- a/src/libs/bmp/lv_bmp.c +++ b/src/libs/bmp/lv_bmp.c @@ -31,13 +31,13 @@ typedef struct { /********************** * STATIC PROTOTYPES **********************/ -static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header); -static lv_res_t decoder_open(lv_img_decoder_t * dec, lv_img_decoder_dsc_t * dsc); +static lv_res_t decoder_info(lv_image_decoder_t * decoder, const void * src, lv_image_header_t * header); +static lv_res_t decoder_open(lv_image_decoder_t * dec, lv_image_decoder_dsc_t * dsc); -static lv_res_t decoder_get_area(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, +static lv_res_t decoder_get_area(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, const lv_area_t * full_area, lv_area_t * decoded_area); -static void decoder_close(lv_img_decoder_t * dec, lv_img_decoder_dsc_t * dsc); +static void decoder_close(lv_image_decoder_t * dec, lv_image_decoder_dsc_t * dsc); /********************** * STATIC VARIABLES @@ -52,11 +52,11 @@ static void decoder_close(lv_img_decoder_t * dec, lv_img_decoder_dsc_t * dsc); **********************/ void lv_bmp_init(void) { - lv_img_decoder_t * dec = lv_img_decoder_create(); - lv_img_decoder_set_info_cb(dec, decoder_info); - lv_img_decoder_set_open_cb(dec, decoder_open); - lv_img_decoder_set_get_area_cb(dec, decoder_get_area); - lv_img_decoder_set_close_cb(dec, decoder_close); + lv_image_decoder_t * dec = lv_image_decoder_create(); + lv_image_decoder_set_info_cb(dec, decoder_info); + lv_image_decoder_set_open_cb(dec, decoder_open); + lv_image_decoder_set_get_area_cb(dec, decoder_get_area); + lv_image_decoder_set_close_cb(dec, decoder_close); } /********************** @@ -69,14 +69,14 @@ void lv_bmp_init(void) * @param header store the info here * @return LV_RES_OK: no error; LV_RES_INV: can't get the info */ -static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header) +static lv_res_t decoder_info(lv_image_decoder_t * decoder, const void * src, lv_image_header_t * header) { LV_UNUSED(decoder); - lv_img_src_t src_type = lv_img_src_get_type(src); /*Get the source type*/ + lv_image_src_t src_type = lv_image_src_get_type(src); /*Get the source type*/ /*If it's a BMP file...*/ - if(src_type == LV_IMG_SRC_FILE) { + if(src_type == LV_IMAGE_SRC_FILE) { const char * fn = src; if(strcmp(lv_fs_get_ext(fn), "bmp") == 0) { /*Check the extension*/ /*Save the data in the header*/ @@ -116,7 +116,7 @@ static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_im } /* BMP file as data not supported for simplicity. * Convert them to LVGL compatible C arrays directly. */ - else if(src_type == LV_IMG_SRC_VARIABLE) { + else if(src_type == LV_IMAGE_SRC_VARIABLE) { return LV_RES_INV; } @@ -128,14 +128,14 @@ static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_im * Open a PNG image and return the decided image * @param src can be file name or pointer to a C array * @param style style of the image object (unused now but certain formats might use it) - * @return pointer to the decoded image or `LV_IMG_DECODER_OPEN_FAIL` if failed + * @return pointer to the decoded image or `LV_IMAGE_DECODER_OPEN_FAIL` if failed */ -static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +static lv_res_t decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc) { LV_UNUSED(decoder); /*If it's a PNG file...*/ - if(dsc->src_type == LV_IMG_SRC_FILE) { + if(dsc->src_type == LV_IMAGE_SRC_FILE) { const char * fn = dsc->src; if(strcmp(lv_fs_get_ext(fn), "bmp") != 0) { @@ -171,7 +171,7 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * } /* BMP file as data not supported for simplicity. * Convert them to LVGL compatible C arrays directly. */ - else if(dsc->src_type == LV_IMG_SRC_VARIABLE) { + else if(dsc->src_type == LV_IMAGE_SRC_VARIABLE) { return LV_RES_INV; } @@ -179,7 +179,7 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * } -static lv_res_t decoder_get_area(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, +static lv_res_t decoder_get_area(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, const lv_area_t * full_area, lv_area_t * decoded_area) { LV_UNUSED(decoder); @@ -215,7 +215,7 @@ static lv_res_t decoder_get_area(lv_img_decoder_t * decoder, lv_img_decoder_dsc_ /** * Free the allocated resources */ -static void decoder_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +static void decoder_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc) { LV_UNUSED(decoder); bmp_dsc_t * b = dsc->user_data; diff --git a/src/libs/ffmpeg/lv_ffmpeg.c b/src/libs/ffmpeg/lv_ffmpeg.c index 53f06c95e..7cb8055d3 100644 --- a/src/libs/ffmpeg/lv_ffmpeg.c +++ b/src/libs/ffmpeg/lv_ffmpeg.c @@ -54,7 +54,7 @@ struct ffmpeg_context_s { #pragma pack(1) -struct lv_img_pixel_color_s { +struct lv_image_pixel_color_s { lv_color_t c; uint8_t alpha; }; @@ -65,18 +65,18 @@ struct lv_img_pixel_color_s { * STATIC PROTOTYPES **********************/ -static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header); -static lv_res_t decoder_open(lv_img_decoder_t * dec, lv_img_decoder_dsc_t * dsc); -static void decoder_close(lv_img_decoder_t * dec, lv_img_decoder_dsc_t * dsc); +static lv_res_t decoder_info(lv_image_decoder_t * decoder, const void * src, lv_image_header_t * header); +static lv_res_t decoder_open(lv_image_decoder_t * dec, lv_image_decoder_dsc_t * dsc); +static void decoder_close(lv_image_decoder_t * dec, lv_image_decoder_dsc_t * dsc); static struct ffmpeg_context_s * ffmpeg_open_file(const char * path); static void ffmpeg_close(struct ffmpeg_context_s * ffmpeg_ctx); static void ffmpeg_close_src_ctx(struct ffmpeg_context_s * ffmpeg_ctx); static void ffmpeg_close_dst_ctx(struct ffmpeg_context_s * ffmpeg_ctx); static int ffmpeg_image_allocate(struct ffmpeg_context_s * ffmpeg_ctx); -static int ffmpeg_get_img_header(const char * path, lv_img_header_t * header); +static int ffmpeg_get_image_header(const char * path, lv_image_header_t * header); static int ffmpeg_get_frame_refr_period(struct ffmpeg_context_s * ffmpeg_ctx); -static uint8_t * ffmpeg_get_img_data(struct ffmpeg_context_s * ffmpeg_ctx); +static uint8_t * ffmpeg_get_image_data(struct ffmpeg_context_s * ffmpeg_ctx); static int ffmpeg_update_next_frame(struct ffmpeg_context_s * ffmpeg_ctx); static int ffmpeg_output_video_frame(struct ffmpeg_context_s * ffmpeg_ctx); static bool ffmpeg_pix_fmt_has_alpha(enum AVPixelFormat pix_fmt); @@ -92,7 +92,7 @@ const lv_obj_class_t lv_ffmpeg_player_class = { .constructor_cb = lv_ffmpeg_player_constructor, .destructor_cb = lv_ffmpeg_player_destructor, .instance_size = sizeof(lv_ffmpeg_player_t), - .base_class = &lv_img_class + .base_class = &lv_image_class }; /********************** @@ -105,10 +105,10 @@ const lv_obj_class_t lv_ffmpeg_player_class = { void lv_ffmpeg_init(void) { - lv_img_decoder_t * dec = lv_img_decoder_create(); - lv_img_decoder_set_info_cb(dec, decoder_info); - lv_img_decoder_set_open_cb(dec, decoder_open); - lv_img_decoder_set_close_cb(dec, decoder_close); + lv_image_decoder_t * dec = lv_image_decoder_create(); + lv_image_decoder_set_info_cb(dec, decoder_info); + lv_image_decoder_set_open_cb(dec, decoder_open); + lv_image_decoder_set_close_cb(dec, decoder_close); #if LV_FFMPEG_AV_DUMP_FORMAT == 0 av_log_set_level(AV_LOG_QUIET); @@ -175,9 +175,9 @@ lv_res_t lv_ffmpeg_player_set_src(lv_obj_t * obj, const char * path) player->imgdsc.header.h = height; player->imgdsc.data_size = data_size; player->imgdsc.header.cf = has_alpha ? LV_COLOR_FORMAT_ARGB8888 : LV_COLOR_FORMAT_NATIVE; - player->imgdsc.data = ffmpeg_get_img_data(player->ffmpeg_ctx); + player->imgdsc.data = ffmpeg_get_image_data(player->ffmpeg_ctx); - lv_img_set_src(&player->img.obj, &(player->imgdsc)); + lv_image_set_src(&player->img.obj, &(player->imgdsc)); int period = ffmpeg_get_frame_refr_period(player->ffmpeg_ctx); @@ -246,17 +246,17 @@ void lv_ffmpeg_player_set_auto_restart(lv_obj_t * obj, bool en) * STATIC FUNCTIONS **********************/ -static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header) +static lv_res_t decoder_info(lv_image_decoder_t * decoder, const void * src, lv_image_header_t * header) { LV_UNUSED(decoder); /* Get the source type */ - lv_img_src_t src_type = lv_img_src_get_type(src); + lv_image_src_t src_type = lv_image_src_get_type(src); - if(src_type == LV_IMG_SRC_FILE) { + if(src_type == LV_IMAGE_SRC_FILE) { const char * fn = src; - if(ffmpeg_get_img_header(fn, header) < 0) { + if(ffmpeg_get_image_header(fn, header) < 0) { LV_LOG_ERROR("ffmpeg can't get image header"); return LV_RES_INV; } @@ -268,11 +268,11 @@ static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_im return LV_RES_INV; } -static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +static lv_res_t decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc) { LV_UNUSED(decoder); - if(dsc->src_type == LV_IMG_SRC_FILE) { + if(dsc->src_type == LV_IMAGE_SRC_FILE) { const char * path = dsc->src; struct ffmpeg_context_s * ffmpeg_ctx = ffmpeg_open_file(path); @@ -294,7 +294,7 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * } ffmpeg_close_src_ctx(ffmpeg_ctx); - uint8_t * img_data = ffmpeg_get_img_data(ffmpeg_ctx); + uint8_t * img_data = ffmpeg_get_image_data(ffmpeg_ctx); dsc->user_data = ffmpeg_ctx; dsc->img_data = img_data; @@ -307,14 +307,14 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * return LV_RES_INV; } -static void decoder_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +static void decoder_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc) { LV_UNUSED(decoder); struct ffmpeg_context_s * ffmpeg_ctx = dsc->user_data; ffmpeg_close(ffmpeg_ctx); } -static uint8_t * ffmpeg_get_img_data(struct ffmpeg_context_s * ffmpeg_ctx) +static uint8_t * ffmpeg_get_image_data(struct ffmpeg_context_s * ffmpeg_ctx) { uint8_t * img_data = ffmpeg_ctx->video_dst_data[0]; @@ -542,8 +542,8 @@ static int ffmpeg_open_codec_context(int * stream_idx, return 0; } -static int ffmpeg_get_img_header(const char * filepath, - lv_img_header_t * header) +static int ffmpeg_get_image_header(const char * filepath, + lv_image_header_t * header) { int ret = -1; @@ -798,7 +798,7 @@ static void lv_ffmpeg_player_frame_update_cb(lv_timer_t * timer) return; } - lv_img_cache_invalidate_src(lv_img_get_src(obj)); + lv_image_cache_invalidate_src(lv_image_get_src(obj)); lv_obj_invalidate(obj); } @@ -834,7 +834,7 @@ static void lv_ffmpeg_player_destructor(const lv_obj_class_t * class_p, player->timer = NULL; } - lv_img_cache_invalidate_src(lv_img_get_src(obj)); + lv_image_cache_invalidate_src(lv_image_get_src(obj)); ffmpeg_close(player->ffmpeg_ctx); player->ffmpeg_ctx = NULL; diff --git a/src/libs/ffmpeg/lv_ffmpeg.h b/src/libs/ffmpeg/lv_ffmpeg.h index 8c7fc26b1..97191942c 100644 --- a/src/libs/ffmpeg/lv_ffmpeg.h +++ b/src/libs/ffmpeg/lv_ffmpeg.h @@ -27,9 +27,9 @@ struct ffmpeg_context_s; extern const lv_obj_class_t lv_ffmpeg_player_class; typedef struct { - lv_img_t img; + lv_image_t img; lv_timer_t * timer; - lv_img_dsc_t imgdsc; + lv_image_dsc_t imgdsc; bool auto_restart; struct ffmpeg_context_s * ffmpeg_ctx; } lv_ffmpeg_player_t; diff --git a/src/libs/gif/lv_gif.c b/src/libs/gif/lv_gif.c index 0a54321b2..0cf34962f 100644 --- a/src/libs/gif/lv_gif.c +++ b/src/libs/gif/lv_gif.c @@ -35,7 +35,7 @@ const lv_obj_class_t lv_gif_class = { .constructor_cb = lv_gif_constructor, .destructor_cb = lv_gif_destructor, .instance_size = sizeof(lv_gif_t), - .base_class = &lv_img_class + .base_class = &lv_image_class }; /********************** @@ -61,17 +61,17 @@ void lv_gif_set_src(lv_obj_t * obj, const void * src) /*Close previous gif if any*/ if(gifobj->gif) { - lv_img_cache_invalidate_src(&gifobj->imgdsc); + lv_image_cache_invalidate_src(&gifobj->imgdsc); gd_close_gif(gifobj->gif); gifobj->gif = NULL; gifobj->imgdsc.data = NULL; } - if(lv_img_src_get_type(src) == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = src; + if(lv_image_src_get_type(src) == LV_IMAGE_SRC_VARIABLE) { + const lv_image_dsc_t * img_dsc = src; gifobj->gif = gd_open_gif_data(img_dsc->data); } - else if(lv_img_src_get_type(src) == LV_IMG_SRC_FILE) { + else if(lv_image_src_get_type(src) == LV_IMAGE_SRC_FILE) { gifobj->gif = gd_open_gif_file(src); } if(gifobj->gif == NULL) { @@ -86,7 +86,7 @@ void lv_gif_set_src(lv_obj_t * obj, const void * src) gifobj->imgdsc.header.w = gifobj->gif->width; gifobj->last_call = lv_tick_get(); - lv_img_set_src(obj, &gifobj->imgdsc); + lv_image_set_src(obj, &gifobj->imgdsc); lv_timer_resume(gifobj->timer); lv_timer_reset(gifobj->timer); @@ -122,7 +122,7 @@ static void lv_gif_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj) { LV_UNUSED(class_p); lv_gif_t * gifobj = (lv_gif_t *) obj; - lv_img_cache_invalidate_src(&gifobj->imgdsc); + lv_image_cache_invalidate_src(&gifobj->imgdsc); if(gifobj->gif) gd_close_gif(gifobj->gif); lv_timer_del(gifobj->timer); @@ -147,7 +147,7 @@ static void next_frame_task_cb(lv_timer_t * t) gd_render_frame(gifobj->gif, (uint8_t *)gifobj->imgdsc.data); - lv_img_cache_invalidate_src(lv_img_get_src(obj)); + lv_image_cache_invalidate_src(lv_image_get_src(obj)); lv_obj_invalidate(obj); } diff --git a/src/libs/gif/lv_gif.h b/src/libs/gif/lv_gif.h index d8c93dbc0..56e5724b0 100644 --- a/src/libs/gif/lv_gif.h +++ b/src/libs/gif/lv_gif.h @@ -28,10 +28,10 @@ extern "C" { **********************/ typedef struct { - lv_img_t img; + lv_image_t img; gd_GIF * gif; lv_timer_t * timer; - lv_img_dsc_t imgdsc; + lv_image_dsc_t imgdsc; uint32_t last_call; } lv_gif_t; diff --git a/src/libs/png/lv_png.c b/src/libs/png/lv_png.c index f1e8f9fb9..736086194 100644 --- a/src/libs/png/lv_png.c +++ b/src/libs/png/lv_png.c @@ -24,9 +24,9 @@ /********************** * STATIC PROTOTYPES **********************/ -static lv_res_t decoder_info(struct _lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header); -static lv_res_t decoder_open(lv_img_decoder_t * dec, lv_img_decoder_dsc_t * dsc); -static void decoder_close(lv_img_decoder_t * dec, lv_img_decoder_dsc_t * dsc); +static lv_res_t decoder_info(struct _lv_image_decoder_t * decoder, const void * src, lv_image_header_t * header); +static lv_res_t decoder_open(lv_image_decoder_t * dec, lv_image_decoder_dsc_t * dsc); +static void decoder_close(lv_image_decoder_t * dec, lv_image_decoder_dsc_t * dsc); static void convert_color_depth(uint8_t * img_p, uint32_t px_cnt); /********************** @@ -46,10 +46,10 @@ static void convert_color_depth(uint8_t * img_p, uint32_t px_cnt); */ void lv_png_init(void) { - lv_img_decoder_t * dec = lv_img_decoder_create(); - lv_img_decoder_set_info_cb(dec, decoder_info); - lv_img_decoder_set_open_cb(dec, decoder_open); - lv_img_decoder_set_close_cb(dec, decoder_close); + lv_image_decoder_t * dec = lv_image_decoder_create(); + lv_image_decoder_set_info_cb(dec, decoder_info); + lv_image_decoder_set_open_cb(dec, decoder_open); + lv_image_decoder_set_close_cb(dec, decoder_close); } /********************** @@ -62,13 +62,13 @@ void lv_png_init(void) * @param header store the info here * @return LV_RES_OK: no error; LV_RES_INV: can't get the info */ -static lv_res_t decoder_info(struct _lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header) +static lv_res_t decoder_info(struct _lv_image_decoder_t * decoder, const void * src, lv_image_header_t * header) { (void) decoder; /*Unused*/ - lv_img_src_t src_type = lv_img_src_get_type(src); /*Get the source type*/ + lv_image_src_t src_type = lv_image_src_get_type(src); /*Get the source type*/ /*If it's a PNG file...*/ - if(src_type == LV_IMG_SRC_FILE) { + if(src_type == LV_IMAGE_SRC_FILE) { const char * fn = src; if(strcmp(lv_fs_get_ext(fn), "png") == 0) { /*Check the extension*/ @@ -100,8 +100,8 @@ static lv_res_t decoder_info(struct _lv_img_decoder_t * decoder, const void * sr } } /*If it's a PNG file in a C array...*/ - else if(src_type == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = src; + else if(src_type == LV_IMAGE_SRC_VARIABLE) { + const lv_image_dsc_t * img_dsc = src; const uint32_t data_size = img_dsc->data_size; const uint32_t * size = ((uint32_t *)img_dsc->data) + 4; const uint8_t magic[] = {0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a}; @@ -136,9 +136,9 @@ static lv_res_t decoder_info(struct _lv_img_decoder_t * decoder, const void * sr * Open a PNG image and return the decided image * @param src can be file name or pointer to a C array * @param style style of the image object (unused now but certain formats might use it) - * @return pointer to the decoded image or `LV_IMG_DECODER_OPEN_FAIL` if failed + * @return pointer to the decoded image or `LV_IMAGE_DECODER_OPEN_FAIL` if failed */ -static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +static lv_res_t decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc) { (void) decoder; /*Unused*/ @@ -147,7 +147,7 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * uint8_t * img_data = NULL; /*If it's a PNG file...*/ - if(dsc->src_type == LV_IMG_SRC_FILE) { + if(dsc->src_type == LV_IMAGE_SRC_FILE) { const char * fn = dsc->src; if(strcmp(lv_fs_get_ext(fn), "png") == 0) { /*Check the extension*/ @@ -186,8 +186,8 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * } } /*If it's a PNG file in a C array...*/ - else if(dsc->src_type == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = dsc->src; + else if(dsc->src_type == LV_IMAGE_SRC_VARIABLE) { + const lv_image_dsc_t * img_dsc = dsc->src; unsigned png_width; /*Not used, just required by the decoder*/ unsigned png_height; /*Not used, just required by the decoder*/ @@ -214,7 +214,7 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * /** * Free the allocated resources */ -static void decoder_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +static void decoder_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc) { LV_UNUSED(decoder); /*Unused*/ if(dsc->img_data) { diff --git a/src/libs/qrcode/lv_qrcode.c b/src/libs/qrcode/lv_qrcode.c index 3ae0e205d..37cca52cc 100644 --- a/src/libs/qrcode/lv_qrcode.c +++ b/src/libs/qrcode/lv_qrcode.c @@ -62,7 +62,7 @@ void lv_qrcode_set_size(lv_obj_t * obj, lv_coord_t size) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_dsc_t * img_dsc = lv_canvas_get_img(obj); + lv_image_dsc_t * img_dsc = lv_canvas_get_image(obj); void * buf = (void *)img_dsc->data; uint32_t buf_size = LV_CANVAS_BUF_SIZE_INDEXED_1BIT(size, size); @@ -98,7 +98,7 @@ lv_res_t lv_qrcode_update(lv_obj_t * obj, const void * data, uint32_t data_len) LV_ASSERT_OBJ(obj, MY_CLASS); lv_qrcode_t * qrcode = (lv_qrcode_t *)obj; - lv_img_dsc_t * img_dsc = lv_canvas_get_img(obj); + lv_image_dsc_t * img_dsc = lv_canvas_get_image(obj); if(!img_dsc->data) { LV_LOG_ERROR("canvas buffer is NULL"); return LV_RES_INV; @@ -223,8 +223,8 @@ static void lv_qrcode_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj) { LV_UNUSED(class_p); - lv_img_dsc_t * img_dsc = lv_canvas_get_img(obj); - lv_img_cache_invalidate_src(img_dsc); + lv_image_dsc_t * img_dsc = lv_canvas_get_image(obj); + lv_image_cache_invalidate_src(img_dsc); if(!img_dsc->data) { return; diff --git a/src/libs/rlottie/lv_rlottie.c b/src/libs/rlottie/lv_rlottie.c index e30dac2c4..5bc55cf70 100644 --- a/src/libs/rlottie/lv_rlottie.c +++ b/src/libs/rlottie/lv_rlottie.c @@ -36,7 +36,7 @@ const lv_obj_class_t lv_rlottie_class = { .constructor_cb = lv_rlottie_constructor, .destructor_cb = lv_rlottie_destructor, .instance_size = sizeof(lv_rlottie_t), - .base_class = &lv_img_class + .base_class = &lv_image_class }; typedef struct { @@ -142,7 +142,7 @@ static void lv_rlottie_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob rlottie->imgdsc.data = (void *)rlottie->allocated_buf; rlottie->imgdsc.data_size = allocaled_buf_size; - lv_img_set_src(obj, &rlottie->imgdsc); + lv_image_set_src(obj, &rlottie->imgdsc); rlottie->play_ctrl = LV_RLOTTIE_CTRL_FORWARD | LV_RLOTTIE_CTRL_PLAY | LV_RLOTTIE_CTRL_LOOP; rlottie->dest_frame = rlottie->total_frames; /* invalid destination frame so it's possible to pause on frame 0 */ @@ -174,7 +174,7 @@ static void lv_rlottie_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj rlottie->dest_frame = 0; } - lv_img_cache_invalidate_src(&rlottie->imgdsc); + lv_image_cache_invalidate_src(&rlottie->imgdsc); if(rlottie->allocated_buf) { lv_free(rlottie->allocated_buf); rlottie->allocated_buf = NULL; diff --git a/src/libs/rlottie/lv_rlottie.h b/src/libs/rlottie/lv_rlottie.h index d66dc22c0..640194acd 100644 --- a/src/libs/rlottie/lv_rlottie.h +++ b/src/libs/rlottie/lv_rlottie.h @@ -34,10 +34,10 @@ typedef enum { /** definition in lottieanimation_capi.c */ struct Lottie_Animation_S; typedef struct { - lv_img_t img_ext; + lv_image_t img_ext; struct Lottie_Animation_S * animation; lv_timer_t * task; - lv_img_dsc_t imgdsc; + lv_image_dsc_t imgdsc; size_t total_frames; size_t current_frame; size_t framerate; diff --git a/src/libs/sjpg/lv_sjpg.c b/src/libs/sjpg/lv_sjpg.c index b20950e07..71dbcfcad 100644 --- a/src/libs/sjpg/lv_sjpg.c +++ b/src/libs/sjpg/lv_sjpg.c @@ -105,11 +105,12 @@ typedef struct { /********************** * STATIC PROTOTYPES **********************/ -static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header); -static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc); -static lv_res_t decoder_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, +static lv_res_t decoder_info(lv_image_decoder_t * decoder, const void * src, lv_image_header_t * header); +static lv_res_t decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); +static lv_res_t decoder_read_line(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, lv_coord_t x, + lv_coord_t y, lv_coord_t len, uint8_t * buf); -static void decoder_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc); +static void decoder_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); static size_t input_func(JDEC * jd, uint8_t * buff, size_t ndata); static int is_jpg(const uint8_t * raw_data, size_t len); static void lv_sjpg_cleanup(SJPEG * sjpeg); @@ -128,13 +129,13 @@ static void lv_sjpg_free(SJPEG * sjpeg); **********************/ void lv_split_jpeg_init(void) { - lv_img_decoder_t * dec = lv_img_decoder_create(); - lv_img_decoder_set_info_cb(dec, decoder_info); - lv_img_decoder_set_open_cb(dec, decoder_open); - lv_img_decoder_set_close_cb(dec, decoder_close); + lv_image_decoder_t * dec = lv_image_decoder_create(); + lv_image_decoder_set_info_cb(dec, decoder_info); + lv_image_decoder_set_open_cb(dec, decoder_open); + lv_image_decoder_set_close_cb(dec, decoder_close); /* Disabled for now - lv_img_decoder_set_read_line_cb(dec, decoder_read_line); + lv_image_decoder_set_read_line_cb(dec, decoder_read_line); */ LV_UNUSED(decoder_read_line); } @@ -149,19 +150,19 @@ void lv_split_jpeg_init(void) * @param header store the info here * @return LV_RES_OK: no error; LV_RES_INV: can't get the info */ -static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header) +static lv_res_t decoder_info(lv_image_decoder_t * decoder, const void * src, lv_image_header_t * header) { LV_UNUSED(decoder); /*Check whether the type `src` is known by the decoder*/ /* Read the SJPG/JPG header and find `width` and `height` */ - lv_img_src_t src_type = lv_img_src_get_type(src); /*Get the source type*/ + lv_image_src_t src_type = lv_image_src_get_type(src); /*Get the source type*/ lv_res_t ret = LV_RES_OK; - if(src_type == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = src; + if(src_type == LV_IMAGE_SRC_VARIABLE) { + const lv_image_dsc_t * img_dsc = src; uint8_t * raw_sjpeg_data = (uint8_t *)img_dsc->data; const uint32_t raw_sjpeg_data_size = img_dsc->data_size; @@ -213,7 +214,7 @@ end: } } - else if(src_type == LV_IMG_SRC_FILE) { + else if(src_type == LV_IMAGE_SRC_FILE) { const char * fn = src; if(strcmp(lv_fs_get_ext(fn), "sjpg") == 0) { @@ -345,15 +346,15 @@ static size_t input_func(JDEC * jd, uint8_t * buff, size_t ndata) * @param dsc pointer to a descriptor which describes this decoding session * @return LV_RES_OK: no error; LV_RES_INV: can't get the info */ -static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +static lv_res_t decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc) { LV_UNUSED(decoder); lv_res_t lv_ret = LV_RES_OK; - if(dsc->src_type == LV_IMG_SRC_VARIABLE) { + if(dsc->src_type == LV_IMAGE_SRC_VARIABLE) { uint8_t * data; SJPEG * sjpeg = (SJPEG *) dsc->user_data; - const uint32_t raw_sjpeg_data_size = ((lv_img_dsc_t *)dsc->src)->data_size; + const uint32_t raw_sjpeg_data_size = ((lv_image_dsc_t *)dsc->src)->data_size; if(sjpeg == NULL) { sjpeg = lv_malloc(sizeof(SJPEG)); if(!sjpeg) return LV_RES_INV; @@ -361,8 +362,8 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * memset(sjpeg, 0, sizeof(SJPEG)); dsc->user_data = sjpeg; - sjpeg->sjpeg_data = (uint8_t *)((lv_img_dsc_t *)(dsc->src))->data; - sjpeg->sjpeg_data_size = ((lv_img_dsc_t *)(dsc->src))->data_size; + sjpeg->sjpeg_data = (uint8_t *)((lv_image_dsc_t *)(dsc->src))->data; + sjpeg->sjpeg_data_size = ((lv_image_dsc_t *)(dsc->src))->data_size; } if(!strncmp((char *) sjpeg->sjpeg_data, "_SJPG__", strlen("_SJPG__"))) { @@ -502,7 +503,7 @@ end: return lv_ret; } } - else if(dsc->src_type == LV_IMG_SRC_FILE) { + else if(dsc->src_type == LV_IMAGE_SRC_FILE) { /* If all fine, then the file will be kept open */ const char * fn = dsc->src; uint8_t * data; @@ -540,8 +541,8 @@ end: memset(sjpeg, 0, sizeof(SJPEG)); dsc->user_data = sjpeg; - sjpeg->sjpeg_data = (uint8_t *)((lv_img_dsc_t *)(dsc->src))->data; - sjpeg->sjpeg_data_size = ((lv_img_dsc_t *)(dsc->src))->data_size; + sjpeg->sjpeg_data = (uint8_t *)((lv_image_dsc_t *)(dsc->src))->data; + sjpeg->sjpeg_data_size = ((lv_image_dsc_t *)(dsc->src))->data_size; } data = buff; data += 14; @@ -628,8 +629,8 @@ end: memset(sjpeg, 0, sizeof(SJPEG)); dsc->user_data = sjpeg; - sjpeg->sjpeg_data = (uint8_t *)((lv_img_dsc_t *)(dsc->src))->data; - sjpeg->sjpeg_data_size = ((lv_img_dsc_t *)(dsc->src))->data_size; + sjpeg->sjpeg_data = (uint8_t *)((lv_image_dsc_t *)(dsc->src))->data; + sjpeg->sjpeg_data_size = ((lv_image_dsc_t *)(dsc->src))->data_size; } uint8_t * workb_temp = lv_malloc(TJPGD_WORKBUFF_SIZE); @@ -722,11 +723,12 @@ end: * @return LV_RES_OK: ok; LV_RES_INV: failed */ -static lv_res_t decoder_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, +static lv_res_t decoder_read_line(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, lv_coord_t x, + lv_coord_t y, lv_coord_t len, uint8_t * buf) { LV_UNUSED(decoder); - if(dsc->src_type == LV_IMG_SRC_VARIABLE) { + if(dsc->src_type == LV_IMAGE_SRC_VARIABLE) { SJPEG * sjpeg = (SJPEG *) dsc->user_data; JRESULT rc; @@ -796,7 +798,7 @@ static lv_res_t decoder_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc #endif // LV_COLOR_DEPTH return LV_RES_OK; } - else if(dsc->src_type == LV_IMG_SRC_FILE) { + else if(dsc->src_type == LV_IMAGE_SRC_FILE) { SJPEG * sjpeg = (SJPEG *) dsc->user_data; JRESULT rc; int sjpeg_req_frame_index = y / sjpeg->sjpeg_single_frame_height; @@ -878,7 +880,7 @@ end: * @param decoder pointer to the decoder where this function belongs * @param dsc pointer to a descriptor which describes this decoding session */ -static void decoder_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +static void decoder_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc) { LV_UNUSED(decoder); /*Free all allocated data*/ @@ -886,14 +888,14 @@ static void decoder_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc if(!sjpeg) return; switch(dsc->src_type) { - case LV_IMG_SRC_FILE: + case LV_IMAGE_SRC_FILE: if(sjpeg->io.lv_file.file_d) { lv_fs_close(&(sjpeg->io.lv_file)); } lv_sjpg_cleanup(sjpeg); break; - case LV_IMG_SRC_VARIABLE: + case LV_IMAGE_SRC_VARIABLE: lv_sjpg_cleanup(sjpeg); break; diff --git a/src/lv_api_map.h b/src/lv_api_map.h index b76459f33..4ef8a079b 100644 --- a/src/lv_api_map.h +++ b/src/lv_api_map.h @@ -19,24 +19,26 @@ extern "C" { * DEFINES *********************/ -#define LV_NO_TASK_READY LV_NO_TIMER_READY -#define LV_INDEV_STATE_REL LV_INDEV_STATE_RELEASED -#define LV_INDEV_STATE_PR LV_INDEV_STATE_PRESSED -#define LV_OBJ_FLAG_SNAPABLE LV_OBJ_FLAG_SNAPPABLE /*Fixed typo*/ -#define LV_IMG_ZOOM_NONE LV_ZOOM_NONE +#define LV_BTNMATRIX_BTN_NONE LV_BUTTONMATRIX_BUTTON_NONE -#ifndef LV_COLOR_SIZE -# define LV_COLOR_SIZE LV_COLOR_DEPTH -#endif +#define LV_BTNMATRIX_CTRL_HIDDEN LV_BUTTONMATRIX_CTRL_HIDDEN +#define LV_BTNMATRIX_CTRL_NO_REPEAT LV_BUTTONMATRIX_CTRL_NO_REPEAT +#define LV_BTNMATRIX_CTRL_DISABLED LV_BUTTONMATRIX_CTRL_DISABLED +#define LV_BTNMATRIX_CTRL_CHECKABLE LV_BUTTONMATRIX_CTRL_CHECKABLE +#define LV_BTNMATRIX_CTRL_CHECKED LV_BUTTONMATRIX_CTRL_CHECKED +#define LV_BTNMATRIX_CTRL_CLICK_TRIG LV_BUTTONMATRIX_CTRL_CLICK_TRIG +#define LV_BTNMATRIX_CTRL_POPOVER LV_BUTTONMATRIX_CTRL_POPOVER +#define LV_BTNMATRIX_CTRL_RECOLOR LV_BUTTONMATRIX_CTRL_RECOLOR +#define LV_BTNMATRIX_CTRL_CUSTOM_1 LV_BUTTONMATRIX_CTRL_CUSTOM_1 +#define LV_BTNMATRIX_CTRL_CUSTOM_2 LV_BUTTONMATRIX_CTRL_CUSTOM_2 -#ifndef LV_COLOR_SIZE -# define LV_COLOR_SIZE LV_COLOR_DEPTH -#endif /********************** * TYPEDEFS **********************/ +typedef lv_image_dsc_t lv_img_dsc_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -46,14 +48,6 @@ static inline LV_ATTRIBUTE_TIMER_HANDLER uint32_t lv_task_handler(void) return lv_timer_handler(); } -/********************** - * MACROS - **********************/ - - -/********************** - * INLINE FUNCTIONS - **********************/ /** * Move the object to the foreground. @@ -83,16 +77,64 @@ static inline void lv_obj_move_background(lv_obj_t * obj) lv_obj_move_to_index(obj, 0); } + +/********************** + * MACROS + **********************/ +#define lv_img_create lv_image_create +#define lv_img_set_src lv_image_set_src +#define lv_img_set_offset_x lv_image_set_offset_x +#define lv_img_set_offset_y lv_image_set_offset_y +#define lv_img_set_angle lv_image_set_angle +#define lv_img_set_pivot lv_image_set_pivot +#define lv_img_set_zoom lv_image_set_zoom +#define lv_img_set_antialias lv_image_set_antialias +#define lv_img_set_size_mode lv_image_set_size_mode +#define lv_img_get_src lv_image_get_src +#define lv_img_get_offset_x lv_image_get_offset_x +#define lv_img_get_offset_y lv_image_get_offset_y +#define lv_img_get_angle lv_image_get_angle +#define lv_img_get_pivot lv_image_get_pivot +#define lv_img_get_zoom lv_image_get_zoom +#define lv_img_get_antialias lv_image_get_antialias +#define lv_img_get_size_mode lv_image_get_size_mode + +#define lv_list_set_btn_text lv_list_set_button_text +#define lv_list_get_btn_text lv_list_get_button_text +#define lv_list_add_btn lv_list_add_button + +#define lv_btn_create lv_button_create + +#define lv_btnmatrix_create lv_buttonmatrix_create +#define lv_btnmatrix_set_map lv_buttonmatrix_set_map +#define lv_btnmatrix_set_ctrl_map lv_buttonmatrix_set_ctrl_map +#define lv_btnmatrix_set_selected_btn lv_buttonmatrix_set_selected_button +#define lv_btnmatrix_set_btn_ctrl lv_buttonmatrix_set_button_ctrl +#define lv_btnmatrix_clear_btn_ctrl lv_buttonmatrix_clear_button_ctrl +#define lv_btnmatrix_set_btn_ctrl_all lv_buttonmatrix_set_button_ctrl_all +#define lv_btnmatrix_clear_btn_ctrl_all lv_buttonmatrix_clear_button_ctrl_all +#define lv_btnmatrix_set_btn_width lv_buttonmatrix_set_button_width +#define lv_btnmatrix_set_one_checked lv_buttonmatrix_set_one_checked +#define lv_btnmatrix_get_map lv_buttonmatrix_get_map +#define lv_btnmatrix_get_selected_btn lv_buttonmatrix_get_selected_button +#define lv_btnmatrix_get_button_text lv_buttonmatrix_get_button_text +#define lv_btnmatrix_has_button_ctrl lv_buttonmatrix_has_button_ctrl +#define lv_btnmatrix_get_one_checked lv_buttonmatrix_get_one_checked + +#define lv_tabview_get_tab_btns lv_tabview_get_tab_buttons + +#define lv_msgbox_get_btns lv_msgbox_get_buttons + +/********************** + * MACROS + **********************/ +/** Use this macro to declare an image in a C file*/ +#define LV_IMG_DECLARE(var_name) extern const lv_image_dsc_t var_name; + /********************** * DEPRECATED FUNCTIONS **********************/ -static inline uint32_t lv_obj_get_child_id(const struct _lv_obj_t * obj) -{ - LV_LOG_WARN("lv_obj_get_child_id(obj) is deprecated, please use lv_obj_get_index(obj)."); - return lv_obj_get_index(obj); -} - #ifdef __cplusplus } /*extern "C"*/ #endif diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index 57b6e5e3b..e84993e70 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -694,11 +694,11 @@ *With other image decoders (e.g. PNG or JPG) caching save the continuous open/decode of images. *However the opened images consume additional RAM. *0: to disable caching*/ -#ifndef LV_IMG_CACHE_DEF_SIZE - #ifdef CONFIG_LV_IMG_CACHE_DEF_SIZE - #define LV_IMG_CACHE_DEF_SIZE CONFIG_LV_IMG_CACHE_DEF_SIZE +#ifndef LV_IMAGE_CACHE_DEF_SIZE + #ifdef CONFIG_LV_IMAGE_CACHE_DEF_SIZE + #define LV_IMAGE_CACHE_DEF_SIZE CONFIG_LV_IMAGE_CACHE_DEF_SIZE #else - #define LV_IMG_CACHE_DEF_SIZE 0 + #define LV_IMAGE_CACHE_DEF_SIZE 0 #endif #endif @@ -2226,11 +2226,11 @@ #endif /*1: Use img cache to buffer header information*/ - #ifndef LV_IMGFONT_USE_IMG_CACHE_HEADER - #ifdef CONFIG_LV_IMGFONT_USE_IMG_CACHE_HEADER - #define LV_IMGFONT_USE_IMG_CACHE_HEADER CONFIG_LV_IMGFONT_USE_IMG_CACHE_HEADER + #ifndef LV_IMGFONT_USE_IMAGE_CACHE_HEADER + #ifdef CONFIG_LV_IMGFONT_USE_IMAGE_CACHE_HEADER + #define LV_IMGFONT_USE_IMAGE_CACHE_HEADER CONFIG_LV_IMGFONT_USE_IMAGE_CACHE_HEADER #else - #define LV_IMGFONT_USE_IMG_CACHE_HEADER 0 + #define LV_IMGFONT_USE_IMAGE_CACHE_HEADER 0 #endif #endif #endif diff --git a/src/lv_init.c b/src/lv_init.c index 3a90b72e3..0305a1cd2 100644 --- a/src/lv_init.c +++ b/src/lv_init.c @@ -19,7 +19,7 @@ #include "libs/png/lv_png.h" #include "libs/sjpg/lv_sjpg.h" #include "draw/lv_draw.h" -#include "draw/lv_img_cache_builtin.h" +#include "draw/lv_image_cache_builtin.h" #include "misc/lv_async.h" #include "misc/lv_fs.h" @@ -145,9 +145,9 @@ void lv_init(void) _lv_sysmon_builtin_init(); #endif - _lv_img_decoder_init(); + _lv_image_decoder_init(); - _lv_img_cache_builtin_init(); + _lv_image_cache_builtin_init(); /*Test if the IDE has UTF-8 encoding*/ const char * txt = "Á"; diff --git a/src/misc/lv_color.h b/src/misc/lv_color.h index 8d8110251..7a4915287 100644 --- a/src/misc/lv_color.h +++ b/src/misc/lv_color.h @@ -167,21 +167,21 @@ typedef uint8_t lv_color_format_t; /** * Get the pixel size of a color format in bytes - * @param src_cf a color format (`LV_IMG_CF_...`) + * @param src_cf a color format (`LV_IMAGE_CF_...`) * @return the pixel size in bytes */ uint8_t lv_color_format_get_size(lv_color_format_t src_cf); /** * Get the pixel size of a color format in bits, bpp - * @param src_cf a color format (`LV_IMG_CF_...`) + * @param src_cf a color format (`LV_IMAGE_CF_...`) * @return the pixel size in bits */ uint8_t lv_color_format_get_bpp(lv_color_format_t cf); /** * Check if a color format has alpha channel or not - * @param src_cf a color format (`LV_IMG_CF_...`) + * @param src_cf a color format (`LV_IMAGE_CF_...`) * @return true: has alpha channel; false: doesn't have alpha channel */ bool lv_color_format_has_alpha(lv_color_format_t src_cf); diff --git a/src/misc/lv_style.c b/src/misc/lv_style.c index 5f1671174..a6ea06909 100644 --- a/src/misc/lv_style.c +++ b/src/misc/lv_style.c @@ -71,11 +71,11 @@ const uint8_t _lv_style_builtin_prop_flag_lookup_table[_LV_STYLE_NUM_BUILT_IN_PR [LV_STYLE_BG_GRAD] = 0, [LV_STYLE_BG_DITHER_MODE] = 0, - [LV_STYLE_BG_IMG_SRC] = LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE, - [LV_STYLE_BG_IMG_OPA] = 0, - [LV_STYLE_BG_IMG_RECOLOR] = 0, - [LV_STYLE_BG_IMG_RECOLOR_OPA] = 0, - [LV_STYLE_BG_IMG_TILED] = 0, + [LV_STYLE_BG_IMAGE_SRC] = LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE, + [LV_STYLE_BG_IMAGE_OPA] = 0, + [LV_STYLE_BG_IMAGE_RECOLOR] = 0, + [LV_STYLE_BG_IMAGE_RECOLOR_OPA] = 0, + [LV_STYLE_BG_IMAGE_TILED] = 0, [LV_STYLE_BORDER_COLOR] = 0, [LV_STYLE_BORDER_OPA] = 0, @@ -95,9 +95,9 @@ const uint8_t _lv_style_builtin_prop_flag_lookup_table[_LV_STYLE_NUM_BUILT_IN_PR [LV_STYLE_SHADOW_COLOR] = 0, [LV_STYLE_SHADOW_OPA] = LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE, - [LV_STYLE_IMG_OPA] = 0, - [LV_STYLE_IMG_RECOLOR] = 0, - [LV_STYLE_IMG_RECOLOR_OPA] = 0, + [LV_STYLE_IMAGE_OPA] = 0, + [LV_STYLE_IMAGE_RECOLOR] = 0, + [LV_STYLE_IMAGE_RECOLOR_OPA] = 0, [LV_STYLE_LINE_WIDTH] = LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE, [LV_STYLE_LINE_DASH_WIDTH] = 0, @@ -110,7 +110,7 @@ const uint8_t _lv_style_builtin_prop_flag_lookup_table[_LV_STYLE_NUM_BUILT_IN_PR [LV_STYLE_ARC_ROUNDED] = 0, [LV_STYLE_ARC_COLOR] = 0, [LV_STYLE_ARC_OPA] = 0, - [LV_STYLE_ARC_IMG_SRC] = 0, + [LV_STYLE_ARC_IMAGE_SRC] = 0, [LV_STYLE_TEXT_COLOR] = LV_STYLE_PROP_FLAG_INHERITABLE, [LV_STYLE_TEXT_OPA] = LV_STYLE_PROP_FLAG_INHERITABLE, @@ -360,7 +360,7 @@ lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop) case LV_STYLE_ARC_COLOR: case LV_STYLE_LINE_COLOR: case LV_STYLE_TEXT_COLOR: - case LV_STYLE_IMG_RECOLOR: + case LV_STYLE_IMAGE_RECOLOR: return (lv_style_value_t) { .color = white }; @@ -368,8 +368,8 @@ lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop) case LV_STYLE_OPA_LAYERED: case LV_STYLE_BORDER_OPA: case LV_STYLE_TEXT_OPA: - case LV_STYLE_IMG_OPA: - case LV_STYLE_BG_IMG_OPA: + case LV_STYLE_IMAGE_OPA: + case LV_STYLE_BG_IMAGE_OPA: case LV_STYLE_OUTLINE_OPA: case LV_STYLE_SHADOW_OPA: case LV_STYLE_LINE_OPA: diff --git a/src/misc/lv_style.h b/src/misc/lv_style.h index 9b529f6d6..c20fb0f70 100644 --- a/src/misc/lv_style.h +++ b/src/misc/lv_style.h @@ -244,12 +244,12 @@ enum _lv_style_prop_t { LV_STYLE_BG_DITHER_MODE = 37, LV_STYLE_BASE_DIR = 38, - LV_STYLE_BG_IMG_SRC = 40, - LV_STYLE_BG_IMG_OPA = 41, - LV_STYLE_BG_IMG_RECOLOR = 42, - LV_STYLE_BG_IMG_RECOLOR_OPA = 43, + LV_STYLE_BG_IMAGE_SRC = 40, + LV_STYLE_BG_IMAGE_OPA = 41, + LV_STYLE_BG_IMAGE_RECOLOR = 42, + LV_STYLE_BG_IMAGE_RECOLOR_OPA = 43, - LV_STYLE_BG_IMG_TILED = 44, + LV_STYLE_BG_IMAGE_TILED = 44, LV_STYLE_CLIP_CORNER = 45, @@ -275,9 +275,9 @@ enum _lv_style_prop_t { LV_STYLE_SHADOW_OFS_Y = 65, LV_STYLE_SHADOW_SPREAD = 66, - LV_STYLE_IMG_OPA = 68, - LV_STYLE_IMG_RECOLOR = 69, - LV_STYLE_IMG_RECOLOR_OPA = 70, + LV_STYLE_IMAGE_OPA = 68, + LV_STYLE_IMAGE_RECOLOR = 69, + LV_STYLE_IMAGE_RECOLOR_OPA = 70, LV_STYLE_LINE_WIDTH = 72, LV_STYLE_LINE_DASH_WIDTH = 73, @@ -291,7 +291,7 @@ enum _lv_style_prop_t { LV_STYLE_ARC_ROUNDED = 81, LV_STYLE_ARC_COLOR = 82, LV_STYLE_ARC_OPA = 83, - LV_STYLE_ARC_IMG_SRC = 84, + LV_STYLE_ARC_IMAGE_SRC = 84, LV_STYLE_TEXT_COLOR = 88, LV_STYLE_TEXT_OPA = 89, diff --git a/src/misc/lv_style_gen.c b/src/misc/lv_style_gen.c index 0b87a5395..cbdb96640 100644 --- a/src/misc/lv_style_gen.c +++ b/src/misc/lv_style_gen.c @@ -360,55 +360,55 @@ void lv_style_set_bg_dither_mode(lv_style_t * style, lv_dither_mode_t value) const lv_style_prop_t _lv_style_const_prop_id_BG_DITHER_MODE = LV_STYLE_BG_DITHER_MODE; -void lv_style_set_bg_img_src(lv_style_t * style, const void * value) +void lv_style_set_bg_image_src(lv_style_t * style, const void * value) { lv_style_value_t v = { .ptr = value }; - lv_style_set_prop(style, LV_STYLE_BG_IMG_SRC, v); + lv_style_set_prop(style, LV_STYLE_BG_IMAGE_SRC, v); } -const lv_style_prop_t _lv_style_const_prop_id_BG_IMG_SRC = LV_STYLE_BG_IMG_SRC; +const lv_style_prop_t _lv_style_const_prop_id_BG_IMAGE_SRC = LV_STYLE_BG_IMAGE_SRC; -void lv_style_set_bg_img_opa(lv_style_t * style, lv_opa_t value) +void lv_style_set_bg_image_opa(lv_style_t * style, lv_opa_t value) { lv_style_value_t v = { .num = (int32_t)value }; - lv_style_set_prop(style, LV_STYLE_BG_IMG_OPA, v); + lv_style_set_prop(style, LV_STYLE_BG_IMAGE_OPA, v); } -const lv_style_prop_t _lv_style_const_prop_id_BG_IMG_OPA = LV_STYLE_BG_IMG_OPA; +const lv_style_prop_t _lv_style_const_prop_id_BG_IMAGE_OPA = LV_STYLE_BG_IMAGE_OPA; -void lv_style_set_bg_img_recolor(lv_style_t * style, lv_color_t value) +void lv_style_set_bg_image_recolor(lv_style_t * style, lv_color_t value) { lv_style_value_t v = { .color = value }; - lv_style_set_prop(style, LV_STYLE_BG_IMG_RECOLOR, v); + lv_style_set_prop(style, LV_STYLE_BG_IMAGE_RECOLOR, v); } -const lv_style_prop_t _lv_style_const_prop_id_BG_IMG_RECOLOR = LV_STYLE_BG_IMG_RECOLOR; +const lv_style_prop_t _lv_style_const_prop_id_BG_IMAGE_RECOLOR = LV_STYLE_BG_IMAGE_RECOLOR; -void lv_style_set_bg_img_recolor_opa(lv_style_t * style, lv_opa_t value) +void lv_style_set_bg_image_recolor_opa(lv_style_t * style, lv_opa_t value) { lv_style_value_t v = { .num = (int32_t)value }; - lv_style_set_prop(style, LV_STYLE_BG_IMG_RECOLOR_OPA, v); + lv_style_set_prop(style, LV_STYLE_BG_IMAGE_RECOLOR_OPA, v); } -const lv_style_prop_t _lv_style_const_prop_id_BG_IMG_RECOLOR_OPA = LV_STYLE_BG_IMG_RECOLOR_OPA; +const lv_style_prop_t _lv_style_const_prop_id_BG_IMAGE_RECOLOR_OPA = LV_STYLE_BG_IMAGE_RECOLOR_OPA; -void lv_style_set_bg_img_tiled(lv_style_t * style, bool value) +void lv_style_set_bg_image_tiled(lv_style_t * style, bool value) { lv_style_value_t v = { .num = (int32_t)value }; - lv_style_set_prop(style, LV_STYLE_BG_IMG_TILED, v); + lv_style_set_prop(style, LV_STYLE_BG_IMAGE_TILED, v); } -const lv_style_prop_t _lv_style_const_prop_id_BG_IMG_TILED = LV_STYLE_BG_IMG_TILED; +const lv_style_prop_t _lv_style_const_prop_id_BG_IMAGE_TILED = LV_STYLE_BG_IMAGE_TILED; void lv_style_set_border_color(lv_style_t * style, lv_color_t value) { @@ -560,35 +560,35 @@ void lv_style_set_shadow_opa(lv_style_t * style, lv_opa_t value) const lv_style_prop_t _lv_style_const_prop_id_SHADOW_OPA = LV_STYLE_SHADOW_OPA; -void lv_style_set_img_opa(lv_style_t * style, lv_opa_t value) +void lv_style_set_image_opa(lv_style_t * style, lv_opa_t value) { lv_style_value_t v = { .num = (int32_t)value }; - lv_style_set_prop(style, LV_STYLE_IMG_OPA, v); + lv_style_set_prop(style, LV_STYLE_IMAGE_OPA, v); } -const lv_style_prop_t _lv_style_const_prop_id_IMG_OPA = LV_STYLE_IMG_OPA; +const lv_style_prop_t _lv_style_const_prop_id_IMAGE_OPA = LV_STYLE_IMAGE_OPA; -void lv_style_set_img_recolor(lv_style_t * style, lv_color_t value) +void lv_style_set_image_recolor(lv_style_t * style, lv_color_t value) { lv_style_value_t v = { .color = value }; - lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR, v); + lv_style_set_prop(style, LV_STYLE_IMAGE_RECOLOR, v); } -const lv_style_prop_t _lv_style_const_prop_id_IMG_RECOLOR = LV_STYLE_IMG_RECOLOR; +const lv_style_prop_t _lv_style_const_prop_id_IMAGE_RECOLOR = LV_STYLE_IMAGE_RECOLOR; -void lv_style_set_img_recolor_opa(lv_style_t * style, lv_opa_t value) +void lv_style_set_image_recolor_opa(lv_style_t * style, lv_opa_t value) { lv_style_value_t v = { .num = (int32_t)value }; - lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR_OPA, v); + lv_style_set_prop(style, LV_STYLE_IMAGE_RECOLOR_OPA, v); } -const lv_style_prop_t _lv_style_const_prop_id_IMG_RECOLOR_OPA = LV_STYLE_IMG_RECOLOR_OPA; +const lv_style_prop_t _lv_style_const_prop_id_IMAGE_RECOLOR_OPA = LV_STYLE_IMAGE_RECOLOR_OPA; void lv_style_set_line_width(lv_style_t * style, lv_coord_t value) { @@ -690,15 +690,15 @@ void lv_style_set_arc_opa(lv_style_t * style, lv_opa_t value) const lv_style_prop_t _lv_style_const_prop_id_ARC_OPA = LV_STYLE_ARC_OPA; -void lv_style_set_arc_img_src(lv_style_t * style, const void * value) +void lv_style_set_arc_image_src(lv_style_t * style, const void * value) { lv_style_value_t v = { .ptr = value }; - lv_style_set_prop(style, LV_STYLE_ARC_IMG_SRC, v); + lv_style_set_prop(style, LV_STYLE_ARC_IMAGE_SRC, v); } -const lv_style_prop_t _lv_style_const_prop_id_ARC_IMG_SRC = LV_STYLE_ARC_IMG_SRC; +const lv_style_prop_t _lv_style_const_prop_id_ARC_IMAGE_SRC = LV_STYLE_ARC_IMAGE_SRC; void lv_style_set_text_color(lv_style_t * style, lv_color_t value) { diff --git a/src/misc/lv_style_gen.h b/src/misc/lv_style_gen.h index 0697011af..4be79ddd7 100644 --- a/src/misc/lv_style_gen.h +++ b/src/misc/lv_style_gen.h @@ -80,16 +80,16 @@ void lv_style_set_bg_grad(lv_style_t * style, const lv_grad_dsc_t * value); extern const lv_style_prop_t _lv_style_const_prop_id_BG_GRAD; void lv_style_set_bg_dither_mode(lv_style_t * style, lv_dither_mode_t value); extern const lv_style_prop_t _lv_style_const_prop_id_BG_DITHER_MODE; -void lv_style_set_bg_img_src(lv_style_t * style, const void * value); -extern const lv_style_prop_t _lv_style_const_prop_id_BG_IMG_SRC; -void lv_style_set_bg_img_opa(lv_style_t * style, lv_opa_t value); -extern const lv_style_prop_t _lv_style_const_prop_id_BG_IMG_OPA; -void lv_style_set_bg_img_recolor(lv_style_t * style, lv_color_t value); -extern const lv_style_prop_t _lv_style_const_prop_id_BG_IMG_RECOLOR; -void lv_style_set_bg_img_recolor_opa(lv_style_t * style, lv_opa_t value); -extern const lv_style_prop_t _lv_style_const_prop_id_BG_IMG_RECOLOR_OPA; -void lv_style_set_bg_img_tiled(lv_style_t * style, bool value); -extern const lv_style_prop_t _lv_style_const_prop_id_BG_IMG_TILED; +void lv_style_set_bg_image_src(lv_style_t * style, const void * value); +extern const lv_style_prop_t _lv_style_const_prop_id_BG_IMAGE_SRC; +void lv_style_set_bg_image_opa(lv_style_t * style, lv_opa_t value); +extern const lv_style_prop_t _lv_style_const_prop_id_BG_IMAGE_OPA; +void lv_style_set_bg_image_recolor(lv_style_t * style, lv_color_t value); +extern const lv_style_prop_t _lv_style_const_prop_id_BG_IMAGE_RECOLOR; +void lv_style_set_bg_image_recolor_opa(lv_style_t * style, lv_opa_t value); +extern const lv_style_prop_t _lv_style_const_prop_id_BG_IMAGE_RECOLOR_OPA; +void lv_style_set_bg_image_tiled(lv_style_t * style, bool value); +extern const lv_style_prop_t _lv_style_const_prop_id_BG_IMAGE_TILED; void lv_style_set_border_color(lv_style_t * style, lv_color_t value); extern const lv_style_prop_t _lv_style_const_prop_id_BORDER_COLOR; void lv_style_set_border_opa(lv_style_t * style, lv_opa_t value); @@ -120,12 +120,12 @@ void lv_style_set_shadow_color(lv_style_t * style, lv_color_t value); extern const lv_style_prop_t _lv_style_const_prop_id_SHADOW_COLOR; void lv_style_set_shadow_opa(lv_style_t * style, lv_opa_t value); extern const lv_style_prop_t _lv_style_const_prop_id_SHADOW_OPA; -void lv_style_set_img_opa(lv_style_t * style, lv_opa_t value); -extern const lv_style_prop_t _lv_style_const_prop_id_IMG_OPA; -void lv_style_set_img_recolor(lv_style_t * style, lv_color_t value); -extern const lv_style_prop_t _lv_style_const_prop_id_IMG_RECOLOR; -void lv_style_set_img_recolor_opa(lv_style_t * style, lv_opa_t value); -extern const lv_style_prop_t _lv_style_const_prop_id_IMG_RECOLOR_OPA; +void lv_style_set_image_opa(lv_style_t * style, lv_opa_t value); +extern const lv_style_prop_t _lv_style_const_prop_id_IMAGE_OPA; +void lv_style_set_image_recolor(lv_style_t * style, lv_color_t value); +extern const lv_style_prop_t _lv_style_const_prop_id_IMAGE_RECOLOR; +void lv_style_set_image_recolor_opa(lv_style_t * style, lv_opa_t value); +extern const lv_style_prop_t _lv_style_const_prop_id_IMAGE_RECOLOR_OPA; void lv_style_set_line_width(lv_style_t * style, lv_coord_t value); extern const lv_style_prop_t _lv_style_const_prop_id_LINE_WIDTH; void lv_style_set_line_dash_width(lv_style_t * style, lv_coord_t value); @@ -146,8 +146,8 @@ void lv_style_set_arc_color(lv_style_t * style, lv_color_t value); extern const lv_style_prop_t _lv_style_const_prop_id_ARC_COLOR; void lv_style_set_arc_opa(lv_style_t * style, lv_opa_t value); extern const lv_style_prop_t _lv_style_const_prop_id_ARC_OPA; -void lv_style_set_arc_img_src(lv_style_t * style, const void * value); -extern const lv_style_prop_t _lv_style_const_prop_id_ARC_IMG_SRC; +void lv_style_set_arc_image_src(lv_style_t * style, const void * value); +extern const lv_style_prop_t _lv_style_const_prop_id_ARC_IMAGE_SRC; void lv_style_set_text_color(lv_style_t * style, lv_color_t value); extern const lv_style_prop_t _lv_style_const_prop_id_TEXT_COLOR; void lv_style_set_text_opa(lv_style_t * style, lv_opa_t value); @@ -394,29 +394,29 @@ extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_SPAN; .prop_ptr = &_lv_style_const_prop_id_BG_DITHER_MODE, .value = { .num = (int32_t)val } \ } -#define LV_STYLE_CONST_BG_IMG_SRC(val) \ +#define LV_STYLE_CONST_BG_IMAGE_SRC(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_BG_IMG_SRC, .value = { .ptr = val } \ + .prop_ptr = &_lv_style_const_prop_id_BG_IMAGE_SRC, .value = { .ptr = val } \ } -#define LV_STYLE_CONST_BG_IMG_OPA(val) \ +#define LV_STYLE_CONST_BG_IMAGE_OPA(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_BG_IMG_OPA, .value = { .num = (int32_t)val } \ + .prop_ptr = &_lv_style_const_prop_id_BG_IMAGE_OPA, .value = { .num = (int32_t)val } \ } -#define LV_STYLE_CONST_BG_IMG_RECOLOR(val) \ +#define LV_STYLE_CONST_BG_IMAGE_RECOLOR(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_BG_IMG_RECOLOR, .value = { .color = val } \ + .prop_ptr = &_lv_style_const_prop_id_BG_IMAGE_RECOLOR, .value = { .color = val } \ } -#define LV_STYLE_CONST_BG_IMG_RECOLOR_OPA(val) \ +#define LV_STYLE_CONST_BG_IMAGE_RECOLOR_OPA(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_BG_IMG_RECOLOR_OPA, .value = { .num = (int32_t)val } \ + .prop_ptr = &_lv_style_const_prop_id_BG_IMAGE_RECOLOR_OPA, .value = { .num = (int32_t)val } \ } -#define LV_STYLE_CONST_BG_IMG_TILED(val) \ +#define LV_STYLE_CONST_BG_IMAGE_TILED(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_BG_IMG_TILED, .value = { .num = (int32_t)val } \ + .prop_ptr = &_lv_style_const_prop_id_BG_IMAGE_TILED, .value = { .num = (int32_t)val } \ } #define LV_STYLE_CONST_BORDER_COLOR(val) \ @@ -494,19 +494,19 @@ extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_SPAN; .prop_ptr = &_lv_style_const_prop_id_SHADOW_OPA, .value = { .num = (int32_t)val } \ } -#define LV_STYLE_CONST_IMG_OPA(val) \ +#define LV_STYLE_CONST_IMAGE_OPA(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_IMG_OPA, .value = { .num = (int32_t)val } \ + .prop_ptr = &_lv_style_const_prop_id_IMAGE_OPA, .value = { .num = (int32_t)val } \ } -#define LV_STYLE_CONST_IMG_RECOLOR(val) \ +#define LV_STYLE_CONST_IMAGE_RECOLOR(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_IMG_RECOLOR, .value = { .color = val } \ + .prop_ptr = &_lv_style_const_prop_id_IMAGE_RECOLOR, .value = { .color = val } \ } -#define LV_STYLE_CONST_IMG_RECOLOR_OPA(val) \ +#define LV_STYLE_CONST_IMAGE_RECOLOR_OPA(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_IMG_RECOLOR_OPA, .value = { .num = (int32_t)val } \ + .prop_ptr = &_lv_style_const_prop_id_IMAGE_RECOLOR_OPA, .value = { .num = (int32_t)val } \ } #define LV_STYLE_CONST_LINE_WIDTH(val) \ @@ -559,9 +559,9 @@ extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_SPAN; .prop_ptr = &_lv_style_const_prop_id_ARC_OPA, .value = { .num = (int32_t)val } \ } -#define LV_STYLE_CONST_ARC_IMG_SRC(val) \ +#define LV_STYLE_CONST_ARC_IMAGE_SRC(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_ARC_IMG_SRC, .value = { .ptr = val } \ + .prop_ptr = &_lv_style_const_prop_id_ARC_IMAGE_SRC, .value = { .ptr = val } \ } #define LV_STYLE_CONST_TEXT_COLOR(val) \ diff --git a/src/others/file_explorer/lv_file_explorer.c b/src/others/file_explorer/lv_file_explorer.c index 6a391a3cc..622f25856 100644 --- a/src/others/file_explorer/lv_file_explorer.c +++ b/src/others/file_explorer/lv_file_explorer.c @@ -19,7 +19,7 @@ #define FILE_EXPLORER_QUICK_ACCESS_AREA_WIDTH (22) #define FILE_EXPLORER_BROWSER_AREA_WIDTH (100 - FILE_EXPLORER_QUICK_ACCESS_AREA_WIDTH) -#define quick_access_list_btn_style (LV_GLOBAL_DEFAULT()->fe_list_btn_style) +#define quick_access_list_button_style (LV_GLOBAL_DEFAULT()->fe_list_button_style) /********************** * TYPEDEFS @@ -295,7 +295,7 @@ static void lv_file_explorer_constructor(const lv_obj_class_t * class_p, lv_obj_ lv_obj_set_size(explorer->list_device, LV_PCT(100), LV_SIZE_CONTENT); lv_obj_set_style_bg_color(lv_list_add_text(explorer->list_device, "DEVICE"), lv_palette_main(LV_PALETTE_ORANGE), 0); - btn = lv_list_add_btn(explorer->list_device, NULL, LV_SYMBOL_DRIVE " File System"); + btn = lv_list_add_button(explorer->list_device, NULL, LV_SYMBOL_DRIVE " File System"); lv_obj_add_event(btn, quick_access_event_handler, LV_EVENT_CLICKED, obj); /*list 2*/ @@ -303,15 +303,15 @@ static void lv_file_explorer_constructor(const lv_obj_class_t * class_p, lv_obj_ lv_obj_set_size(explorer->list_places, LV_PCT(100), LV_SIZE_CONTENT); lv_obj_set_style_bg_color(lv_list_add_text(explorer->list_places, "PLACES"), lv_palette_main(LV_PALETTE_LIME), 0); - btn = lv_list_add_btn(explorer->list_places, NULL, LV_SYMBOL_HOME " HOME"); + btn = lv_list_add_button(explorer->list_places, NULL, LV_SYMBOL_HOME " HOME"); lv_obj_add_event(btn, quick_access_event_handler, LV_EVENT_CLICKED, obj); - btn = lv_list_add_btn(explorer->list_places, NULL, LV_SYMBOL_VIDEO " Video"); + btn = lv_list_add_button(explorer->list_places, NULL, LV_SYMBOL_VIDEO " Video"); lv_obj_add_event(btn, quick_access_event_handler, LV_EVENT_CLICKED, obj); - btn = lv_list_add_btn(explorer->list_places, NULL, LV_SYMBOL_IMAGE " Pictures"); + btn = lv_list_add_button(explorer->list_places, NULL, LV_SYMBOL_IMAGE " Pictures"); lv_obj_add_event(btn, quick_access_event_handler, LV_EVENT_CLICKED, obj); - btn = lv_list_add_btn(explorer->list_places, NULL, LV_SYMBOL_AUDIO " Music"); + btn = lv_list_add_button(explorer->list_places, NULL, LV_SYMBOL_AUDIO " Music"); lv_obj_add_event(btn, quick_access_event_handler, LV_EVENT_CLICKED, obj); - btn = lv_list_add_btn(explorer->list_places, NULL, LV_SYMBOL_FILE " Documents"); + btn = lv_list_add_button(explorer->list_places, NULL, LV_SYMBOL_FILE " Documents"); lv_obj_add_event(btn, quick_access_event_handler, LV_EVENT_CLICKED, obj); #endif @@ -399,9 +399,9 @@ static void init_style(lv_obj_t * obj) lv_obj_set_style_pad_all(explorer->list_places, 0, 0); /*Style of the quick access list btn in the quick access bar*/ - lv_style_init(&quick_access_list_btn_style); - lv_style_set_border_width(&quick_access_list_btn_style, 0); - lv_style_set_bg_color(&quick_access_list_btn_style, lv_color_hex(0xf2f1f6)); + lv_style_init(&quick_access_list_button_style); + lv_style_set_border_width(&quick_access_list_button_style, 0); + lv_style_set_bg_color(&quick_access_list_button_style, lv_color_hex(0xf2f1f6)); uint32_t i, j; for(i = 0; i < lv_obj_get_child_cnt(explorer->quick_access_area); i++) { @@ -409,8 +409,8 @@ static void init_style(lv_obj_t * obj) if(lv_obj_check_type(child, &lv_list_class)) { for(j = 0; j < lv_obj_get_child_cnt(child); j++) { lv_obj_t * list_child = lv_obj_get_child(child, j); - if(lv_obj_check_type(list_child, &lv_list_btn_class)) { - lv_obj_add_style(list_child, &quick_access_list_btn_style, 0); + if(lv_obj_check_type(list_child, &lv_list_button_class)) { + lv_obj_add_style(list_child, &quick_access_list_button_style, 0); } } } diff --git a/src/others/ime/lv_ime_pinyin.c b/src/others/ime/lv_ime_pinyin.c index a51934bf7..6deedc641 100644 --- a/src/others/ime/lv_ime_pinyin.c +++ b/src/others/ime/lv_ime_pinyin.c @@ -66,7 +66,7 @@ static const char * lv_btnm_def_pinyin_k9_map[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 2 LV_SYMBOL_LEFT"\0", "\0" }; -static lv_btnmatrix_ctrl_t default_kb_ctrl_k9_map[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 17] = { 1 }; +static lv_buttonmatrix_ctrl_t default_kb_ctrl_k9_map[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 17] = { 1 }; static char lv_pinyin_k9_cand_str[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 2][LV_IME_PINYIN_K9_MAX_INPUT] = {0}; #endif @@ -568,12 +568,12 @@ static void lv_ime_pinyin_constructor(const lv_obj_class_t * class_p, lv_obj_t * #endif /* Init pinyin_ime->cand_panel */ - pinyin_ime->cand_panel = lv_btnmatrix_create(lv_obj_get_parent(obj)); - lv_btnmatrix_set_map(pinyin_ime->cand_panel, (const char **)lv_btnm_def_pinyin_sel_map); + pinyin_ime->cand_panel = lv_buttonmatrix_create(lv_obj_get_parent(obj)); + lv_buttonmatrix_set_map(pinyin_ime->cand_panel, (const char **)lv_btnm_def_pinyin_sel_map); lv_obj_set_size(pinyin_ime->cand_panel, LV_PCT(100), LV_PCT(5)); lv_obj_add_flag(pinyin_ime->cand_panel, LV_OBJ_FLAG_HIDDEN); - lv_btnmatrix_set_one_checked(pinyin_ime->cand_panel, true); + lv_buttonmatrix_set_one_checked(pinyin_ime->cand_panel, true); lv_obj_clear_flag(pinyin_ime->cand_panel, LV_OBJ_FLAG_CLICK_FOCUSABLE); /* Set cand_panel style*/ @@ -640,10 +640,10 @@ static void lv_ime_pinyin_kb_event(lv_event_t * e) #endif if(code == LV_EVENT_VALUE_CHANGED) { - uint16_t btn_id = lv_btnmatrix_get_selected_btn(kb); - if(btn_id == LV_BTNMATRIX_BTN_NONE) return; + uint16_t btn_id = lv_buttonmatrix_get_selected_button(kb); + if(btn_id == LV_BUTTONMATRIX_BUTTON_NONE) return; - const char * txt = lv_btnmatrix_get_btn_text(kb, lv_btnmatrix_get_selected_btn(kb)); + const char * txt = lv_buttonmatrix_get_button_text(kb, lv_buttonmatrix_get_selected_button(kb)); if(txt == NULL) return; lv_obj_t * ta = lv_keyboard_get_textarea(pinyin_ime->kb); @@ -651,18 +651,18 @@ static void lv_ime_pinyin_kb_event(lv_event_t * e) #if LV_IME_PINYIN_USE_K9_MODE if(pinyin_ime->mode == LV_IME_PINYIN_MODE_K9) { - uint16_t tmp_btn_str_len = lv_strlen(pinyin_ime->input_char); - if((btn_id >= 16) && (tmp_btn_str_len > 0) && (btn_id < (16 + LV_IME_PINYIN_K9_CAND_TEXT_NUM))) { + uint16_t tmp_button_str_len = lv_strlen(pinyin_ime->input_char); + if((btn_id >= 16) && (tmp_button_str_len > 0) && (btn_id < (16 + LV_IME_PINYIN_K9_CAND_TEXT_NUM))) { lv_memzero(pinyin_ime->input_char, sizeof(pinyin_ime->input_char)); strcat(pinyin_ime->input_char, txt); pinyin_input_proc(obj); - for(int index = 0; index < tmp_btn_str_len; index++) { + for(int index = 0; index < tmp_button_str_len; index++) { lv_textarea_del_char(ta); } - pinyin_ime->ta_count = tmp_btn_str_len; - pinyin_ime->k9_input_str_len = tmp_btn_str_len; + pinyin_ime->ta_count = tmp_button_str_len; + pinyin_ime->k9_input_str_len = tmp_button_str_len; lv_textarea_add_text(ta, pinyin_ime->input_char); return; @@ -776,8 +776,8 @@ static void lv_ime_pinyin_cand_panel_event(lv_event_t * e) lv_obj_t * ta = lv_keyboard_get_textarea(pinyin_ime->kb); if(ta == NULL) return; - uint32_t id = lv_btnmatrix_get_selected_btn(cand_panel); - if(id == LV_BTNMATRIX_BTN_NONE) { + uint32_t id = lv_buttonmatrix_get_selected_button(cand_panel); + if(id == LV_BUTTONMATRIX_BUTTON_NONE) { return; } else if(id == 0) { @@ -789,7 +789,7 @@ static void lv_ime_pinyin_cand_panel_event(lv_event_t * e) return; } - const char * txt = lv_btnmatrix_get_btn_text(cand_panel, id); + const char * txt = lv_buttonmatrix_get_button_text(cand_panel, id); uint16_t index = 0; for(index = 0; index < pinyin_ime->ta_count; index++) lv_textarea_del_char(ta); @@ -999,14 +999,14 @@ static void pinyin_k9_init_data(lv_obj_t * obj) py_str_i++; } - default_kb_ctrl_k9_map[0] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1; - default_kb_ctrl_k9_map[4] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1; - default_kb_ctrl_k9_map[5] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1; - default_kb_ctrl_k9_map[9] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1; - default_kb_ctrl_k9_map[10] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1; - default_kb_ctrl_k9_map[14] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1; - default_kb_ctrl_k9_map[15] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1; - default_kb_ctrl_k9_map[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 16] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1; + default_kb_ctrl_k9_map[0] = LV_KEYBOARD_CTRL_BUTTON_FLAGS | 1; + default_kb_ctrl_k9_map[4] = LV_KEYBOARD_CTRL_BUTTON_FLAGS | 1; + default_kb_ctrl_k9_map[5] = LV_KEYBOARD_CTRL_BUTTON_FLAGS | 1; + default_kb_ctrl_k9_map[9] = LV_KEYBOARD_CTRL_BUTTON_FLAGS | 1; + default_kb_ctrl_k9_map[10] = LV_KEYBOARD_CTRL_BUTTON_FLAGS | 1; + default_kb_ctrl_k9_map[14] = LV_KEYBOARD_CTRL_BUTTON_FLAGS | 1; + default_kb_ctrl_k9_map[15] = LV_KEYBOARD_CTRL_BUTTON_FLAGS | 1; + default_kb_ctrl_k9_map[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 16] = LV_KEYBOARD_CTRL_BUTTON_FLAGS | 1; } static void pinyin_k9_get_legal_py(lv_obj_t * obj, char * k9_input, const char * py9_map[]) diff --git a/src/others/imgfont/lv_imgfont.c b/src/others/imgfont/lv_imgfont.c index 800c3c7a0..a8761293e 100644 --- a/src/others/imgfont/lv_imgfont.c +++ b/src/others/imgfont/lv_imgfont.c @@ -47,8 +47,8 @@ static bool imgfont_get_glyph_dsc(const lv_font_t * font, lv_font_glyph_dsc_t * **********************/ lv_font_t * lv_imgfont_create(uint16_t height, lv_imgfont_get_path_cb_t path_cb, void * user_data) { - LV_ASSERT_MSG(LV_IMGFONT_PATH_MAX_LEN > sizeof(lv_img_dsc_t), - "LV_IMGFONT_PATH_MAX_LEN must be greater than sizeof(lv_img_dsc_t)"); + LV_ASSERT_MSG(LV_IMGFONT_PATH_MAX_LEN > sizeof(lv_image_dsc_t), + "LV_IMGFONT_PATH_MAX_LEN must be greater than sizeof(lv_image_dsc_t)"); size_t size = sizeof(imgfont_dsc_t) + sizeof(lv_font_t); imgfont_dsc_t * dsc = (imgfont_dsc_t *)lv_malloc(size); @@ -108,10 +108,10 @@ static bool imgfont_get_glyph_dsc(const lv_font_t * font, lv_font_glyph_dsc_t * const void * img_src = dsc->path_cb(dsc->font, unicode, unicode_next, &offset_y, dsc->user_data); if(img_src == NULL) return false; - const lv_img_header_t * img_header; -#if LV_IMGFONT_USE_IMG_CACHE_HEADER + const lv_image_header_t * img_header; +#if LV_IMGFONT_USE_IMAGE_CACHE_HEADER lv_color_t color = { 0 }; - _lv_img_cache_entry_t * entry = _lv_img_cache_open(dsc->path, color, 0); + _lv_image_cache_entry_t * entry = _lv_image_cache_open(dsc->path, color, 0); if(entry == NULL) { return false; @@ -119,9 +119,9 @@ static bool imgfont_get_glyph_dsc(const lv_font_t * font, lv_font_glyph_dsc_t * img_header = &entry->dec_dsc.header; #else - lv_img_header_t header; + lv_image_header_t header; - if(lv_img_decoder_get_info(img_src, &header) != LV_RES_OK) { + if(lv_image_decoder_get_info(img_src, &header) != LV_RES_OK) { return false; } diff --git a/src/others/snapshot/lv_snapshot.c b/src/others/snapshot/lv_snapshot.c index 700db3b33..854dfd8b2 100644 --- a/src/others/snapshot/lv_snapshot.c +++ b/src/others/snapshot/lv_snapshot.c @@ -82,7 +82,7 @@ uint32_t lv_snapshot_buf_size_needed(lv_obj_t * obj, lv_color_format_t cf) * * @return LV_RES_OK on success, LV_RES_INV on error. */ -lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_color_format_t cf, lv_img_dsc_t * dsc, void * buf, +lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_color_format_t cf, lv_image_dsc_t * dsc, void * buf, uint32_t buff_size) { LV_ASSERT_NULL(obj); @@ -114,7 +114,7 @@ lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_color_format_t cf, lv_img_ds lv_area_increase(&snapshot_area, ext_size, ext_size); lv_memzero(buf, buff_size); - lv_memzero(dsc, sizeof(lv_img_dsc_t)); + lv_memzero(dsc, sizeof(lv_image_dsc_t)); dsc->data = buf; dsc->header.w = w; dsc->header.h = h; @@ -149,7 +149,7 @@ lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_color_format_t cf, lv_img_ds * * @return a pointer to an image descriptor, or NULL if failed. */ -lv_img_dsc_t * lv_snapshot_take(lv_obj_t * obj, lv_color_format_t cf) +lv_image_dsc_t * lv_snapshot_take(lv_obj_t * obj, lv_color_format_t cf) { LV_ASSERT_NULL(obj); uint32_t buff_size = lv_snapshot_buf_size_needed(obj, cf); @@ -161,7 +161,7 @@ lv_img_dsc_t * lv_snapshot_take(lv_obj_t * obj, lv_color_format_t cf) return NULL; } - lv_img_dsc_t * dsc = lv_malloc(sizeof(lv_img_dsc_t)); + lv_image_dsc_t * dsc = lv_malloc(sizeof(lv_image_dsc_t)); LV_ASSERT_MALLOC(buf); if(dsc == NULL) { lv_free(buf); @@ -184,7 +184,7 @@ lv_img_dsc_t * lv_snapshot_take(lv_obj_t * obj, lv_color_format_t cf) * @param dsc The image descriptor generated by lv_snapshot_take. * */ -void lv_snapshot_free(lv_img_dsc_t * dsc) +void lv_snapshot_free(lv_image_dsc_t * dsc) { if(!dsc) return; diff --git a/src/others/snapshot/lv_snapshot.h b/src/others/snapshot/lv_snapshot.h index c8835cb5b..2dd26eae3 100644 --- a/src/others/snapshot/lv_snapshot.h +++ b/src/others/snapshot/lv_snapshot.h @@ -38,7 +38,7 @@ extern "C" { * * @return a pointer to an image descriptor, or NULL if failed. */ -lv_img_dsc_t * lv_snapshot_take(lv_obj_t * obj, lv_color_format_t cf); +lv_image_dsc_t * lv_snapshot_take(lv_obj_t * obj, lv_color_format_t cf); /** Free the snapshot image returned by @ref lv_snapshot_take * @@ -47,7 +47,7 @@ lv_img_dsc_t * lv_snapshot_take(lv_obj_t * obj, lv_color_format_t cf); * @param dsc The image descriptor generated by lv_snapshot_take. * */ -void lv_snapshot_free(lv_img_dsc_t * dsc); +void lv_snapshot_free(lv_image_dsc_t * dsc); /** Get the buffer needed for object snapshot image. * @@ -68,7 +68,7 @@ uint32_t lv_snapshot_buf_size_needed(lv_obj_t * obj, lv_color_format_t cf); * * @return LV_RES_OK on success, LV_RES_INV on error. */ -lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_color_format_t cf, lv_img_dsc_t * dsc, void * buf, +lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_color_format_t cf, lv_image_dsc_t * dsc, void * buf, uint32_t buff_size); diff --git a/src/themes/basic/lv_theme_basic.c b/src/themes/basic/lv_theme_basic.c index 591e1a6ee..41e98e3fc 100644 --- a/src/themes/basic/lv_theme_basic.c +++ b/src/themes/basic/lv_theme_basic.c @@ -229,13 +229,13 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); } #if LV_USE_BTN - else if(lv_obj_check_type(obj, &lv_btn_class)) { + else if(lv_obj_check_type(obj, &lv_button_class)) { lv_obj_add_style(obj, &theme->styles.dark, 0); } #endif #if LV_USE_BTNMATRIX - else if(lv_obj_check_type(obj, &lv_btnmatrix_class)) { + else if(lv_obj_check_type(obj, &lv_buttonmatrix_class)) { #if LV_USE_MSGBOX if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_class)) { lv_obj_add_style(obj, &theme->styles.light, LV_PART_ITEMS); @@ -376,7 +376,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) else if(lv_obj_check_type(obj, &lv_list_text_class)) { } - else if(lv_obj_check_type(obj, &lv_list_btn_class)) { + else if(lv_obj_check_type(obj, &lv_list_button_class)) { lv_obj_add_style(obj, &theme->styles.dark, 0); } diff --git a/src/themes/default/lv_theme_default.c b/src/themes/default/lv_theme_default.c index 40cd7cff7..b75df4251 100644 --- a/src/themes/default/lv_theme_default.c +++ b/src/themes/default/lv_theme_default.c @@ -130,11 +130,11 @@ typedef struct { #endif #if LV_USE_MSGBOX - lv_style_t msgbox_bg, msgbox_btn_bg, msgbox_backdrop_bg; + lv_style_t msgbox_bg, msgbox_button_bg, msgbox_backdrop_bg; #endif #if LV_USE_KEYBOARD - lv_style_t keyboard_btn_bg; + lv_style_t keyboard_button_bg; #endif #if LV_USE_LIST @@ -430,7 +430,7 @@ static void style_init(struct _my_theme_t * theme) lv_style_set_radius(&theme->styles.cb_marker, RADIUS_DEFAULT / 2); style_init_reset(&theme->styles.cb_marker_checked); - lv_style_set_bg_img_src(&theme->styles.cb_marker_checked, LV_SYMBOL_OK); + lv_style_set_bg_image_src(&theme->styles.cb_marker_checked, LV_SYMBOL_OK); lv_style_set_text_color(&theme->styles.cb_marker_checked, lv_color_white()); lv_style_set_text_font(&theme->styles.cb_marker_checked, theme->base.font_small); #endif @@ -594,8 +594,8 @@ static void style_init(struct _my_theme_t * theme) #if LV_USE_MSGBOX /*To add space for for the button shadow*/ - style_init_reset(&theme->styles.msgbox_btn_bg); - lv_style_set_pad_all(&theme->styles.msgbox_btn_bg, _LV_DPX_CALC(theme->disp_dpi, 4)); + style_init_reset(&theme->styles.msgbox_button_bg); + lv_style_set_pad_all(&theme->styles.msgbox_button_bg, _LV_DPX_CALC(theme->disp_dpi, 4)); style_init_reset(&theme->styles.msgbox_bg); lv_style_set_max_width(&theme->styles.msgbox_bg, lv_pct(100)); @@ -605,9 +605,9 @@ static void style_init(struct _my_theme_t * theme) lv_style_set_bg_opa(&theme->styles.msgbox_backdrop_bg, LV_OPA_100); #endif #if LV_USE_KEYBOARD - style_init_reset(&theme->styles.keyboard_btn_bg); - lv_style_set_shadow_width(&theme->styles.keyboard_btn_bg, 0); - lv_style_set_radius(&theme->styles.keyboard_btn_bg, + style_init_reset(&theme->styles.keyboard_button_bg); + lv_style_set_shadow_width(&theme->styles.keyboard_button_bg, 0); + lv_style_set_radius(&theme->styles.keyboard_button_bg, theme->disp_size == DISP_SMALL ? RADIUS_DEFAULT / 2 : RADIUS_DEFAULT); #endif @@ -802,7 +802,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); } #if LV_USE_BTN - else if(lv_obj_check_type(obj, &lv_btn_class)) { + else if(lv_obj_check_type(obj, &lv_button_class)) { lv_obj_add_style(obj, &theme->styles.btn, 0); lv_obj_add_style(obj, &theme->styles.bg_color_primary, 0); lv_obj_add_style(obj, &theme->styles.transition_delayed, 0); @@ -832,10 +832,10 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) #endif #if LV_USE_BTNMATRIX - else if(lv_obj_check_type(obj, &lv_btnmatrix_class)) { + else if(lv_obj_check_type(obj, &lv_buttonmatrix_class)) { #if LV_USE_MSGBOX if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_class)) { - lv_obj_add_style(obj, &theme->styles.msgbox_btn_bg, 0); + lv_obj_add_style(obj, &theme->styles.msgbox_button_bg, 0); lv_obj_add_style(obj, &theme->styles.pad_gap, 0); lv_obj_add_style(obj, &theme->styles.btn, LV_PART_ITEMS); lv_obj_add_style(obj, &theme->styles.pressed, LV_PART_ITEMS | LV_STATE_PRESSED); @@ -1087,7 +1087,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) lv_obj_add_style(obj, &theme->styles.btn, LV_PART_ITEMS); lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_ITEMS | LV_STATE_DISABLED); lv_obj_add_style(obj, &theme->styles.bg_color_white, LV_PART_ITEMS); - lv_obj_add_style(obj, &theme->styles.keyboard_btn_bg, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.keyboard_button_bg, LV_PART_ITEMS); lv_obj_add_style(obj, &theme->styles.pressed, LV_PART_ITEMS | LV_STATE_PRESSED); lv_obj_add_style(obj, &theme->styles.bg_color_grey, LV_PART_ITEMS | LV_STATE_CHECKED); lv_obj_add_style(obj, &theme->styles.bg_color_primary_muted, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); @@ -1106,7 +1106,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) lv_obj_add_style(obj, &theme->styles.bg_color_grey, 0); lv_obj_add_style(obj, &theme->styles.list_item_grow, 0); } - else if(lv_obj_check_type(obj, &lv_list_btn_class)) { + else if(lv_obj_check_type(obj, &lv_list_button_class)) { lv_obj_add_style(obj, &theme->styles.bg_color_white, 0); lv_obj_add_style(obj, &theme->styles.list_btn, 0); lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_STATE_FOCUS_KEY); diff --git a/src/themes/mono/lv_theme_mono.c b/src/themes/mono/lv_theme_mono.c index 9998c3dc5..0c8405351 100644 --- a/src/themes/mono/lv_theme_mono.c +++ b/src/themes/mono/lv_theme_mono.c @@ -266,7 +266,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); } #if LV_USE_BTN - else if(lv_obj_check_type(obj, &lv_btn_class)) { + else if(lv_obj_check_type(obj, &lv_button_class)) { lv_obj_add_style(obj, &theme->styles.card, 0); lv_obj_add_style(obj, &theme->styles.pr, LV_STATE_PRESSED); lv_obj_add_style(obj, &theme->styles.inv, LV_STATE_CHECKED); @@ -277,7 +277,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) #endif #if LV_USE_BTNMATRIX - else if(lv_obj_check_type(obj, &lv_btnmatrix_class)) { + else if(lv_obj_check_type(obj, &lv_buttonmatrix_class)) { #if LV_USE_MSGBOX if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_class)) { lv_obj_add_style(obj, &theme->styles.pad_gap, 0); @@ -473,7 +473,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) else if(lv_obj_check_type(obj, &lv_list_text_class)) { } - else if(lv_obj_check_type(obj, &lv_list_btn_class)) { + else if(lv_obj_check_type(obj, &lv_list_button_class)) { lv_obj_add_style(obj, &theme->styles.card, 0); lv_obj_add_style(obj, &theme->styles.pr, LV_STATE_PRESSED); lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); diff --git a/src/widgets/animimg/lv_animimg.c b/src/widgets/animimage/lv_animimage.c similarity index 96% rename from src/widgets/animimg/lv_animimg.c rename to src/widgets/animimage/lv_animimage.c index 2b0ab59d2..31665705e 100644 --- a/src/widgets/animimg/lv_animimg.c +++ b/src/widgets/animimage/lv_animimage.c @@ -6,7 +6,7 @@ /********************* * INCLUDES *********************/ -#include "lv_animimg.h" +#include "lv_animimage.h" #if LV_USE_ANIMIMG != 0 /*Testing of dependencies*/ @@ -14,7 +14,7 @@ #error "lv_animimg: lv_img is required. Enable it in lv_conf.h (LV_USE_IMG 1) " #endif -#include "../../draw/lv_img_decoder.h" +#include "../../draw/lv_image_decoder.h" #include "../../misc/lv_assert.h" #include "../../misc/lv_fs.h" #include "../../misc/lv_txt.h" @@ -45,7 +45,7 @@ static void lv_animimg_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob const lv_obj_class_t lv_animimg_class = { .constructor_cb = lv_animimg_constructor, .instance_size = sizeof(lv_animimg_t), - .base_class = &lv_img_class + .base_class = &lv_image_class }; /********************** @@ -161,7 +161,7 @@ static void index_change(lv_obj_t * obj, int32_t index) idx = index % animimg->pic_count; - lv_img_set_src(obj, animimg->dsc[idx]); + lv_image_set_src(obj, animimg->dsc[idx]); } #endif diff --git a/src/widgets/animimg/lv_animimg.h b/src/widgets/animimage/lv_animimage.h similarity index 94% rename from src/widgets/animimg/lv_animimg.h rename to src/widgets/animimage/lv_animimage.h index fe802ca7f..cdda39092 100644 --- a/src/widgets/animimg/lv_animimg.h +++ b/src/widgets/animimage/lv_animimage.h @@ -3,8 +3,8 @@ * */ -#ifndef LV_ANIM_IMG_H -#define LV_ANIM_IMG_H +#ifndef LV_ANIM_IMAGE_H +#define LV_ANIM_IMAGE_H #ifdef __cplusplus extern "C" { @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#include "../img/lv_img.h" +#include "../image/lv_image.h" #if LV_USE_ANIMIMG != 0 @@ -34,7 +34,7 @@ extern const lv_obj_class_t lv_animimg_class; /*Data of image*/ typedef struct { - lv_img_t img; + lv_image_t img; lv_anim_t anim; /*picture sequence */ const void ** dsc; @@ -44,7 +44,7 @@ typedef struct { /*Image parts*/ enum _lv_animimg_part_t { - LV_ANIM_IMG_PART_MAIN, + LV_ANIM_IMAGE_PART_MAIN, }; @@ -136,4 +136,4 @@ uint16_t lv_animimg_get_repeat_count(lv_obj_t * img); } /* extern "C" */ #endif -#endif /*LV_ANIM_IMG_H*/ +#endif /*LV_ANIM_IMAGE_H*/ diff --git a/src/widgets/bar/lv_bar.c b/src/widgets/bar/lv_bar.c index 2f5f9a630..304e51b88 100644 --- a/src/widgets/bar/lv_bar.c +++ b/src/widgets/bar/lv_bar.c @@ -428,16 +428,16 @@ static void draw_indic(lv_event_t * e) if((hor && lv_area_get_width(&bar->indic_area) > indic_radius * 2) || (!hor && lv_area_get_height(&bar->indic_area) > indic_radius * 2)) { lv_opa_t bg_opa = draw_rect_dsc.bg_opa; - lv_opa_t bg_img_opa = draw_rect_dsc.bg_img_opa; + lv_opa_t bg_image_opa = draw_rect_dsc.bg_image_opa; lv_opa_t border_opa = draw_rect_dsc.border_opa; draw_rect_dsc.bg_opa = LV_OPA_TRANSP; - draw_rect_dsc.bg_img_opa = LV_OPA_TRANSP; + draw_rect_dsc.bg_image_opa = LV_OPA_TRANSP; draw_rect_dsc.border_opa = LV_OPA_TRANSP; lv_draw_rect(layer, &draw_rect_dsc, &bar->indic_area); draw_rect_dsc.bg_opa = bg_opa; - draw_rect_dsc.bg_img_opa = bg_img_opa; + draw_rect_dsc.bg_image_opa = bg_image_opa; draw_rect_dsc.border_opa = border_opa; } @@ -477,7 +477,7 @@ static void draw_indic(lv_event_t * e) lv_area_increase(&border2_area, 2, 2); draw_rect_dsc.border_width += 2; draw_rect_dsc.bg_opa = LV_OPA_TRANSP; - draw_rect_dsc.bg_img_opa = LV_OPA_TRANSP; + draw_rect_dsc.bg_image_opa = LV_OPA_TRANSP; draw_rect_dsc.shadow_opa = LV_OPA_TRANSP; lv_draw_rect(layer_indic, &draw_rect_dsc, &border2_area); @@ -490,8 +490,8 @@ static void draw_indic(lv_event_t * e) mask_dsc.area = mask_indic_max_area; lv_draw_mask_rect(layer_indic, &mask_dsc); - lv_draw_img_dsc_t layer_draw_dsc; - lv_draw_img_dsc_init(&layer_draw_dsc); + lv_draw_image_dsc_t layer_draw_dsc; + lv_draw_image_dsc_init(&layer_draw_dsc); layer_draw_dsc.src = layer_indic; lv_draw_layer(layer, &layer_draw_dsc, &indic_area); diff --git a/src/widgets/btn/lv_btn.c b/src/widgets/button/lv_button.c similarity index 73% rename from src/widgets/btn/lv_btn.c rename to src/widgets/button/lv_button.c index a126604b8..cb112880e 100644 --- a/src/widgets/btn/lv_btn.c +++ b/src/widgets/button/lv_button.c @@ -7,13 +7,13 @@ * INCLUDES *********************/ -#include "lv_btn.h" +#include "lv_button.h" #if LV_USE_BTN != 0 /********************* * DEFINES *********************/ -#define MY_CLASS &lv_btn_class +#define MY_CLASS &lv_button_class /********************** * TYPEDEFS @@ -22,17 +22,17 @@ /********************** * STATIC PROTOTYPES **********************/ -static void lv_btn_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj); +static void lv_button_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj); /********************** * STATIC VARIABLES **********************/ -const lv_obj_class_t lv_btn_class = { - .constructor_cb = lv_btn_constructor, +const lv_obj_class_t lv_button_class = { + .constructor_cb = lv_button_constructor, .width_def = LV_SIZE_CONTENT, .height_def = LV_SIZE_CONTENT, .group_def = LV_OBJ_CLASS_GROUP_DEF_TRUE, - .instance_size = sizeof(lv_btn_t), + .instance_size = sizeof(lv_button_t), .base_class = &lv_obj_class }; @@ -44,7 +44,7 @@ const lv_obj_class_t lv_btn_class = { * GLOBAL FUNCTIONS **********************/ -lv_obj_t * lv_btn_create(lv_obj_t * parent) +lv_obj_t * lv_button_create(lv_obj_t * parent) { LV_LOG_INFO("begin"); lv_obj_t * obj = lv_obj_class_create_obj(MY_CLASS, parent); @@ -56,7 +56,7 @@ lv_obj_t * lv_btn_create(lv_obj_t * parent) * STATIC FUNCTIONS **********************/ -static void lv_btn_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) +static void lv_button_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) { LV_UNUSED(class_p); LV_TRACE_OBJ_CREATE("begin"); diff --git a/src/widgets/btn/lv_btn.h b/src/widgets/button/lv_button.h similarity index 81% rename from src/widgets/btn/lv_btn.h rename to src/widgets/button/lv_button.h index 473577776..669945d06 100644 --- a/src/widgets/btn/lv_btn.h +++ b/src/widgets/button/lv_button.h @@ -3,8 +3,8 @@ * */ -#ifndef LV_BTN_H -#define LV_BTN_H +#ifndef LV_BUTTON_H +#define LV_BUTTON_H #ifdef __cplusplus extern "C" { @@ -28,9 +28,9 @@ extern "C" { typedef struct { lv_obj_t obj; -} lv_btn_t; +} lv_button_t; -extern const lv_obj_class_t lv_btn_class; +extern const lv_obj_class_t lv_button_class; /********************** * GLOBAL PROTOTYPES @@ -41,7 +41,7 @@ extern const lv_obj_class_t lv_btn_class; * @param parent pointer to an object, it will be the parent of the new button * @return pointer to the created button */ -lv_obj_t * lv_btn_create(lv_obj_t * parent); +lv_obj_t * lv_button_create(lv_obj_t * parent); /********************** * MACROS @@ -53,4 +53,4 @@ lv_obj_t * lv_btn_create(lv_obj_t * parent); } /*extern "C"*/ #endif -#endif /*LV_BTN_H*/ +#endif /*LV_BUTTON_H*/ diff --git a/src/widgets/btnmatrix/lv_btnmatrix.c b/src/widgets/buttonmatrix/lv_buttonmatrix.c similarity index 76% rename from src/widgets/btnmatrix/lv_btnmatrix.c rename to src/widgets/buttonmatrix/lv_buttonmatrix.c index aeaaaf97a..f83768a53 100644 --- a/src/widgets/btnmatrix/lv_btnmatrix.c +++ b/src/widgets/buttonmatrix/lv_buttonmatrix.c @@ -6,7 +6,7 @@ /********************* * INCLUDES *********************/ -#include "lv_btnmatrix.h" +#include "lv_buttonmatrix.h" #if LV_USE_BTNMATRIX != 0 #include "../../misc/lv_assert.h" @@ -21,10 +21,10 @@ /********************* * DEFINES *********************/ -#define MY_CLASS &lv_btnmatrix_class +#define MY_CLASS &lv_buttonmatrix_class #define BTN_EXTRA_CLICK_AREA_MAX (LV_DPI_DEF / 10) -#define LV_BTNMATRIX_WIDTH_MASK 0x000F +#define LV_BUTTONMATRIX_WIDTH_MASK 0x000F /********************** * TYPEDEFS @@ -33,23 +33,23 @@ /********************** * STATIC PROTOTYPES **********************/ -static void lv_btnmatrix_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj); -static void lv_btnmatrix_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj); -static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e); +static void lv_buttonmatrix_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj); +static void lv_buttonmatrix_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj); +static void lv_buttonmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e); static void draw_main(lv_event_t * e); -static uint8_t get_button_width(lv_btnmatrix_ctrl_t ctrl_bits); -static bool button_is_hidden(lv_btnmatrix_ctrl_t ctrl_bits); -static bool button_is_checked(lv_btnmatrix_ctrl_t ctrl_bits); -static bool button_is_repeat_disabled(lv_btnmatrix_ctrl_t ctrl_bits); -static bool button_is_inactive(lv_btnmatrix_ctrl_t ctrl_bits); -static bool button_is_click_trig(lv_btnmatrix_ctrl_t ctrl_bits); -static bool button_is_popover(lv_btnmatrix_ctrl_t ctrl_bits); -static bool button_is_checkable(lv_btnmatrix_ctrl_t ctrl_bits); -static bool button_is_recolor(lv_btnmatrix_ctrl_t ctrl_bits); -static bool button_get_checked(lv_btnmatrix_ctrl_t ctrl_bits); +static uint8_t get_button_width(lv_buttonmatrix_ctrl_t ctrl_bits); +static bool button_is_hidden(lv_buttonmatrix_ctrl_t ctrl_bits); +static bool button_is_checked(lv_buttonmatrix_ctrl_t ctrl_bits); +static bool button_is_repeat_disabled(lv_buttonmatrix_ctrl_t ctrl_bits); +static bool button_is_inactive(lv_buttonmatrix_ctrl_t ctrl_bits); +static bool button_is_click_trig(lv_buttonmatrix_ctrl_t ctrl_bits); +static bool button_is_popover(lv_buttonmatrix_ctrl_t ctrl_bits); +static bool button_is_checkable(lv_buttonmatrix_ctrl_t ctrl_bits); +static bool button_is_recolor(lv_buttonmatrix_ctrl_t ctrl_bits); +static bool button_get_checked(lv_buttonmatrix_ctrl_t ctrl_bits); static uint16_t get_button_from_point(lv_obj_t * obj, lv_point_t * p); -static void allocate_btn_areas_and_controls(const lv_obj_t * obj, const char ** map); +static void allocate_button_areas_and_controls(const lv_obj_t * obj, const char ** map); static void invalidate_button_area(const lv_obj_t * obj, uint16_t btn_idx); static void make_one_button_checked(lv_obj_t * obj, uint16_t btn_idx); static bool has_popovers_in_top_row(lv_obj_t * obj); @@ -58,16 +58,16 @@ static bool has_popovers_in_top_row(lv_obj_t * obj); * STATIC VARIABLES **********************/ #if LV_WIDGETS_HAS_DEFAULT_VALUE -static const char * lv_btnmatrix_def_map[] = {"Btn1", "Btn2", "Btn3", "\n", "Btn4", "Btn5", ""}; +static const char * lv_buttonmatrix_def_map[] = {"Btn1", "Btn2", "Btn3", "\n", "Btn4", "Btn5", ""}; #endif -const lv_obj_class_t lv_btnmatrix_class = { - .constructor_cb = lv_btnmatrix_constructor, - .destructor_cb = lv_btnmatrix_destructor, - .event_cb = lv_btnmatrix_event, +const lv_obj_class_t lv_buttonmatrix_class = { + .constructor_cb = lv_buttonmatrix_constructor, + .destructor_cb = lv_buttonmatrix_destructor, + .event_cb = lv_buttonmatrix_event, .width_def = LV_DPI_DEF * 2, .height_def = LV_DPI_DEF, - .instance_size = sizeof(lv_btnmatrix_t), + .instance_size = sizeof(lv_buttonmatrix_t), .editable = LV_OBJ_CLASS_EDITABLE_TRUE, .group_def = LV_OBJ_CLASS_GROUP_DEF_TRUE, .base_class = &lv_obj_class @@ -81,7 +81,7 @@ const lv_obj_class_t lv_btnmatrix_class = { * GLOBAL FUNCTIONS **********************/ -lv_obj_t * lv_btnmatrix_create(lv_obj_t * parent) +lv_obj_t * lv_buttonmatrix_create(lv_obj_t * parent) { LV_LOG_INFO("begin"); lv_obj_t * obj = lv_obj_class_create_obj(MY_CLASS, parent); @@ -93,15 +93,15 @@ lv_obj_t * lv_btnmatrix_create(lv_obj_t * parent) * Setter functions *====================*/ -void lv_btnmatrix_set_map(lv_obj_t * obj, const char * map[]) +void lv_buttonmatrix_set_map(lv_obj_t * obj, const char * map[]) { LV_ASSERT_OBJ(obj, MY_CLASS); if(map == NULL) return; - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; /*Analyze the map and create the required number of buttons*/ - allocate_btn_areas_and_controls(obj, map); + allocate_button_areas_and_controls(obj, map); btnm->map_p = map; lv_base_dir_t base_dir = lv_obj_get_style_base_dir(obj, LV_PART_MAIN); @@ -184,104 +184,104 @@ void lv_btnmatrix_set_map(lv_obj_t * obj, const char * map[]) lv_obj_invalidate(obj); } -void lv_btnmatrix_set_ctrl_map(lv_obj_t * obj, const lv_btnmatrix_ctrl_t ctrl_map[]) +void lv_buttonmatrix_set_ctrl_map(lv_obj_t * obj, const lv_buttonmatrix_ctrl_t ctrl_map[]) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; - lv_memcpy(btnm->ctrl_bits, ctrl_map, sizeof(lv_btnmatrix_ctrl_t) * btnm->btn_cnt); + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; + lv_memcpy(btnm->ctrl_bits, ctrl_map, sizeof(lv_buttonmatrix_ctrl_t) * btnm->btn_cnt); - lv_btnmatrix_set_map(obj, btnm->map_p); + lv_buttonmatrix_set_map(obj, btnm->map_p); } -void lv_btnmatrix_set_selected_btn(lv_obj_t * obj, uint16_t btn_id) +void lv_buttonmatrix_set_selected_button(lv_obj_t * obj, uint16_t btn_id) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; - if(btn_id >= btnm->btn_cnt && btn_id != LV_BTNMATRIX_BTN_NONE) return; + if(btn_id >= btnm->btn_cnt && btn_id != LV_BUTTONMATRIX_BUTTON_NONE) return; invalidate_button_area(obj, btnm->btn_id_sel); btnm->btn_id_sel = btn_id; invalidate_button_area(obj, btn_id); } -void lv_btnmatrix_set_btn_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl) +void lv_buttonmatrix_set_button_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_buttonmatrix_ctrl_t ctrl) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; if(btn_id >= btnm->btn_cnt) return; - if(btnm->one_check && (ctrl & LV_BTNMATRIX_CTRL_CHECKED)) { - lv_btnmatrix_clear_btn_ctrl_all(obj, LV_BTNMATRIX_CTRL_CHECKED); + if(btnm->one_check && (ctrl & LV_BUTTONMATRIX_CTRL_CHECKED)) { + lv_buttonmatrix_clear_button_ctrl_all(obj, LV_BUTTONMATRIX_CTRL_CHECKED); } btnm->ctrl_bits[btn_id] |= ctrl; invalidate_button_area(obj, btn_id); - if(ctrl & LV_BTNMATRIX_CTRL_POPOVER) { + if(ctrl & LV_BUTTONMATRIX_CTRL_POPOVER) { lv_obj_refresh_ext_draw_size(obj); } } -void lv_btnmatrix_clear_btn_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl) +void lv_buttonmatrix_clear_button_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_buttonmatrix_ctrl_t ctrl) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; if(btn_id >= btnm->btn_cnt) return; btnm->ctrl_bits[btn_id] &= (~ctrl); invalidate_button_area(obj, btn_id); - if(ctrl & LV_BTNMATRIX_CTRL_POPOVER) { + if(ctrl & LV_BUTTONMATRIX_CTRL_POPOVER) { lv_obj_refresh_ext_draw_size(obj); } } -void lv_btnmatrix_set_btn_ctrl_all(lv_obj_t * obj, lv_btnmatrix_ctrl_t ctrl) +void lv_buttonmatrix_set_button_ctrl_all(lv_obj_t * obj, lv_buttonmatrix_ctrl_t ctrl) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; uint16_t i; for(i = 0; i < btnm->btn_cnt; i++) { - lv_btnmatrix_set_btn_ctrl(obj, i, ctrl); + lv_buttonmatrix_set_button_ctrl(obj, i, ctrl); } } -void lv_btnmatrix_clear_btn_ctrl_all(lv_obj_t * obj, lv_btnmatrix_ctrl_t ctrl) +void lv_buttonmatrix_clear_button_ctrl_all(lv_obj_t * obj, lv_buttonmatrix_ctrl_t ctrl) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; uint16_t i; for(i = 0; i < btnm->btn_cnt; i++) { - lv_btnmatrix_clear_btn_ctrl(obj, i, ctrl); + lv_buttonmatrix_clear_button_ctrl(obj, i, ctrl); } } -void lv_btnmatrix_set_btn_width(lv_obj_t * obj, uint16_t btn_id, uint8_t width) +void lv_buttonmatrix_set_button_width(lv_obj_t * obj, uint16_t btn_id, uint8_t width) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; if(btn_id >= btnm->btn_cnt) return; - btnm->ctrl_bits[btn_id] &= (~LV_BTNMATRIX_WIDTH_MASK); - btnm->ctrl_bits[btn_id] |= (LV_BTNMATRIX_WIDTH_MASK & width); + btnm->ctrl_bits[btn_id] &= (~LV_BUTTONMATRIX_WIDTH_MASK); + btnm->ctrl_bits[btn_id] |= (LV_BUTTONMATRIX_WIDTH_MASK & width); - lv_btnmatrix_set_map(obj, btnm->map_p); + lv_buttonmatrix_set_map(obj, btnm->map_p); } -void lv_btnmatrix_set_one_checked(lv_obj_t * obj, bool en) +void lv_buttonmatrix_set_one_checked(lv_obj_t * obj, bool en) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; btnm->one_check = en; /*If more than one button is toggled only the first one should be*/ @@ -292,29 +292,29 @@ void lv_btnmatrix_set_one_checked(lv_obj_t * obj, bool en) * Getter functions *====================*/ -const char ** lv_btnmatrix_get_map(const lv_obj_t * obj) +const char ** lv_buttonmatrix_get_map(const lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; return btnm->map_p; } -uint16_t lv_btnmatrix_get_selected_btn(const lv_obj_t * obj) +uint16_t lv_buttonmatrix_get_selected_button(const lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; return btnm->btn_id_sel; } -const char * lv_btnmatrix_get_btn_text(const lv_obj_t * obj, uint16_t btn_id) +const char * lv_buttonmatrix_get_button_text(const lv_obj_t * obj, uint16_t btn_id) { LV_ASSERT_OBJ(obj, MY_CLASS); - if(btn_id == LV_BTNMATRIX_BTN_NONE) return NULL; + if(btn_id == LV_BUTTONMATRIX_BUTTON_NONE) return NULL; - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; if(btn_id > btnm->btn_cnt) return NULL; uint16_t txt_i = 0; @@ -333,21 +333,21 @@ const char * lv_btnmatrix_get_btn_text(const lv_obj_t * obj, uint16_t btn_id) return btnm->map_p[txt_i]; } -bool lv_btnmatrix_has_btn_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl) +bool lv_buttonmatrix_has_button_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_buttonmatrix_ctrl_t ctrl) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; if(btn_id >= btnm->btn_cnt) return false; return (btnm->ctrl_bits[btn_id] & ctrl) == ctrl; } -bool lv_btnmatrix_get_one_checked(const lv_obj_t * obj) +bool lv_buttonmatrix_get_one_checked(const lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; return btnm->one_check; } @@ -356,31 +356,31 @@ bool lv_btnmatrix_get_one_checked(const lv_obj_t * obj) * STATIC FUNCTIONS **********************/ -static void lv_btnmatrix_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) +static void lv_buttonmatrix_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) { LV_UNUSED(class_p); LV_TRACE_OBJ_CREATE("begin"); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; btnm->btn_cnt = 0; btnm->row_cnt = 0; - btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE; + btnm->btn_id_sel = LV_BUTTONMATRIX_BUTTON_NONE; btnm->button_areas = NULL; btnm->ctrl_bits = NULL; btnm->map_p = NULL; btnm->one_check = 0; #if LV_WIDGETS_HAS_DEFAULT_VALUE - lv_btnmatrix_set_map(obj, lv_btnmatrix_def_map); + lv_buttonmatrix_set_map(obj, lv_buttonmatrix_def_map); #endif LV_TRACE_OBJ_CREATE("finished"); } -static void lv_btnmatrix_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj) +static void lv_buttonmatrix_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj) { LV_TRACE_OBJ_CREATE("begin"); LV_UNUSED(class_p); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; lv_free(btnm->button_areas); lv_free(btnm->ctrl_bits); btnm->button_areas = NULL; @@ -388,7 +388,7 @@ static void lv_btnmatrix_destructor(const lv_obj_class_t * class_p, lv_obj_t * o LV_TRACE_OBJ_CREATE("finished"); } -static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) +static void lv_buttonmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) { LV_UNUSED(class_p); @@ -400,7 +400,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target(e); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; lv_point_t p; if(code == LV_EVENT_REFR_EXT_DRAW_SIZE) { @@ -411,10 +411,10 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) } } if(code == LV_EVENT_STYLE_CHANGED) { - lv_btnmatrix_set_map(obj, btnm->map_p); + lv_buttonmatrix_set_map(obj, btnm->map_p); } else if(code == LV_EVENT_SIZE_CHANGED) { - lv_btnmatrix_set_map(obj, btnm->map_p); + lv_buttonmatrix_set_map(obj, btnm->map_p); } else if(code == LV_EVENT_PRESSED) { lv_indev_t * indev = lv_event_get_indev(e); @@ -427,8 +427,8 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) lv_indev_get_point(indev, &p); btn_pr = get_button_from_point(obj, &p); /*Handle the case where there is no button there*/ - btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE; - if(btn_pr != LV_BTNMATRIX_BTN_NONE) { + btnm->btn_id_sel = LV_BUTTONMATRIX_BUTTON_NONE; + if(btn_pr != LV_BUTTONMATRIX_BUTTON_NONE) { if(button_is_inactive(btnm->ctrl_bits[btn_pr]) == false && button_is_hidden(btnm->ctrl_bits[btn_pr]) == false) { btnm->btn_id_sel = btn_pr; @@ -437,7 +437,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) } } - if(btnm->btn_id_sel != LV_BTNMATRIX_BTN_NONE) { + if(btnm->btn_id_sel != LV_BUTTONMATRIX_BUTTON_NONE) { if(button_is_click_trig(btnm->ctrl_bits[btnm->btn_id_sel]) == false && button_is_popover(btnm->ctrl_bits[btnm->btn_id_sel]) == false && button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel]) == false && @@ -450,26 +450,26 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) } else if(code == LV_EVENT_PRESSING) { /*If a slid to a new button, discard the current button and don't press any buttons*/ - if(btnm->btn_id_sel != LV_BTNMATRIX_BTN_NONE) { + if(btnm->btn_id_sel != LV_BUTTONMATRIX_BUTTON_NONE) { lv_indev_t * indev = lv_event_get_indev(e); lv_indev_get_point(indev, &p); uint16_t btn_pr = get_button_from_point(obj, &p); if(btn_pr != btnm->btn_id_sel) { invalidate_button_area(obj, btnm->btn_id_sel); /*Invalidate the old area*/ - btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE; + btnm->btn_id_sel = LV_BUTTONMATRIX_BUTTON_NONE; } } } else if(code == LV_EVENT_RELEASED) { - if(btnm->btn_id_sel != LV_BTNMATRIX_BTN_NONE) { + if(btnm->btn_id_sel != LV_BUTTONMATRIX_BUTTON_NONE) { /*Toggle the button if enabled*/ if(button_is_checkable(btnm->ctrl_bits[btnm->btn_id_sel]) && !button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel])) { if(button_get_checked(btnm->ctrl_bits[btnm->btn_id_sel]) && !btnm->one_check) { - btnm->ctrl_bits[btnm->btn_id_sel] &= (~LV_BTNMATRIX_CTRL_CHECKED); + btnm->ctrl_bits[btnm->btn_id_sel] &= (~LV_BUTTONMATRIX_CTRL_CHECKED); } else { - btnm->ctrl_bits[btnm->btn_id_sel] |= LV_BTNMATRIX_CTRL_CHECKED; + btnm->ctrl_bits[btnm->btn_id_sel] |= LV_BUTTONMATRIX_CTRL_CHECKED; } if(btnm->one_check) make_one_button_checked(obj, btnm->btn_id_sel); } @@ -490,7 +490,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) } else if(code == LV_EVENT_LONG_PRESSED_REPEAT) { - if(btnm->btn_id_sel != LV_BTNMATRIX_BTN_NONE) { + if(btnm->btn_id_sel != LV_BUTTONMATRIX_BUTTON_NONE) { if(button_is_repeat_disabled(btnm->ctrl_bits[btnm->btn_id_sel]) == false && button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel]) == false && button_is_hidden(btnm->ctrl_bits[btnm->btn_id_sel]) == false) { @@ -502,7 +502,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) } else if(code == LV_EVENT_PRESS_LOST) { invalidate_button_area(obj, btnm->btn_id_sel); - btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE; + btnm->btn_id_sel = LV_BUTTONMATRIX_BUTTON_NONE; } else if(code == LV_EVENT_FOCUSED) { if(btnm->btn_cnt == 0) return; @@ -518,7 +518,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) bool editing = lv_group_get_editing(lv_obj_get_group(obj)); /*Focus the first button if there is not selected button*/ - if(btnm->btn_id_sel == LV_BTNMATRIX_BTN_NONE) { + if(btnm->btn_id_sel == LV_BUTTONMATRIX_BUTTON_NONE) { if(indev_type == LV_INDEV_TYPE_KEYPAD || (indev_type == LV_INDEV_TYPE_ENCODER && editing)) { uint32_t b = 0; if(btnm->one_check) { @@ -540,14 +540,14 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) btnm->btn_id_sel = b; } else { - btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE; + btnm->btn_id_sel = LV_BUTTONMATRIX_BUTTON_NONE; } } } else if(code == LV_EVENT_DEFOCUSED || code == LV_EVENT_LEAVE) { // TODO - // if(btnm->btn_id_sel != LV_BTNMATRIX_BTN_NONE) invalidate_button_area(obj, btnm->btn_id_sel); - // btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE; + // if(btnm->btn_id_sel != LV_BUTTONMATRIX_BUTTON_NONE) invalidate_button_area(obj, btnm->btn_id_sel); + // btnm->btn_id_sel = LV_BUTTONMATRIX_BUTTON_NONE; } else if(code == LV_EVENT_KEY) { @@ -555,7 +555,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) char c = *((char *)lv_event_get_param(e)); if(c == LV_KEY_RIGHT) { - if(btnm->btn_id_sel == LV_BTNMATRIX_BTN_NONE) btnm->btn_id_sel = 0; + if(btnm->btn_id_sel == LV_BUTTONMATRIX_BUTTON_NONE) btnm->btn_id_sel = 0; else btnm->btn_id_sel++; if(btnm->btn_id_sel >= btnm->btn_cnt) btnm->btn_id_sel = 0; @@ -565,13 +565,13 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) if(btnm->btn_id_sel >= btnm->btn_cnt) btnm->btn_id_sel = 0; if(btnm->btn_id_sel == btn_id_start) { - btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE; + btnm->btn_id_sel = LV_BUTTONMATRIX_BUTTON_NONE; break; } } } else if(c == LV_KEY_LEFT) { - if(btnm->btn_id_sel == LV_BTNMATRIX_BTN_NONE) btnm->btn_id_sel = 0; + if(btnm->btn_id_sel == LV_BUTTONMATRIX_BUTTON_NONE) btnm->btn_id_sel = 0; if(btnm->btn_id_sel == 0) btnm->btn_id_sel = btnm->btn_cnt - 1; else if(btnm->btn_id_sel > 0) btnm->btn_id_sel--; @@ -582,7 +582,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) else btnm->btn_id_sel = btnm->btn_cnt - 1; if(btnm->btn_id_sel == btn_id_start) { - btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE; + btnm->btn_id_sel = LV_BUTTONMATRIX_BUTTON_NONE; break; } } @@ -590,12 +590,12 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) else if(c == LV_KEY_DOWN) { lv_coord_t col_gap = lv_obj_get_style_pad_column(obj, LV_PART_MAIN); /*Find the area below the current*/ - if(btnm->btn_id_sel == LV_BTNMATRIX_BTN_NONE) { + if(btnm->btn_id_sel == LV_BUTTONMATRIX_BUTTON_NONE) { btnm->btn_id_sel = 0; while(button_is_hidden(btnm->ctrl_bits[btnm->btn_id_sel]) || button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel])) { btnm->btn_id_sel++; if(btnm->btn_id_sel >= btnm->btn_cnt) { - btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE; + btnm->btn_id_sel = LV_BUTTONMATRIX_BUTTON_NONE; break; } } @@ -621,12 +621,12 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) else if(c == LV_KEY_UP) { lv_coord_t col_gap = lv_obj_get_style_pad_column(obj, LV_PART_MAIN); /*Find the area below the current*/ - if(btnm->btn_id_sel == LV_BTNMATRIX_BTN_NONE) { + if(btnm->btn_id_sel == LV_BUTTONMATRIX_BUTTON_NONE) { btnm->btn_id_sel = 0; while(button_is_hidden(btnm->ctrl_bits[btnm->btn_id_sel]) || button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel])) { btnm->btn_id_sel++; if(btnm->btn_id_sel >= btnm->btn_cnt) { - btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE; + btnm->btn_id_sel = LV_BUTTONMATRIX_BUTTON_NONE; break; } } @@ -660,7 +660,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) static void draw_main(lv_event_t * e) { lv_obj_t * obj = lv_event_get_target(e); - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; if(btnm->btn_cnt == 0) return; lv_layer_t * layer = lv_event_get_layer(e); @@ -761,7 +761,7 @@ static void draw_main(lv_event_t * e) lv_coord_t btn_height = lv_area_get_height(&btn_area); - if((btn_state & LV_STATE_PRESSED) && (btnm->ctrl_bits[btn_i] & LV_BTNMATRIX_CTRL_POPOVER)) { + if((btn_state & LV_STATE_PRESSED) && (btnm->ctrl_bits[btn_i] & LV_BUTTONMATRIX_CTRL_POPOVER)) { /*Push up the upper boundary of the btn area to create the popover*/ btn_area.y1 -= btn_height; } @@ -792,7 +792,7 @@ static void draw_main(lv_event_t * e) btn_area.x2 = btn_area.x1 + txt_size.x; btn_area.y2 = btn_area.y1 + txt_size.y; - if((btn_state & LV_STATE_PRESSED) && (btnm->ctrl_bits[btn_i] & LV_BTNMATRIX_CTRL_POPOVER)) { + if((btn_state & LV_STATE_PRESSED) && (btnm->ctrl_bits[btn_i] & LV_BUTTONMATRIX_CTRL_POPOVER)) { /*Push up the button text into the popover*/ btn_area.y1 -= btn_height / 2; btn_area.y2 -= btn_height / 2; @@ -812,9 +812,9 @@ static void draw_main(lv_event_t * e) * @param obj pointer to button matrix object * @param map_p pointer to a string array */ -static void allocate_btn_areas_and_controls(const lv_obj_t * obj, const char ** map) +static void allocate_button_areas_and_controls(const lv_obj_t * obj, const char ** map) { - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; btnm->row_cnt = 1; /*Count the buttons in the map*/ uint16_t btn_cnt = 0; @@ -843,11 +843,11 @@ static void allocate_btn_areas_and_controls(const lv_obj_t * obj, const char ** btnm->button_areas = lv_malloc(sizeof(lv_area_t) * btn_cnt); LV_ASSERT_MALLOC(btnm->button_areas); - btnm->ctrl_bits = lv_malloc(sizeof(lv_btnmatrix_ctrl_t) * btn_cnt); + btnm->ctrl_bits = lv_malloc(sizeof(lv_buttonmatrix_ctrl_t) * btn_cnt); LV_ASSERT_MALLOC(btnm->ctrl_bits); if(btnm->button_areas == NULL || btnm->ctrl_bits == NULL) btn_cnt = 0; - lv_memzero(btnm->ctrl_bits, sizeof(lv_btnmatrix_ctrl_t) * btn_cnt); + lv_memzero(btnm->ctrl_bits, sizeof(lv_buttonmatrix_ctrl_t) * btn_cnt); btnm->btn_cnt = btn_cnt; } @@ -857,67 +857,67 @@ static void allocate_btn_areas_and_controls(const lv_obj_t * obj, const char ** * @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_btnmatrix_ctrl_t ctrl_bits) +static uint8_t get_button_width(lv_buttonmatrix_ctrl_t ctrl_bits) { - uint8_t w = ctrl_bits & LV_BTNMATRIX_WIDTH_MASK; + uint8_t w = ctrl_bits & LV_BUTTONMATRIX_WIDTH_MASK; return w != 0 ? w : 1; } -static bool button_is_hidden(lv_btnmatrix_ctrl_t ctrl_bits) +static bool button_is_hidden(lv_buttonmatrix_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNMATRIX_CTRL_HIDDEN; + return ctrl_bits & LV_BUTTONMATRIX_CTRL_HIDDEN; } -static bool button_is_checked(lv_btnmatrix_ctrl_t ctrl_bits) +static bool button_is_checked(lv_buttonmatrix_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNMATRIX_CTRL_CHECKED; + return ctrl_bits & LV_BUTTONMATRIX_CTRL_CHECKED; } -static bool button_is_repeat_disabled(lv_btnmatrix_ctrl_t ctrl_bits) +static bool button_is_repeat_disabled(lv_buttonmatrix_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNMATRIX_CTRL_NO_REPEAT; + return ctrl_bits & LV_BUTTONMATRIX_CTRL_NO_REPEAT; } -static bool button_is_inactive(lv_btnmatrix_ctrl_t ctrl_bits) +static bool button_is_inactive(lv_buttonmatrix_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNMATRIX_CTRL_DISABLED; + return ctrl_bits & LV_BUTTONMATRIX_CTRL_DISABLED; } -static bool button_is_click_trig(lv_btnmatrix_ctrl_t ctrl_bits) +static bool button_is_click_trig(lv_buttonmatrix_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNMATRIX_CTRL_CLICK_TRIG; + return ctrl_bits & LV_BUTTONMATRIX_CTRL_CLICK_TRIG; } -static bool button_is_popover(lv_btnmatrix_ctrl_t ctrl_bits) +static bool button_is_popover(lv_buttonmatrix_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNMATRIX_CTRL_POPOVER; + return ctrl_bits & LV_BUTTONMATRIX_CTRL_POPOVER; } -static bool button_is_checkable(lv_btnmatrix_ctrl_t ctrl_bits) +static bool button_is_checkable(lv_buttonmatrix_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNMATRIX_CTRL_CHECKABLE; + return ctrl_bits & LV_BUTTONMATRIX_CTRL_CHECKABLE; } -static bool button_get_checked(lv_btnmatrix_ctrl_t ctrl_bits) +static bool button_get_checked(lv_buttonmatrix_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNMATRIX_CTRL_CHECKED; + return ctrl_bits & LV_BUTTONMATRIX_CTRL_CHECKED; } -static bool button_is_recolor(lv_btnmatrix_ctrl_t ctrl_bits) +static bool button_is_recolor(lv_buttonmatrix_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNMATRIX_CTRL_RECOLOR; + return ctrl_bits & LV_BUTTONMATRIX_CTRL_RECOLOR; } /** * Gives the button id of a button under a given point * @param obj pointer to a button matrix object * @param p a point with absolute coordinates - * @return the id of the button or LV_BTNMATRIX_BTN_NONE. + * @return the id of the button or LV_BUTTONMATRIX_BUTTON_NONE. */ static uint16_t get_button_from_point(lv_obj_t * obj, lv_point_t * p) { lv_area_t obj_cords; lv_area_t btn_area; - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; uint16_t i; lv_obj_get_coords(obj, &obj_cords); @@ -961,19 +961,19 @@ static uint16_t get_button_from_point(lv_obj_t * obj, lv_point_t * p) } } - if(i == btnm->btn_cnt) i = LV_BTNMATRIX_BTN_NONE; + if(i == btnm->btn_cnt) i = LV_BUTTONMATRIX_BUTTON_NONE; return i; } static void invalidate_button_area(const lv_obj_t * obj, uint16_t btn_idx) { - if(btn_idx == LV_BTNMATRIX_BTN_NONE) return; + if(btn_idx == LV_BUTTONMATRIX_BUTTON_NONE) return; lv_area_t btn_area; lv_area_t obj_area; - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;; if(btn_idx >= btnm->btn_cnt) return; lv_area_copy(&btn_area, &btnm->button_areas[btn_idx]); @@ -995,7 +995,7 @@ static void invalidate_button_area(const lv_obj_t * obj, uint16_t btn_idx) btn_area.x2 += obj_area.x1 + row_gap; btn_area.y2 += obj_area.y1 + col_gap; - if((btn_idx == btnm->btn_id_sel) && (btnm->ctrl_bits[btn_idx] & LV_BTNMATRIX_CTRL_POPOVER)) { + if((btn_idx == btnm->btn_id_sel) && (btnm->ctrl_bits[btn_idx] & LV_BUTTONMATRIX_CTRL_POPOVER)) { /*Push up the upper boundary of the btn area to also invalidate the popover*/ btn_area.y1 -= lv_area_get_height(&btn_area); } @@ -1012,21 +1012,21 @@ static void invalidate_button_area(const lv_obj_t * obj, uint16_t btn_idx) static void make_one_button_checked(lv_obj_t * obj, uint16_t btn_idx) { /*Save whether the button was toggled*/ - bool was_toggled = lv_btnmatrix_has_btn_ctrl(obj, btn_idx, LV_BTNMATRIX_CTRL_CHECKED); + bool was_toggled = lv_buttonmatrix_has_button_ctrl(obj, btn_idx, LV_BUTTONMATRIX_CTRL_CHECKED); - lv_btnmatrix_clear_btn_ctrl_all(obj, LV_BTNMATRIX_CTRL_CHECKED); + lv_buttonmatrix_clear_button_ctrl_all(obj, LV_BUTTONMATRIX_CTRL_CHECKED); - if(was_toggled) lv_btnmatrix_set_btn_ctrl(obj, btn_idx, LV_BTNMATRIX_CTRL_CHECKED); + if(was_toggled) lv_buttonmatrix_set_button_ctrl(obj, btn_idx, LV_BUTTONMATRIX_CTRL_CHECKED); } /** - * Check if any of the buttons in the first row has the LV_BTNMATRIX_CTRL_POPOVER control flag set. + * Check if any of the buttons in the first row has the LV_BUTTONMATRIX_CTRL_POPOVER control flag set. * @param obj Button matrix object * @return true if at least one button has the flag, false otherwise */ static bool has_popovers_in_top_row(lv_obj_t * obj) { - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; if(btnm->row_cnt <= 0) { return false; diff --git a/src/widgets/btnmatrix/lv_btnmatrix.h b/src/widgets/buttonmatrix/lv_buttonmatrix.h similarity index 56% rename from src/widgets/btnmatrix/lv_btnmatrix.h rename to src/widgets/buttonmatrix/lv_buttonmatrix.h index 26271d0db..3a907e5e0 100644 --- a/src/widgets/btnmatrix/lv_btnmatrix.h +++ b/src/widgets/buttonmatrix/lv_buttonmatrix.h @@ -3,8 +3,8 @@ * */ -#ifndef LV_BTNMATRIX_H -#define LV_BTNMATRIX_H +#ifndef LV_BUTTONMATRIX_H +#define LV_BUTTONMATRIX_H #ifdef __cplusplus extern "C" { @@ -22,8 +22,8 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_BTNMATRIX_BTN_NONE 0xFFFF -LV_EXPORT_CONST_INT(LV_BTNMATRIX_BTN_NONE); +#define LV_BUTTONMATRIX_BUTTON_NONE 0xFFFF +LV_EXPORT_CONST_INT(LV_BUTTONMATRIX_BUTTON_NONE); /********************** * TYPEDEFS @@ -31,45 +31,45 @@ LV_EXPORT_CONST_INT(LV_BTNMATRIX_BTN_NONE); /** Type to store button control bits (disabled, hidden etc.) * The first 3 bits are used to store the width*/ -enum _lv_btnmatrix_ctrl_t { - _LV_BTNMATRIX_WIDTH = 0x000F, /**< Reserved to store the size units*/ - LV_BTNMATRIX_CTRL_HIDDEN = 0x0010, /**< Button hidden*/ - LV_BTNMATRIX_CTRL_NO_REPEAT = 0x0020, /**< Do not repeat press this button.*/ - LV_BTNMATRIX_CTRL_DISABLED = 0x0040, /**< Disable this button.*/ - LV_BTNMATRIX_CTRL_CHECKABLE = 0x0080, /**< The button can be toggled.*/ - LV_BTNMATRIX_CTRL_CHECKED = 0x0100, /**< Button is currently toggled (e.g. checked).*/ - LV_BTNMATRIX_CTRL_CLICK_TRIG = 0x0200, /**< 1: Send LV_EVENT_VALUE_CHANGE on CLICK, 0: Send LV_EVENT_VALUE_CHANGE on PRESS*/ - LV_BTNMATRIX_CTRL_POPOVER = 0x0400, /**< Show a popover when pressing this key*/ - LV_BTNMATRIX_CTRL_RECOLOR = 0x0800, /**< Enable text recoloring with `#color`*/ - _LV_BTNMATRIX_CTRL_RESERVED_1 = 0x1000, /**< Reserved for later use*/ - _LV_BTNMATRIX_CTRL_RESERVED_2 = 0x2000, /**< Reserved for later use*/ - LV_BTNMATRIX_CTRL_CUSTOM_1 = 0x4000, /**< Custom free to use flag*/ - LV_BTNMATRIX_CTRL_CUSTOM_2 = 0x8000, /**< Custom free to use flag*/ +enum _lv_buttonmatrix_ctrl_t { + _LV_BUTTONMATRIX_WIDTH = 0x000F, /**< Reserved to store the size units*/ + LV_BUTTONMATRIX_CTRL_HIDDEN = 0x0010, /**< Button hidden*/ + LV_BUTTONMATRIX_CTRL_NO_REPEAT = 0x0020, /**< Do not repeat press this button.*/ + LV_BUTTONMATRIX_CTRL_DISABLED = 0x0040, /**< Disable this button.*/ + LV_BUTTONMATRIX_CTRL_CHECKABLE = 0x0080, /**< The button can be toggled.*/ + LV_BUTTONMATRIX_CTRL_CHECKED = 0x0100, /**< Button is currently toggled (e.g. checked).*/ + LV_BUTTONMATRIX_CTRL_CLICK_TRIG = 0x0200, /**< 1: Send LV_EVENT_VALUE_CHANGE on CLICK, 0: Send LV_EVENT_VALUE_CHANGE on PRESS*/ + LV_BUTTONMATRIX_CTRL_POPOVER = 0x0400, /**< Show a popover when pressing this key*/ + LV_BUTTONMATRIX_CTRL_RECOLOR = 0x0800, /**< Enable text recoloring with `#color`*/ + _LV_BUTTONMATRIX_CTRL_RESERVED_1 = 0x1000, /**< Reserved for later use*/ + _LV_BUTTONMATRIX_CTRL_RESERVED_2 = 0x2000, /**< Reserved for later use*/ + LV_BUTTONMATRIX_CTRL_CUSTOM_1 = 0x4000, /**< Custom free to use flag*/ + LV_BUTTONMATRIX_CTRL_CUSTOM_2 = 0x8000, /**< Custom free to use flag*/ }; #ifdef DOXYGEN -typedef _lv_btnmatrix_ctrl_t lv_btnmatrix_ctrl_t; +typedef _lv_buttonmatrix_ctrl_t lv_buttonmatrix_ctrl_t; #else -typedef uint16_t lv_btnmatrix_ctrl_t; +typedef uint16_t lv_buttonmatrix_ctrl_t; #endif /*DOXYGEN*/ -typedef bool (*lv_btnmatrix_btn_draw_cb_t)(lv_obj_t * btnm, uint32_t btn_id, const lv_area_t * draw_area, - const lv_area_t * clip_area); +typedef bool (*lv_buttonmatrix_button_draw_cb_t)(lv_obj_t * btnm, uint32_t btn_id, const lv_area_t * draw_area, + const lv_area_t * clip_area); /*Data of button matrix*/ typedef struct { lv_obj_t obj; const char ** map_p; /*Pointer to the current map*/ lv_area_t * button_areas; /*Array of areas of buttons*/ - lv_btnmatrix_ctrl_t * ctrl_bits; /*Array of control bytes*/ + lv_buttonmatrix_ctrl_t * ctrl_bits; /*Array of control bytes*/ uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/ uint16_t row_cnt; /*Number of rows in 'map_p'(Handled by the library)*/ - uint16_t btn_id_sel; /*Index of the active button (being pressed/released etc) or LV_BTNMATRIX_BTN_NONE*/ + uint16_t btn_id_sel; /*Index of the active button (being pressed/released etc) or LV_BUTTONMATRIX_BUTTON_NONE*/ uint8_t one_check : 1; /*Single button toggled at once*/ -} lv_btnmatrix_t; +} lv_buttonmatrix_t; -extern const lv_obj_class_t lv_btnmatrix_class; +extern const lv_obj_class_t lv_buttonmatrix_class; /********************** @@ -81,7 +81,7 @@ extern const lv_obj_class_t lv_btnmatrix_class; * @param parent pointer to an object, it will be the parent of the new button matrix * @return pointer to the created button matrix */ -lv_obj_t * lv_btnmatrix_create(lv_obj_t * parent); +lv_obj_t * lv_buttonmatrix_create(lv_obj_t * parent); /*===================== * Setter functions @@ -94,79 +94,79 @@ lv_obj_t * lv_btnmatrix_create(lv_obj_t * parent); * @param obj 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_btnmatrix_set_map(lv_obj_t * obj, const char * map[]); +void lv_buttonmatrix_set_map(lv_obj_t * obj, 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 obj pointer to a button matrix object - * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. The + * @param ctrl_map pointer to an array of `lv_button_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). * An element of the map should look like e.g.: - * `ctrl_map[0] = width | LV_BTNMATRIX_CTRL_NO_REPEAT | LV_BTNMATRIX_CTRL_TGL_ENABLE` + * `ctrl_map[0] = width | LV_BUTTONMATRIX_CTRL_NO_REPEAT | LV_BUTTONMATRIX_CTRL_TGL_ENABLE` */ -void lv_btnmatrix_set_ctrl_map(lv_obj_t * obj, const lv_btnmatrix_ctrl_t ctrl_map[]); +void lv_buttonmatrix_set_ctrl_map(lv_obj_t * obj, const lv_buttonmatrix_ctrl_t ctrl_map[]); /** * Set the selected buttons * @param obj pointer to button matrix object * @param btn_id 0 based index of the button to modify. (Not counting new lines) */ -void lv_btnmatrix_set_selected_btn(lv_obj_t * obj, uint16_t btn_id); +void lv_buttonmatrix_set_selected_button(lv_obj_t * obj, uint16_t btn_id); /** * Set the attributes of a button of the button matrix * @param obj pointer to button matrix object * @param btn_id 0 based index of the button to modify. (Not counting new lines) - * @param ctrl OR-ed attributes. E.g. `LV_BTNMATRIX_CTRL_NO_REPEAT | LV_BTNMATRIX_CTRL_CHECKABLE` + * @param ctrl OR-ed attributes. E.g. `LV_BUTTONMATRIX_CTRL_NO_REPEAT | LV_BUTTONMATRIX_CTRL_CHECKABLE` */ -void lv_btnmatrix_set_btn_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl); +void lv_buttonmatrix_set_button_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_buttonmatrix_ctrl_t ctrl); /** * Clear the attributes of a button of the button matrix * @param obj pointer to button matrix object * @param btn_id 0 based index of the button to modify. (Not counting new lines) - * @param ctrl OR-ed attributes. E.g. `LV_BTNMATRIX_CTRL_NO_REPEAT | LV_BTNMATRIX_CTRL_CHECKABLE` + * @param ctrl OR-ed attributes. E.g. `LV_BUTTONMATRIX_CTRL_NO_REPEAT | LV_BUTTONMATRIX_CTRL_CHECKABLE` */ -void lv_btnmatrix_clear_btn_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl); +void lv_buttonmatrix_clear_button_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_buttonmatrix_ctrl_t ctrl); /** * Set attributes of all buttons of a button matrix * @param obj pointer to a button matrix object - * @param ctrl attribute(s) to set from `lv_btnmatrix_ctrl_t`. Values can be ORed. + * @param ctrl attribute(s) to set from `lv_buttonmatrix_ctrl_t`. Values can be ORed. */ -void lv_btnmatrix_set_btn_ctrl_all(lv_obj_t * obj, lv_btnmatrix_ctrl_t ctrl); +void lv_buttonmatrix_set_button_ctrl_all(lv_obj_t * obj, lv_buttonmatrix_ctrl_t ctrl); /** * Clear the attributes of all buttons of a button matrix * @param obj pointer to a button matrix object - * @param ctrl attribute(s) to set from `lv_btnmatrix_ctrl_t`. Values can be ORed. + * @param ctrl attribute(s) to set from `lv_buttonmatrix_ctrl_t`. Values can be ORed. * @param en true: set the attributes; false: clear the attributes */ -void lv_btnmatrix_clear_btn_ctrl_all(lv_obj_t * obj, lv_btnmatrix_ctrl_t ctrl); +void lv_buttonmatrix_clear_button_ctrl_all(lv_obj_t * obj, lv_buttonmatrix_ctrl_t ctrl); /** * Set a single button's 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 - * `lv_btnmatrix_set_ctrl_map` and this method only be used for dynamic changes. + * `lv_buttonmatrix_set_ctrl_map` and this method only be used for dynamic changes. * @param obj pointer to button matrix object * @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_btnmatrix_set_btn_width(lv_obj_t * obj, uint16_t btn_id, uint8_t width); +void lv_buttonmatrix_set_button_width(lv_obj_t * obj, uint16_t btn_id, uint8_t width); /** * Make the button matrix like a selector widget (only one button may be checked at a time). - * `LV_BTNMATRIX_CTRL_CHECKABLE` must be enabled on the buttons to be selected using - * `lv_btnmatrix_set_ctrl()` or `lv_btnmatrix_set_btn_ctrl_all()`. + * `LV_BUTTONMATRIX_CTRL_CHECKABLE` must be enabled on the buttons to be selected using + * `lv_buttonmatrix_set_ctrl()` or `lv_buttonmatrix_set_button_ctrl_all()`. * @param obj pointer to a button matrix object * @param en whether "one check" mode is enabled */ -void lv_btnmatrix_set_one_checked(lv_obj_t * obj, bool en); +void lv_buttonmatrix_set_one_checked(lv_obj_t * obj, bool en); /*===================== * Getter functions @@ -177,15 +177,15 @@ void lv_btnmatrix_set_one_checked(lv_obj_t * obj, bool en); * @param obj pointer to a button matrix object * @return the current map */ -const char ** lv_btnmatrix_get_map(const lv_obj_t * obj); +const char ** lv_buttonmatrix_get_map(const lv_obj_t * obj); /** * Get the index of the lastly "activated" button by the user (pressed, released, focused etc) * Useful in the `event_cb` to get the text of the button, check if hidden etc. * @param obj pointer to button matrix object - * @return index of the last released button (LV_BTNMATRIX_BTN_NONE: if unset) + * @return index of the last released button (LV_BUTTONMATRIX_BUTTON_NONE: if unset) */ -uint16_t lv_btnmatrix_get_selected_btn(const lv_obj_t * obj); +uint16_t lv_buttonmatrix_get_selected_button(const lv_obj_t * obj); /** * Get the button's text @@ -193,7 +193,7 @@ uint16_t lv_btnmatrix_get_selected_btn(const lv_obj_t * obj); * @param btn_id the index a button not counting new line characters. * @return text of btn_index` button */ -const char * lv_btnmatrix_get_btn_text(const lv_obj_t * obj, uint16_t btn_id); +const char * lv_buttonmatrix_get_button_text(const lv_obj_t * obj, uint16_t btn_id); /** * Get the whether a control value is enabled or disabled for button of a button matrix @@ -202,14 +202,14 @@ const char * lv_btnmatrix_get_btn_text(const lv_obj_t * obj, uint16_t btn_id); * @param ctrl control values to check (ORed value can be used) * @return true: the control attribute is enabled false: disabled */ -bool lv_btnmatrix_has_btn_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_btnmatrix_ctrl_t ctrl); +bool lv_buttonmatrix_has_button_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_buttonmatrix_ctrl_t ctrl); /** * Tell whether "one check" mode is enabled or not. * @param obj Button matrix object * @return true: "one check" mode is enabled; false: disabled */ -bool lv_btnmatrix_get_one_checked(const lv_obj_t * obj); +bool lv_buttonmatrix_get_one_checked(const lv_obj_t * obj); /********************** * MACROS @@ -221,4 +221,4 @@ bool lv_btnmatrix_get_one_checked(const lv_obj_t * obj); } /*extern "C"*/ #endif -#endif /*LV_BTNMATRIX_H*/ +#endif /*LV_BUTTONMATRIX_H*/ diff --git a/src/widgets/calendar/lv_calendar.c b/src/widgets/calendar/lv_calendar.c index 96c9439c6..f425686c5 100644 --- a/src/widgets/calendar/lv_calendar.c +++ b/src/widgets/calendar/lv_calendar.c @@ -15,8 +15,8 @@ /********************* * DEFINES *********************/ -#define LV_CALENDAR_CTRL_TODAY LV_BTNMATRIX_CTRL_CUSTOM_1 -#define LV_CALENDAR_CTRL_HIGHLIGHT LV_BTNMATRIX_CTRL_CUSTOM_2 +#define LV_CALENDAR_CTRL_TODAY LV_BUTTONMATRIX_CTRL_CUSTOM_1 +#define LV_CALENDAR_CTRL_HIGHLIGHT LV_BUTTONMATRIX_CTRL_CUSTOM_2 #define MY_CLASS &lv_calendar_class @@ -123,9 +123,9 @@ void lv_calendar_set_showed_date(lv_obj_t * obj, uint32_t year, uint32_t month) uint32_t i; /*Remove the disabled state but revert it for day names*/ - lv_btnmatrix_clear_btn_ctrl_all(calendar->btnm, LV_BTNMATRIX_CTRL_DISABLED); + lv_buttonmatrix_clear_button_ctrl_all(calendar->btnm, LV_BUTTONMATRIX_CTRL_DISABLED); for(i = 0; i < 7; i++) { - lv_btnmatrix_set_btn_ctrl(calendar->btnm, i, LV_BTNMATRIX_CTRL_DISABLED); + lv_buttonmatrix_set_button_ctrl(calendar->btnm, i, LV_BUTTONMATRIX_CTRL_DISABLED); } uint8_t act_mo_len = get_month_length(d.year, d.month); @@ -138,19 +138,19 @@ void lv_calendar_set_showed_date(lv_obj_t * obj, uint32_t year, uint32_t month) uint8_t prev_mo_len = get_month_length(d.year, d.month - 1); for(i = 0, c = prev_mo_len - day_first + 1; i < day_first; i++, c++) { lv_snprintf(calendar->nums[i], sizeof(calendar->nums[0]), "%d", c); - lv_btnmatrix_set_btn_ctrl(calendar->btnm, i + 7, LV_BTNMATRIX_CTRL_DISABLED); + lv_buttonmatrix_set_button_ctrl(calendar->btnm, i + 7, LV_BUTTONMATRIX_CTRL_DISABLED); } for(i = day_first + act_mo_len, c = 1; i < 6 * 7; i++, c++) { lv_snprintf(calendar->nums[i], sizeof(calendar->nums[0]), "%d", c); - lv_btnmatrix_set_btn_ctrl(calendar->btnm, i + 7, LV_BTNMATRIX_CTRL_DISABLED); + lv_buttonmatrix_set_button_ctrl(calendar->btnm, i + 7, LV_BUTTONMATRIX_CTRL_DISABLED); } highlight_update(obj); /*Reset the focused button if the days changes*/ - if(lv_btnmatrix_get_selected_btn(calendar->btnm) != LV_BTNMATRIX_BTN_NONE) { - lv_btnmatrix_set_selected_btn(calendar->btnm, day_first + 7); + if(lv_buttonmatrix_get_selected_button(calendar->btnm) != LV_BUTTONMATRIX_BUTTON_NONE) { + lv_buttonmatrix_set_selected_button(calendar->btnm, day_first + 7); } lv_obj_invalidate(obj); @@ -213,15 +213,15 @@ lv_res_t lv_calendar_get_pressed_date(const lv_obj_t * obj, lv_calendar_date_t * LV_ASSERT_OBJ(obj, MY_CLASS); lv_calendar_t * calendar = (lv_calendar_t *)obj; - uint16_t d = lv_btnmatrix_get_selected_btn(calendar->btnm); - if(d == LV_BTNMATRIX_BTN_NONE) { + uint16_t d = lv_buttonmatrix_get_selected_button(calendar->btnm); + if(d == LV_BUTTONMATRIX_BUTTON_NONE) { date->year = 0; date->month = 0; date->day = 0; return LV_RES_INV; } - const char * txt = lv_btnmatrix_get_btn_text(calendar->btnm, lv_btnmatrix_get_selected_btn(calendar->btnm)); + const char * txt = lv_buttonmatrix_get_button_text(calendar->btnm, lv_buttonmatrix_get_selected_button(calendar->btnm)); if(txt[1] == 0) date->day = txt[0] - '0'; else date->day = (txt[0] - '0') * 10 + (txt[1] - '0'); @@ -276,9 +276,9 @@ static void lv_calendar_constructor(const lv_obj_class_t * class_p, lv_obj_t * o } calendar->map[8 * 7 - 1] = ""; - calendar->btnm = lv_btnmatrix_create(obj); - lv_btnmatrix_set_map(calendar->btnm, calendar->map); - lv_btnmatrix_set_btn_ctrl_all(calendar->btnm, LV_BTNMATRIX_CTRL_CLICK_TRIG | LV_BTNMATRIX_CTRL_NO_REPEAT); + calendar->btnm = lv_buttonmatrix_create(obj); + lv_buttonmatrix_set_map(calendar->btnm, calendar->map); + lv_buttonmatrix_set_button_ctrl_all(calendar->btnm, LV_BUTTONMATRIX_CTRL_CLICK_TRIG | LV_BUTTONMATRIX_CTRL_NO_REPEAT); lv_obj_add_event(calendar->btnm, draw_part_begin_event_cb, LV_EVENT_DRAW_TASK_ADDED, NULL); lv_obj_set_width(calendar->btnm, lv_pct(100)); @@ -308,20 +308,20 @@ static void draw_part_begin_event_cb(lv_event_t * e) rect_draw_dsc->bg_opa = LV_OPA_TRANSP; rect_draw_dsc->border_opa = LV_OPA_TRANSP; } - else if(lv_btnmatrix_has_btn_ctrl(obj, rect_draw_dsc->base.id1, LV_BTNMATRIX_CTRL_DISABLED)) { + else if(lv_buttonmatrix_has_button_ctrl(obj, rect_draw_dsc->base.id1, LV_BUTTONMATRIX_CTRL_DISABLED)) { rect_draw_dsc->bg_opa = LV_OPA_TRANSP; rect_draw_dsc->border_opa = LV_OPA_TRANSP; } - if(lv_btnmatrix_has_btn_ctrl(obj, rect_draw_dsc->base.id1, LV_CALENDAR_CTRL_HIGHLIGHT)) { + if(lv_buttonmatrix_has_button_ctrl(obj, rect_draw_dsc->base.id1, LV_CALENDAR_CTRL_HIGHLIGHT)) { rect_draw_dsc->bg_opa = LV_OPA_40; rect_draw_dsc->bg_color = lv_theme_get_color_primary(obj); - if(lv_btnmatrix_get_selected_btn(obj) == rect_draw_dsc->base.id1) { + if(lv_buttonmatrix_get_selected_button(obj) == rect_draw_dsc->base.id1) { rect_draw_dsc->bg_opa = LV_OPA_70; } } - if(lv_btnmatrix_has_btn_ctrl(obj, rect_draw_dsc->base.id1, LV_CALENDAR_CTRL_TODAY)) { + if(lv_buttonmatrix_has_button_ctrl(obj, rect_draw_dsc->base.id1, LV_CALENDAR_CTRL_TODAY)) { rect_draw_dsc->border_opa = LV_OPA_COVER; rect_draw_dsc->border_color = lv_theme_get_color_primary(obj); rect_draw_dsc->border_width += 1; @@ -389,21 +389,21 @@ static void highlight_update(lv_obj_t * obj) uint16_t i; /*Clear all kind of selection*/ - lv_btnmatrix_clear_btn_ctrl_all(calendar->btnm, LV_CALENDAR_CTRL_TODAY | LV_CALENDAR_CTRL_HIGHLIGHT); + lv_buttonmatrix_clear_button_ctrl_all(calendar->btnm, LV_CALENDAR_CTRL_TODAY | LV_CALENDAR_CTRL_HIGHLIGHT); uint8_t day_first = get_day_of_week(calendar->showed_date.year, calendar->showed_date.month, 1); if(calendar->highlighted_dates) { for(i = 0; i < calendar->highlighted_dates_num; i++) { if(calendar->highlighted_dates[i].year == calendar->showed_date.year && calendar->highlighted_dates[i].month == calendar->showed_date.month) { - lv_btnmatrix_set_btn_ctrl(calendar->btnm, calendar->highlighted_dates[i].day - 1 + day_first + 7, - LV_CALENDAR_CTRL_HIGHLIGHT); + lv_buttonmatrix_set_button_ctrl(calendar->btnm, calendar->highlighted_dates[i].day - 1 + day_first + 7, + LV_CALENDAR_CTRL_HIGHLIGHT); } } } if(calendar->showed_date.year == calendar->today.year && calendar->showed_date.month == calendar->today.month) { - lv_btnmatrix_set_btn_ctrl(calendar->btnm, calendar->today.day - 1 + day_first + 7, LV_CALENDAR_CTRL_TODAY); + lv_buttonmatrix_set_button_ctrl(calendar->btnm, calendar->today.day - 1 + day_first + 7, LV_CALENDAR_CTRL_TODAY); } } diff --git a/src/widgets/calendar/lv_calendar.h b/src/widgets/calendar/lv_calendar.h index 961106819..c3e170404 100644 --- a/src/widgets/calendar/lv_calendar.h +++ b/src/widgets/calendar/lv_calendar.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#include "../btnmatrix/lv_btnmatrix.h" +#include "../buttonmatrix/lv_buttonmatrix.h" #if LV_USE_CALENDAR diff --git a/src/widgets/calendar/lv_calendar_header_arrow.c b/src/widgets/calendar/lv_calendar_header_arrow.c index ceeeebbcc..d66d3a032 100644 --- a/src/widgets/calendar/lv_calendar_header_arrow.c +++ b/src/widgets/calendar/lv_calendar_header_arrow.c @@ -10,7 +10,7 @@ #if LV_USE_CALENDAR && LV_USE_CALENDAR_HEADER_ARROW #include "lv_calendar.h" -#include "../btn/lv_btn.h" +#include "../button/lv_button.h" #include "../label/lv_label.h" #include "../../layouts/flex/lv_flex.h" @@ -71,8 +71,8 @@ static void my_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) lv_obj_set_flex_flow(obj, LV_FLEX_FLOW_ROW); lv_obj_set_flex_align(obj, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_START); - lv_obj_t * mo_prev = lv_btn_create(obj); - lv_obj_set_style_bg_img_src(mo_prev, LV_SYMBOL_LEFT, 0); + lv_obj_t * mo_prev = lv_button_create(obj); + lv_obj_set_style_bg_image_src(mo_prev, LV_SYMBOL_LEFT, 0); lv_obj_set_height(mo_prev, lv_pct(100)); lv_obj_update_layout(mo_prev); lv_coord_t btn_size = lv_obj_get_height(mo_prev); @@ -86,8 +86,8 @@ static void my_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) lv_obj_set_style_text_align(label, LV_TEXT_ALIGN_CENTER, 0); lv_obj_set_flex_grow(label, 1); - lv_obj_t * mo_next = lv_btn_create(obj); - lv_obj_set_style_bg_img_src(mo_next, LV_SYMBOL_RIGHT, 0); + lv_obj_t * mo_next = lv_button_create(obj); + lv_obj_set_style_bg_image_src(mo_next, LV_SYMBOL_RIGHT, 0); lv_obj_set_size(mo_next, btn_size, btn_size); lv_obj_add_event(mo_next, month_event_cb, LV_EVENT_CLICKED, NULL); diff --git a/src/widgets/canvas/lv_canvas.c b/src/widgets/canvas/lv_canvas.c index bcce03ecb..666bd5a20 100644 --- a/src/widgets/canvas/lv_canvas.c +++ b/src/widgets/canvas/lv_canvas.c @@ -38,7 +38,7 @@ const lv_obj_class_t lv_canvas_class = { .constructor_cb = lv_canvas_constructor, .destructor_cb = lv_canvas_destructor, .instance_size = sizeof(lv_canvas_t), - .base_class = &lv_img_class + .base_class = &lv_image_class }; /********************** @@ -75,8 +75,8 @@ void lv_canvas_set_buffer(lv_obj_t * obj, void * buf, lv_coord_t w, lv_coord_t h canvas->dsc.data = buf; canvas->dsc.data_size = w * h * lv_color_format_get_size(cf); - lv_img_set_src(obj, &canvas->dsc); - lv_img_cache_invalidate_src(&canvas->dsc); + lv_image_set_src(obj, &canvas->dsc); + lv_image_cache_invalidate_src(&canvas->dsc); } void lv_canvas_set_px(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa) @@ -140,7 +140,7 @@ void lv_canvas_set_palette(lv_obj_t * obj, uint8_t id, lv_color32_t c) lv_canvas_t * canvas = (lv_canvas_t *)obj; - lv_img_buf_set_palette(&canvas->dsc, id, c); + lv_image_buf_set_palette(&canvas->dsc, id, c); lv_obj_invalidate(obj); } @@ -180,7 +180,7 @@ lv_color32_t lv_canvas_get_px(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) break; } case LV_COLOR_FORMAT_A8: { - lv_color_t alpha_color = lv_obj_get_style_img_recolor(obj, LV_PART_MAIN); + lv_color_t alpha_color = lv_obj_get_style_image_recolor(obj, LV_PART_MAIN); ret.red = alpha_color.red; ret.green = alpha_color.green; ret.blue = alpha_color.blue; @@ -195,7 +195,7 @@ lv_color32_t lv_canvas_get_px(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) return ret; } -lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * obj) +lv_image_dsc_t * lv_canvas_get_image(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); @@ -234,7 +234,7 @@ void lv_canvas_fill_bg(lv_obj_t * obj, lv_color_t color, lv_opa_t opa) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_dsc_t * dsc = lv_canvas_get_img(obj); + lv_image_dsc_t * dsc = lv_canvas_get_image(obj); uint32_t x; uint32_t y; @@ -289,7 +289,7 @@ void lv_canvas_init_layer(lv_obj_t * canvas, lv_layer_t * layer) LV_ASSERT_NULL(canvas); LV_ASSERT_NULL(layer); - lv_img_dsc_t * dsc = lv_canvas_get_img(canvas); + lv_image_dsc_t * dsc = lv_canvas_get_image(canvas); lv_area_t canvas_area = {0, 0, dsc->header.w - 1, dsc->header.h - 1}; lv_memzero(layer, sizeof(*layer)); @@ -325,7 +325,7 @@ static void lv_canvas_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj canvas->dsc.data_size = 0; canvas->dsc.data = NULL; - lv_img_set_src(obj, &canvas->dsc); + lv_image_set_src(obj, &canvas->dsc); LV_TRACE_OBJ_CREATE("finished"); } @@ -336,7 +336,7 @@ static void lv_canvas_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj) LV_TRACE_OBJ_CREATE("begin"); lv_canvas_t * canvas = (lv_canvas_t *)obj; - lv_img_cache_invalidate_src(&canvas->dsc); + lv_image_cache_invalidate_src(&canvas->dsc); } diff --git a/src/widgets/canvas/lv_canvas.h b/src/widgets/canvas/lv_canvas.h index f1d247a71..250ed5eac 100644 --- a/src/widgets/canvas/lv_canvas.h +++ b/src/widgets/canvas/lv_canvas.h @@ -17,8 +17,8 @@ extern "C" { #if LV_USE_CANVAS != 0 -#include "../img/lv_img.h" -#include "../../draw/lv_draw_img.h" +#include "../image/lv_image.h" +#include "../../draw/lv_draw_image.h" /********************* * DEFINES @@ -31,8 +31,8 @@ extern const lv_obj_class_t lv_canvas_class; /*Data of canvas*/ typedef struct { - lv_img_t img; - lv_img_dsc_t dsc; + lv_image_t img; + lv_image_dsc_t dsc; } lv_canvas_t; /********************** @@ -53,27 +53,27 @@ lv_obj_t * lv_canvas_create(lv_obj_t * parent); /** * Set a buffer for the canvas. * @param buf a buffer where the content of the canvas will be. - * The required size is (lv_img_color_format_get_px_size(cf) * w) / 8 * h) + * The required size is (lv_image_color_format_get_px_size(cf) * w) / 8 * h) * It can be allocated with `lv_malloc()` or * it can be statically allocated array (e.g. static lv_color_t buf[100*50]) or * it can be an address in RAM or external SRAM * @param canvas pointer to a canvas object * @param w width of the canvas * @param h height of the canvas - * @param cf color format. `LV_IMG_CF_...` + * @param cf color format. `LV_IMAGE_CF_...` */ void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_t h, lv_color_format_t cf); void lv_canvas_set_px(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); /** - * Set the palette color of a canvas with index format. Valid only for `LV_IMG_CF_INDEXED1/2/4/8` + * Set the palette color of a canvas with index format. Valid only for `LV_IMAGE_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 + * - for `LV_IMAGE_CF_INDEXED1`: 0..1 + * - for `LV_IMAGE_CF_INDEXED2`: 0..3 + * - for `LV_IMAGE_CF_INDEXED4`: 0..15 + * - for `LV_IMAGE_CF_INDEXED8`: 0..255 * @param c the color to set */ void lv_canvas_set_palette(lv_obj_t * canvas, uint8_t id, lv_color32_t c); @@ -86,11 +86,11 @@ void lv_canvas_set_palette(lv_obj_t * canvas, uint8_t id, lv_color32_t c); lv_color32_t lv_canvas_get_px(lv_obj_t * obj, lv_coord_t x, lv_coord_t y); /** - * Get the image of the canvas as a pointer to an `lv_img_dsc_t` variable. + * Get the image of the canvas as a pointer to an `lv_image_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_image_dsc_t * lv_canvas_get_image(lv_obj_t * canvas); /*===================== * Other functions @@ -123,21 +123,21 @@ void lv_canvas_finish_layer(lv_obj_t * canvas, lv_layer_t * layer); /********************** * MACROS **********************/ -#define LV_CANVAS_BUF_SIZE_TRUE_COLOR(w, h) LV_IMG_BUF_SIZE_TRUE_COLOR(w, h) -#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) LV_IMG_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) -#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) LV_IMG_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) +#define LV_CANVAS_BUF_SIZE_TRUE_COLOR(w, h) LV_IMAGE_BUF_SIZE_TRUE_COLOR(w, h) +#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) LV_IMAGE_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) +#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) LV_IMAGE_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) /*+ 1: to be sure no fractional row*/ -#define LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) LV_IMG_BUF_SIZE_ALPHA_1BIT(w, h) -#define LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) LV_IMG_BUF_SIZE_ALPHA_2BIT(w, h) -#define LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) LV_IMG_BUF_SIZE_ALPHA_4BIT(w, h) -#define LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) LV_IMG_BUF_SIZE_ALPHA_8BIT(w, h) +#define LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) LV_IMAGE_BUF_SIZE_ALPHA_1BIT(w, h) +#define LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) LV_IMAGE_BUF_SIZE_ALPHA_2BIT(w, h) +#define LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) LV_IMAGE_BUF_SIZE_ALPHA_4BIT(w, h) +#define LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) LV_IMAGE_BUF_SIZE_ALPHA_8BIT(w, h) /*4 * X: for palette*/ -#define LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w, h) LV_IMG_BUF_SIZE_INDEXED_1BIT(w, h) -#define LV_CANVAS_BUF_SIZE_INDEXED_2BIT(w, h) LV_IMG_BUF_SIZE_INDEXED_2BIT(w, h) -#define LV_CANVAS_BUF_SIZE_INDEXED_4BIT(w, h) LV_IMG_BUF_SIZE_INDEXED_4BIT(w, h) -#define LV_CANVAS_BUF_SIZE_INDEXED_8BIT(w, h) LV_IMG_BUF_SIZE_INDEXED_8BIT(w, h) +#define LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w, h) LV_IMAGE_BUF_SIZE_INDEXED_1BIT(w, h) +#define LV_CANVAS_BUF_SIZE_INDEXED_2BIT(w, h) LV_IMAGE_BUF_SIZE_INDEXED_2BIT(w, h) +#define LV_CANVAS_BUF_SIZE_INDEXED_4BIT(w, h) LV_IMAGE_BUF_SIZE_INDEXED_4BIT(w, h) +#define LV_CANVAS_BUF_SIZE_INDEXED_8BIT(w, h) LV_IMAGE_BUF_SIZE_INDEXED_8BIT(w, h) #endif /*LV_USE_CANVAS*/ diff --git a/src/widgets/dropdown/lv_dropdown.c b/src/widgets/dropdown/lv_dropdown.c index 5cff946fd..a3c889238 100644 --- a/src/widgets/dropdown/lv_dropdown.c +++ b/src/widgets/dropdown/lv_dropdown.c @@ -804,10 +804,10 @@ static void draw_main(lv_event_t * e) if(lv_obj_get_style_base_dir(obj, LV_PART_MAIN) == LV_BASE_DIR_RTL) symbol_to_left = true; if(dropdown->symbol) { - lv_img_src_t symbol_type = lv_img_src_get_type(dropdown->symbol); + lv_image_src_t symbol_type = lv_image_src_get_type(dropdown->symbol); lv_coord_t symbol_w; lv_coord_t symbol_h; - if(symbol_type == LV_IMG_SRC_SYMBOL) { + if(symbol_type == LV_IMAGE_SRC_SYMBOL) { lv_point_t size; lv_txt_get_size(&size, dropdown->symbol, symbol_dsc.font, symbol_dsc.letter_space, symbol_dsc.line_space, LV_COORD_MAX, symbol_dsc.flag); @@ -815,8 +815,8 @@ static void draw_main(lv_event_t * e) symbol_h = size.y; } else { - lv_img_header_t header; - lv_res_t res = lv_img_decoder_get_info(dropdown->symbol, &header); + lv_image_header_t header; + lv_res_t res = lv_image_decoder_get_info(dropdown->symbol, &header); if(res == LV_RES_OK) { symbol_w = header.w; symbol_h = header.h; @@ -837,7 +837,7 @@ static void draw_main(lv_event_t * e) symbol_area.x2 = symbol_area.x1 + symbol_w - 1; } - if(symbol_type == LV_IMG_SRC_SYMBOL) { + if(symbol_type == LV_IMAGE_SRC_SYMBOL) { symbol_area.y1 = obj->coords.y1 + top; symbol_area.y2 = symbol_area.y1 + symbol_h - 1; symbol_dsc.text = dropdown->symbol; @@ -846,14 +846,14 @@ static void draw_main(lv_event_t * e) else { symbol_area.y1 = obj->coords.y1 + (lv_obj_get_height(obj) - symbol_h) / 2; symbol_area.y2 = symbol_area.y1 + symbol_h - 1; - lv_draw_img_dsc_t img_dsc; - lv_draw_img_dsc_init(&img_dsc); - lv_obj_init_draw_img_dsc(obj, LV_PART_INDICATOR, &img_dsc); + lv_draw_image_dsc_t img_dsc; + lv_draw_image_dsc_init(&img_dsc); + lv_obj_init_draw_image_dsc(obj, LV_PART_INDICATOR, &img_dsc); img_dsc.pivot.x = symbol_w / 2; img_dsc.pivot.y = symbol_h / 2; img_dsc.angle = lv_obj_get_style_transform_angle(obj, LV_PART_INDICATOR); img_dsc.src = dropdown->symbol; - lv_draw_img(layer, &img_dsc, &symbol_area); + lv_draw_image(layer, &img_dsc, &symbol_area); } } diff --git a/src/widgets/img/lv_img.c b/src/widgets/image/lv_image.c similarity index 72% rename from src/widgets/img/lv_img.c rename to src/widgets/image/lv_image.c index fbced5c6b..52ccf999b 100644 --- a/src/widgets/img/lv_img.c +++ b/src/widgets/image/lv_image.c @@ -6,7 +6,7 @@ /********************* * INCLUDES *********************/ -#include "lv_img.h" +#include "lv_image.h" #if LV_USE_IMG != 0 #include "../../stdlib/lv_string.h" @@ -14,7 +14,7 @@ /********************* * DEFINES *********************/ -#define MY_CLASS &lv_img_class +#define MY_CLASS &lv_image_class /********************** * TYPEDEFS @@ -23,21 +23,21 @@ /********************** * STATIC PROTOTYPES **********************/ -static void lv_img_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj); -static void lv_img_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj); -static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e); -static void draw_img(lv_event_t * e); +static void lv_image_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj); +static void lv_image_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj); +static void lv_image_event(const lv_obj_class_t * class_p, lv_event_t * e); +static void draw_image(lv_event_t * e); /********************** * STATIC VARIABLES **********************/ -const lv_obj_class_t lv_img_class = { - .constructor_cb = lv_img_constructor, - .destructor_cb = lv_img_destructor, - .event_cb = lv_img_event, +const lv_obj_class_t lv_image_class = { + .constructor_cb = lv_image_constructor, + .destructor_cb = lv_image_destructor, + .event_cb = lv_image_event, .width_def = LV_SIZE_CONTENT, .height_def = LV_SIZE_CONTENT, - .instance_size = sizeof(lv_img_t), + .instance_size = sizeof(lv_image_t), .base_class = &lv_obj_class }; @@ -49,7 +49,7 @@ const lv_obj_class_t lv_img_class = { * GLOBAL FUNCTIONS **********************/ -lv_obj_t * lv_img_create(lv_obj_t * parent) +lv_obj_t * lv_image_create(lv_obj_t * parent) { LV_LOG_INFO("begin"); lv_obj_t * obj = lv_obj_class_create_obj(MY_CLASS, parent); @@ -61,25 +61,25 @@ lv_obj_t * lv_img_create(lv_obj_t * parent) * Setter functions *====================*/ -void lv_img_set_src(lv_obj_t * obj, const void * src) +void lv_image_set_src(lv_obj_t * obj, const void * src) { LV_ASSERT_OBJ(obj, MY_CLASS); lv_obj_invalidate(obj); - lv_img_src_t src_type = lv_img_src_get_type(src); - lv_img_t * img = (lv_img_t *)obj; + lv_image_src_t src_type = lv_image_src_get_type(src); + lv_image_t * img = (lv_image_t *)obj; #if LV_USE_LOG && LV_LOG_LEVEL >= LV_LOG_LEVEL_INFO switch(src_type) { - case LV_IMG_SRC_FILE: - LV_LOG_TRACE("`LV_IMG_SRC_FILE` type found"); + case LV_IMAGE_SRC_FILE: + LV_LOG_TRACE("`LV_IMAGE_SRC_FILE` type found"); break; - case LV_IMG_SRC_VARIABLE: - LV_LOG_TRACE("`LV_IMG_SRC_VARIABLE` type found"); + case LV_IMAGE_SRC_VARIABLE: + LV_LOG_TRACE("`LV_IMAGE_SRC_VARIABLE` type found"); break; - case LV_IMG_SRC_SYMBOL: - LV_LOG_TRACE("`LV_IMG_SRC_SYMBOL` type found"); + case LV_IMAGE_SRC_SYMBOL: + LV_LOG_TRACE("`LV_IMAGE_SRC_SYMBOL` type found"); break; default: LV_LOG_WARN("unknown type"); @@ -87,35 +87,35 @@ void lv_img_set_src(lv_obj_t * obj, const void * src) #endif /*If the new source type is unknown free the memories of the old source*/ - if(src_type == LV_IMG_SRC_UNKNOWN) { + if(src_type == LV_IMAGE_SRC_UNKNOWN) { LV_LOG_WARN("unknown image type"); - if(img->src_type == LV_IMG_SRC_SYMBOL || img->src_type == LV_IMG_SRC_FILE) { + if(img->src_type == LV_IMAGE_SRC_SYMBOL || img->src_type == LV_IMAGE_SRC_FILE) { lv_free((void *)img->src); } img->src = NULL; - img->src_type = LV_IMG_SRC_UNKNOWN; + img->src_type = LV_IMAGE_SRC_UNKNOWN; return; } - lv_img_header_t header; - lv_img_decoder_get_info(src, &header); + lv_image_header_t header; + lv_image_decoder_get_info(src, &header); /*Save the source*/ - if(src_type == LV_IMG_SRC_VARIABLE) { + if(src_type == LV_IMAGE_SRC_VARIABLE) { /*If memory was allocated because of the previous `src_type` then free it*/ - if(img->src_type == LV_IMG_SRC_FILE || img->src_type == LV_IMG_SRC_SYMBOL) { + if(img->src_type == LV_IMAGE_SRC_FILE || img->src_type == LV_IMAGE_SRC_SYMBOL) { lv_free((void *)img->src); } img->src = src; } - else if(src_type == LV_IMG_SRC_FILE || src_type == LV_IMG_SRC_SYMBOL) { + else if(src_type == LV_IMAGE_SRC_FILE || src_type == LV_IMAGE_SRC_SYMBOL) { /*If the new and the old src are the same then it was only a refresh.*/ if(img->src != src) { const void * old_src = NULL; /*If memory was allocated because of the previous `src_type` then save its pointer and free after allocation. *It's important to allocate first to be sure the new data will be on a new address. *Else `img_cache` wouldn't see the change in source.*/ - if(img->src_type == LV_IMG_SRC_FILE || img->src_type == LV_IMG_SRC_SYMBOL) { + if(img->src_type == LV_IMAGE_SRC_FILE || img->src_type == LV_IMAGE_SRC_SYMBOL) { old_src = img->src; } char * new_str = lv_strdup(src); @@ -127,8 +127,8 @@ void lv_img_set_src(lv_obj_t * obj, const void * src) } } - if(src_type == LV_IMG_SRC_SYMBOL) { - /*`lv_img_dsc_get_info` couldn't set the width and height of a font so set it here*/ + if(src_type == LV_IMAGE_SRC_SYMBOL) { + /*`lv_image_dsc_get_info` couldn't set the width and height of a font so set it here*/ const lv_font_t * font = lv_obj_get_style_text_font(obj, LV_PART_MAIN); lv_coord_t letter_space = lv_obj_get_style_text_letter_space(obj, LV_PART_MAIN); lv_coord_t line_space = lv_obj_get_style_text_line_space(obj, LV_PART_MAIN); @@ -151,35 +151,35 @@ void lv_img_set_src(lv_obj_t * obj, const void * src) lv_obj_invalidate(obj); } -void lv_img_set_offset_x(lv_obj_t * obj, lv_coord_t x) +void lv_image_set_offset_x(lv_obj_t * obj, lv_coord_t x) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; img->offset.x = x; lv_obj_invalidate(obj); } -void lv_img_set_offset_y(lv_obj_t * obj, lv_coord_t y) +void lv_image_set_offset_y(lv_obj_t * obj, lv_coord_t y) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; img->offset.y = y; lv_obj_invalidate(obj); } -void lv_img_set_angle(lv_obj_t * obj, int16_t angle) +void lv_image_set_angle(lv_obj_t * obj, int16_t angle) { while(angle >= 3600) angle -= 3600; while(angle < 0) angle += 3600; - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; if(angle == img->angle) return; - if(img->obj_size_mode == LV_IMG_SIZE_MODE_REAL) { + if(img->obj_size_mode == LV_IMAGE_SIZE_MODE_REAL) { img->angle = angle; lv_obj_invalidate_area(obj, &obj->coords); return; @@ -190,8 +190,8 @@ void lv_img_set_angle(lv_obj_t * obj, int16_t angle) lv_coord_t h = lv_obj_get_height(obj); lv_area_t a; lv_point_t pivot_px; - lv_img_get_pivot(obj, &pivot_px); - _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); + lv_image_get_pivot(obj, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); a.x1 += obj->coords.x1; a.y1 += obj->coords.y1; a.x2 += obj->coords.x1; @@ -207,7 +207,7 @@ void lv_img_set_angle(lv_obj_t * obj, int16_t angle) lv_obj_refresh_ext_draw_size(obj); lv_disp_enable_invalidation(disp, true); - _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); a.x1 += obj->coords.x1; a.y1 += obj->coords.y1; a.x2 += obj->coords.x1; @@ -215,12 +215,12 @@ void lv_img_set_angle(lv_obj_t * obj, int16_t angle) lv_obj_invalidate_area(obj, &a); } -void lv_img_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) +void lv_image_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) { - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; if(img->pivot.x == x && img->pivot.y == y) return; - if(img->obj_size_mode == LV_IMG_SIZE_MODE_REAL) { + if(img->obj_size_mode == LV_IMAGE_SIZE_MODE_REAL) { img->pivot.x = x; img->pivot.y = y; lv_obj_invalidate_area(obj, &obj->coords); @@ -232,8 +232,8 @@ void lv_img_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) lv_coord_t h = lv_obj_get_height(obj); lv_area_t a; lv_point_t pivot_px; - lv_img_get_pivot(obj, &pivot_px); - _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); + lv_image_get_pivot(obj, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); a.x1 += obj->coords.x1; a.y1 += obj->coords.y1; a.x2 += obj->coords.x1; @@ -250,8 +250,8 @@ void lv_img_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) lv_obj_refresh_ext_draw_size(obj); lv_disp_enable_invalidation(disp, true); - lv_img_get_pivot(obj, &pivot_px); - _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); + lv_image_get_pivot(obj, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); a.x1 += obj->coords.x1; a.y1 += obj->coords.y1; a.x2 += obj->coords.x1; @@ -259,14 +259,14 @@ void lv_img_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) lv_obj_invalidate_area(obj, &a); } -void lv_img_set_zoom(lv_obj_t * obj, uint16_t zoom) +void lv_image_set_zoom(lv_obj_t * obj, uint16_t zoom) { - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; if(zoom == img->zoom) return; if(zoom == 0) zoom = 1; - if(img->obj_size_mode == LV_IMG_SIZE_MODE_REAL) { + if(img->obj_size_mode == LV_IMAGE_SIZE_MODE_REAL) { img->zoom = zoom; lv_obj_invalidate_area(obj, &obj->coords); return; @@ -277,8 +277,8 @@ void lv_img_set_zoom(lv_obj_t * obj, uint16_t zoom) lv_coord_t h = lv_obj_get_height(obj); lv_area_t a; lv_point_t pivot_px; - lv_img_get_pivot(obj, &pivot_px); - _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); + lv_image_get_pivot(obj, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); a.x1 += obj->coords.x1 - 1; a.y1 += obj->coords.y1 - 1; a.x2 += obj->coords.x1 + 1; @@ -294,7 +294,7 @@ void lv_img_set_zoom(lv_obj_t * obj, uint16_t zoom) lv_obj_refresh_ext_draw_size(obj); lv_disp_enable_invalidation(disp, true); - _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); a.x1 += obj->coords.x1 - 1; a.y1 += obj->coords.y1 - 1; a.x2 += obj->coords.x1 + 1; @@ -302,19 +302,19 @@ void lv_img_set_zoom(lv_obj_t * obj, uint16_t zoom) lv_obj_invalidate_area(obj, &a); } -void lv_img_set_antialias(lv_obj_t * obj, bool antialias) +void lv_image_set_antialias(lv_obj_t * obj, bool antialias) { - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; if(antialias == img->antialias) return; img->antialias = antialias; lv_obj_invalidate(obj); } -void lv_img_set_size_mode(lv_obj_t * obj, lv_img_size_mode_t mode) +void lv_image_set_size_mode(lv_obj_t * obj, lv_image_size_mode_t mode) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; if(mode == img->obj_size_mode) return; img->obj_size_mode = mode; @@ -325,74 +325,74 @@ void lv_img_set_size_mode(lv_obj_t * obj, lv_img_size_mode_t mode) * Getter functions *====================*/ -const void * lv_img_get_src(lv_obj_t * obj) +const void * lv_image_get_src(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; return img->src; } -lv_coord_t lv_img_get_offset_x(lv_obj_t * obj) +lv_coord_t lv_image_get_offset_x(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; return img->offset.x; } -lv_coord_t lv_img_get_offset_y(lv_obj_t * obj) +lv_coord_t lv_image_get_offset_y(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; return img->offset.y; } -lv_coord_t lv_img_get_angle(lv_obj_t * obj) +lv_coord_t lv_image_get_angle(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; return img->angle; } -void lv_img_get_pivot(lv_obj_t * obj, lv_point_t * pivot) +void lv_image_get_pivot(lv_obj_t * obj, lv_point_t * pivot) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; pivot->x = lv_pct_to_px(img->pivot.x, img->w); pivot->y = lv_pct_to_px(img->pivot.y, img->h); } -lv_coord_t lv_img_get_zoom(lv_obj_t * obj) +lv_coord_t lv_image_get_zoom(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; return img->zoom; } -bool lv_img_get_antialias(lv_obj_t * obj) +bool lv_image_get_antialias(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; return img->antialias ? true : false; } -lv_img_size_mode_t lv_img_get_size_mode(lv_obj_t * obj) +lv_image_size_mode_t lv_image_get_size_mode(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; return img->obj_size_mode; } @@ -400,15 +400,15 @@ lv_img_size_mode_t lv_img_get_size_mode(lv_obj_t * obj) * STATIC FUNCTIONS **********************/ -static void lv_img_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) +static void lv_image_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) { LV_UNUSED(class_p); LV_TRACE_OBJ_CREATE("begin"); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; img->src = NULL; - img->src_type = LV_IMG_SRC_UNKNOWN; + img->src_type = LV_IMAGE_SRC_UNKNOWN; img->cf = LV_COLOR_FORMAT_UNKNOWN; img->w = lv_obj_get_width(obj); img->h = lv_obj_get_height(obj); @@ -419,7 +419,7 @@ static void lv_img_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) img->offset.y = 0; img->pivot.x = LV_PCT(50); /*Default pivot to image center*/ img->pivot.y = LV_PCT(50); - img->obj_size_mode = LV_IMG_SIZE_MODE_VIRTUAL; + img->obj_size_mode = LV_IMAGE_SIZE_MODE_VIRTUAL; lv_obj_clear_flag(obj, LV_OBJ_FLAG_CLICKABLE); lv_obj_add_flag(obj, LV_OBJ_FLAG_ADV_HITTEST); @@ -427,35 +427,35 @@ static void lv_img_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) LV_TRACE_OBJ_CREATE("finished"); } -static void lv_img_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj) +static void lv_image_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj) { LV_UNUSED(class_p); - lv_img_t * img = (lv_img_t *)obj; - if(img->src_type == LV_IMG_SRC_FILE || img->src_type == LV_IMG_SRC_SYMBOL) { + lv_image_t * img = (lv_image_t *)obj; + if(img->src_type == LV_IMAGE_SRC_FILE || img->src_type == LV_IMAGE_SRC_SYMBOL) { lv_free((void *)img->src); img->src = NULL; - img->src_type = LV_IMG_SRC_UNKNOWN; + img->src_type = LV_IMAGE_SRC_UNKNOWN; } } -static lv_point_t lv_img_get_transformed_size(lv_obj_t * obj) +static lv_point_t lv_image_get_transformed_size(lv_obj_t * obj) { - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; lv_area_t area_transform; lv_point_t pivot_px; - lv_img_get_pivot(obj, &pivot_px); - _lv_img_buf_get_transformed_area(&area_transform, img->w, img->h, - img->angle, img->zoom, &pivot_px); + lv_image_get_pivot(obj, &pivot_px); + _lv_image_buf_get_transformed_area(&area_transform, img->w, img->h, + img->angle, img->zoom, &pivot_px); return (lv_point_t) { lv_area_get_width(&area_transform), lv_area_get_height(&area_transform) }; } -static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e) +static void lv_image_event(const lv_obj_class_t * class_p, lv_event_t * e) { LV_UNUSED(class_p); @@ -469,14 +469,14 @@ static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e) } lv_obj_t * obj = lv_event_get_target(e); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; lv_point_t pivot_px; - lv_img_get_pivot(obj, &pivot_px); + lv_image_get_pivot(obj, &pivot_px); if(code == LV_EVENT_STYLE_CHANGED) { /*Refresh the file name to refresh the symbol text size*/ - if(img->src_type == LV_IMG_SRC_SYMBOL) { - lv_img_set_src(obj, img->src); + if(img->src_type == LV_IMAGE_SRC_SYMBOL) { + lv_image_set_src(obj, img->src); } else { /*With transformation it might change*/ @@ -492,7 +492,7 @@ static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e) lv_area_t a; lv_coord_t w = lv_obj_get_width(obj); lv_coord_t h = lv_obj_get_height(obj); - _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &pivot_px); *s = LV_MAX(*s, -a.x1); *s = LV_MAX(*s, -a.y1); *s = LV_MAX(*s, a.x2 - w); @@ -510,7 +510,7 @@ static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e) lv_coord_t w = lv_obj_get_width(obj); lv_coord_t h = lv_obj_get_height(obj); lv_area_t coords; - _lv_img_buf_get_transformed_area(&coords, w, h, img->angle, img->zoom, &pivot_px); + _lv_image_buf_get_transformed_area(&coords, w, h, img->angle, img->zoom, &pivot_px); coords.x1 += obj->coords.x1; coords.y1 += obj->coords.y1; coords.x2 += obj->coords.x1; @@ -526,8 +526,8 @@ static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e) } else if(code == LV_EVENT_GET_SELF_SIZE) { lv_point_t * p = lv_event_get_param(e); - if(img->obj_size_mode == LV_IMG_SIZE_MODE_REAL) { - *p = lv_img_get_transformed_size(obj); + if(img->obj_size_mode == LV_IMAGE_SIZE_MODE_REAL) { + *p = lv_image_get_transformed_size(obj); } else { p->x = img->w; @@ -535,19 +535,19 @@ static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e) } } else if(code == LV_EVENT_DRAW_MAIN || code == LV_EVENT_DRAW_POST || code == LV_EVENT_COVER_CHECK) { - draw_img(e); + draw_image(e); } } -static void draw_img(lv_event_t * e) +static void draw_image(lv_event_t * e) { lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target(e); - lv_img_t * img = (lv_img_t *)obj; + lv_image_t * img = (lv_image_t *)obj; if(code == LV_EVENT_COVER_CHECK) { lv_cover_check_info_t * info = lv_event_get_param(e); if(info->res == LV_COVER_RES_MASKED) return; - if(img->src_type == LV_IMG_SRC_UNKNOWN || img->src_type == LV_IMG_SRC_SYMBOL) { + if(img->src_type == LV_IMAGE_SRC_UNKNOWN || img->src_type == LV_IMAGE_SRC_SYMBOL) { info->res = LV_COVER_RES_NOT_COVER; return; } @@ -559,7 +559,7 @@ static void draw_img(lv_event_t * e) } /*With not LV_OPA_COVER images can't cover an area */ - if(lv_obj_get_style_img_opa(obj, LV_PART_MAIN) != LV_OPA_COVER) { + if(lv_obj_get_style_image_opa(obj, LV_PART_MAIN) != LV_OPA_COVER) { info->res = LV_COVER_RES_NOT_COVER; return; } @@ -579,8 +579,8 @@ static void draw_img(lv_event_t * e) else { lv_area_t a; lv_point_t pivot_px; - lv_img_get_pivot(obj, &pivot_px); - _lv_img_buf_get_transformed_area(&a, lv_obj_get_width(obj), lv_obj_get_height(obj), 0, img->zoom, &pivot_px); + lv_image_get_pivot(obj, &pivot_px); + _lv_image_buf_get_transformed_area(&a, lv_obj_get_width(obj), lv_obj_get_height(obj), 0, img->zoom, &pivot_px); a.x1 += obj->coords.x1; a.y1 += obj->coords.y1; a.x2 += obj->coords.x1; @@ -605,19 +605,19 @@ static void draw_img(lv_event_t * e) lv_point_t bg_pivot; lv_point_t pivot_px; - lv_img_get_pivot(obj, &pivot_px); + lv_image_get_pivot(obj, &pivot_px); bg_pivot.x = pivot_px.x + pleft; bg_pivot.y = pivot_px.y + ptop; lv_area_t bg_coords; - if(img->obj_size_mode == LV_IMG_SIZE_MODE_REAL) { + if(img->obj_size_mode == LV_IMAGE_SIZE_MODE_REAL) { /*Object size equals to transformed image size*/ lv_obj_get_coords(obj, &bg_coords); } else { - _lv_img_buf_get_transformed_area(&bg_coords, obj_w, obj_h, - img->angle, img->zoom, &bg_pivot); + _lv_image_buf_get_transformed_area(&bg_coords, obj_w, obj_h, + img->angle, img->zoom, &bg_pivot); /*Modify the coordinates to draw the background for the rotated and scaled coordinates*/ bg_coords.x1 += obj->coords.x1; @@ -644,9 +644,9 @@ static void draw_img(lv_event_t * e) lv_area_t img_max_area; lv_area_copy(&img_max_area, &obj->coords); - lv_point_t img_size_final = lv_img_get_transformed_size(obj); + lv_point_t img_size_final = lv_image_get_transformed_size(obj); - if(img->obj_size_mode == LV_IMG_SIZE_MODE_REAL) { + if(img->obj_size_mode == LV_IMAGE_SIZE_MODE_REAL) { img_max_area.x1 -= ((img->w - img_size_final.x) + 1) / 2; img_max_area.x2 -= ((img->w - img_size_final.x) + 1) / 2; img_max_area.y1 -= ((img->h - img_size_final.y) + 1) / 2; @@ -662,10 +662,10 @@ static void draw_img(lv_event_t * e) img_max_area.x2 -= pright; img_max_area.y2 -= pbottom; - if(img->src_type == LV_IMG_SRC_FILE || img->src_type == LV_IMG_SRC_VARIABLE) { - lv_draw_img_dsc_t img_dsc; - lv_draw_img_dsc_init(&img_dsc); - lv_obj_init_draw_img_dsc(obj, LV_PART_MAIN, &img_dsc); + if(img->src_type == LV_IMAGE_SRC_FILE || img->src_type == LV_IMAGE_SRC_VARIABLE) { + lv_draw_image_dsc_t img_dsc; + lv_draw_image_dsc_init(&img_dsc); + lv_obj_init_draw_image_dsc(obj, LV_PART_MAIN, &img_dsc); img_dsc.zoom = img->zoom; img_dsc.angle = img->angle; @@ -697,12 +697,12 @@ static void draw_img(lv_event_t * e) coords_tmp.x2 = coords_tmp.x1 + img->w - 1; for(; coords_tmp.x1 < img_max_area.x2; coords_tmp.x1 += img_size_final.x, coords_tmp.x2 += img_size_final.x) { - lv_draw_img(layer, &img_dsc, &coords_tmp); + lv_draw_image(layer, &img_dsc, &coords_tmp); } } layer->clip_area = clip_area_ori; } - else if(img->src_type == LV_IMG_SRC_SYMBOL) { + else if(img->src_type == LV_IMAGE_SRC_SYMBOL) { lv_draw_label_dsc_t label_dsc; lv_draw_label_dsc_init(&label_dsc); lv_obj_init_draw_label_dsc(obj, LV_PART_MAIN, &label_dsc); diff --git a/src/widgets/img/lv_img.h b/src/widgets/image/lv_image.h similarity index 75% rename from src/widgets/img/lv_img.h rename to src/widgets/image/lv_image.h index e075bac13..371db3b9e 100644 --- a/src/widgets/img/lv_img.h +++ b/src/widgets/image/lv_image.h @@ -3,8 +3,8 @@ * */ -#ifndef LV_IMG_H -#define LV_IMG_H +#ifndef LV_IMAGE_H +#define LV_IMAGE_H #ifdef __cplusplus extern "C" { @@ -46,33 +46,33 @@ typedef struct { lv_coord_t angle; /*rotation angle of the image*/ lv_point_t pivot; /*rotation center of the image*/ lv_coord_t zoom; /*256 means no zoom, 512 double size, 128 half size*/ - uint8_t src_type : 2; /*See: lv_img_src_t*/ + uint8_t src_type : 2; /*See: lv_image_src_t*/ uint8_t cf : 5; /*Color format from `lv_color_format_t`*/ uint8_t antialias : 1; /*Apply anti-aliasing in transformations (rotate, zoom)*/ uint8_t obj_size_mode: 2; /*Image size mode when image size and object size is different.*/ -} lv_img_t; +} lv_image_t; -extern const lv_obj_class_t lv_img_class; +extern const lv_obj_class_t lv_image_class; /** * Image size mode, when image size and object size is different */ -enum _lv_img_size_mode_t { +enum _lv_image_size_mode_t { /** Zoom doesn't affect the coordinates of the object, * however if zoomed in the image is drawn out of the its coordinates. * The layout's won't change on zoom */ - LV_IMG_SIZE_MODE_VIRTUAL = 0, + LV_IMAGE_SIZE_MODE_VIRTUAL = 0, /** If the object size is set to SIZE_CONTENT, then object size equals zoomed image size. * It causes layout recalculation. * If the object size is set explicitly, the image will be cropped when zoomed in.*/ - LV_IMG_SIZE_MODE_REAL, + LV_IMAGE_SIZE_MODE_REAL, }; #ifdef DOXYGEN -typedef _lv_img_size_mode_t lv_img_size_mode_t; +typedef _lv_image_size_mode_t lv_image_size_mode_t; #else -typedef uint8_t lv_img_size_mode_t; +typedef uint8_t lv_image_size_mode_t; #endif /*DOXYGEN*/ /********************** @@ -84,7 +84,7 @@ typedef uint8_t lv_img_size_mode_t; * @param parent pointer to an object, it will be the parent of the new image * @return pointer to the created image */ -lv_obj_t * lv_img_create(lv_obj_t * parent); +lv_obj_t * lv_image_create(lv_obj_t * parent); /*===================== * Setter functions @@ -93,18 +93,18 @@ lv_obj_t * lv_img_create(lv_obj_t * parent); /** * Set the image data to display on the object * @param obj pointer to an image object - * @param src 1) pointer to an ::lv_img_dsc_t descriptor (converted by LVGL's image converter) (e.g. &my_img) or + * @param src 1) pointer to an ::lv_image_dsc_t descriptor (converted by LVGL's image converter) (e.g. &my_img) or * 2) path to an image file (e.g. "S:/dir/img.bin")or * 3) a SYMBOL (e.g. LV_SYMBOL_OK) */ -void lv_img_set_src(lv_obj_t * obj, const void * src); +void lv_image_set_src(lv_obj_t * obj, const void * src); /** * Set an offset for the source of an image so the image will be displayed from the new origin. * @param obj pointer to an image * @param x the new offset along x axis. */ -void lv_img_set_offset_x(lv_obj_t * obj, lv_coord_t x); +void lv_image_set_offset_x(lv_obj_t * obj, lv_coord_t x); /** * Set an offset for the source of an image. @@ -112,27 +112,27 @@ void lv_img_set_offset_x(lv_obj_t * obj, lv_coord_t x); * @param obj pointer to an image * @param y the new offset along y axis. */ -void lv_img_set_offset_y(lv_obj_t * obj, lv_coord_t y); +void lv_image_set_offset_y(lv_obj_t * obj, lv_coord_t y); /** * Set the rotation angle of the image. - * The image will be rotated around the set pivot set by `lv_img_set_pivot()` + * The image will be rotated around the set pivot set by `lv_image_set_pivot()` * Note that indexed and alpha only images can't be transformed. * @param obj pointer to an image object * @param angle rotation angle in degree with 0.1 degree resolution (0..3600: clock wise) */ -void lv_img_set_angle(lv_obj_t * obj, int16_t angle); +void lv_image_set_angle(lv_obj_t * obj, int16_t angle); /** * Set the rotation center of the image. * The image will be rotated around this point. - * x, y can be set with value of LV_PCT, lv_img_get_pivot will return the true pixel coordinate of pivot in this case. + * x, y can be set with value of LV_PCT, lv_image_get_pivot will return the true pixel coordinate of pivot in this case. * @param obj pointer to an image object * @param x rotation center x of the image * @param y rotation center y of the image */ -void lv_img_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y); +void lv_image_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y); /** @@ -140,13 +140,13 @@ void lv_img_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y); * Note that indexed and alpha only images can't be transformed. * @param img pointer to an image object * @param zoom the zoom factor. - * @example 256 or LV_ZOOM_IMG_NONE for no zoom + * @example 256 or LV_ZOOM_IMAGE_NONE for no zoom * @example <256: scale down * @example >256 scale up * @example 128 half size * @example 512 double size */ -void lv_img_set_zoom(lv_obj_t * obj, uint16_t zoom); +void lv_image_set_zoom(lv_obj_t * obj, uint16_t zoom); /** * Enable/disable anti-aliasing for the transformations (rotate, zoom) or not. @@ -154,7 +154,7 @@ void lv_img_set_zoom(lv_obj_t * obj, uint16_t zoom); * @param obj pointer to an image object * @param antialias true: anti-aliased; false: not anti-aliased */ -void lv_img_set_antialias(lv_obj_t * obj, bool antialias); +void lv_image_set_antialias(lv_obj_t * obj, bool antialias); /** * Set the image object size mode. @@ -162,7 +162,7 @@ void lv_img_set_antialias(lv_obj_t * obj, bool antialias); * @param obj pointer to an image object * @param mode the new size mode. */ -void lv_img_set_size_mode(lv_obj_t * obj, lv_img_size_mode_t mode); +void lv_image_set_size_mode(lv_obj_t * obj, lv_image_size_mode_t mode); /*===================== * Getter functions *====================*/ @@ -172,28 +172,28 @@ void lv_img_set_size_mode(lv_obj_t * obj, lv_img_size_mode_t mode); * @param obj pointer to an image object * @return the image source (symbol, file name or ::lv-img_dsc_t for C arrays) */ -const void * lv_img_get_src(lv_obj_t * obj); +const void * lv_image_get_src(lv_obj_t * obj); /** * Get the offset's x attribute of the image object. * @param obj pointer to an image * @return offset X value. */ -lv_coord_t lv_img_get_offset_x(lv_obj_t * obj); +lv_coord_t lv_image_get_offset_x(lv_obj_t * obj); /** * Get the offset's y attribute of the image object. * @param obj pointer to an image * @return offset Y value. */ -lv_coord_t lv_img_get_offset_y(lv_obj_t * obj); +lv_coord_t lv_image_get_offset_y(lv_obj_t * obj); /** * Get the rotation angle of the image. * @param obj pointer to an image object * @return rotation angle in 0.1 degrees (0..3600) */ -lv_coord_t lv_img_get_angle(lv_obj_t * obj); +lv_coord_t lv_image_get_angle(lv_obj_t * obj); /** * Get the pivot (rotation center) of the image. @@ -201,35 +201,35 @@ lv_coord_t lv_img_get_angle(lv_obj_t * obj); * @param obj pointer to an image object * @param pivot store the rotation center here */ -void lv_img_get_pivot(lv_obj_t * obj, lv_point_t * pivot); +void lv_image_get_pivot(lv_obj_t * obj, lv_point_t * pivot); /** * Get the zoom factor of the image. * @param obj pointer to an image object * @return zoom factor (256: no zoom) */ -lv_coord_t lv_img_get_zoom(lv_obj_t * obj); +lv_coord_t lv_image_get_zoom(lv_obj_t * obj); /** * Get whether the transformations (rotate, zoom) are anti-aliased or not * @param obj pointer to an image object * @return true: anti-aliased; false: not anti-aliased */ -bool lv_img_get_antialias(lv_obj_t * obj); +bool lv_image_get_antialias(lv_obj_t * obj); /** * Get the size mode of the image * @param obj pointer to an image object - * @return element of @ref lv_img_size_mode_t + * @return element of @ref lv_image_size_mode_t */ -lv_img_size_mode_t lv_img_get_size_mode(lv_obj_t * obj); +lv_image_size_mode_t lv_image_get_size_mode(lv_obj_t * obj); /********************** * MACROS **********************/ /** 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; +#define LV_IMAGE_DECLARE(var_name) extern const lv_image_dsc_t var_name; #endif /*LV_USE_IMG*/ @@ -237,4 +237,4 @@ lv_img_size_mode_t lv_img_get_size_mode(lv_obj_t * obj); } /*extern "C"*/ #endif -#endif /*LV_IMG_H*/ +#endif /*LV_IMAGE_H*/ diff --git a/src/widgets/imgbtn/lv_imgbtn.c b/src/widgets/imgbtn/lv_imgbtn.c index 21540dcef..de37cf783 100644 --- a/src/widgets/imgbtn/lv_imgbtn.c +++ b/src/widgets/imgbtn/lv_imgbtn.c @@ -28,7 +28,7 @@ static void lv_imgbtn_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj); static void draw_main(lv_event_t * e); static void lv_imgbtn_event(const lv_obj_class_t * class_p, lv_event_t * e); -static void refr_img(lv_obj_t * imgbtn); +static void refr_image(lv_obj_t * imgbtn); static lv_imgbtn_state_t suggest_state(lv_obj_t * imgbtn, lv_imgbtn_state_t state); static lv_imgbtn_state_t get_state(const lv_obj_t * imgbtn); static void update_src_info(lv_imgbtn_src_info_t * info, const void * src); @@ -90,7 +90,7 @@ void lv_imgbtn_set_src(lv_obj_t * obj, lv_imgbtn_state_t state, const void * src update_src_info(&imgbtn->src_mid[state], src_mid); update_src_info(&imgbtn->src_right[state], src_right); - refr_img(obj); + refr_image(obj); } void lv_imgbtn_set_state(lv_obj_t * obj, lv_imgbtn_state_t state) @@ -108,7 +108,7 @@ void lv_imgbtn_set_state(lv_obj_t * obj, lv_imgbtn_state_t state) lv_obj_clear_state(obj, LV_STATE_CHECKED | LV_STATE_PRESSED | LV_STATE_DISABLED); lv_obj_add_state(obj, obj_state); - refr_img(obj); + refr_image(obj); } /*===================== @@ -119,7 +119,7 @@ void lv_imgbtn_set_state(lv_obj_t * obj, lv_imgbtn_state_t state) /** * Get the left image in a given state * @param obj pointer to an image button object - * @param state the state where to get the image (from `lv_btn_state_t`) ` + * @param state the state where to get the image (from `lv_button_state_t`) ` * @return pointer to the left image source (a C array or path to a file) */ const void * lv_imgbtn_get_src_left(lv_obj_t * obj, lv_imgbtn_state_t state) @@ -134,7 +134,7 @@ const void * lv_imgbtn_get_src_left(lv_obj_t * obj, lv_imgbtn_state_t state) /** * Get the middle image in a given state * @param obj pointer to an image button object - * @param state the state where to get the image (from `lv_btn_state_t`) ` + * @param state the state where to get the image (from `lv_button_state_t`) ` * @return pointer to the middle image source (a C array or path to a file) */ const void * lv_imgbtn_get_src_middle(lv_obj_t * obj, lv_imgbtn_state_t state) @@ -148,7 +148,7 @@ const void * lv_imgbtn_get_src_middle(lv_obj_t * obj, lv_imgbtn_state_t state) /** * Get the right image in a given state * @param obj pointer to an image button object - * @param state the state where to get the image (from `lv_btn_state_t`) ` + * @param state the state where to get the image (from `lv_button_state_t`) ` * @return pointer to the left image source (a C array or path to a file) */ const void * lv_imgbtn_get_src_right(lv_obj_t * obj, lv_imgbtn_state_t state) @@ -186,7 +186,7 @@ static void lv_imgbtn_event(const lv_obj_class_t * class_p, lv_event_t * e) lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target(e); if(code == LV_EVENT_PRESSED || code == LV_EVENT_RELEASED || code == LV_EVENT_PRESS_LOST) { - refr_img(obj); + refr_image(obj); } else if(code == LV_EVENT_DRAW_MAIN) { draw_main(e); @@ -225,9 +225,9 @@ static void draw_main(lv_event_t * e) lv_area_copy(&coords, &obj->coords); lv_area_increase(&coords, tw, th); - lv_draw_img_dsc_t img_dsc; - lv_draw_img_dsc_init(&img_dsc); - lv_obj_init_draw_img_dsc(obj, LV_PART_MAIN, &img_dsc); + lv_draw_image_dsc_t img_dsc; + lv_draw_image_dsc_init(&img_dsc); + lv_obj_init_draw_image_dsc(obj, LV_PART_MAIN, &img_dsc); lv_area_t coords_part; lv_coord_t left_w = 0; @@ -240,7 +240,7 @@ static void draw_main(lv_event_t * e) coords_part.x2 = coords.x1 + src_info->header.w - 1; coords_part.y2 = coords.y1 + src_info->header.h - 1; img_dsc.src = src_info->img_src; - lv_draw_img(layer, &img_dsc, &coords_part); + lv_draw_image(layer, &img_dsc, &coords_part); } src_info = &imgbtn->src_right[state]; @@ -251,7 +251,7 @@ static void draw_main(lv_event_t * e) coords_part.x2 = coords.x2; coords_part.y2 = coords.y1 + src_info->header.h - 1; img_dsc.src = src_info->img_src; - lv_draw_img(layer, &img_dsc, &coords_part); + lv_draw_image(layer, &img_dsc, &coords_part); } src_info = &imgbtn->src_mid[state]; @@ -277,7 +277,7 @@ static void draw_main(lv_event_t * e) for(i = coords_part.x1; i < (lv_coord_t)(clip_area_center.x2 + src_info->header.w - 1); i += src_info->header.w) { img_dsc.src = src_info->img_src; - lv_draw_img(layer, &img_dsc, &coords_part); + lv_draw_image(layer, &img_dsc, &coords_part); coords_part.x1 = coords_part.x2 + 1; coords_part.x2 += src_info->header.w; } @@ -286,7 +286,7 @@ static void draw_main(lv_event_t * e) } } -static void refr_img(lv_obj_t * obj) +static void refr_image(lv_obj_t * obj) { lv_imgbtn_t * imgbtn = (lv_imgbtn_t *)obj; lv_imgbtn_state_t state = suggest_state(obj, get_state(obj)); @@ -366,7 +366,7 @@ static void update_src_info(lv_imgbtn_src_info_t * info, const void * src) return; } - lv_res_t res = lv_img_decoder_get_info(src, &info->header); + lv_res_t res = lv_image_decoder_get_info(src, &info->header); if(res != LV_RES_OK) { LV_LOG_WARN("can't get info"); return; diff --git a/src/widgets/imgbtn/lv_imgbtn.h b/src/widgets/imgbtn/lv_imgbtn.h index d57357bda..8c6ebe206 100644 --- a/src/widgets/imgbtn/lv_imgbtn.h +++ b/src/widgets/imgbtn/lv_imgbtn.h @@ -32,7 +32,7 @@ typedef enum { typedef struct { const void * img_src; - lv_img_header_t header; + lv_image_header_t header; } lv_imgbtn_src_info_t; /********************** @@ -96,7 +96,7 @@ void lv_imgbtn_set_state(lv_obj_t * imgbtn, lv_imgbtn_state_t state); /** * Get the left image in a given state * @param imgbtn pointer to an image button object - * @param state the state where to get the image (from `lv_btn_state_t`) ` + * @param state the state where to get the image (from `lv_button_state_t`) ` * @return pointer to the left image source (a C array or path to a file) */ const void * lv_imgbtn_get_src_left(lv_obj_t * imgbtn, lv_imgbtn_state_t state); @@ -104,7 +104,7 @@ const void * lv_imgbtn_get_src_left(lv_obj_t * imgbtn, lv_imgbtn_state_t state); /** * Get the middle image in a given state * @param imgbtn pointer to an image button object - * @param state the state where to get the image (from `lv_btn_state_t`) ` + * @param state the state where to get the image (from `lv_button_state_t`) ` * @return pointer to the middle image source (a C array or path to a file) */ const void * lv_imgbtn_get_src_middle(lv_obj_t * imgbtn, lv_imgbtn_state_t state); @@ -112,7 +112,7 @@ const void * lv_imgbtn_get_src_middle(lv_obj_t * imgbtn, lv_imgbtn_state_t state /** * Get the right image in a given state * @param imgbtn pointer to an image button object - * @param state the state where to get the image (from `lv_btn_state_t`) ` + * @param state the state where to get the image (from `lv_button_state_t`) ` * @return pointer to the left image source (a C array or path to a file) */ const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_imgbtn_state_t state); diff --git a/src/widgets/keyboard/lv_keyboard.c b/src/widgets/keyboard/lv_keyboard.c index a74830e19..765323291 100644 --- a/src/widgets/keyboard/lv_keyboard.c +++ b/src/widgets/keyboard/lv_keyboard.c @@ -20,7 +20,7 @@ * DEFINES *********************/ #define MY_CLASS &lv_keyboard_class -#define LV_KB_BTN(width) LV_BTNMATRIX_CTRL_POPOVER | width +#define LV_KB_BTN(width) LV_BUTTONMATRIX_CTRL_POPOVER | width /********************** * TYPEDEFS @@ -44,7 +44,7 @@ const lv_obj_class_t lv_keyboard_class = { .height_def = LV_PCT(50), .instance_size = sizeof(lv_keyboard_t), .editable = 1, - .base_class = &lv_btnmatrix_class + .base_class = &lv_buttonmatrix_class }; static const char * const default_kb_map_lc[] = {"1#", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", LV_SYMBOL_BACKSPACE, "\n", @@ -57,15 +57,15 @@ static const char * const default_kb_map_lc[] = {"1#", "q", "w", "e", "r", "t", LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" }; -static const lv_btnmatrix_ctrl_t default_kb_ctrl_lc_map[] = { - LV_KEYBOARD_CTRL_BTN_FLAGS | 5, LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_BTNMATRIX_CTRL_CHECKED | 7, - LV_KEYBOARD_CTRL_BTN_FLAGS | 6, LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_BTNMATRIX_CTRL_CHECKED | 7, - LV_BTNMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BTNMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_BTNMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BTNMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BTNMATRIX_CTRL_CHECKED | LV_KB_BTN(1), - LV_KEYBOARD_CTRL_BTN_FLAGS | 2, +static const lv_buttonmatrix_ctrl_t default_kb_ctrl_lc_map[] = { + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 5, LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_BUTTONMATRIX_CTRL_CHECKED | 7, + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 6, LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_BUTTONMATRIX_CTRL_CHECKED | 7, + LV_BUTTONMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BUTTONMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_BUTTONMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BUTTONMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BUTTONMATRIX_CTRL_CHECKED | LV_KB_BTN(1), + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2, #if LV_USE_ARABIC_PERSIAN_CHARS == 1 - LV_KEYBOARD_CTRL_BTN_FLAGS | 2, + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2, #endif - LV_BTNMATRIX_CTRL_CHECKED | 2, 6, LV_BTNMATRIX_CTRL_CHECKED | 2, LV_KEYBOARD_CTRL_BTN_FLAGS | 2 + LV_BUTTONMATRIX_CTRL_CHECKED | 2, 6, LV_BUTTONMATRIX_CTRL_CHECKED | 2, LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2 }; static const char * const default_kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", LV_SYMBOL_BACKSPACE, "\n", @@ -78,15 +78,15 @@ static const char * const default_kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" }; -static const lv_btnmatrix_ctrl_t default_kb_ctrl_uc_map[] = { - LV_KEYBOARD_CTRL_BTN_FLAGS | 5, LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_BTNMATRIX_CTRL_CHECKED | 7, - LV_KEYBOARD_CTRL_BTN_FLAGS | 6, LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_BTNMATRIX_CTRL_CHECKED | 7, - LV_BTNMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BTNMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_BTNMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BTNMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BTNMATRIX_CTRL_CHECKED | LV_KB_BTN(1), - LV_KEYBOARD_CTRL_BTN_FLAGS | 2, +static const lv_buttonmatrix_ctrl_t default_kb_ctrl_uc_map[] = { + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 5, LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_KB_BTN(4), LV_BUTTONMATRIX_CTRL_CHECKED | 7, + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 6, LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_KB_BTN(3), LV_BUTTONMATRIX_CTRL_CHECKED | 7, + LV_BUTTONMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BUTTONMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_BUTTONMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BUTTONMATRIX_CTRL_CHECKED | LV_KB_BTN(1), LV_BUTTONMATRIX_CTRL_CHECKED | LV_KB_BTN(1), + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2, #if LV_USE_ARABIC_PERSIAN_CHARS == 1 - LV_KEYBOARD_CTRL_BTN_FLAGS | 2, + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2, #endif - LV_BTNMATRIX_CTRL_CHECKED | 2, 6, LV_BTNMATRIX_CTRL_CHECKED | 2, LV_KEYBOARD_CTRL_BTN_FLAGS | 2 + LV_BUTTONMATRIX_CTRL_CHECKED | 2, 6, LV_BUTTONMATRIX_CTRL_CHECKED | 2, LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2 }; #if LV_USE_ARABIC_PERSIAN_CHARS == 1 static const char * const default_kb_map_ar[] = { @@ -96,11 +96,11 @@ static const char * const default_kb_map_ar[] = { LV_SYMBOL_CLOSE, "abc", LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_NEW_LINE, LV_SYMBOL_OK, "" }; -static const lv_btnmatrix_ctrl_t default_kb_ctrl_ar_map[] = { - LV_KEYBOARD_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, +static const lv_buttonmatrix_ctrl_t default_kb_ctrl_ar_map[] = { + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - LV_KEYBOARD_CTRL_BTN_FLAGS | 2, LV_KEYBOARD_CTRL_BTN_FLAGS | 2, 2, 6, 2, 3, LV_KEYBOARD_CTRL_BTN_FLAGS | 2 + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2, LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2, 2, 6, 2, 3, LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2 }; #endif @@ -114,15 +114,15 @@ static const char * const default_kb_map_spec[] = {"1", "2", "3", "4", "5", "6", LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" }; -static const lv_btnmatrix_ctrl_t default_kb_ctrl_spec_map[] = { - LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_BTNMATRIX_CTRL_CHECKED | 2, - LV_KEYBOARD_CTRL_BTN_FLAGS | 2, LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), +static const lv_buttonmatrix_ctrl_t default_kb_ctrl_spec_map[] = { + LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_BUTTONMATRIX_CTRL_CHECKED | 2, + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2, LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), LV_KB_BTN(1), - LV_KEYBOARD_CTRL_BTN_FLAGS | 2, + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2, #if LV_USE_ARABIC_PERSIAN_CHARS == 1 - LV_KEYBOARD_CTRL_BTN_FLAGS | 2, + LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2, #endif - LV_BTNMATRIX_CTRL_CHECKED | 2, 6, LV_BTNMATRIX_CTRL_CHECKED | 2, LV_KEYBOARD_CTRL_BTN_FLAGS | 2 + LV_BUTTONMATRIX_CTRL_CHECKED | 2, 6, LV_BUTTONMATRIX_CTRL_CHECKED | 2, LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2 }; static const char * const default_kb_map_num[] = {"1", "2", "3", LV_SYMBOL_KEYBOARD, "\n", @@ -131,9 +131,9 @@ static const char * const default_kb_map_num[] = {"1", "2", "3", LV_SYMBOL_KEYBO "+/-", "0", ".", LV_SYMBOL_LEFT, LV_SYMBOL_RIGHT, "" }; -static const lv_btnmatrix_ctrl_t default_kb_ctrl_num_map[] = { - 1, 1, 1, LV_KEYBOARD_CTRL_BTN_FLAGS | 2, - 1, 1, 1, LV_KEYBOARD_CTRL_BTN_FLAGS | 2, +static const lv_buttonmatrix_ctrl_t default_kb_ctrl_num_map[] = { + 1, 1, 1, LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2, + 1, 1, 1, LV_KEYBOARD_CTRL_BUTTON_FLAGS | 2, 1, 1, 1, 2, 1, 1, 1, 1, 1 }; @@ -152,7 +152,7 @@ static const char * * kb_map[10] = { #endif (const char * *)NULL }; -static const lv_btnmatrix_ctrl_t * kb_ctrl[10] = { +static const lv_buttonmatrix_ctrl_t * kb_ctrl[10] = { default_kb_ctrl_lc_map, default_kb_ctrl_uc_map, default_kb_ctrl_spec_map, @@ -256,10 +256,10 @@ void lv_keyboard_set_popovers(lv_obj_t * obj, bool en) * @param kb pointer to a Keyboard object * @param mode keyboard map to alter 'lv_keyboard_mode_t' * @param map pointer to a string array to describe the map. - * See 'lv_btnmatrix_set_map()' for more info. + * See 'lv_buttonmatrix_set_map()' for more info. */ void lv_keyboard_set_map(lv_obj_t * obj, lv_keyboard_mode_t mode, const char * map[], - const lv_btnmatrix_ctrl_t ctrl_map[]) + const lv_buttonmatrix_ctrl_t ctrl_map[]) { kb_map[mode] = map; kb_ctrl[mode] = ctrl_map; @@ -299,7 +299,7 @@ lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t * obj) * @param kb pointer to a Keyboard object * @return true: "popovers" mode is enabled; false: disabled */ -bool lv_btnmatrix_get_popovers(const lv_obj_t * obj) +bool lv_buttonmatrix_get_popovers(const lv_obj_t * obj) { lv_keyboard_t * keyboard = (lv_keyboard_t *)obj; return keyboard->popovers; @@ -322,35 +322,35 @@ void lv_keyboard_def_event_cb(lv_event_t * e) LV_ASSERT_OBJ(obj, MY_CLASS); lv_keyboard_t * keyboard = (lv_keyboard_t *)obj; - uint16_t btn_id = lv_btnmatrix_get_selected_btn(obj); - if(btn_id == LV_BTNMATRIX_BTN_NONE) return; + uint16_t btn_id = lv_buttonmatrix_get_selected_button(obj); + if(btn_id == LV_BUTTONMATRIX_BUTTON_NONE) return; - const char * txt = lv_btnmatrix_get_btn_text(obj, btn_id); + const char * txt = lv_buttonmatrix_get_button_text(obj, btn_id); if(txt == NULL) return; if(strcmp(txt, "abc") == 0) { keyboard->mode = LV_KEYBOARD_MODE_TEXT_LOWER; - lv_btnmatrix_set_map(obj, kb_map[LV_KEYBOARD_MODE_TEXT_LOWER]); + lv_buttonmatrix_set_map(obj, kb_map[LV_KEYBOARD_MODE_TEXT_LOWER]); lv_keyboard_update_ctrl_map(obj); return; } #if LV_USE_ARABIC_PERSIAN_CHARS == 1 else if(strcmp(txt, "أب") == 0) { keyboard->mode = LV_KEYBOARD_MODE_TEXT_ARABIC; - lv_btnmatrix_set_map(obj, kb_map[LV_KEYBOARD_MODE_TEXT_ARABIC]); + lv_buttonmatrix_set_map(obj, kb_map[LV_KEYBOARD_MODE_TEXT_ARABIC]); lv_keyboard_update_ctrl_map(obj); return; } #endif else if(strcmp(txt, "ABC") == 0) { keyboard->mode = LV_KEYBOARD_MODE_TEXT_UPPER; - lv_btnmatrix_set_map(obj, kb_map[LV_KEYBOARD_MODE_TEXT_UPPER]); + lv_buttonmatrix_set_map(obj, kb_map[LV_KEYBOARD_MODE_TEXT_UPPER]); lv_keyboard_update_ctrl_map(obj); return; } else if(strcmp(txt, "1#") == 0) { keyboard->mode = LV_KEYBOARD_MODE_SPECIAL; - lv_btnmatrix_set_map(obj, kb_map[LV_KEYBOARD_MODE_SPECIAL]); + lv_buttonmatrix_set_map(obj, kb_map[LV_KEYBOARD_MODE_SPECIAL]); lv_keyboard_update_ctrl_map(obj); return; } @@ -448,7 +448,7 @@ static void lv_keyboard_constructor(const lv_obj_class_t * class_p, lv_obj_t * o static void lv_keyboard_update_map(lv_obj_t * obj) { lv_keyboard_t * keyboard = (lv_keyboard_t *)obj; - lv_btnmatrix_set_map(obj, kb_map[keyboard->mode]); + lv_buttonmatrix_set_map(obj, kb_map[keyboard->mode]); lv_keyboard_update_ctrl_map(obj); } @@ -461,22 +461,22 @@ static void lv_keyboard_update_ctrl_map(lv_obj_t * obj) lv_keyboard_t * keyboard = (lv_keyboard_t *)obj; if(keyboard->popovers) { - /*Apply the current control map (already includes LV_BTNMATRIX_CTRL_POPOVER flags)*/ - lv_btnmatrix_set_ctrl_map(obj, kb_ctrl[keyboard->mode]); + /*Apply the current control map (already includes LV_BUTTONMATRIX_CTRL_POPOVER flags)*/ + lv_buttonmatrix_set_ctrl_map(obj, kb_ctrl[keyboard->mode]); } else { /*Make a copy of the current control map*/ - lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; - lv_btnmatrix_ctrl_t * ctrl_map = lv_malloc(btnm->btn_cnt * sizeof(lv_btnmatrix_ctrl_t)); - lv_memcpy(ctrl_map, kb_ctrl[keyboard->mode], sizeof(lv_btnmatrix_ctrl_t) * btnm->btn_cnt); + lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; + lv_buttonmatrix_ctrl_t * ctrl_map = lv_malloc(btnm->btn_cnt * sizeof(lv_buttonmatrix_ctrl_t)); + lv_memcpy(ctrl_map, kb_ctrl[keyboard->mode], sizeof(lv_buttonmatrix_ctrl_t) * btnm->btn_cnt); - /*Remove all LV_BTNMATRIX_CTRL_POPOVER flags*/ + /*Remove all LV_BUTTONMATRIX_CTRL_POPOVER flags*/ for(uint16_t i = 0; i < btnm->btn_cnt; i++) { - ctrl_map[i] &= (~LV_BTNMATRIX_CTRL_POPOVER); + ctrl_map[i] &= (~LV_BUTTONMATRIX_CTRL_POPOVER); } /*Apply new control map and clean up*/ - lv_btnmatrix_set_ctrl_map(obj, ctrl_map); + lv_buttonmatrix_set_ctrl_map(obj, ctrl_map); lv_free(ctrl_map); } } diff --git a/src/widgets/keyboard/lv_keyboard.h b/src/widgets/keyboard/lv_keyboard.h index 565ed9357..0cd2165aa 100644 --- a/src/widgets/keyboard/lv_keyboard.h +++ b/src/widgets/keyboard/lv_keyboard.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#include "../btnmatrix/lv_btnmatrix.h" +#include "../buttonmatrix/lv_buttonmatrix.h" #if LV_USE_KEYBOARD @@ -29,7 +29,7 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_KEYBOARD_CTRL_BTN_FLAGS (LV_BTNMATRIX_CTRL_NO_REPEAT | LV_BTNMATRIX_CTRL_CLICK_TRIG | LV_BTNMATRIX_CTRL_CHECKED) +#define LV_KEYBOARD_CTRL_BUTTON_FLAGS (LV_BUTTONMATRIX_CTRL_NO_REPEAT | LV_BUTTONMATRIX_CTRL_CLICK_TRIG | LV_BUTTONMATRIX_CTRL_CHECKED) /********************** * TYPEDEFS @@ -59,7 +59,7 @@ typedef uint8_t lv_keyboard_mode_t; /*Data of keyboard*/ typedef struct { - lv_btnmatrix_t btnm; + lv_buttonmatrix_t btnm; lv_obj_t * ta; /*Pointer to the assigned text area*/ lv_keyboard_mode_t mode; /*Key map type*/ uint8_t popovers : 1; /*Show button titles in popovers on press*/ @@ -108,12 +108,12 @@ void lv_keyboard_set_popovers(lv_obj_t * kb, bool en); * @param kb pointer to a Keyboard object * @param mode keyboard map to alter 'lv_keyboard_mode_t' * @param map pointer to a string array to describe the map. - * See 'lv_btnmatrix_set_map()' for more info. + * See 'lv_buttonmatrix_set_map()' for more info. * @param ctrl_map */ void lv_keyboard_set_map(lv_obj_t * kb, lv_keyboard_mode_t mode, const char * map[], - const lv_btnmatrix_ctrl_t ctrl_map[]); + const lv_buttonmatrix_ctrl_t ctrl_map[]); /*===================== * Getter functions @@ -138,7 +138,7 @@ lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t * kb); * @param obj pointer to a Keyboard object * @return true: "popovers" mode is enabled; false: disabled */ -bool lv_btnmatrix_get_popovers(const lv_obj_t * obj); +bool lv_buttonmatrix_get_popovers(const lv_obj_t * obj); /** * Get the current map of a keyboard @@ -147,18 +147,18 @@ bool lv_btnmatrix_get_popovers(const lv_obj_t * obj); */ static inline const char ** lv_keyboard_get_map_array(const lv_obj_t * kb) { - return lv_btnmatrix_get_map(kb); + return lv_buttonmatrix_get_map(kb); } /** * Get the index of the lastly "activated" button by the user (pressed, released, focused etc) * Useful in the `event_cb` to get the text of the button, check if hidden etc. * @param obj pointer to button matrix object - * @return index of the last released button (LV_BTNMATRIX_BTN_NONE: if unset) + * @return index of the last released button (LV_BUTTONMATRIX_BUTTON_NONE: if unset) */ -static inline uint16_t lv_keyboard_get_selected_btn(const lv_obj_t * obj) +static inline uint16_t lv_keyboard_get_selected_button(const lv_obj_t * obj) { - return lv_btnmatrix_get_selected_btn(obj); + return lv_buttonmatrix_get_selected_button(obj); } /** @@ -167,9 +167,9 @@ static inline uint16_t lv_keyboard_get_selected_btn(const lv_obj_t * obj) * @param btn_id the index a button not counting new line characters. * @return text of btn_index` button */ -static inline const char * lv_keyboard_get_btn_text(const lv_obj_t * obj, uint16_t btn_id) +static inline const char * lv_keyboard_get_button_text(const lv_obj_t * obj, uint16_t btn_id) { - return lv_btnmatrix_get_btn_text(obj, btn_id); + return lv_buttonmatrix_get_button_text(obj, btn_id); } /*===================== diff --git a/src/widgets/list/lv_list.c b/src/widgets/list/lv_list.c index 8fa520c9e..61abe8177 100644 --- a/src/widgets/list/lv_list.c +++ b/src/widgets/list/lv_list.c @@ -10,8 +10,8 @@ #include "../../layouts/flex/lv_flex.h" #include "../../disp/lv_disp.h" #include "../label/lv_label.h" -#include "../img/lv_img.h" -#include "../btn/lv_btn.h" +#include "../image/lv_image.h" +#include "../button/lv_button.h" #if LV_USE_LIST @@ -34,8 +34,8 @@ const lv_obj_class_t lv_list_class = { .height_def = LV_DPI_DEF * 2 }; -const lv_obj_class_t lv_list_btn_class = { - .base_class = &lv_btn_class, +const lv_obj_class_t lv_list_button_class = { + .base_class = &lv_button_class, }; const lv_obj_class_t lv_list_text_class = { @@ -71,18 +71,18 @@ lv_obj_t * lv_list_add_text(lv_obj_t * list, const char * txt) return obj; } -lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * icon, const char * txt) +lv_obj_t * lv_list_add_button(lv_obj_t * list, const void * icon, const char * txt) { LV_LOG_INFO("begin"); - lv_obj_t * obj = lv_obj_class_create_obj(&lv_list_btn_class, list); + lv_obj_t * obj = lv_obj_class_create_obj(&lv_list_button_class, list); lv_obj_class_init_obj(obj); lv_obj_set_size(obj, LV_PCT(100), LV_SIZE_CONTENT); lv_obj_set_flex_flow(obj, LV_FLEX_FLOW_ROW); #if LV_USE_IMG == 1 if(icon) { - lv_obj_t * img = lv_img_create(obj); - lv_img_set_src(img, icon); + lv_obj_t * img = lv_image_create(obj); + lv_image_set_src(img, icon); } #endif @@ -96,7 +96,7 @@ lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * icon, const char * txt) return obj; } -const char * lv_list_get_btn_text(lv_obj_t * list, lv_obj_t * btn) +const char * lv_list_get_button_text(lv_obj_t * list, lv_obj_t * btn) { LV_UNUSED(list); uint32_t i; @@ -111,7 +111,7 @@ const char * lv_list_get_btn_text(lv_obj_t * list, lv_obj_t * btn) return ""; } -void lv_list_set_btn_text(lv_obj_t * list, lv_obj_t * btn, const char * txt) +void lv_list_set_button_text(lv_obj_t * list, lv_obj_t * btn, const char * txt) { LV_UNUSED(list); uint32_t i; diff --git a/src/widgets/list/lv_list.h b/src/widgets/list/lv_list.h index aa8f2512a..fdf7e9a50 100644 --- a/src/widgets/list/lv_list.h +++ b/src/widgets/list/lv_list.h @@ -27,7 +27,7 @@ extern "C" { extern const lv_obj_class_t lv_list_class; extern const lv_obj_class_t lv_list_text_class; -extern const lv_obj_class_t lv_list_btn_class; +extern const lv_obj_class_t lv_list_button_class; /********************** * GLOBAL PROTOTYPES **********************/ @@ -54,7 +54,7 @@ lv_obj_t * lv_list_add_text(lv_obj_t * list, const char * txt); * @param txt Text of the new button, when NULL no text will be added * @return pointer to the created button */ -lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * icon, const char * txt); +lv_obj_t * lv_list_add_button(lv_obj_t * list, const void * icon, const char * txt); /** * Get text of a given list button @@ -62,7 +62,7 @@ lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * icon, const char * txt) * @param btn pointer to the button * @return Text of btn, if btn doesn't have text "" will be returned */ -const char * lv_list_get_btn_text(lv_obj_t * list, lv_obj_t * btn); +const char * lv_list_get_button_text(lv_obj_t * list, lv_obj_t * btn); /** * Set text of a given list button @@ -71,7 +71,7 @@ const char * lv_list_get_btn_text(lv_obj_t * list, lv_obj_t * btn); * @param txt pointer to the text * @return Text of btn, if btn doesn't have text "" will be returned */ -void lv_list_set_btn_text(lv_obj_t * list, lv_obj_t * btn, const char * txt); +void lv_list_set_button_text(lv_obj_t * list, lv_obj_t * btn, const char * txt); /********************** * MACROS diff --git a/src/widgets/menu/lv_menu.c b/src/widgets/menu/lv_menu.c index 6a6fa821d..fc8052d36 100644 --- a/src/widgets/menu/lv_menu.c +++ b/src/widgets/menu/lv_menu.c @@ -19,8 +19,8 @@ #include "../../layouts/lv_layout.h" #include "../../stdlib/lv_string.h" #include "../label/lv_label.h" -#include "../btn/lv_btn.h" -#include "../img/lv_img.h" +#include "../button/lv_button.h" +#include "../image/lv_image.h" /********************** * TYPEDEFS @@ -107,7 +107,7 @@ static void lv_menu_value_changed_event_cb(lv_event_t * e); /********************** * GLOBAL FUNCTIONS **********************/ -bool lv_menu_item_back_btn_is_root(lv_obj_t * menu, lv_obj_t * obj); +bool lv_menu_item_back_button_is_root(lv_obj_t * menu, lv_obj_t * obj); void lv_menu_clear_history(lv_obj_t * obj); lv_obj_t * lv_menu_create(lv_obj_t * parent) @@ -228,7 +228,7 @@ void lv_menu_set_page(lv_obj_t * obj, lv_obj_t * page) if(menu->sidebar_page != NULL) { /* With sidebar enabled */ if(menu->sidebar_generated) { - if(menu->mode_root_back_btn == LV_MENU_ROOT_BACK_BTN_ENABLED) { + if(menu->mode_root_back_btn == LV_MENU_ROOT_BACK_BUTTON_ENABLED) { /* Root back btn is always shown if enabled*/ lv_obj_clear_flag(menu->sidebar_header_back_btn, LV_OBJ_FLAG_HIDDEN); lv_obj_add_flag(menu->sidebar_header_back_btn, LV_OBJ_FLAG_CLICKABLE); @@ -250,7 +250,7 @@ void lv_menu_set_page(lv_obj_t * obj, lv_obj_t * page) } else { /* With sidebar disabled */ - if(menu->cur_depth >= 2 || menu->mode_root_back_btn == LV_MENU_ROOT_BACK_BTN_ENABLED) { + if(menu->cur_depth >= 2 || menu->mode_root_back_btn == LV_MENU_ROOT_BACK_BUTTON_ENABLED) { lv_obj_clear_flag(menu->main_header_back_btn, LV_OBJ_FLAG_HIDDEN); lv_obj_add_flag(menu->main_header_back_btn, LV_OBJ_FLAG_CLICKABLE); } @@ -294,14 +294,14 @@ void lv_menu_set_sidebar_page(lv_obj_t * obj, lv_obj_t * page) lv_obj_add_flag(sidebar_header, LV_OBJ_FLAG_EVENT_BUBBLE); menu->sidebar_header = sidebar_header; - lv_obj_t * sidebar_header_back_btn = lv_btn_create(menu->sidebar_header); + lv_obj_t * sidebar_header_back_btn = lv_button_create(menu->sidebar_header); lv_obj_add_event(sidebar_header_back_btn, lv_menu_back_event_cb, LV_EVENT_CLICKED, menu); lv_obj_add_flag(sidebar_header_back_btn, LV_OBJ_FLAG_EVENT_BUBBLE); lv_obj_set_flex_flow(sidebar_header_back_btn, LV_FLEX_FLOW_ROW); menu->sidebar_header_back_btn = sidebar_header_back_btn; - lv_obj_t * sidebar_header_back_icon = lv_img_create(menu->sidebar_header_back_btn); - lv_img_set_src(sidebar_header_back_icon, LV_SYMBOL_LEFT); + lv_obj_t * sidebar_header_back_icon = lv_image_create(menu->sidebar_header_back_btn); + lv_image_set_src(sidebar_header_back_icon, LV_SYMBOL_LEFT); lv_obj_t * sidebar_header_title = lv_label_create(menu->sidebar_header); lv_obj_add_flag(sidebar_header_title, LV_OBJ_FLAG_HIDDEN); @@ -341,7 +341,7 @@ void lv_menu_set_mode_header(lv_obj_t * obj, lv_menu_mode_header_t mode_header) } } -void lv_menu_set_mode_root_back_btn(lv_obj_t * obj, lv_menu_mode_root_back_btn_t mode_root_back_btn) +void lv_menu_set_mode_root_back_button(lv_obj_t * obj, lv_menu_mode_root_back_button_t mode_root_back_btn) { LV_ASSERT_OBJ(obj, MY_CLASS); @@ -456,7 +456,7 @@ lv_obj_t * lv_menu_get_main_header(lv_obj_t * obj) return menu->main_header; } -lv_obj_t * lv_menu_get_main_header_back_btn(lv_obj_t * obj) +lv_obj_t * lv_menu_get_main_header_back_button(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); @@ -472,7 +472,7 @@ lv_obj_t * lv_menu_get_sidebar_header(lv_obj_t * obj) return menu->sidebar_header; } -lv_obj_t * lv_menu_get_sidebar_header_back_btn(lv_obj_t * obj) +lv_obj_t * lv_menu_get_sidebar_header_back_button(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); @@ -480,7 +480,7 @@ lv_obj_t * lv_menu_get_sidebar_header_back_btn(lv_obj_t * obj) return menu->sidebar_header_back_btn; } -bool lv_menu_back_btn_is_root(lv_obj_t * menu, lv_obj_t * obj) +bool lv_menu_back_button_is_root(lv_obj_t * menu, lv_obj_t * obj) { LV_ASSERT_OBJ(menu, MY_CLASS); @@ -522,7 +522,7 @@ static void lv_menu_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) lv_menu_t * menu = (lv_menu_t *)obj; menu->mode_header = LV_MENU_HEADER_TOP_FIXED; - menu->mode_root_back_btn = LV_MENU_ROOT_BACK_BTN_DISABLED; + menu->mode_root_back_btn = LV_MENU_ROOT_BACK_BUTTON_DISABLED; menu->cur_depth = 0; menu->prev_depth = 0; menu->sidebar_generated = false; @@ -557,14 +557,14 @@ static void lv_menu_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) menu->main_header = main_header; /* Create the default simple back btn and title */ - lv_obj_t * main_header_back_btn = lv_btn_create(menu->main_header); + lv_obj_t * main_header_back_btn = lv_button_create(menu->main_header); lv_obj_add_event(main_header_back_btn, lv_menu_back_event_cb, LV_EVENT_CLICKED, menu); lv_obj_add_flag(main_header_back_btn, LV_OBJ_FLAG_EVENT_BUBBLE); lv_obj_set_flex_flow(main_header_back_btn, LV_FLEX_FLOW_ROW); menu->main_header_back_btn = main_header_back_btn; - lv_obj_t * main_header_back_icon = lv_img_create(menu->main_header_back_btn); - lv_img_set_src(main_header_back_icon, LV_SYMBOL_LEFT); + lv_obj_t * main_header_back_icon = lv_image_create(menu->main_header_back_btn); + lv_image_set_src(main_header_back_icon, LV_SYMBOL_LEFT); lv_obj_t * main_header_title = lv_label_create(menu->main_header); lv_obj_add_flag(main_header_title, LV_OBJ_FLAG_HIDDEN); @@ -761,7 +761,7 @@ static void lv_menu_back_event_cb(lv_event_t * e) menu->prev_depth = menu->cur_depth; /* Save the previous value for user event handler */ - if(lv_menu_back_btn_is_root((lv_obj_t *)menu, obj)) return; + if(lv_menu_back_button_is_root((lv_obj_t *)menu, obj)) return; lv_ll_t * history_ll = &(menu->history_ll); diff --git a/src/widgets/menu/lv_menu.h b/src/widgets/menu/lv_menu.h index 0ed2d70bb..ba6939a50 100644 --- a/src/widgets/menu/lv_menu.h +++ b/src/widgets/menu/lv_menu.h @@ -37,15 +37,15 @@ typedef uint8_t lv_menu_mode_header_t; #endif /*DOXYGEN*/ -enum _lv_menu_mode_root_back_btn_t { - LV_MENU_ROOT_BACK_BTN_DISABLED, - LV_MENU_ROOT_BACK_BTN_ENABLED +enum _lv_menu_mode_root_back_button_t { + LV_MENU_ROOT_BACK_BUTTON_DISABLED, + LV_MENU_ROOT_BACK_BUTTON_ENABLED }; #ifdef DOXYGEN -typedef _lv_menu_mode_root_back_btn_t lv_menu_mode_root_back_btn_t; +typedef _lv_menu_mode_root_back_button_t lv_menu_mode_root_back_button_t; #else -typedef uint8_t lv_menu_mode_root_back_btn_t; +typedef uint8_t lv_menu_mode_root_back_button_t; #endif /*DOXYGEN*/ typedef struct /// @cond @@ -84,7 +84,7 @@ typedef struct { uint8_t prev_depth; uint8_t sidebar_generated : 1; lv_menu_mode_header_t mode_header : 2; - lv_menu_mode_root_back_btn_t mode_root_back_btn : 1; + lv_menu_mode_root_back_button_t mode_root_back_btn : 1; } lv_menu_t; typedef struct { @@ -185,7 +185,7 @@ void lv_menu_set_mode_header(lv_obj_t * obj, lv_menu_mode_header_t mode_header); * @param obj pointer to a menu * @param mode_root_back_btn */ -void lv_menu_set_mode_root_back_btn(lv_obj_t * obj, lv_menu_mode_root_back_btn_t mode_root_back_btn); +void lv_menu_set_mode_root_back_button(lv_obj_t * obj, lv_menu_mode_root_back_button_t mode_root_back_btn); /** * Add menu to the menu item @@ -224,7 +224,7 @@ lv_obj_t * lv_menu_get_main_header(lv_obj_t * obj); * @param obj pointer to the menu * @return pointer to main header back btn obj */ -lv_obj_t * lv_menu_get_main_header_back_btn(lv_obj_t * obj); +lv_obj_t * lv_menu_get_main_header_back_button(lv_obj_t * obj); /** * Get a pointer to sidebar header obj @@ -238,7 +238,7 @@ lv_obj_t * lv_menu_get_sidebar_header(lv_obj_t * obj); * @param obj pointer to the menu * @return pointer to sidebar header back btn obj */ -lv_obj_t * lv_menu_get_sidebar_header_back_btn(lv_obj_t * obj); +lv_obj_t * lv_menu_get_sidebar_header_back_button(lv_obj_t * obj); /** * Check if an obj is a root back btn @@ -246,7 +246,7 @@ lv_obj_t * lv_menu_get_sidebar_header_back_btn(lv_obj_t * obj); * @param obj pointer to the back button * @return true if it is a root back btn */ -bool lv_menu_back_btn_is_root(lv_obj_t * menu, lv_obj_t * obj); +bool lv_menu_back_button_is_root(lv_obj_t * menu, lv_obj_t * obj); /** * Clear menu history diff --git a/src/widgets/meter/lv_meter.c b/src/widgets/meter/lv_meter.c index ed15a724e..2eb6b2483 100644 --- a/src/widgets/meter/lv_meter.c +++ b/src/widgets/meter/lv_meter.c @@ -126,8 +126,8 @@ lv_meter_indicator_t * lv_meter_add_needle_line(lv_obj_t * obj, uint16_t width, return indic; } -lv_meter_indicator_t * lv_meter_add_needle_img(lv_obj_t * obj, const void * src, - lv_coord_t pivot_x, lv_coord_t pivot_y) +lv_meter_indicator_t * lv_meter_add_needle_image(lv_obj_t * obj, const void * src, + lv_coord_t pivot_x, lv_coord_t pivot_y) { LV_ASSERT_OBJ(obj, MY_CLASS); lv_meter_t * meter = (lv_meter_t *)obj; @@ -495,9 +495,9 @@ static void draw_needles(lv_obj_t * obj, lv_layer_t * layer, const lv_area_t * s lv_draw_line_dsc_init(&line_dsc); lv_obj_init_draw_line_dsc(obj, LV_PART_ITEMS, &line_dsc); - lv_draw_img_dsc_t img_dsc; - lv_draw_img_dsc_init(&img_dsc); - lv_obj_init_draw_img_dsc(obj, LV_PART_ITEMS, &img_dsc); + lv_draw_image_dsc_t img_dsc; + lv_draw_image_dsc_init(&img_dsc); + lv_obj_init_draw_image_dsc(obj, LV_PART_ITEMS, &img_dsc); lv_opa_t opa_main = lv_obj_get_style_opa_recursive(obj, LV_PART_MAIN); lv_meter_indicator_t * indic; @@ -522,8 +522,8 @@ static void draw_needles(lv_obj_t * obj, lv_layer_t * layer, const lv_area_t * s int32_t angle = lv_map(indic->end_value, meter->scale.min, meter->scale.max, meter->scale.rotation, meter->scale.rotation + meter->scale.angle_range); - lv_img_header_t info; - lv_img_decoder_get_info(indic->type_data.needle_img.src, &info); + lv_image_header_t info; + lv_image_decoder_get_info(indic->type_data.needle_img.src, &info); lv_area_t a; a.x1 = scale_center.x - indic->type_data.needle_img.pivot.x; a.y1 = scale_center.y - indic->type_data.needle_img.pivot.y; @@ -538,7 +538,7 @@ static void draw_needles(lv_obj_t * obj, lv_layer_t * layer, const lv_area_t * s img_dsc.angle = angle; img_dsc.src = indic->type_data.needle_img.src; - lv_draw_img(layer, &img_dsc, &a); + lv_draw_image(layer, &img_dsc, &a); } } } @@ -602,8 +602,8 @@ static void inv_line(lv_obj_t * obj, lv_meter_indicator_t * indic, int32_t value else if(indic->type == LV_METER_INDICATOR_TYPE_NEEDLE_IMG) { int32_t angle = lv_map(value, meter->scale.min, meter->scale.max, meter->scale.rotation, meter->scale.rotation + meter->scale.angle_range); - lv_img_header_t info; - lv_img_decoder_get_info(indic->type_data.needle_img.src, &info); + lv_image_header_t info; + lv_image_decoder_get_info(indic->type_data.needle_img.src, &info); angle = angle * 10; if(angle > 3600) angle -= 3600; @@ -611,7 +611,7 @@ static void inv_line(lv_obj_t * obj, lv_meter_indicator_t * indic, int32_t value scale_center.x -= indic->type_data.needle_img.pivot.x; scale_center.y -= indic->type_data.needle_img.pivot.y; lv_area_t a; - _lv_img_buf_get_transformed_area(&a, info.w, info.h, angle, LV_ZOOM_NONE, &indic->type_data.needle_img.pivot); + _lv_image_buf_get_transformed_area(&a, info.w, info.h, angle, LV_ZOOM_NONE, &indic->type_data.needle_img.pivot); a.x1 += scale_center.x - 2; a.y1 += scale_center.y - 2; a.x2 += scale_center.x + 2; diff --git a/src/widgets/meter/lv_meter.h b/src/widgets/meter/lv_meter.h index 54e211521..a9e7d96a7 100644 --- a/src/widgets/meter/lv_meter.h +++ b/src/widgets/meter/lv_meter.h @@ -161,14 +161,14 @@ lv_meter_indicator_t * lv_meter_add_needle_line(lv_obj_t * obj, uint16_t width, /** * Add a needle image indicator the scale * @param obj pointer to a meter object - * @param src the image source of the indicator. path or pointer to ::lv_img_dsc_t + * @param src the image source of the indicator. path or pointer to ::lv_image_dsc_t * @param pivot_x the X pivot point of the needle * @param pivot_y the Y pivot point of the needle * @return the new indicator or NULL on allocation failure. * @note the needle image should point to the right, like -O-----> */ -lv_meter_indicator_t * lv_meter_add_needle_img(lv_obj_t * obj, const void * src, - lv_coord_t pivot_x, lv_coord_t pivot_y); +lv_meter_indicator_t * lv_meter_add_needle_image(lv_obj_t * obj, const void * src, + lv_coord_t pivot_x, lv_coord_t pivot_y); /** * Add an arc indicator the scale diff --git a/src/widgets/msgbox/lv_msgbox.c b/src/widgets/msgbox/lv_msgbox.c index 33b2d1059..403f47685 100644 --- a/src/widgets/msgbox/lv_msgbox.c +++ b/src/widgets/msgbox/lv_msgbox.c @@ -10,8 +10,8 @@ #if LV_USE_MSGBOX #include "../label/lv_label.h" -#include "../btn/lv_btn.h" -#include "../btnmatrix/lv_btnmatrix.h" +#include "../button/lv_button.h" +#include "../buttonmatrix/lv_buttonmatrix.h" #include "../../misc/lv_assert.h" #include "../../disp/lv_disp.h" #include "../../layouts/flex/lv_flex.h" @@ -100,14 +100,14 @@ lv_obj_t * lv_msgbox_create(lv_obj_t * parent, const char * title, const char * } if(add_close_btn) { - mbox->close_btn = lv_btn_create(obj); + mbox->close_btn = lv_button_create(obj); lv_obj_set_ext_click_area(mbox->close_btn, LV_DPX(10)); lv_obj_add_event(mbox->close_btn, msgbox_close_click_event_cb, LV_EVENT_CLICKED, NULL); lv_obj_t * label = lv_label_create(mbox->close_btn); lv_label_set_text(label, LV_SYMBOL_CLOSE); const lv_font_t * font = lv_obj_get_style_text_font(mbox->close_btn, LV_PART_MAIN); - lv_coord_t close_btn_size = lv_font_get_line_height(font) + LV_DPX(10); - lv_obj_set_size(mbox->close_btn, close_btn_size, close_btn_size); + lv_coord_t close_button_size = lv_font_get_line_height(font) + LV_DPX(10); + lv_obj_set_size(mbox->close_btn, close_button_size, close_button_size); lv_obj_align(label, LV_ALIGN_CENTER, 0, 0); } @@ -125,20 +125,20 @@ lv_obj_t * lv_msgbox_create(lv_obj_t * parent, const char * title, const char * } if(btn_txts) { - mbox->btns = lv_btnmatrix_create(obj); - lv_btnmatrix_set_map(mbox->btns, btn_txts); - lv_btnmatrix_set_btn_ctrl_all(mbox->btns, LV_BTNMATRIX_CTRL_CLICK_TRIG | LV_BTNMATRIX_CTRL_NO_REPEAT); + mbox->buttons = lv_buttonmatrix_create(obj); + lv_buttonmatrix_set_map(mbox->buttons, btn_txts); + lv_buttonmatrix_set_button_ctrl_all(mbox->buttons, LV_BUTTONMATRIX_CTRL_CLICK_TRIG | LV_BUTTONMATRIX_CTRL_NO_REPEAT); uint32_t btn_cnt = 0; while(btn_txts[btn_cnt] && btn_txts[btn_cnt][0] != '\0') { btn_cnt++; } - const lv_font_t * font = lv_obj_get_style_text_font(mbox->btns, LV_PART_ITEMS); + const lv_font_t * font = lv_obj_get_style_text_font(mbox->buttons, LV_PART_ITEMS); lv_coord_t btn_h = lv_font_get_line_height(font) + LV_DPI_DEF / 10; - lv_obj_set_size(mbox->btns, btn_cnt * (2 * LV_DPI_DEF / 3), btn_h); - lv_obj_set_style_max_width(mbox->btns, lv_pct(100), 0); - lv_obj_add_flag(mbox->btns, LV_OBJ_FLAG_EVENT_BUBBLE); /*To see the event directly on the message box*/ + lv_obj_set_size(mbox->buttons, btn_cnt * (2 * LV_DPI_DEF / 3), btn_h); + lv_obj_set_style_max_width(mbox->buttons, lv_pct(100), 0); + lv_obj_add_flag(mbox->buttons, LV_OBJ_FLAG_EVENT_BUBBLE); /*To see the event directly on the message box*/ } return obj; @@ -152,7 +152,7 @@ lv_obj_t * lv_msgbox_get_title(lv_obj_t * obj) return mbox->title; } -lv_obj_t * lv_msgbox_get_close_btn(lv_obj_t * obj) +lv_obj_t * lv_msgbox_get_close_button(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); lv_msgbox_t * mbox = (lv_msgbox_t *)obj; @@ -173,23 +173,23 @@ lv_obj_t * lv_msgbox_get_content(lv_obj_t * obj) return mbox->content; } -lv_obj_t * lv_msgbox_get_btns(lv_obj_t * obj) +lv_obj_t * lv_msgbox_get_buttons(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); lv_msgbox_t * mbox = (lv_msgbox_t *)obj; - return mbox->btns; + return mbox->buttons; } -uint16_t lv_msgbox_get_active_btn(lv_obj_t * mbox) +uint16_t lv_msgbox_get_active_button(lv_obj_t * mbox) { - lv_obj_t * btnm = lv_msgbox_get_btns(mbox); - return lv_btnmatrix_get_selected_btn(btnm); + lv_obj_t * btnm = lv_msgbox_get_buttons(mbox); + return lv_buttonmatrix_get_selected_button(btnm); } -const char * lv_msgbox_get_active_btn_text(lv_obj_t * mbox) +const char * lv_msgbox_get_active_button_text(lv_obj_t * mbox) { - lv_obj_t * btnm = lv_msgbox_get_btns(mbox); - return lv_btnmatrix_get_btn_text(btnm, lv_btnmatrix_get_selected_btn(btnm)); + lv_obj_t * btnm = lv_msgbox_get_buttons(mbox); + return lv_buttonmatrix_get_button_text(btnm, lv_buttonmatrix_get_selected_button(btnm)); } void lv_msgbox_close(lv_obj_t * mbox) diff --git a/src/widgets/msgbox/lv_msgbox.h b/src/widgets/msgbox/lv_msgbox.h index 7872d0e69..50f2cbfd7 100644 --- a/src/widgets/msgbox/lv_msgbox.h +++ b/src/widgets/msgbox/lv_msgbox.h @@ -40,7 +40,7 @@ typedef struct { lv_obj_t * close_btn; lv_obj_t * content; lv_obj_t * text; - lv_obj_t * btns; + lv_obj_t * buttons; } lv_msgbox_t; extern const lv_obj_class_t lv_msgbox_class; @@ -65,22 +65,22 @@ lv_obj_t * lv_msgbox_create(lv_obj_t * parent, const char * title, const char * lv_obj_t * lv_msgbox_get_title(lv_obj_t * obj); -lv_obj_t * lv_msgbox_get_close_btn(lv_obj_t * obj); +lv_obj_t * lv_msgbox_get_close_button(lv_obj_t * obj); lv_obj_t * lv_msgbox_get_text(lv_obj_t * obj); lv_obj_t * lv_msgbox_get_content(lv_obj_t * obj); -lv_obj_t * lv_msgbox_get_btns(lv_obj_t * obj); +lv_obj_t * lv_msgbox_get_buttons(lv_obj_t * obj); /** * Get the index of the selected button * @param mbox message box object - * @return index of the button (LV_BTNMATRIX_BTN_NONE: if unset) + * @return index of the button (LV_BUTTONMATRIX_BUTTON_NONE: if unset) */ -uint16_t lv_msgbox_get_active_btn(lv_obj_t * mbox); +uint16_t lv_msgbox_get_active_button(lv_obj_t * mbox); -const char * lv_msgbox_get_active_btn_text(lv_obj_t * mbox); +const char * lv_msgbox_get_active_button_text(lv_obj_t * mbox); void lv_msgbox_close(lv_obj_t * mbox); diff --git a/src/widgets/slider/lv_slider.c b/src/widgets/slider/lv_slider.c index 30de69ff7..15308c9c7 100644 --- a/src/widgets/slider/lv_slider.c +++ b/src/widgets/slider/lv_slider.c @@ -17,7 +17,7 @@ #include "../../draw/lv_draw.h" #include "../../stdlib/lv_string.h" #include "../../misc/lv_math.h" -#include "../img/lv_img.h" +#include "../image/lv_image.h" /********************* * DEFINES diff --git a/src/widgets/switch/lv_switch.c b/src/widgets/switch/lv_switch.c index 378205dbd..c94a7299a 100644 --- a/src/widgets/switch/lv_switch.c +++ b/src/widgets/switch/lv_switch.c @@ -15,7 +15,6 @@ #include "../../misc/lv_anim.h" #include "../../indev/lv_indev.h" #include "../../disp/lv_disp.h" -#include "../img/lv_img.h" /********************* * DEFINES diff --git a/src/widgets/tabview/lv_tabview.c b/src/widgets/tabview/lv_tabview.c index 26b34dab5..8697d74d6 100644 --- a/src/widgets/tabview/lv_tabview.c +++ b/src/widgets/tabview/lv_tabview.c @@ -27,7 +27,7 @@ static void lv_tabview_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj); static void lv_tabview_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj); static void lv_tabview_event(const lv_obj_class_t * class_p, lv_event_t * e); -static void btns_value_changed_event_cb(lv_event_t * e); +static void buttons_value_changed_event_cb(lv_event_t * e); static void cont_scroll_end_event_cb(lv_event_t * e); /********************** @@ -80,7 +80,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * obj, const char * name) lv_obj_set_size(page, LV_PCT(100), LV_PCT(100)); uint32_t tab_id = lv_obj_get_child_cnt(cont); - lv_obj_t * btns = lv_tabview_get_tab_btns(obj); + lv_obj_t * buttons = lv_tabview_get_tab_buttons(obj); char ** old_map = tabview->map; char ** new_map; @@ -109,18 +109,18 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * obj, const char * name) } } tabview->map = new_map; - lv_btnmatrix_set_map(btns, (const char **)new_map); + lv_buttonmatrix_set_map(buttons, (const char **)new_map); lv_free(old_map); - lv_btnmatrix_set_btn_ctrl_all(btns, LV_BTNMATRIX_CTRL_CHECKABLE | LV_BTNMATRIX_CTRL_CLICK_TRIG | - LV_BTNMATRIX_CTRL_NO_REPEAT); + lv_buttonmatrix_set_button_ctrl_all(buttons, LV_BUTTONMATRIX_CTRL_CHECKABLE | LV_BUTTONMATRIX_CTRL_CLICK_TRIG | + LV_BUTTONMATRIX_CTRL_NO_REPEAT); tabview->tab_cnt++; if(tabview->tab_cnt == 1) { lv_tabview_set_act(obj, 0, LV_ANIM_OFF); } - lv_btnmatrix_set_btn_ctrl(btns, tabview->tab_cur, LV_BTNMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(buttons, tabview->tab_cur, LV_BUTTONMATRIX_CTRL_CHECKED); return page; } @@ -171,8 +171,8 @@ void lv_tabview_set_act(lv_obj_t * obj, uint32_t id, lv_anim_enable_t anim_en) lv_obj_scroll_to_y(cont, id * (gap + h), anim_en); } - lv_obj_t * btns = lv_tabview_get_tab_btns(obj); - lv_btnmatrix_set_btn_ctrl(btns, id, LV_BTNMATRIX_CTRL_CHECKED); + lv_obj_t * buttons = lv_tabview_get_tab_buttons(obj); + lv_buttonmatrix_set_button_ctrl(buttons, id, LV_BUTTONMATRIX_CTRL_CHECKED); tabview->tab_cur = id; } @@ -188,7 +188,7 @@ lv_obj_t * lv_tabview_get_content(lv_obj_t * tv) return lv_obj_get_child(tv, 1); } -lv_obj_t * lv_tabview_get_tab_btns(lv_obj_t * tv) +lv_obj_t * lv_tabview_get_tab_buttons(lv_obj_t * tv) { return lv_obj_get_child(tv, 0); } @@ -224,14 +224,14 @@ static void lv_tabview_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob lv_obj_t * btnm; lv_obj_t * cont; - btnm = lv_btnmatrix_create(obj); + btnm = lv_buttonmatrix_create(obj); cont = lv_obj_create(obj); - lv_btnmatrix_set_one_checked(btnm, true); + lv_buttonmatrix_set_one_checked(btnm, true); tabview->map = lv_malloc(sizeof(const char *)); tabview->map[0] = (char *)""; - lv_btnmatrix_set_map(btnm, (const char **)tabview->map); - lv_obj_add_event(btnm, btns_value_changed_event_cb, LV_EVENT_VALUE_CHANGED, NULL); + lv_buttonmatrix_set_map(btnm, (const char **)tabview->map); + lv_obj_add_event(btnm, buttons_value_changed_event_cb, LV_EVENT_VALUE_CHANGED, NULL); lv_obj_add_flag(btnm, LV_OBJ_FLAG_EVENT_BUBBLE); lv_obj_add_event(cont, cont_scroll_end_event_cb, LV_EVENT_ALL, NULL); @@ -306,12 +306,12 @@ static void lv_tabview_event(const lv_obj_class_t * class_p, lv_event_t * e) } -static void btns_value_changed_event_cb(lv_event_t * e) +static void buttons_value_changed_event_cb(lv_event_t * e) { - lv_obj_t * btns = lv_event_get_target(e); + lv_obj_t * buttons = lv_event_get_target(e); - lv_obj_t * tv = lv_obj_get_parent(btns); - uint32_t id = lv_btnmatrix_get_selected_btn(btns); + lv_obj_t * tv = lv_obj_get_parent(buttons); + uint32_t id = lv_buttonmatrix_get_selected_button(buttons); lv_tabview_set_act(tv, id, LV_ANIM_OFF); } diff --git a/src/widgets/tabview/lv_tabview.h b/src/widgets/tabview/lv_tabview.h index 388c65477..9a5278870 100644 --- a/src/widgets/tabview/lv_tabview.h +++ b/src/widgets/tabview/lv_tabview.h @@ -46,7 +46,7 @@ void lv_tabview_rename_tab(lv_obj_t * obj, uint32_t tab_id, const char * new_nam lv_obj_t * lv_tabview_get_content(lv_obj_t * tv); -lv_obj_t * lv_tabview_get_tab_btns(lv_obj_t * tv); +lv_obj_t * lv_tabview_get_tab_buttons(lv_obj_t * tv); void lv_tabview_set_act(lv_obj_t * obj, uint32_t id, lv_anim_enable_t anim_en); diff --git a/src/widgets/win/lv_win.c b/src/widgets/win/lv_win.c index 1c8ab6b2e..640df1d71 100644 --- a/src/widgets/win/lv_win.c +++ b/src/widgets/win/lv_win.c @@ -59,14 +59,14 @@ lv_obj_t * lv_win_add_title(lv_obj_t * win, const char * txt) return title; } -lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * icon, lv_coord_t btn_w) +lv_obj_t * lv_win_add_button(lv_obj_t * win, const void * icon, lv_coord_t btn_w) { lv_obj_t * header = lv_win_get_header(win); - lv_obj_t * btn = lv_btn_create(header); + lv_obj_t * btn = lv_button_create(header); lv_obj_set_size(btn, btn_w, LV_PCT(100)); - lv_obj_t * img = lv_img_create(btn); - lv_img_set_src(img, icon); + lv_obj_t * img = lv_image_create(btn); + lv_image_set_src(img, icon); lv_obj_align(img, LV_ALIGN_CENTER, 0, 0); return btn; diff --git a/src/widgets/win/lv_win.h b/src/widgets/win/lv_win.h index c67ce8afc..b47e9306b 100644 --- a/src/widgets/win/lv_win.h +++ b/src/widgets/win/lv_win.h @@ -36,7 +36,7 @@ lv_obj_t * lv_win_create(lv_obj_t * parent); lv_obj_t * lv_win_add_title(lv_obj_t * win, const char * txt); -lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * icon, lv_coord_t btn_w); +lv_obj_t * lv_win_add_button(lv_obj_t * win, const void * icon, lv_coord_t btn_w); lv_obj_t * lv_win_get_header(lv_obj_t * win); lv_obj_t * lv_win_get_content(lv_obj_t * win); diff --git a/test_img_cogwheel_argb8888.c b/test_img_cogwheel_argb8888.c index 468033705..d31a25875 100644 --- a/test_img_cogwheel_argb8888.c +++ b/test_img_cogwheel_argb8888.c @@ -5,12 +5,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_TEST__IMG_COGWHEEL_ARGB8888 - #define LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_ARGB8888 +#ifndef LV_ATTRIBUTE_IMAGE_TEST__IMAGE_COGWHEEL_ARGB8888 + #define LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_ARGB8888 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_ARGB8888 uint8_t -test_img_cogwheel_argb8888_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_ARGB8888 uint8_t +test_image_cogwheel_argb8888_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x08, 0xad, 0x9b, 0x8f, 0xff, 0x95, 0x7e, 0x6d, 0xff, 0x90, 0x7a, 0x67, 0xff, 0x92, 0x7c, 0x69, 0xff, 0x91, 0x7b, 0x69, 0xff, 0x8c, 0x75, 0x63, 0xff, 0x97, 0x83, 0x72, 0xff, 0xd1, 0xc7, 0xc0, 0x6d, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf1, 0x11, 0x9e, 0x8a, 0x79, 0xff, 0x8f, 0x78, 0x65, 0xff, 0x90, 0x79, 0x66, 0xff, 0x91, 0x7a, 0x67, 0xff, 0x8e, 0x79, 0x66, 0xff, 0x8c, 0x75, 0x63, 0xff, 0x8c, 0x76, 0x64, 0xff, 0x9f, 0x8c, 0x7d, 0xff, 0xff, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0c, 0xee, 0xee, 0xee, 0x0f, 0xff, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0xe4, 0xe0, 0xdb, 0x39, 0x9a, 0x85, 0x74, 0xff, 0x90, 0x79, 0x66, 0xff, 0x94, 0x7e, 0x6c, 0xff, 0x95, 0x7f, 0x6d, 0xff, 0x94, 0x7e, 0x6c, 0xff, 0x92, 0x7c, 0x6b, 0xff, 0x8c, 0x76, 0x63, 0xff, 0x95, 0x7f, 0x6e, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0xcb, 0xc2, 0xbb, 0x53, 0xae, 0xa2, 0x96, 0xff, 0xdf, 0xd9, 0xd9, 0x28, 0xff, 0xff, 0xff, 0x06, 0xff, 0xff, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -113,11 +113,11 @@ test_img_cogwheel_argb8888_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 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, 0x03, 0xff, 0xff, 0xff, 0x09, 0xff, 0xff, 0xff, 0x0c, 0xff, 0xff, 0xff, 0x0c, 0xff, 0xff, 0xff, 0x0b, 0xff, 0xff, 0xff, 0x10, 0xff, 0xf4, 0xf4, 0x18, 0xff, 0xff, 0xff, 0x12, 0xff, 0xff, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t test_img_cogwheel_argb8888 = { +const lv_image_dsc_t test_image_cogwheel_argb8888 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 100, .header.h = 100, .data_size = 10000 * 4, - .data = test_img_cogwheel_argb8888_map, + .data = test_image_cogwheel_argb8888_map, }; diff --git a/test_img_cogwheel_i4.c b/test_img_cogwheel_i4.c index 05e08f042..adedafaf2 100644 --- a/test_img_cogwheel_i4.c +++ b/test_img_cogwheel_i4.c @@ -5,12 +5,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_I4 - #define LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_I4 +#ifndef LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_I4 + #define LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_I4 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_I4 uint8_t -test_img_cogwheel_i4_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_I4 uint8_t +test_image_cogwheel_i4_map[] = { 0x00, 0x00, 0x00, 0x00, /*Color of index 0*/ 0xfe, 0xfe, 0xfe, 0x05, /*Color of index 1*/ 0xed, 0xeb, 0xea, 0x1b, /*Color of index 2*/ @@ -130,11 +130,11 @@ test_img_cogwheel_i4_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x10, 0x00, 0x00, 0x00, 0x01, 0x11, 0x21, 0x12, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t test_img_cogwheel_i4 = { +const lv_image_dsc_t test_image_cogwheel_i4 = { .header.cf = LV_COLOR_FORMAT_I4, .header.always_zero = 0, .header.w = 100, .header.h = 100, .data_size = 5064, - .data = test_img_cogwheel_i4_map, + .data = test_image_cogwheel_i4_map, }; diff --git a/test_img_cogwheel_rgb565a8.c b/test_img_cogwheel_rgb565a8.c index a46f0766b..f478b4044 100644 --- a/test_img_cogwheel_rgb565a8.c +++ b/test_img_cogwheel_rgb565a8.c @@ -5,12 +5,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_RGB565A8 - #define LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_RGB565A8 +#ifndef LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_RGB565A8 + #define LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_RGB565A8 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_RGB565A8 uint8_t -test_img_cogwheel_rgb565a8_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_RGB565A8 uint8_t +test_image_cogwheel_rgb565a8_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xf6, 0x94, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xb2, 0x63, 0x33, 0x74, 0x5a, 0xc6, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xf7, 0x74, 0x7c, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xb2, 0x63, 0xd2, 0x6b, 0x74, 0x84, 0xff, 0xff, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x9e, 0xf7, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xdf, 0x33, 0x7c, 0xd2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xd2, 0x63, 0x13, 0x74, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0xbe, 0x36, 0x9d, 0xdc, 0xde, 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, @@ -215,12 +215,12 @@ test_img_cogwheel_rgb565a8_map[] = { }; -const lv_img_dsc_t test_img_cogwheel_rgb565a8 = { +const lv_image_dsc_t test_image_cogwheel_rgb565a8 = { .header.cf = LV_COLOR_FORMAT_RGB565A8, .header.always_zero = 0, .header.w = 100, .header.h = 100, .header.stride = 200, .data_size = 30000, - .data = test_img_cogwheel_rgb565a8_map, + .data = test_image_cogwheel_rgb565a8_map, }; diff --git a/tests/src/lv_test_conf_full.h b/tests/src/lv_test_conf_full.h index dfacc9c74..e6eec2138 100644 --- a/tests/src/lv_test_conf_full.h +++ b/tests/src/lv_test_conf_full.h @@ -2,7 +2,7 @@ #define LV_LAYER_MAX_MEMORY_USAGE (4 * 1024) #define LV_USE_DRAW_MASKS 1 #define LV_SHADOW_CACHE_SIZE (8 * 1024) -#define LV_IMG_CACHE_DEF_SIZE 32 +#define LV_IMAGE_CACHE_DEF_SIZE 32 #define LV_USE_LOG 1 #define LV_LOG_LEVEL LV_LOG_LEVEL_TRACE #define LV_LOG_PRINTF 1 diff --git a/tests/src/test_assets/test_animimg001.c b/tests/src/test_assets/test_animimg001.c index d0d472b1d..3ac3d297f 100644 --- a/tests/src/test_assets/test_animimg001.c +++ b/tests/src/test_assets/test_animimg001.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_ANIMIMG001 - #define LV_ATTRIBUTE_IMG_ANIMIMG001 +#ifndef LV_ATTRIBUTE_IMAGE_ANIMIMG001 + #define LV_ATTRIBUTE_IMAGE_ANIMIMG001 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG001 uint8_t test_animimg001_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_ANIMIMG001 uint8_t test_animimg001_map[] = { /*Pixel format: Blue: 8 bit, Green: 8 bit, Red: 8 bit, Alpha: 8 bit*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -184,7 +184,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t test_animimg001 = { +const lv_image_dsc_t test_animimg001 = { .header.always_zero = 0, .header.w = 130, .header.h = 170, diff --git a/tests/src/test_assets/test_animimg002.c b/tests/src/test_assets/test_animimg002.c index 96a372b5e..4595e156c 100644 --- a/tests/src/test_assets/test_animimg002.c +++ b/tests/src/test_assets/test_animimg002.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_ANIMIMG002 - #define LV_ATTRIBUTE_IMG_ANIMIMG002 +#ifndef LV_ATTRIBUTE_IMAGE_ANIMIMG002 + #define LV_ATTRIBUTE_IMAGE_ANIMIMG002 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG002 uint8_t test_animimg002_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_ANIMIMG002 uint8_t test_animimg002_map[] = { /*Pixel format: Blue: 8 bit, Green: 8 bit, Red: 8 bit, Alpha: 8 bit*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -184,7 +184,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t test_animimg002 = { +const lv_image_dsc_t test_animimg002 = { .header.always_zero = 0, .header.w = 130, .header.h = 170, diff --git a/tests/src/test_assets/test_animimg003.c b/tests/src/test_assets/test_animimg003.c index cf2b4afbf..38a54a5c5 100644 --- a/tests/src/test_assets/test_animimg003.c +++ b/tests/src/test_assets/test_animimg003.c @@ -6,11 +6,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_ANIMIMG003 - #define LV_ATTRIBUTE_IMG_ANIMIMG003 +#ifndef LV_ATTRIBUTE_IMAGE_ANIMIMG003 + #define LV_ATTRIBUTE_IMAGE_ANIMIMG003 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG003 uint8_t test_animimg003_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_ANIMIMG003 uint8_t test_animimg003_map[] = { /*Pixel format: Blue: 8 bit, Green: 8 bit, Red: 8 bit, Alpha: 8 bit*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -184,7 +184,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ANIMIMG00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t test_animimg003 = { +const lv_image_dsc_t test_animimg003 = { .header.always_zero = 0, .header.w = 130, .header.h = 170, diff --git a/tests/src/test_assets/test_arc_bg.c b/tests/src/test_assets/test_arc_bg.c index fa167a58c..b25114017 100644 --- a/tests/src/test_assets/test_arc_bg.c +++ b/tests/src/test_assets/test_arc_bg.c @@ -4,11 +4,11 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_TEST_ARC_BG - #define LV_ATTRIBUTE_IMG_TEST_ARC_BG +#ifndef LV_ATTRIBUTE_IMAGE_TEST_ARC_BG + #define LV_ATTRIBUTE_IMAGE_TEST_ARC_BG #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TEST_ARC_BG uint8_t test_arc_bg_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_TEST_ARC_BG uint8_t test_arc_bg_map[] = { #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 /*Pixel format: Alpha 8 bit, Red: 3 bit, Green: 3 bit, Blue: 2 bit*/ 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xdc, 0xff, @@ -319,7 +319,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TEST_ARC_ #endif }; -const lv_img_dsc_t test_arc_bg = { +const lv_image_dsc_t test_arc_bg = { .header.cf = LV_COLOR_FORMAT_NATIVE_WITH_ALPHA, .header.always_zero = 0, .header.w = 100, diff --git a/tests/src/test_assets/test_img_caret_down.c b/tests/src/test_assets/test_img_caret_down.c index 5a4aa0336..98f042ff5 100644 --- a/tests/src/test_assets/test_img_caret_down.c +++ b/tests/src/test_assets/test_img_caret_down.c @@ -6,11 +6,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_IMG_CARET_DOWN - #define LV_ATTRIBUTE_IMG_IMG_CARET_DOWN +#ifndef LV_ATTRIBUTE_IMAGE_IMG_CARET_DOWN + #define LV_ATTRIBUTE_IMAGE_IMG_CARET_DOWN #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_CARET_DOWN uint8_t test_img_caret_down_map[] +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_CARET_DOWN uint8_t +test_image_caret_down_map[] = { /*Pixel format: Blue: 8 bit, Green: 8 bit, Red: 8 bit, Alpha: 8 bit*/ 0x46, 0x46, 0x46, 0x00, 0x44, 0x44, 0x44, 0x04, 0x2c, 0x2c, 0x2c, 0x08, 0x2c, 0x2c, 0x2c, 0x08, 0x2c, 0x2c, 0x2c, 0x08, 0x2c, 0x2c, 0x2c, 0x08, 0x2c, 0x2c, 0x2c, 0x08, 0x2c, 0x2c, 0x2c, 0x08, 0x2c, 0x2c, 0x2c, 0x08, 0x2c, 0x2c, 0x2c, 0x08, 0x2c, 0x2c, 0x2c, 0x08, 0x31, 0x31, 0x31, 0x08, 0x82, 0x82, 0x82, 0x00, @@ -23,12 +24,12 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_CARET 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x13, 0x13, 0x03, 0x0d, 0x0d, 0x0d, 0x5f, 0x12, 0x12, 0x12, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t test_img_caret_down = { +const lv_image_dsc_t test_image_caret_down = { .header.always_zero = 0, .header.w = 13, .header.h = 8, .header.cf = LV_COLOR_FORMAT_ARGB8888, - .data = test_img_caret_down_map, + .data = test_image_caret_down_map, }; #endif /* LV_BUILD_EXAMPLES */ diff --git a/tests/src/test_assets/test_img_cogwheel_a8.c b/tests/src/test_assets/test_img_cogwheel_a8.c index 181d04cf7..1aceabcd5 100644 --- a/tests/src/test_assets/test_img_cogwheel_a8.c +++ b/tests/src/test_assets/test_img_cogwheel_a8.c @@ -5,12 +5,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_A8 - #define LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_A8 +#ifndef LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_A8 + #define LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_A8 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_A8 uint8_t -test_img_cogwheel_a8_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_A8 uint8_t +test_image_cogwheel_a8_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0f, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x53, 0xff, 0x28, 0x06, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -113,11 +113,11 @@ test_img_cogwheel_a8_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x09, 0x0c, 0x0c, 0x0b, 0x10, 0x18, 0x12, 0x0b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t test_img_cogwheel_a8 = { +const lv_image_dsc_t test_image_cogwheel_a8 = { .header.cf = LV_COLOR_FORMAT_A8, .header.always_zero = 0, .header.w = 100, .header.h = 100, .data_size = 10000, - .data = test_img_cogwheel_a8_map, + .data = test_image_cogwheel_a8_map, }; diff --git a/tests/src/test_assets/test_img_cogwheel_argb8888.c b/tests/src/test_assets/test_img_cogwheel_argb8888.c index b7a84b852..47978a32e 100644 --- a/tests/src/test_assets/test_img_cogwheel_argb8888.c +++ b/tests/src/test_assets/test_img_cogwheel_argb8888.c @@ -5,12 +5,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_TEST__IMG_COGWHEEL_ARGB8888 - #define LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_ARGB8888 +#ifndef LV_ATTRIBUTE_IMAGE_TEST__IMAGE_COGWHEEL_ARGB8888 + #define LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_ARGB8888 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_ARGB8888 uint8_t -test_img_cogwheel_argb8888_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_ARGB8888 uint8_t +test_image_cogwheel_argb8888_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x08, 0xad, 0x9b, 0x8f, 0xff, 0x95, 0x7e, 0x6d, 0xff, 0x90, 0x7a, 0x67, 0xff, 0x92, 0x7c, 0x69, 0xff, 0x91, 0x7b, 0x69, 0xff, 0x8c, 0x75, 0x63, 0xff, 0x97, 0x83, 0x72, 0xff, 0xd1, 0xc7, 0xc0, 0x6d, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf1, 0x11, 0x9e, 0x8a, 0x79, 0xff, 0x8f, 0x78, 0x65, 0xff, 0x90, 0x79, 0x66, 0xff, 0x91, 0x7a, 0x67, 0xff, 0x8e, 0x79, 0x66, 0xff, 0x8c, 0x75, 0x63, 0xff, 0x8c, 0x76, 0x64, 0xff, 0x9f, 0x8c, 0x7d, 0xff, 0xff, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x0c, 0xee, 0xee, 0xee, 0x0f, 0xff, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0xe4, 0xe0, 0xdb, 0x39, 0x9a, 0x85, 0x74, 0xff, 0x90, 0x79, 0x66, 0xff, 0x94, 0x7e, 0x6c, 0xff, 0x95, 0x7f, 0x6d, 0xff, 0x94, 0x7e, 0x6c, 0xff, 0x92, 0x7c, 0x6b, 0xff, 0x8c, 0x76, 0x63, 0xff, 0x95, 0x7f, 0x6e, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0xcb, 0xc2, 0xbb, 0x53, 0xae, 0xa2, 0x96, 0xff, 0xdf, 0xd9, 0xd9, 0x28, 0xff, 0xff, 0xff, 0x06, 0xff, 0xff, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -113,11 +113,11 @@ test_img_cogwheel_argb8888_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 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, 0x03, 0xff, 0xff, 0xff, 0x09, 0xff, 0xff, 0xff, 0x0c, 0xff, 0xff, 0xff, 0x0c, 0xff, 0xff, 0xff, 0x0b, 0xff, 0xff, 0xff, 0x10, 0xff, 0xf4, 0xf4, 0x18, 0xff, 0xff, 0xff, 0x12, 0xff, 0xff, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t test_img_cogwheel_argb8888 = { +const lv_image_dsc_t test_image_cogwheel_argb8888 = { .header.cf = LV_COLOR_FORMAT_ARGB8888, .header.always_zero = 0, .header.w = 100, .header.h = 100, .data_size = 10000 * 4, - .data = test_img_cogwheel_argb8888_map, + .data = test_image_cogwheel_argb8888_map, }; diff --git a/tests/src/test_assets/test_img_cogwheel_i4.c b/tests/src/test_assets/test_img_cogwheel_i4.c index 240ba15aa..cb12ea50c 100644 --- a/tests/src/test_assets/test_img_cogwheel_i4.c +++ b/tests/src/test_assets/test_img_cogwheel_i4.c @@ -5,12 +5,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_I4 - #define LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_I4 +#ifndef LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_I4 + #define LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_I4 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_I4 uint8_t -test_img_cogwheel_i4_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_I4 uint8_t +test_image_cogwheel_i4_map[] = { 0x00, 0x00, 0x00, 0x00, /*Color of index 0*/ 0xfe, 0xfe, 0xfe, 0x05, /*Color of index 1*/ 0xed, 0xeb, 0xea, 0x1b, /*Color of index 2*/ @@ -130,11 +130,11 @@ test_img_cogwheel_i4_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x10, 0x00, 0x00, 0x00, 0x01, 0x11, 0x21, 0x12, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t test_img_cogwheel_i4 = { +const lv_image_dsc_t test_image_cogwheel_i4 = { .header.cf = LV_COLOR_FORMAT_I4, .header.always_zero = 0, .header.w = 100, .header.h = 100, .data_size = 5064, - .data = test_img_cogwheel_i4_map, + .data = test_image_cogwheel_i4_map, }; diff --git a/tests/src/test_assets/test_img_cogwheel_rgb565.c b/tests/src/test_assets/test_img_cogwheel_rgb565.c index 42fd22d0d..d0759a009 100644 --- a/tests/src/test_assets/test_img_cogwheel_rgb565.c +++ b/tests/src/test_assets/test_img_cogwheel_rgb565.c @@ -5,12 +5,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_RGB565 - #define LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_RGB565 +#ifndef LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_RGB565 + #define LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_RGB565 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_RGB565 uint8_t -test_img_cogwheel_rgb565_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_RGB565 uint8_t +test_image_cogwheel_rgb565_map[] = { /*Pixel format: Red: 5 bit, Green: 6 bit, Blue: 5 bit*/ 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0xf6, 0x94, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xb2, 0x63, 0x33, 0x74, 0xbb, 0xd6, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x74, 0x7c, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xb2, 0x63, 0xd2, 0x6b, 0x74, 0x84, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, @@ -114,11 +114,11 @@ test_img_cogwheel_rgb565_map[] = { 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, }; -const lv_img_dsc_t test_img_cogwheel_rgb565 = { +const lv_image_dsc_t test_image_cogwheel_rgb565 = { .header.cf = LV_COLOR_FORMAT_RGB565, .header.always_zero = 0, .header.w = 100, .header.h = 100, .data_size = 10000 * 2, - .data = test_img_cogwheel_rgb565_map, + .data = test_image_cogwheel_rgb565_map, }; diff --git a/tests/src/test_assets/test_img_cogwheel_rgb565a8.c b/tests/src/test_assets/test_img_cogwheel_rgb565a8.c index 89645cc41..9ac623a1e 100644 --- a/tests/src/test_assets/test_img_cogwheel_rgb565a8.c +++ b/tests/src/test_assets/test_img_cogwheel_rgb565a8.c @@ -5,12 +5,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_RGB565A8 - #define LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_RGB565A8 +#ifndef LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_RGB565A8 + #define LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_RGB565A8 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_RGB565A8 uint8_t -test_img_cogwheel_rgb565a8_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_RGB565A8 uint8_t +test_image_cogwheel_rgb565a8_map[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xf6, 0x94, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xb2, 0x63, 0x33, 0x74, 0x5a, 0xc6, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xf7, 0x74, 0x7c, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xb2, 0x63, 0xd2, 0x6b, 0x74, 0x84, 0xff, 0xff, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x9e, 0xf7, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xdf, 0x33, 0x7c, 0xd2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xd2, 0x63, 0x13, 0x74, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0xbe, 0x36, 0x9d, 0xdc, 0xde, 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, @@ -215,12 +215,12 @@ test_img_cogwheel_rgb565a8_map[] = { }; -const lv_img_dsc_t test_img_cogwheel_rgb565a8 = { +const lv_image_dsc_t test_image_cogwheel_rgb565a8 = { .header.cf = LV_COLOR_FORMAT_RGB565A8, .header.always_zero = 0, .header.w = 100, .header.h = 100, .header.stride = 200, .data_size = 30000, - .data = test_img_cogwheel_rgb565a8_map, + .data = test_image_cogwheel_rgb565a8_map, }; diff --git a/tests/src/test_assets/test_img_cogwheel_xrgb8888.c b/tests/src/test_assets/test_img_cogwheel_xrgb8888.c index efaa3ab3d..a84fbaeee 100644 --- a/tests/src/test_assets/test_img_cogwheel_xrgb8888.c +++ b/tests/src/test_assets/test_img_cogwheel_xrgb8888.c @@ -5,12 +5,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -#ifndef LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_XRGB8888 - #define LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_XRGB8888 +#ifndef LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_XRGB8888 + #define LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_XRGB8888 #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TEST_IMG_COGWHEEL_XRGB8888 uint8_t -test_img_cogwheel_xrgb8888_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_TEST_IMAGE_COGWHEEL_XRGB8888 uint8_t +test_image_cogwheel_xrgb8888_map[] = { /*Pixel format: Fix 0xFF: 8 bit, Red: 8 bit, Green: 8 bit, Blue: 8 bit*/ 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xad, 0x9b, 0x8f, 0xff, 0x95, 0x7e, 0x6d, 0xff, 0x90, 0x7a, 0x67, 0xff, 0x92, 0x7c, 0x69, 0xff, 0x91, 0x7b, 0x69, 0xff, 0x8c, 0x75, 0x63, 0xff, 0x97, 0x83, 0x72, 0xff, 0xd8, 0xd4, 0xd1, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xdf, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xdf, 0xdf, 0xdf, 0xff, 0x9e, 0x8a, 0x79, 0xff, 0x8f, 0x78, 0x65, 0xff, 0x90, 0x79, 0x66, 0xff, 0x91, 0x7a, 0x67, 0xff, 0x8f, 0x79, 0x66, 0xff, 0x8c, 0x75, 0x63, 0xff, 0x8c, 0x76, 0x64, 0xff, 0x9f, 0x8c, 0x7d, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, @@ -114,11 +114,11 @@ test_img_cogwheel_xrgb8888_map[] = { 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xdf, 0xde, 0xde, 0xff, 0xde, 0xdf, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xdf, 0xdf, 0xdf, 0xff, 0xdf, 0xdf, 0xdf, 0xff, 0xdf, 0xdf, 0xdf, 0xff, 0xdf, 0xdf, 0xdf, 0xff, 0xdf, 0xdf, 0xdf, 0xff, 0xe0, 0xe0, 0xe0, 0xff, 0xe0, 0xdf, 0xdf, 0xff, 0xdf, 0xdf, 0xdf, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xdf, 0xff, 0xde, 0xde, 0xdf, 0xff, }; -const lv_img_dsc_t test_img_cogwheel_xrgb8888 = { +const lv_image_dsc_t test_image_cogwheel_xrgb8888 = { .header.cf = LV_COLOR_FORMAT_XRGB8888, .header.always_zero = 0, .header.w = 100, .header.h = 100, .data_size = 10000 * 4, - .data = test_img_cogwheel_xrgb8888_map, + .data = test_image_cogwheel_xrgb8888_map, }; diff --git a/tests/src/test_cases/test_animimg.c b/tests/src/test_cases/test_animimg.c index b87f5e90a..285e2606d 100644 --- a/tests/src/test_cases/test_animimg.c +++ b/tests/src/test_cases/test_animimg.c @@ -4,11 +4,11 @@ #include "unity/unity.h" #include "lv_test_indev.h" -LV_IMG_DECLARE(test_animimg001) -LV_IMG_DECLARE(test_animimg002) -LV_IMG_DECLARE(test_animimg003) +LV_IMAGE_DECLARE(test_animimg001) +LV_IMAGE_DECLARE(test_animimg002) +LV_IMAGE_DECLARE(test_animimg003) -static const lv_img_dsc_t * anim_imgs[3] = { +static const lv_image_dsc_t * anim_imgs[3] = { &test_animimg001, &test_animimg002, &test_animimg003, diff --git a/tests/src/test_cases/test_btn.c b/tests/src/test_cases/test_btn.c index a8b4233c1..a693b2ba6 100644 --- a/tests/src/test_cases/test_btn.c +++ b/tests/src/test_cases/test_btn.c @@ -15,10 +15,10 @@ void tearDown(void) lv_obj_clean(active_screen); } -void test_btn_creation(void) +void test_button_creation(void) { lv_obj_t * btn; - btn = lv_btn_create(active_screen); + btn = lv_button_create(active_screen); TEST_ASSERT_NOT_NULL(btn); /* These flags are set in the object's constructor. */ TEST_ASSERT_TRUE(lv_obj_has_flag(btn, LV_OBJ_FLAG_SCROLL_ON_FOCUS)); diff --git a/tests/src/test_cases/test_btnmatrix.c b/tests/src/test_cases/test_btnmatrix.c index 2a0919724..3cf318ae7 100644 --- a/tests/src/test_cases/test_btnmatrix.c +++ b/tests/src/test_cases/test_btnmatrix.c @@ -11,7 +11,7 @@ lv_event_code_t exp_evt_code; void setUp(void) { active_screen = lv_scr_act(); - btnm = lv_btnmatrix_create(active_screen); + btnm = lv_buttonmatrix_create(active_screen); TEST_ASSERT_NOT_NULL(btnm); event_triggered = false; exp_evt_code = 0; @@ -22,12 +22,12 @@ void tearDown(void) lv_obj_clean(active_screen); } -void test_btn_matrix_creation(void) +void test_button_matrix_creation(void) { const char ** map; /* Verify the default map. */ - map = lv_btnmatrix_get_map(btnm); + map = lv_buttonmatrix_get_map(btnm); TEST_ASSERT_EQUAL_STRING(map[0], "Btn1"); TEST_ASSERT_EQUAL_STRING(map[1], "Btn2"); TEST_ASSERT_EQUAL_STRING(map[2], "Btn3"); @@ -36,14 +36,14 @@ void test_btn_matrix_creation(void) TEST_ASSERT_EQUAL_STRING(map[5], "Btn5"); } -void test_btn_matrix_set_map_works(void) +void test_button_matrix_set_map_works(void) { const char ** ret_map; static const char * exp_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, exp_map); + lv_buttonmatrix_set_map(btnm, exp_map); /* Verify if the map was set correctly. */ - ret_map = lv_btnmatrix_get_map(btnm); + ret_map = lv_buttonmatrix_get_map(btnm); TEST_ASSERT_EQUAL_STRING(exp_map[0], ret_map[0]); TEST_ASSERT_EQUAL_STRING(exp_map[1], ret_map[1]); TEST_ASSERT_EQUAL_STRING(exp_map[2], ret_map[2]); @@ -54,239 +54,239 @@ void test_btn_matrix_set_map_works(void) TEST_ASSERT_EQUAL_SCREENSHOT("btnm_1.png"); } -void test_btn_matrix_render_2(void) +void test_button_matrix_render_2(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_set_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_CHECKED); lv_obj_set_pos(btnm, 10, 10); static const char * btn_map2[] = {"A", "\n", "B", "\n", "C", "\n", "D", ""}; - btnm = lv_btnmatrix_create(active_screen); + btnm = lv_buttonmatrix_create(active_screen); TEST_ASSERT_NOT_NULL(btnm); lv_obj_set_width(btnm, 150); lv_obj_set_height(btnm, 250); - lv_btnmatrix_set_map(btnm, btn_map2); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_set_one_checked(btnm, true); - lv_btnmatrix_set_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 2, LV_BTNMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_map(btnm, btn_map2); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_one_checked(btnm, true); + lv_buttonmatrix_set_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 2, LV_BUTTONMATRIX_CTRL_CHECKED); lv_obj_set_pos(btnm, 10, 160); static const char * btn_map3[] = {"A", "B", "C", "\n", "D", "E", "F", ""}; - btnm = lv_btnmatrix_create(active_screen); + btnm = lv_buttonmatrix_create(active_screen); TEST_ASSERT_NOT_NULL(btnm); - lv_btnmatrix_set_map(btnm, btn_map3); + lv_buttonmatrix_set_map(btnm, btn_map3); lv_obj_set_width(btnm, 400); - lv_btnmatrix_set_btn_width(btnm, 0, 3); - lv_btnmatrix_set_btn_width(btnm, 1, 2); - lv_btnmatrix_set_btn_width(btnm, 2, 1); - lv_btnmatrix_set_btn_width(btnm, 3, 1); - lv_btnmatrix_set_btn_width(btnm, 4, 2); - lv_btnmatrix_set_btn_width(btnm, 5, 3); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_set_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 4, LV_BTNMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_width(btnm, 0, 3); + lv_buttonmatrix_set_button_width(btnm, 1, 2); + lv_buttonmatrix_set_button_width(btnm, 2, 1); + lv_buttonmatrix_set_button_width(btnm, 3, 1); + lv_buttonmatrix_set_button_width(btnm, 4, 2); + lv_buttonmatrix_set_button_width(btnm, 5, 3); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 4, LV_BUTTONMATRIX_CTRL_CHECKED); lv_obj_set_pos(btnm, 300, 10); static const char * btn_map4[] = {"A", "B", "C", "D", "E", "F", "G", "\n", "G", "F", "E", "D", "C", "B", "A", "" }; - btnm = lv_btnmatrix_create(active_screen); - lv_btnmatrix_set_map(btnm, btn_map4); + btnm = lv_buttonmatrix_create(active_screen); + lv_buttonmatrix_set_map(btnm, btn_map4); lv_obj_set_width(btnm, 600); lv_obj_set_height(btnm, 150); - lv_btnmatrix_set_btn_width(btnm, 0, 1); - lv_btnmatrix_set_btn_width(btnm, 1, 2); - lv_btnmatrix_set_btn_width(btnm, 2, 3); - lv_btnmatrix_set_btn_width(btnm, 3, 4); - lv_btnmatrix_set_btn_width(btnm, 4, 5); - lv_btnmatrix_set_btn_width(btnm, 5, 6); - lv_btnmatrix_set_btn_width(btnm, 6, 7); + lv_buttonmatrix_set_button_width(btnm, 0, 1); + lv_buttonmatrix_set_button_width(btnm, 1, 2); + lv_buttonmatrix_set_button_width(btnm, 2, 3); + lv_buttonmatrix_set_button_width(btnm, 3, 4); + lv_buttonmatrix_set_button_width(btnm, 4, 5); + lv_buttonmatrix_set_button_width(btnm, 5, 6); + lv_buttonmatrix_set_button_width(btnm, 6, 7); - lv_btnmatrix_set_btn_width(btnm, 7, 7); - lv_btnmatrix_set_btn_width(btnm, 8, 6); - lv_btnmatrix_set_btn_width(btnm, 9, 5); - lv_btnmatrix_set_btn_width(btnm, 10, 4); - lv_btnmatrix_set_btn_width(btnm, 11, 3); - lv_btnmatrix_set_btn_width(btnm, 12, 2); - lv_btnmatrix_set_btn_width(btnm, 13, 1); + lv_buttonmatrix_set_button_width(btnm, 7, 7); + lv_buttonmatrix_set_button_width(btnm, 8, 6); + lv_buttonmatrix_set_button_width(btnm, 9, 5); + lv_buttonmatrix_set_button_width(btnm, 10, 4); + lv_buttonmatrix_set_button_width(btnm, 11, 3); + lv_buttonmatrix_set_button_width(btnm, 12, 2); + lv_buttonmatrix_set_button_width(btnm, 13, 1); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_set_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 5, LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 7, LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 9, LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 11, LV_BTNMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 5, LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 7, LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 9, LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 11, LV_BUTTONMATRIX_CTRL_CHECKED); lv_obj_set_pos(btnm, 180, 160); TEST_ASSERT_EQUAL_SCREENSHOT("btnm_2.png"); } -void test_btn_matrix_set_ctrl_map_works(void) +void test_button_matrix_set_ctrl_map_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_map(btnm, btn_map); - lv_btnmatrix_ctrl_t ctrl_map[4]; - ctrl_map[0] = 1 | LV_BTNMATRIX_CTRL_DISABLED; - ctrl_map[1] = 1 | LV_BTNMATRIX_CTRL_CHECKABLE | LV_BTNMATRIX_CTRL_CHECKED; - ctrl_map[2] = 1 | LV_BTNMATRIX_CTRL_HIDDEN; - ctrl_map[3] = 1 | LV_BTNMATRIX_CTRL_CHECKABLE; - lv_btnmatrix_set_ctrl_map(btnm, ctrl_map); + lv_buttonmatrix_ctrl_t ctrl_map[4]; + ctrl_map[0] = 1 | LV_BUTTONMATRIX_CTRL_DISABLED; + ctrl_map[1] = 1 | LV_BUTTONMATRIX_CTRL_CHECKABLE | LV_BUTTONMATRIX_CTRL_CHECKED; + ctrl_map[2] = 1 | LV_BUTTONMATRIX_CTRL_HIDDEN; + ctrl_map[3] = 1 | LV_BUTTONMATRIX_CTRL_CHECKABLE; + lv_buttonmatrix_set_ctrl_map(btnm, ctrl_map); /* Verify if the ctrl map was set correctly. */ - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_DISABLED)); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 1, - LV_BTNMATRIX_CTRL_CHECKABLE | LV_BTNMATRIX_CTRL_CHECKED)); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 2, LV_BTNMATRIX_CTRL_HIDDEN)); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_CHECKABLE)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_DISABLED)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 1, + LV_BUTTONMATRIX_CTRL_CHECKABLE | LV_BUTTONMATRIX_CTRL_CHECKED)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 2, LV_BUTTONMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_CHECKABLE)); /* Also checking randomly that no other flags are set. */ - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_CHECKABLE)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_DISABLED)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_CHECKED)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 4, LV_BTNMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_CHECKABLE)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_DISABLED)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_CHECKED)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 4, LV_BUTTONMATRIX_CTRL_HIDDEN)); } -void test_btn_matrix_set_btn_ctrl_works(void) +void test_button_matrix_set_button_ctrl_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_map(btnm, btn_map); /* Set btn control map using individual APIs. */ - lv_btnmatrix_set_btn_ctrl(btnm, 0, 1 | LV_BTNMATRIX_CTRL_DISABLED); - lv_btnmatrix_set_btn_ctrl(btnm, 1, 1 | LV_BTNMATRIX_CTRL_CHECKABLE | LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 2, 1 | LV_BTNMATRIX_CTRL_HIDDEN); - lv_btnmatrix_set_btn_ctrl(btnm, 3, 1 | LV_BTNMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_button_ctrl(btnm, 0, 1 | LV_BUTTONMATRIX_CTRL_DISABLED); + lv_buttonmatrix_set_button_ctrl(btnm, 1, 1 | LV_BUTTONMATRIX_CTRL_CHECKABLE | LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 2, 1 | LV_BUTTONMATRIX_CTRL_HIDDEN); + lv_buttonmatrix_set_button_ctrl(btnm, 3, 1 | LV_BUTTONMATRIX_CTRL_CHECKABLE); /* Verify if the ctrl map was set correctly. */ - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_DISABLED)); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 1, - LV_BTNMATRIX_CTRL_CHECKABLE | LV_BTNMATRIX_CTRL_CHECKED)); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 2, LV_BTNMATRIX_CTRL_HIDDEN)); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_CHECKABLE)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_DISABLED)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 1, + LV_BUTTONMATRIX_CTRL_CHECKABLE | LV_BUTTONMATRIX_CTRL_CHECKED)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 2, LV_BUTTONMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_CHECKABLE)); /* Also checking randomly that no other flags are set. */ - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_CHECKABLE)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_DISABLED)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_CHECKED)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 4, LV_BTNMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_CHECKABLE)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_DISABLED)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_CHECKED)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 4, LV_BUTTONMATRIX_CTRL_HIDDEN)); } -void test_btn_matrix_clear_btn_ctrl_works(void) +void test_button_matrix_clear_button_ctrl_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_map(btnm, btn_map); /* Set btn control map using individual APIs. */ - lv_btnmatrix_set_btn_ctrl(btnm, 0, 1 | LV_BTNMATRIX_CTRL_DISABLED); - lv_btnmatrix_set_btn_ctrl(btnm, 1, 1 | LV_BTNMATRIX_CTRL_CHECKABLE | LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 2, 1 | LV_BTNMATRIX_CTRL_HIDDEN); - lv_btnmatrix_set_btn_ctrl(btnm, 3, 1 | LV_BTNMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_button_ctrl(btnm, 0, 1 | LV_BUTTONMATRIX_CTRL_DISABLED); + lv_buttonmatrix_set_button_ctrl(btnm, 1, 1 | LV_BUTTONMATRIX_CTRL_CHECKABLE | LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 2, 1 | LV_BUTTONMATRIX_CTRL_HIDDEN); + lv_buttonmatrix_set_button_ctrl(btnm, 3, 1 | LV_BUTTONMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_clear_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_DISABLED); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_DISABLED)); - lv_btnmatrix_clear_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_CHECKED); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_CHECKED)); - lv_btnmatrix_clear_btn_ctrl(btnm, 2, LV_BTNMATRIX_CTRL_HIDDEN); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 2, LV_BTNMATRIX_CTRL_HIDDEN)); - lv_btnmatrix_clear_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_CHECKABLE); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_CHECKABLE)); + lv_buttonmatrix_clear_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_DISABLED); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_DISABLED)); + lv_buttonmatrix_clear_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_CHECKED); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_CHECKED)); + lv_buttonmatrix_clear_button_ctrl(btnm, 2, LV_BUTTONMATRIX_CTRL_HIDDEN); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 2, LV_BUTTONMATRIX_CTRL_HIDDEN)); + lv_buttonmatrix_clear_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_CHECKABLE); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_CHECKABLE)); } -void test_btn_matrix_set_selected_btn_works(void) +void test_button_matrix_set_selected_button_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_selected_btn(btnm, 2); - TEST_ASSERT_EQUAL_UINT16(2, lv_btnmatrix_get_selected_btn(btnm)); + lv_buttonmatrix_set_selected_button(btnm, 2); + TEST_ASSERT_EQUAL_UINT16(2, lv_buttonmatrix_get_selected_button(btnm)); - lv_btnmatrix_set_selected_btn(btnm, 0); - TEST_ASSERT_EQUAL_UINT16(0, lv_btnmatrix_get_selected_btn(btnm)); + lv_buttonmatrix_set_selected_button(btnm, 0); + TEST_ASSERT_EQUAL_UINT16(0, lv_buttonmatrix_get_selected_button(btnm)); - lv_btnmatrix_set_selected_btn(btnm, 3); - TEST_ASSERT_EQUAL_UINT16(3, lv_btnmatrix_get_selected_btn(btnm)); + lv_buttonmatrix_set_selected_button(btnm, 3); + TEST_ASSERT_EQUAL_UINT16(3, lv_buttonmatrix_get_selected_button(btnm)); - lv_btnmatrix_set_selected_btn(btnm, 1); - TEST_ASSERT_EQUAL_UINT16(1, lv_btnmatrix_get_selected_btn(btnm)); + lv_buttonmatrix_set_selected_button(btnm, 1); + TEST_ASSERT_EQUAL_UINT16(1, lv_buttonmatrix_get_selected_button(btnm)); } -void test_btn_matrix_set_btn_ctrl_all_works(void) +void test_button_matrix_set_button_ctrl_all_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_HIDDEN); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_HIDDEN); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_HIDDEN)); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_HIDDEN)); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 2, LV_BTNMATRIX_CTRL_HIDDEN)); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 2, LV_BUTTONMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_HIDDEN)); } -void test_btn_matrix_clear_btn_ctrl_all_works(void) +void test_button_matrix_clear_button_ctrl_all_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_HIDDEN); - lv_btnmatrix_clear_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_HIDDEN); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_HIDDEN); + lv_buttonmatrix_clear_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_HIDDEN); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_HIDDEN)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_HIDDEN)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 2, LV_BTNMATRIX_CTRL_HIDDEN)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 2, LV_BUTTONMATRIX_CTRL_HIDDEN)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_HIDDEN)); } -void test_btn_matrix_set_btn_width_works(void) +void test_button_matrix_set_button_width_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_width(btnm, 1, 3); - lv_btnmatrix_set_btn_width(btnm, 2, 2); + lv_buttonmatrix_set_button_width(btnm, 1, 3); + lv_buttonmatrix_set_button_width(btnm, 2, 2); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 1, 3)); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 2, 2)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 1, 3)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 2, 2)); } -void test_btn_matrix_set_one_checked_works(void) +void test_button_matrix_set_one_checked_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); - lv_btnmatrix_set_one_checked(btnm, true); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_one_checked(btnm, true); - lv_btnmatrix_set_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 2, LV_BTNMATRIX_CTRL_CHECKED); - lv_btnmatrix_set_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 2, LV_BUTTONMATRIX_CTRL_CHECKED); + lv_buttonmatrix_set_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_CHECKED); - TEST_ASSERT_TRUE(lv_btnmatrix_get_one_checked(btnm)); + TEST_ASSERT_TRUE(lv_buttonmatrix_get_one_checked(btnm)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_CHECKED)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_CHECKED)); - TEST_ASSERT_FALSE(lv_btnmatrix_has_btn_ctrl(btnm, 2, LV_BTNMATRIX_CTRL_CHECKED)); - TEST_ASSERT_TRUE(lv_btnmatrix_has_btn_ctrl(btnm, 3, LV_BTNMATRIX_CTRL_CHECKED)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_CHECKED)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 1, LV_BUTTONMATRIX_CTRL_CHECKED)); + TEST_ASSERT_FALSE(lv_buttonmatrix_has_button_ctrl(btnm, 2, LV_BUTTONMATRIX_CTRL_CHECKED)); + TEST_ASSERT_TRUE(lv_buttonmatrix_has_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_CHECKED)); } -void test_btn_matrix_get_btn_text_works(void) +void test_button_matrix_get_button_text_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_map(btnm, btn_map); - const char * lv_btnmatrix_get_btn_text(const lv_obj_t * obj, uint16_t btn_id); + const char * lv_buttonmatrix_get_button_text(const lv_obj_t * obj, uint16_t btn_id); - TEST_ASSERT_EQUAL_STRING("A", lv_btnmatrix_get_btn_text(btnm, 0)); - TEST_ASSERT_EQUAL_STRING("B", lv_btnmatrix_get_btn_text(btnm, 1)); - TEST_ASSERT_EQUAL_STRING("C", lv_btnmatrix_get_btn_text(btnm, 2)); - TEST_ASSERT_EQUAL_STRING("D", lv_btnmatrix_get_btn_text(btnm, 3)); + TEST_ASSERT_EQUAL_STRING("A", lv_buttonmatrix_get_button_text(btnm, 0)); + TEST_ASSERT_EQUAL_STRING("B", lv_buttonmatrix_get_button_text(btnm, 1)); + TEST_ASSERT_EQUAL_STRING("C", lv_buttonmatrix_get_button_text(btnm, 2)); + TEST_ASSERT_EQUAL_STRING("D", lv_buttonmatrix_get_button_text(btnm, 3)); } /* Common event handler for all the consecutive test cases. */ @@ -298,10 +298,10 @@ static void event_handler(lv_event_t * e) } } -void test_btn_matrix_pressed_event_works(void) +void test_button_matrix_pressed_event_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_map(btnm, btn_map); lv_obj_add_event(btnm, event_handler, LV_EVENT_PRESSED, NULL); /* Set expected event code before the event is raised. */ exp_evt_code = LV_EVENT_PRESSED; @@ -310,11 +310,11 @@ void test_btn_matrix_pressed_event_works(void) TEST_ASSERT_TRUE(event_triggered); } -void test_btn_matrix_release_event_works(void) +void test_button_matrix_release_event_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); lv_obj_add_event(btnm, event_handler, LV_EVENT_RELEASED, NULL); /* Set expected event code before the event is raised. */ exp_evt_code = LV_EVENT_RELEASED; @@ -325,68 +325,68 @@ void test_btn_matrix_release_event_works(void) event_triggered = false; /* This will increase test coverage by unchecking the same button. */ - lv_btnmatrix_set_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_POPOVER); + lv_buttonmatrix_set_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_POPOVER); /* Click button index 0. */ lv_test_mouse_click_at(65, 35); TEST_ASSERT_TRUE(event_triggered); } -void test_btn_matrix_key_event_works(void) +void test_button_matrix_key_event_works(void) { uint32_t keyCode; static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); lv_obj_update_layout(btnm); /*The force calculating the button areas*/ lv_obj_add_event(btnm, event_handler, LV_EVENT_KEY, NULL); /* Set expected event code before the event is raised. */ exp_evt_code = LV_EVENT_KEY; - lv_btnmatrix_t * btnmObj = (lv_btnmatrix_t *)btnm; + lv_buttonmatrix_t * btnmObj = (lv_buttonmatrix_t *)btnm; /* Select the first button. */ - lv_btnmatrix_set_selected_btn(btnm, 0); + lv_buttonmatrix_set_selected_button(btnm, 0); keyCode = LV_KEY_RIGHT; lv_obj_send_event(btnm, LV_EVENT_KEY, &keyCode); TEST_ASSERT_TRUE(event_triggered); - uint16_t btnId = lv_btnmatrix_get_selected_btn(btnm); + uint16_t btnId = lv_buttonmatrix_get_selected_button(btnm); TEST_ASSERT_EQUAL_INT(1, btnId); event_triggered = false; keyCode = LV_KEY_LEFT; lv_obj_send_event(btnm, LV_EVENT_KEY, &keyCode); TEST_ASSERT_TRUE(event_triggered); - btnId = lv_btnmatrix_get_selected_btn(btnm); + btnId = lv_buttonmatrix_get_selected_button(btnm); TEST_ASSERT_EQUAL_INT(0, btnId); event_triggered = false; keyCode = LV_KEY_DOWN; lv_obj_send_event(btnm, LV_EVENT_KEY, &keyCode); TEST_ASSERT_TRUE(event_triggered); - btnId = lv_btnmatrix_get_selected_btn(btnm); + btnId = lv_buttonmatrix_get_selected_button(btnm); TEST_ASSERT_EQUAL_INT(2, btnId); event_triggered = false; keyCode = LV_KEY_UP; lv_obj_send_event(btnm, LV_EVENT_KEY, &keyCode); TEST_ASSERT_TRUE(event_triggered); - btnId = lv_btnmatrix_get_selected_btn(btnm); + btnId = lv_buttonmatrix_get_selected_button(btnm); TEST_ASSERT_EQUAL_INT(0, btnId); /* Added this code to increase code coverage. */ - btnmObj->btn_id_sel = LV_BTNMATRIX_BTN_NONE; - lv_btnmatrix_set_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_HIDDEN); + btnmObj->btn_id_sel = LV_BUTTONMATRIX_BUTTON_NONE; + lv_buttonmatrix_set_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_HIDDEN); keyCode = LV_KEY_DOWN; lv_obj_send_event(btnm, LV_EVENT_KEY, &keyCode); TEST_ASSERT_TRUE(event_triggered); event_triggered = false; } -void test_btn_matrix_pressing_event_works(void) +void test_button_matrix_pressing_event_works(void) { - lv_btnmatrix_t * btnmObj = (lv_btnmatrix_t *)btnm; + lv_buttonmatrix_t * btnmObj = (lv_buttonmatrix_t *)btnm; static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); lv_obj_add_event(btnm, event_handler, LV_EVENT_PRESSING, NULL); /* Set expected event code before the event is raised. */ exp_evt_code = LV_EVENT_PRESSING; @@ -398,13 +398,13 @@ void test_btn_matrix_pressing_event_works(void) TEST_ASSERT_TRUE(event_triggered); } -void test_btn_matrix_long_press_repeat_event_works(void) +void test_button_matrix_long_press_repeat_event_works(void) { - lv_btnmatrix_t * btnmObj = (lv_btnmatrix_t *)btnm; + lv_buttonmatrix_t * btnmObj = (lv_buttonmatrix_t *)btnm; static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); lv_obj_add_event(btnm, event_handler, LV_EVENT_LONG_PRESSED_REPEAT, NULL); /* Set expected event code before the event is raised. */ exp_evt_code = LV_EVENT_LONG_PRESSED_REPEAT; @@ -415,12 +415,12 @@ void test_btn_matrix_long_press_repeat_event_works(void) TEST_ASSERT_TRUE(event_triggered); } -void test_btn_matrix_press_lost_event_works(void) +void test_button_matrix_press_lost_event_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); lv_obj_add_event(btnm, event_handler, LV_EVENT_PRESS_LOST, NULL); /* Set expected event code before the event is raised. */ exp_evt_code = LV_EVENT_PRESS_LOST; @@ -428,13 +428,13 @@ void test_btn_matrix_press_lost_event_works(void) TEST_ASSERT_TRUE(event_triggered); } -void test_btn_matrix_defocused_event_works(void) +void test_button_matrix_defocused_event_works(void) { - lv_btnmatrix_t * btnmObj = (lv_btnmatrix_t *)btnm; + lv_buttonmatrix_t * btnmObj = (lv_buttonmatrix_t *)btnm; static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); lv_obj_add_event(btnm, event_handler, LV_EVENT_DEFOCUSED, NULL); /* Set expected event code before the event is raised. */ exp_evt_code = LV_EVENT_DEFOCUSED; @@ -445,12 +445,12 @@ void test_btn_matrix_defocused_event_works(void) TEST_ASSERT_TRUE(event_triggered); } -void test_btn_matrix_focused_event_works(void) +void test_button_matrix_focused_event_works(void) { static const char * btn_map[] = {"A", "B", "\n", "C", "D", ""}; - lv_btnmatrix_set_map(btnm, btn_map); - lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); + lv_buttonmatrix_set_map(btnm, btn_map); + lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); lv_obj_add_event(btnm, event_handler, LV_EVENT_FOCUSED, NULL); /* Set expected event code before the event is raised. */ exp_evt_code = LV_EVENT_FOCUSED; diff --git a/tests/src/test_cases/test_draw_arc.c b/tests/src/test_cases/test_draw_arc.c index f1b9399d1..42a448aea 100644 --- a/tests/src/test_cases/test_draw_arc.c +++ b/tests/src/test_cases/test_draw_arc.c @@ -117,7 +117,7 @@ void test_image_arc(void) lv_draw_arc_dsc_t arc_dsc; lv_draw_arc_dsc_init(&arc_dsc); - LV_IMG_DECLARE(test_arc_bg); + LV_IMAGE_DECLARE(test_arc_bg); arc_dsc.img_src = &test_arc_bg; draw_arcs(&arc_dsc, "image"); diff --git a/tests/src/test_cases/test_draw_blend.c b/tests/src/test_cases/test_draw_blend.c index 058b5c6b4..8553f8129 100644 --- a/tests/src/test_cases/test_draw_blend.c +++ b/tests/src/test_cases/test_draw_blend.c @@ -88,10 +88,10 @@ static void canvas_basic_render(uint8_t * canvas_buf, lv_color_format_t render_c } -void canvas_blend_test(lv_obj_t * canvas_large, lv_draw_img_dsc_t * img_dsc, const char * name_main, +void canvas_blend_test(lv_obj_t * canvas_large, lv_draw_image_dsc_t * img_dsc, const char * name_main, const char * name_sub, lv_color_format_t small_render_cf, uint32_t idx) { - lv_img_dsc_t * img = (lv_img_dsc_t *)img_dsc->src; + lv_image_dsc_t * img = (lv_image_dsc_t *)img_dsc->src; img->header.cf = small_render_cf; canvas_basic_render((uint8_t *)img->data, small_render_cf, name_main, name_sub); @@ -105,14 +105,14 @@ void canvas_blend_test(lv_obj_t * canvas_large, lv_draw_img_dsc_t * img_dsc, co img_dsc->opa = LV_OPA_COVER; lv_canvas_init_layer(canvas_large, &layer); - lv_draw_img(&layer, img_dsc, &area); + lv_draw_image(&layer, img_dsc, &area); lv_canvas_finish_layer(canvas_large, &layer); lv_area_move(&area, 190, 0); img_dsc->opa = LV_OPA_50; lv_canvas_init_layer(canvas_large, &layer); - lv_draw_img(&layer, img_dsc, &area); + lv_draw_image(&layer, img_dsc, &area); lv_canvas_finish_layer(canvas_large, &layer); } @@ -128,15 +128,15 @@ static void canvas_draw(const char * name, lv_color_format_t large_render_cf) lv_canvas_set_buffer(canvas2, canvas2_buf, 770, 390, large_render_cf); lv_canvas_fill_bg(canvas2, lv_palette_lighten(LV_PALETTE_BLUE_GREY, 2), LV_OPA_COVER); - lv_img_dsc_t img = { 0 }; + lv_image_dsc_t img = { 0 }; img.header.w = 180; img.header.h = 180; img.header.stride = 0; img.header.always_zero = 0; img.data = canvas_buf; - lv_draw_img_dsc_t img_dsc; - lv_draw_img_dsc_init(&img_dsc); + lv_draw_image_dsc_t img_dsc; + lv_draw_image_dsc_init(&img_dsc); img_dsc.src = &img; canvas_blend_test(canvas2, &img_dsc, "rgb565", name, LV_COLOR_FORMAT_RGB565, 0); diff --git a/tests/src/test_cases/test_draw_layer.c b/tests/src/test_cases/test_draw_layer.c index b166db597..f1bfe622a 100644 --- a/tests/src/test_cases/test_draw_layer.c +++ b/tests/src/test_cases/test_draw_layer.c @@ -22,7 +22,7 @@ static const char * lorem_ipsum = static lv_obj_t * create_test_obj(const char * text, bool simple) { - lv_obj_t * obj = lv_btn_create(lv_scr_act()); + lv_obj_t * obj = lv_button_create(lv_scr_act()); lv_obj_set_size(obj, 120, 80); if(simple) { diff --git a/tests/src/test_cases/test_draw_transform.c b/tests/src/test_cases/test_draw_transform.c index fc9a84329..39a39c7dd 100644 --- a/tests/src/test_cases/test_draw_transform.c +++ b/tests/src/test_cases/test_draw_transform.c @@ -48,36 +48,36 @@ static void canvas_basic_render(lv_color_format_t render_cf, uint8_t * canvas_bu lv_obj_del(canvas); } -static void draw_images(lv_layer_t * layer, lv_draw_img_dsc_t * dsc) +static void draw_images(lv_layer_t * layer, lv_draw_image_dsc_t * dsc) { /* Angle */ lv_area_t area = { 10, 30, 109, 129}; dsc->pivot.x = 50; dsc->pivot.y = 50; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); lv_area_move(&area, 110, 0); dsc->angle = 900; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); lv_area_move(&area, 110, 0); dsc->angle = 1800; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); lv_area_move(&area, 110, 0); dsc->angle = -900; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); lv_area_move(&area, 150, 0); dsc->angle = 300; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); dsc->pivot.x = 0; dsc->pivot.y = 0; dsc->angle = 300; lv_area_move(&area, 150, 0); - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); /* Zoom */ area.x1 = 10; @@ -88,27 +88,27 @@ static void draw_images(lv_layer_t * layer, lv_draw_img_dsc_t * dsc) dsc->pivot.y = 50; dsc->angle = 0; dsc->zoom = 128; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); lv_area_move(&area, 110, 0); dsc->zoom = 300; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); lv_area_move(&area, 110, 0); dsc->pivot.x = 0; dsc->pivot.y = 0; dsc->zoom = 128; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); lv_area_move(&area, 110, 0); dsc->zoom = 300; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); /* Zoom + Angle*/ dsc->angle = 650; dsc->zoom = 200; lv_area_move(&area, 200, 0); - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); /*Edge color bleeding test*/ lv_draw_rect_dsc_t rect_dsc; @@ -128,22 +128,22 @@ static void draw_images(lv_layer_t * layer, lv_draw_img_dsc_t * dsc) dsc->pivot.y = 50; dsc->angle = 0; dsc->zoom = 256; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); lv_area_move(&area, 180, 0); dsc->angle = 300; dsc->zoom = 200; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); lv_area_move(&area, 150, 0); dsc->angle = 1400; dsc->zoom = 150; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); lv_area_move(&area, 120, 0); dsc->angle = 2000; dsc->zoom = 100; - lv_draw_img(layer, dsc, &area); + lv_draw_image(layer, dsc, &area); } void create_test_screen(lv_color_format_t render_cf, const char * name) @@ -160,7 +160,7 @@ void create_test_screen(lv_color_format_t render_cf, const char * name) static uint8_t canvas_buf_small[100 * 100 * 4]; - lv_img_dsc_t img; + lv_image_dsc_t img; img.data = canvas_buf_small; img.header.cf = render_cf; img.header.w = 100; @@ -168,8 +168,8 @@ void create_test_screen(lv_color_format_t render_cf, const char * name) img.header.stride = 100 * lv_color_format_get_size(render_cf); img.header.always_zero = 0; - lv_draw_img_dsc_t img_dsc; - lv_draw_img_dsc_init(&img_dsc); + lv_draw_image_dsc_t img_dsc; + lv_draw_image_dsc_init(&img_dsc); img_dsc.src = &img; canvas_basic_render(render_cf, canvas_buf_small); diff --git a/tests/src/test_cases/test_dropdown.c b/tests/src/test_cases/test_dropdown.c index 71dd3a903..fbb65e14e 100644 --- a/tests/src/test_cases/test_dropdown.c +++ b/tests/src/test_cases/test_dropdown.c @@ -367,11 +367,11 @@ void test_dropdown_render_1(void) void test_dropdown_render_2(void) { lv_obj_clean(lv_scr_act()); - LV_IMG_DECLARE(test_img_caret_down); + LV_IMAGE_DECLARE(test_image_caret_down); lv_obj_t * dd1 = lv_dropdown_create(lv_scr_act()); lv_dropdown_set_text(dd1, "Short"); lv_dropdown_set_options(dd1, "1\n2"); - lv_dropdown_set_symbol(dd1, &test_img_caret_down); + lv_dropdown_set_symbol(dd1, &test_image_caret_down); lv_dropdown_open(dd1); lv_obj_t * dd2 = lv_dropdown_create(lv_scr_act()); diff --git a/tests/src/test_cases/test_image_formats.c b/tests/src/test_cases/test_image_formats.c index 625b7d6e4..5163bac59 100644 --- a/tests/src/test_cases/test_image_formats.c +++ b/tests/src/test_cases/test_image_formats.c @@ -28,11 +28,11 @@ static void img_create(const char * name, const void * img_src, bool rotate, boo lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_COLUMN); - lv_obj_t * img = lv_img_create(cont); - lv_img_set_src(img, img_src); - lv_obj_set_style_img_recolor(img, lv_palette_main(LV_PALETTE_RED), 0); /*For A8*/ - if(recolor) lv_obj_set_style_img_recolor_opa(img, LV_OPA_70, 0); - if(rotate) lv_img_set_angle(img, 450); + lv_obj_t * img = lv_image_create(cont); + lv_image_set_src(img, img_src); + lv_obj_set_style_image_recolor(img, lv_palette_main(LV_PALETTE_RED), 0); /*For A8*/ + if(recolor) lv_obj_set_style_image_recolor_opa(img, LV_OPA_70, 0); + if(rotate) lv_image_set_angle(img, 450); lv_obj_t * label = lv_label_create(cont); lv_label_set_text(label, name); @@ -41,19 +41,19 @@ static void img_create(const char * name, const void * img_src, bool rotate, boo void test_image_built_in_decode(void) { - LV_IMG_DECLARE(test_img_cogwheel_i4); - LV_IMG_DECLARE(test_img_cogwheel_a8); - LV_IMG_DECLARE(test_img_cogwheel_rgb565); - LV_IMG_DECLARE(test_img_cogwheel_rgb565a8); - LV_IMG_DECLARE(test_img_cogwheel_xrgb8888); - LV_IMG_DECLARE(test_img_cogwheel_argb8888); + LV_IMAGE_DECLARE(test_image_cogwheel_i4); + LV_IMAGE_DECLARE(test_image_cogwheel_a8); + LV_IMAGE_DECLARE(test_image_cogwheel_rgb565); + LV_IMAGE_DECLARE(test_image_cogwheel_rgb565a8); + LV_IMAGE_DECLARE(test_image_cogwheel_xrgb8888); + LV_IMAGE_DECLARE(test_image_cogwheel_argb8888); - img_create("I4", &test_img_cogwheel_i4, false, false); - img_create("A8", &test_img_cogwheel_a8, false, false); - img_create("RGB565", &test_img_cogwheel_rgb565, false, false); - img_create("RGB565A8", &test_img_cogwheel_rgb565a8, false, false); - img_create("XRGB8888", &test_img_cogwheel_xrgb8888, false, false); - img_create("ARGB8888", &test_img_cogwheel_argb8888, false, false); + img_create("I4", &test_image_cogwheel_i4, false, false); + img_create("A8", &test_image_cogwheel_a8, false, false); + img_create("RGB565", &test_image_cogwheel_rgb565, false, false); + img_create("RGB565A8", &test_image_cogwheel_rgb565a8, false, false); + img_create("XRGB8888", &test_image_cogwheel_xrgb8888, false, false); + img_create("ARGB8888", &test_image_cogwheel_argb8888, false, false); img_create("binI1", "A:src/test_files/binimages/cogwheel.I1.bin", false, false); img_create("binI2", "A:src/test_files/binimages/cogwheel.I2.bin", false, false); @@ -71,19 +71,19 @@ void test_image_built_in_decode(void) void test_image_built_in_decode_rotate(void) { - LV_IMG_DECLARE(test_img_cogwheel_i4); - LV_IMG_DECLARE(test_img_cogwheel_a8); - LV_IMG_DECLARE(test_img_cogwheel_rgb565); - LV_IMG_DECLARE(test_img_cogwheel_rgb565a8); - LV_IMG_DECLARE(test_img_cogwheel_xrgb8888); - LV_IMG_DECLARE(test_img_cogwheel_argb8888); + LV_IMAGE_DECLARE(test_image_cogwheel_i4); + LV_IMAGE_DECLARE(test_image_cogwheel_a8); + LV_IMAGE_DECLARE(test_image_cogwheel_rgb565); + LV_IMAGE_DECLARE(test_image_cogwheel_rgb565a8); + LV_IMAGE_DECLARE(test_image_cogwheel_xrgb8888); + LV_IMAGE_DECLARE(test_image_cogwheel_argb8888); - img_create("I4", &test_img_cogwheel_i4, true, false); - img_create("A8", &test_img_cogwheel_a8, true, false); - img_create("RGB565", &test_img_cogwheel_rgb565, true, false); - img_create("RGB565A8", &test_img_cogwheel_rgb565a8, true, false); - img_create("XRGB8888", &test_img_cogwheel_xrgb8888, true, false); - img_create("ARGB8888", &test_img_cogwheel_argb8888, true, false); + img_create("I4", &test_image_cogwheel_i4, true, false); + img_create("A8", &test_image_cogwheel_a8, true, false); + img_create("RGB565", &test_image_cogwheel_rgb565, true, false); + img_create("RGB565A8", &test_image_cogwheel_rgb565a8, true, false); + img_create("XRGB8888", &test_image_cogwheel_xrgb8888, true, false); + img_create("ARGB8888", &test_image_cogwheel_argb8888, true, false); /*Only A8 is read to ram thus can rotate for now*/ img_create("binA8", "A:src/test_files/binimages/cogwheel.A8.bin", true, false); @@ -93,19 +93,19 @@ void test_image_built_in_decode_rotate(void) void test_image_built_in_decode_recolor(void) { - LV_IMG_DECLARE(test_img_cogwheel_i4); - LV_IMG_DECLARE(test_img_cogwheel_a8); - LV_IMG_DECLARE(test_img_cogwheel_rgb565); - LV_IMG_DECLARE(test_img_cogwheel_rgb565a8); - LV_IMG_DECLARE(test_img_cogwheel_xrgb8888); - LV_IMG_DECLARE(test_img_cogwheel_argb8888); + LV_IMAGE_DECLARE(test_image_cogwheel_i4); + LV_IMAGE_DECLARE(test_image_cogwheel_a8); + LV_IMAGE_DECLARE(test_image_cogwheel_rgb565); + LV_IMAGE_DECLARE(test_image_cogwheel_rgb565a8); + LV_IMAGE_DECLARE(test_image_cogwheel_xrgb8888); + LV_IMAGE_DECLARE(test_image_cogwheel_argb8888); - img_create("I4", &test_img_cogwheel_i4, false, true); - img_create("A8", &test_img_cogwheel_a8, false, true); - img_create("RGB565", &test_img_cogwheel_rgb565, false, true); - img_create("RGB565A8", &test_img_cogwheel_rgb565a8, false, true); - img_create("XRGB8888", &test_img_cogwheel_xrgb8888, false, true); - img_create("ARGB8888", &test_img_cogwheel_argb8888, false, true); + img_create("I4", &test_image_cogwheel_i4, false, true); + img_create("A8", &test_image_cogwheel_a8, false, true); + img_create("RGB565", &test_image_cogwheel_rgb565, false, true); + img_create("RGB565A8", &test_image_cogwheel_rgb565a8, false, true); + img_create("XRGB8888", &test_image_cogwheel_xrgb8888, false, true); + img_create("ARGB8888", &test_image_cogwheel_argb8888, false, true); img_create("binI1", "A:src/test_files/binimages/cogwheel.I1.bin", false, true); img_create("binI2", "A:src/test_files/binimages/cogwheel.I2.bin", false, true); @@ -123,19 +123,19 @@ void test_image_built_in_decode_recolor(void) void test_image_built_in_decode_rotate_and_recolor(void) { - LV_IMG_DECLARE(test_img_cogwheel_i4); - LV_IMG_DECLARE(test_img_cogwheel_a8); - LV_IMG_DECLARE(test_img_cogwheel_rgb565); - LV_IMG_DECLARE(test_img_cogwheel_rgb565a8); - LV_IMG_DECLARE(test_img_cogwheel_xrgb8888); - LV_IMG_DECLARE(test_img_cogwheel_argb8888); + LV_IMAGE_DECLARE(test_image_cogwheel_i4); + LV_IMAGE_DECLARE(test_image_cogwheel_a8); + LV_IMAGE_DECLARE(test_image_cogwheel_rgb565); + LV_IMAGE_DECLARE(test_image_cogwheel_rgb565a8); + LV_IMAGE_DECLARE(test_image_cogwheel_xrgb8888); + LV_IMAGE_DECLARE(test_image_cogwheel_argb8888); - img_create("I4", &test_img_cogwheel_i4, true, true); - img_create("A8", &test_img_cogwheel_a8, true, true); - img_create("RGB565", &test_img_cogwheel_rgb565, true, true); - img_create("RGB565A8", &test_img_cogwheel_rgb565a8, true, true); - img_create("XRGB8888", &test_img_cogwheel_xrgb8888, true, true); - img_create("ARGB8888", &test_img_cogwheel_argb8888, true, true); + img_create("I4", &test_image_cogwheel_i4, true, true); + img_create("A8", &test_image_cogwheel_a8, true, true); + img_create("RGB565", &test_image_cogwheel_rgb565, true, true); + img_create("RGB565A8", &test_image_cogwheel_rgb565a8, true, true); + img_create("XRGB8888", &test_image_cogwheel_xrgb8888, true, true); + img_create("ARGB8888", &test_image_cogwheel_argb8888, true, true); /*Only A8 is read to ram thus can rotate for now*/ img_create("binA8", "A:src/test_files/binimages/cogwheel.A8.bin", true, true); diff --git a/tests/src/test_cases/test_list.c b/tests/src/test_cases/test_list.c index 628ce1770..8df356df1 100644 --- a/tests/src/test_cases/test_list.c +++ b/tests/src/test_cases/test_list.c @@ -18,25 +18,25 @@ void tearDown(void) void test_list_get_text_from_added_button(void) { const char * message = "LVGL Rocks!"; - lv_obj_t * button_ok = lv_list_add_btn(list, LV_SYMBOL_OK, message); + lv_obj_t * button_ok = lv_list_add_button(list, LV_SYMBOL_OK, message); - TEST_ASSERT_EQUAL_STRING(message, lv_list_get_btn_text(list, button_ok)); + TEST_ASSERT_EQUAL_STRING(message, lv_list_get_button_text(list, button_ok)); } void test_list_get_text_from_button_without_symbol(void) { const char * message = "LVGL Rocks!"; - lv_obj_t * button_ok = lv_list_add_btn(list, NULL, message); + lv_obj_t * button_ok = lv_list_add_button(list, NULL, message); - TEST_ASSERT_EQUAL_STRING(message, lv_list_get_btn_text(list, button_ok)); + TEST_ASSERT_EQUAL_STRING(message, lv_list_get_button_text(list, button_ok)); } void test_list_gets_empty_text_from_button_without_text(void) { const char * empty_text = ""; - lv_obj_t * button_ok = lv_list_add_btn(list, NULL, NULL); + lv_obj_t * button_ok = lv_list_add_button(list, NULL, NULL); - TEST_ASSERT_EQUAL_STRING(empty_text, lv_list_get_btn_text(list, button_ok)); + TEST_ASSERT_EQUAL_STRING(empty_text, lv_list_get_button_text(list, button_ok)); } void test_list_get_text_from_label(void) @@ -52,9 +52,9 @@ void test_list_snapshot(void) lv_obj_t * snapshot_list = lv_list_create(lv_scr_act()); lv_list_add_text(snapshot_list, "File"); - lv_list_add_btn(snapshot_list, LV_SYMBOL_FILE, "New"); - lv_list_add_btn(snapshot_list, LV_SYMBOL_DIRECTORY, "Open"); - lv_list_add_btn(snapshot_list, LV_SYMBOL_SAVE, "Save"); + lv_list_add_button(snapshot_list, LV_SYMBOL_FILE, "New"); + lv_list_add_button(snapshot_list, LV_SYMBOL_DIRECTORY, "Open"); + lv_list_add_button(snapshot_list, LV_SYMBOL_SAVE, "Save"); lv_obj_center(snapshot_list); diff --git a/tests/src/test_cases/test_msgbox.c b/tests/src/test_cases/test_msgbox.c index 21a5a8d86..536b1642b 100644 --- a/tests/src/test_cases/test_msgbox.c +++ b/tests/src/test_cases/test_msgbox.c @@ -9,16 +9,16 @@ void setUp(void); /* This function runs after every test */ void tearDown(void); -void test_msgbox_creation_successfull_with_close_btn(void); -void test_msgbox_creation_successfull_no_close_btn(void); +void test_msgbox_creation_successfull_with_close_button(void); +void test_msgbox_creation_successfull_no_close_button(void); void test_msgbox_creation_successfull_modal(void); void test_msgbox_get_title(void); -void test_msgbox_get_close_btn(void); +void test_msgbox_get_close_button(void); void test_msgbox_get_text(void); void test_msgbox_get_content(void); -void test_msgbox_get_btns(void); -void test_msgbox_get_active_btn(void); -void test_msgbox_get_active_btn_text(void); +void test_msgbox_get_buttons(void); +void test_msgbox_get_active_button(void); +void test_msgbox_get_active_button_text(void); void test_msgbox_close(void); void test_msgbox_close_modal(void); void test_msgbox_close_async(void); @@ -27,7 +27,7 @@ void test_msgbox_close_click_event(void); static lv_obj_t * active_screen = NULL; static lv_obj_t * msgbox = NULL; -static const char * btns_txts[] = {"Apply", "Cancel", NULL}; +static const char * buttons_txts[] = {"Apply", "Cancel", NULL}; void setUp(void) { @@ -39,22 +39,22 @@ void tearDown(void) lv_obj_clean(active_screen); } -void test_msgbox_creation_successfull_with_close_btn(void) +void test_msgbox_creation_successfull_with_close_button(void) { bool add_close_btn = true; - msgbox = lv_msgbox_create(active_screen, "The title", "The text", btns_txts, add_close_btn); + msgbox = lv_msgbox_create(active_screen, "The title", "The text", buttons_txts, add_close_btn); TEST_ASSERT_NOT_NULL(msgbox); TEST_ASSERT_EQUAL_SCREENSHOT("msgbox_ok_with_close_btn.png"); } -void test_msgbox_creation_successfull_no_close_btn(void) +void test_msgbox_creation_successfull_no_close_button(void) { bool add_close_btn = false; - msgbox = lv_msgbox_create(active_screen, "The title", "The text", btns_txts, add_close_btn); + msgbox = lv_msgbox_create(active_screen, "The title", "The text", buttons_txts, add_close_btn); TEST_ASSERT_NOT_NULL(msgbox); @@ -64,7 +64,7 @@ void test_msgbox_creation_successfull_no_close_btn(void) void test_msgbox_creation_successfull_modal(void) { // If parent is NULL the message box will be modal - msgbox = lv_msgbox_create(NULL, "The title", "The text", btns_txts, true); + msgbox = lv_msgbox_create(NULL, "The title", "The text", buttons_txts, true); TEST_ASSERT_NOT_NULL(msgbox); @@ -77,7 +77,7 @@ void test_msgbox_get_title(void) const char * txt_title = "The title"; lv_obj_t * lbl_title = NULL; - msgbox = lv_msgbox_create(active_screen, txt_title, "The text", btns_txts, true); + msgbox = lv_msgbox_create(active_screen, txt_title, "The text", buttons_txts, true); // Msgbox title is a lv_label widget lbl_title = lv_msgbox_get_title(msgbox); @@ -85,14 +85,14 @@ void test_msgbox_get_title(void) TEST_ASSERT_EQUAL_STRING(txt_title, lv_label_get_text(lbl_title)); } -void test_msgbox_get_close_btn(void) +void test_msgbox_get_close_button(void) { lv_obj_t * close_btn = NULL; - msgbox = lv_msgbox_create(active_screen, "The title", "The text", btns_txts, true); + msgbox = lv_msgbox_create(active_screen, "The title", "The text", buttons_txts, true); // Msgbox close button is a lv_btn widget - close_btn = lv_msgbox_get_close_btn(msgbox); + close_btn = lv_msgbox_get_close_button(msgbox); TEST_ASSERT_NOT_NULL(close_btn); } @@ -102,7 +102,7 @@ void test_msgbox_get_text(void) const char * txt_text = "The text"; lv_obj_t * lbl_text = NULL; - msgbox = lv_msgbox_create(active_screen, "The title", txt_text, btns_txts, true); + msgbox = lv_msgbox_create(active_screen, "The title", txt_text, buttons_txts, true); // Msgbox text is a lv_label widget lbl_text = lv_msgbox_get_text(msgbox); @@ -112,44 +112,44 @@ void test_msgbox_get_text(void) void test_msgbox_get_content(void) { - msgbox = lv_msgbox_create(active_screen, "The title", "The text", btns_txts, true); + msgbox = lv_msgbox_create(active_screen, "The title", "The text", buttons_txts, true); TEST_ASSERT_NOT_NULL(lv_msgbox_get_content(msgbox)); } -void test_msgbox_get_btns(void) +void test_msgbox_get_buttons(void) { lv_obj_t * btnmatrix = NULL; - msgbox = lv_msgbox_create(active_screen, "The title", "The text", btns_txts, true); + msgbox = lv_msgbox_create(active_screen, "The title", "The text", buttons_txts, true); // Msgbox buttons is a lv_btnmatrix widget - btnmatrix = lv_msgbox_get_btns(msgbox); + btnmatrix = lv_msgbox_get_buttons(msgbox); for(int i = 0; i < 2; i++) { - TEST_ASSERT_EQUAL_STRING(btns_txts[i], lv_btnmatrix_get_btn_text(btnmatrix, i)); + TEST_ASSERT_EQUAL_STRING(buttons_txts[i], lv_buttonmatrix_get_button_text(btnmatrix, i)); } } -void test_msgbox_get_active_btn(void) +void test_msgbox_get_active_button(void) { - msgbox = lv_msgbox_create(active_screen, "The title", "The text", btns_txts, true); + msgbox = lv_msgbox_create(active_screen, "The title", "The text", buttons_txts, true); - // index of active button is LV_BTNMATRIX_BTN_NONE if unset (no button clicked) - TEST_ASSERT_EQUAL(LV_BTNMATRIX_BTN_NONE, lv_msgbox_get_active_btn(msgbox)); + // index of active button is LV_BUTTONMATRIX_BUTTON_NONE if unset (no button clicked) + TEST_ASSERT_EQUAL(LV_BUTTONMATRIX_BUTTON_NONE, lv_msgbox_get_active_button(msgbox)); } -void test_msgbox_get_active_btn_text(void) +void test_msgbox_get_active_button_text(void) { - msgbox = lv_msgbox_create(active_screen, "The title", "The text", btns_txts, true); + msgbox = lv_msgbox_create(active_screen, "The title", "The text", buttons_txts, true); // active button unset (no button clicked) -> active button text NULL - TEST_ASSERT_NULL(lv_msgbox_get_active_btn_text(msgbox)); + TEST_ASSERT_NULL(lv_msgbox_get_active_button_text(msgbox)); } void test_msgbox_close(void) { - msgbox = lv_msgbox_create(active_screen, "The title", "The text", btns_txts, true); + msgbox = lv_msgbox_create(active_screen, "The title", "The text", buttons_txts, true); lv_msgbox_close(msgbox); @@ -159,7 +159,7 @@ void test_msgbox_close(void) void test_msgbox_close_modal(void) { - msgbox = lv_msgbox_create(NULL, "The title", "The text", btns_txts, true); + msgbox = lv_msgbox_create(NULL, "The title", "The text", buttons_txts, true); lv_msgbox_close(msgbox); @@ -169,7 +169,7 @@ void test_msgbox_close_modal(void) void test_msgbox_close_async(void) { - msgbox = lv_msgbox_create(active_screen, "The title", "The text", btns_txts, true); + msgbox = lv_msgbox_create(active_screen, "The title", "The text", buttons_txts, true); lv_msgbox_close_async(msgbox); @@ -179,7 +179,7 @@ void test_msgbox_close_async(void) void test_msgbox_close_async_modal(void) { - msgbox = lv_msgbox_create(NULL, "The title", "The text", btns_txts, true); + msgbox = lv_msgbox_create(NULL, "The title", "The text", buttons_txts, true); lv_msgbox_close_async(msgbox); @@ -191,10 +191,10 @@ void test_msgbox_close_click_event(void) { lv_obj_t * close_btn = NULL; - msgbox = lv_msgbox_create(active_screen, "The title", "The text", btns_txts, true); + msgbox = lv_msgbox_create(active_screen, "The title", "The text", buttons_txts, true); // Msgbox close button is a lv_btn widget - close_btn = lv_msgbox_get_close_btn(msgbox); + close_btn = lv_msgbox_get_close_button(msgbox); lv_obj_send_event(close_btn, LV_EVENT_CLICKED, NULL); } diff --git a/tests/src/test_cases/test_obj_flags.c b/tests/src/test_cases/test_obj_flags.c index a8f66689f..4552ed6bc 100644 --- a/tests/src/test_cases/test_obj_flags.c +++ b/tests/src/test_cases/test_obj_flags.c @@ -40,7 +40,7 @@ void test_obj_flag_overflow_visible_1(void) lv_obj_set_style_bg_color(obj_child_1, lv_palette_main(LV_PALETTE_PURPLE), 0); lv_obj_align(obj_child_1, LV_ALIGN_LEFT_MID, -100, 0); - lv_obj_t * btn_1 = lv_btn_create(obj_child_1); + lv_obj_t * btn_1 = lv_button_create(obj_child_1); lv_obj_set_size(btn_1, 100, 100); lv_obj_align(btn_1, LV_ALIGN_LEFT_MID, -75, 0); lv_obj_clear_flag(btn_1, LV_OBJ_FLAG_SCROLL_ON_FOCUS); @@ -58,7 +58,7 @@ void test_obj_flag_overflow_visible_1(void) lv_obj_align(obj_child_2, LV_ALIGN_RIGHT_MID, 100, 0); lv_obj_add_event(obj_child_2, ext_draw_size_event_cb, LV_EVENT_REFR_EXT_DRAW_SIZE, NULL); - lv_obj_t * btn_2 = lv_btn_create(obj_child_2); + lv_obj_t * btn_2 = lv_button_create(obj_child_2); lv_obj_set_size(btn_2, 100, 100); lv_obj_align(btn_2, LV_ALIGN_RIGHT_MID, 75, 0); lv_obj_clear_flag(btn_2, LV_OBJ_FLAG_SCROLL_ON_FOCUS); diff --git a/tests/src/test_cases/test_snapshot.c b/tests/src/test_cases/test_snapshot.c index b29e20633..75e3174be 100644 --- a/tests/src/test_cases/test_snapshot.c +++ b/tests/src/test_cases/test_snapshot.c @@ -15,7 +15,7 @@ void test_snapshot_should_not_leak_memory(void) uint32_t final_available_memory = 0; lv_mem_monitor_t monitor; - lv_img_dsc_t * snapshots[NUM_SNAPSHOTS] = {NULL}; + lv_image_dsc_t * snapshots[NUM_SNAPSHOTS] = {NULL}; lv_mem_monitor(&monitor); initial_available_memory = monitor.free_size; diff --git a/tests/src/test_cases/test_tabview.c b/tests/src/test_cases/test_tabview.c index 51b7cafd8..c8a4c75dd 100644 --- a/tests/src/test_cases/test_tabview.c +++ b/tests/src/test_cases/test_tabview.c @@ -18,7 +18,7 @@ void test_tabview_add_several_tabs_no_scroll(void); void test_tabview_rename_tab(void); void test_tabview_add_several_tabs_hor(void); void test_tabview_get_content(void); -void test_tabview_get_tab_btns(void); +void test_tabview_get_tab_buttons(void); void test_tabview_set_act_non_existent(void); void test_tabview_tab2_selected_event(void); void test_tabview_update_on_external_scroll(void); @@ -193,13 +193,13 @@ void test_tabview_get_content(void) TEST_ASSERT_NOT_NULL(content); } -void test_tabview_get_tab_btns(void) +void test_tabview_get_tab_buttons(void) { tabview = lv_tabview_create(active_screen, LV_DIR_TOP, 50); - lv_obj_t * btns = lv_tabview_get_tab_btns(tabview); + lv_obj_t * buttons = lv_tabview_get_tab_buttons(tabview); - TEST_ASSERT_NOT_NULL(btns); + TEST_ASSERT_NOT_NULL(buttons); } void test_tabview_set_act_non_existent(void) diff --git a/tests/src/test_cases/test_win.c b/tests/src/test_cases/test_win.c index 8a6d4fff6..604560d6d 100644 --- a/tests/src/test_cases/test_win.c +++ b/tests/src/test_cases/test_win.c @@ -84,9 +84,9 @@ void test_win_add_title_multiple(void) TEST_ASSERT_EQUAL(2, lv_obj_get_child_cnt(header)); } -void test_win_add_btn(void) +void test_win_add_button(void) { - int win_btn_width = 50; + int win_button_width = 50; // Create the win object, get the header and update layout win = lv_win_create(active_screen); @@ -94,7 +94,7 @@ void test_win_add_btn(void) lv_obj_update_layout(win); // Add a button to the window header - lv_win_add_btn(win, LV_SYMBOL_OK, win_btn_width); + lv_win_add_button(win, LV_SYMBOL_OK, win_button_width); lv_obj_update_layout(win); // Check that no additional children have been created under win @@ -105,7 +105,7 @@ void test_win_add_btn(void) // Check that the button has been created properly lv_obj_t * btn = lv_obj_get_child(header, 0); TEST_ASSERT_EQUAL(1, lv_obj_get_child_cnt(btn)); - TEST_ASSERT_EQUAL(win_btn_width, lv_obj_get_width(btn)); + TEST_ASSERT_EQUAL(win_button_width, lv_obj_get_width(btn)); // Check the output remains visually consistent TEST_ASSERT_EQUAL_SCREENSHOT("win_01.png"); @@ -116,15 +116,15 @@ void test_win_add_multiple_elements(void) lv_obj_t * btn; lv_obj_t * title; - int win_btn_width = 50; - int win_btn_close_width = 60; + int win_button_width = 50; + int win_button_close_width = 60; // Create the win object, get the header and update layout win = lv_win_create(active_screen); - lv_win_add_btn(win, LV_SYMBOL_LEFT, win_btn_width); + lv_win_add_button(win, LV_SYMBOL_LEFT, win_button_width); lv_win_add_title(win, dummy_text); - lv_win_add_btn(win, LV_SYMBOL_RIGHT, win_btn_width); - lv_win_add_btn(win, LV_SYMBOL_CLOSE, win_btn_close_width); + lv_win_add_button(win, LV_SYMBOL_RIGHT, win_button_width); + lv_win_add_button(win, LV_SYMBOL_CLOSE, win_button_close_width); header = lv_win_get_header(win); lv_obj_update_layout(win); @@ -137,7 +137,7 @@ void test_win_add_multiple_elements(void) // Check that the left button has been created properly btn = lv_obj_get_child(header, 0); TEST_ASSERT_EQUAL(1, lv_obj_get_child_cnt(btn)); - TEST_ASSERT_EQUAL(win_btn_width, lv_obj_get_width(btn)); + TEST_ASSERT_EQUAL(win_button_width, lv_obj_get_width(btn)); // Check that the title is a label and has been created properly title = lv_obj_get_child(header, 1); @@ -147,12 +147,12 @@ void test_win_add_multiple_elements(void) // Check that the right button has been created properly btn = lv_obj_get_child(header, 2); TEST_ASSERT_EQUAL(1, lv_obj_get_child_cnt(btn)); - TEST_ASSERT_EQUAL(win_btn_width, lv_obj_get_width(btn)); + TEST_ASSERT_EQUAL(win_button_width, lv_obj_get_width(btn)); // Check that the close button has been created properly btn = lv_obj_get_child(header, 3); TEST_ASSERT_EQUAL(1, lv_obj_get_child_cnt(btn)); - TEST_ASSERT_EQUAL(win_btn_close_width, lv_obj_get_width(btn)); + TEST_ASSERT_EQUAL(win_button_close_width, lv_obj_get_width(btn)); // Check the output remains visually consistent TEST_ASSERT_EQUAL_SCREENSHOT("win_02.png"); diff --git a/tests/unity/unity_support.c b/tests/unity/unity_support.c index 6146fa35a..9500f3399 100644 --- a/tests/unity/unity_support.c +++ b/tests/unity/unity_support.c @@ -42,14 +42,14 @@ typedef struct { png_infop info_ptr; int number_of_passes; png_bytep * row_pointers; -} png_img_t; +} png_image_t; /********************** * STATIC PROTOTYPES **********************/ -static int read_png_file(png_img_t * p, const char * file_name); +static int read_png_file(png_image_t * p, const char * file_name); static int write_png_file(void * raw_img, uint32_t width, uint32_t height, char * file_name); -static void png_release(png_img_t * p); +static void png_release(png_image_t * p); /********************** * STATIC VARIABLES @@ -63,7 +63,7 @@ static void png_release(png_img_t * p); * GLOBAL FUNCTIONS **********************/ -bool lv_test_assert_img_eq(const char * fn_ref) +bool lv_test_assert_image_eq(const char * fn_ref) { char fn_ref_full[512]; sprintf(fn_ref_full, "%s%s", REF_IMGS_PATH, fn_ref); @@ -75,7 +75,7 @@ bool lv_test_assert_img_eq(const char * fn_ref) extern uint8_t * last_flushed_buf; uint8_t * screen_buf = last_flushed_buf; - png_img_t p; + png_image_t p; int res = read_png_file(&p, fn_ref_full); if(res == ERR_FILE_NOT_FOUND) { TEST_PRINTF("%s%s", fn_ref_full, " was not found, creating is now from the rendered screen"); @@ -138,7 +138,7 @@ bool lv_test_assert_img_eq(const char * fn_ref) * STATIC FUNCTIONS **********************/ -static int read_png_file(png_img_t * p, const char * file_name) +static int read_png_file(png_image_t * p, const char * file_name) { char header[8]; // 8 is the maximum size that can be checked @@ -290,7 +290,7 @@ static int write_png_file(void * raw_img, uint32_t width, uint32_t height, char } -static void png_release(png_img_t * p) +static void png_release(png_image_t * p) { int y; for(y = 0; y < p->height; y++) free(p->row_pointers[y]); diff --git a/tests/unity/unity_support.h b/tests/unity/unity_support.h index 53c43dabf..b8a871d8c 100644 --- a/tests/unity/unity_support.h +++ b/tests/unity/unity_support.h @@ -9,7 +9,7 @@ extern "C" { #include #include "../../lvgl.h" -bool lv_test_assert_img_eq(const char * fn_ref); +bool lv_test_assert_image_eq(const char * fn_ref); #if LV_COLOR_DEPTH != 32 @@ -20,14 +20,14 @@ bool lv_test_assert_img_eq(const char * fn_ref); # define TEST_ASSERT_EQUAL_SCREENSHOT(path) if(LV_HOR_RES != 800 || LV_VER_RES != 480) { \ TEST_IGNORE_MESSAGE("Requires 800x480 resolution"); \ } else { \ - TEST_ASSERT_MESSAGE(lv_test_assert_img_eq(path), path); \ + TEST_ASSERT_MESSAGE(lv_test_assert_image_eq(path), path); \ } # define TEST_ASSERT_EQUAL_SCREENSHOT_MESSAGE(path, msg) if(LV_HOR_RES != 800 || LV_VER_RES != 480) { \ TEST_PRINTF(msg); \ TEST_IGNORE_MESSAGE("Requires 800x480 resolution"); \ } else { \ - TEST_ASSERT_MESSAGE(lv_test_assert_img_eq(path), msg); \ + TEST_ASSERT_MESSAGE(lv_test_assert_image_eq(path), msg); \ } #endif