From a6ee4a680c437e97c7c59e6977bde9f4a83432fa Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 7 Jul 2018 12:21:36 +0200 Subject: [PATCH] move lv_fonts from lv_misc next to lv_misc --- lv_core/lv_group.h | 2 +- lv_core/lv_obj.h | 2 +- lv_core/lv_vdb.h | 2 +- lv_draw/lv_draw.h | 2 +- lv_draw/lv_draw_arc.c | 6 +----- lv_draw/lv_draw_rbasic.h | 2 +- lv_draw/lv_draw_vbasic.h | 2 +- {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_10.c | 2 +- .../lv_font_dejavu_10_cyrillic.c | 2 +- .../lv_font_dejavu_10_latin_sup.c | 2 +- {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_20.c | 2 +- .../lv_font_dejavu_20_cyrillic.c | 2 +- .../lv_font_dejavu_20_latin_sup.c | 2 +- {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_30.c | 2 +- .../lv_font_dejavu_30_cyrillic.c | 2 +- .../lv_font_dejavu_30_latin_sup.c | 2 +- {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_40.c | 2 +- .../lv_font_dejavu_40_cyrillic.c | 2 +- .../lv_font_dejavu_40_latin_sup.c | 2 +- {lv_misc/lv_fonts => lv_fonts}/lv_font_symbol_10.c | 2 +- {lv_misc/lv_fonts => lv_fonts}/lv_font_symbol_20.c | 2 +- {lv_misc/lv_fonts => lv_fonts}/lv_font_symbol_30.c | 2 +- {lv_misc/lv_fonts => lv_fonts}/lv_font_symbol_40.c | 2 +- {lv_misc/lv_fonts => lv_fonts}/lv_fonts.mk | 6 +++--- lv_hal/lv_hal_tick.c | 2 +- lv_misc/lv_anim.h | 2 +- lv_misc/lv_color.h | 2 +- lv_misc/lv_font.h | 12 ++++++++++-- lv_misc/lv_log.c | 2 +- lv_misc/lv_mem.h | 2 +- lv_misc/lv_misc.mk | 1 + lv_misc/{lv_fonts => }/lv_symbol_def.h | 7 +++++-- lv_misc/lv_task.h | 2 +- lv_misc/lv_txt.h | 2 +- lv_misc/lv_ufs.h | 2 +- lv_objx/lv_bar.h | 2 +- lv_objx/lv_btn.h | 2 +- lv_objx/lv_btnm.h | 2 +- lv_objx/lv_cb.h | 2 +- lv_objx/lv_chart.h | 2 +- lv_objx/lv_cont.h | 2 +- lv_objx/lv_ddlist.c | 2 +- lv_objx/lv_ddlist.h | 2 +- lv_objx/lv_gauge.h | 2 +- lv_objx/lv_img.h | 4 ++-- lv_objx/lv_kb.h | 2 +- lv_objx/lv_label.h | 4 ++-- lv_objx/lv_led.h | 2 +- lv_objx/lv_line.h | 2 +- lv_objx/lv_list.h | 2 +- lv_objx/lv_lmeter.h | 2 +- lv_objx/lv_mbox.h | 2 +- lv_objx/lv_objx.mk | 2 +- lv_objx/lv_objx_templ.h | 2 +- lv_objx/lv_page.h | 2 +- lv_objx/lv_roller.h | 2 +- lv_objx/lv_slider.h | 2 +- lv_objx/lv_sw.h | 2 +- lv_objx/lv_ta.h | 2 +- lv_objx/lv_tabview.h | 2 +- lv_objx/lv_win.h | 2 +- lv_themes/lv_theme.h | 2 +- lv_themes/lv_theme_alien.h | 2 +- lv_themes/lv_theme_default.h | 2 +- lv_themes/lv_theme_material.h | 2 +- lv_themes/lv_theme_mono.h | 2 +- lv_themes/lv_theme_night.h | 2 +- lv_themes/lv_theme_templ.h | 2 +- lv_themes/lv_theme_zen.h | 2 +- 69 files changed, 86 insertions(+), 78 deletions(-) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_10.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_10_cyrillic.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_10_latin_sup.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_20.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_20_cyrillic.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_20_latin_sup.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_30.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_30_cyrillic.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_30_latin_sup.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_40.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_40_cyrillic.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_dejavu_40_latin_sup.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_symbol_10.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_symbol_20.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_symbol_30.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_font_symbol_40.c (99%) rename {lv_misc/lv_fonts => lv_fonts}/lv_fonts.mk (81%) rename lv_misc/{lv_fonts => }/lv_symbol_def.h (98%) diff --git a/lv_core/lv_group.h b/lv_core/lv_group.h index a28ab0ea7..fbe3e9556 100644 --- a/lv_core/lv_group.h +++ b/lv_core/lv_group.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index 98c9625eb..8616c8415 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_core/lv_vdb.h b/lv_core/lv_vdb.h index 9aa0087d3..5ca1ccf12 100644 --- a/lv_core/lv_vdb.h +++ b/lv_core/lv_vdb.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_draw/lv_draw.h b/lv_draw/lv_draw.h index 593e3e72a..7056b0256 100644 --- a/lv_draw/lv_draw.h +++ b/lv_draw/lv_draw.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_draw/lv_draw_arc.c b/lv_draw/lv_draw_arc.c index 63bb17fa0..7cb47d135 100644 --- a/lv_draw/lv_draw_arc.c +++ b/lv_draw/lv_draw_arc.c @@ -70,15 +70,11 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, cons if(start_angle <= end_angle) deg_test = deg_test_norm; else deg_test = deg_test_inv; - // Good, may not be the fastest - // Does not draw overlapping pixels if(deg_test(270, start_angle, end_angle)) hor_line(center_x - r_out + 1, center_y, mask, thickness - 1, color, opa); // Left Middle if(deg_test(90, start_angle, end_angle)) hor_line(center_x + r_in, center_y, mask, thickness - 1, color, opa); // Right Middle if(deg_test(180, start_angle, end_angle)) ver_line(center_x, center_y - r_out + 1, mask, thickness - 1, color, opa); // Top Middle if(deg_test(0, start_angle, end_angle)) ver_line(center_x, center_y + r_in, mask, thickness - 1, color, opa); // Bottom middle - - lv_point_t last_corner_out = { -r_out, -r_out}; uint32_t r_out_sqr = r_out * r_out; uint32_t r_in_sqr = r_in * r_in; int16_t xi; @@ -153,7 +149,7 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, cons #if LV_ANTIALIAS - + /*TODO*/ #endif diff --git a/lv_draw/lv_draw_rbasic.h b/lv_draw/lv_draw_rbasic.h index 7c43b9169..b1d62f3fb 100644 --- a/lv_draw/lv_draw_rbasic.h +++ b/lv_draw/lv_draw_rbasic.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_draw/lv_draw_vbasic.h b/lv_draw/lv_draw_vbasic.h index b55237997..b619d928b 100644 --- a/lv_draw/lv_draw_vbasic.h +++ b/lv_draw/lv_draw_vbasic.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_misc/lv_fonts/lv_font_dejavu_10.c b/lv_fonts/lv_font_dejavu_10.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_10.c rename to lv_fonts/lv_font_dejavu_10.c index d67400e6b..958581780 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_10.c +++ b/lv_fonts/lv_font_dejavu_10.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_10 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_10_cyrillic.c b/lv_fonts/lv_font_dejavu_10_cyrillic.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_10_cyrillic.c rename to lv_fonts/lv_font_dejavu_10_cyrillic.c index 2e76258f7..711408d0d 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_10_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_10_cyrillic.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_10_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_10_latin_sup.c b/lv_fonts/lv_font_dejavu_10_latin_sup.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_10_latin_sup.c rename to lv_fonts/lv_font_dejavu_10_latin_sup.c index e57a147e3..563171091 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_10_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_10_latin_sup.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_10_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_20.c b/lv_fonts/lv_font_dejavu_20.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_20.c rename to lv_fonts/lv_font_dejavu_20.c index 8c4028d26..63e098d95 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_20.c +++ b/lv_fonts/lv_font_dejavu_20.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_20 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_20_cyrillic.c b/lv_fonts/lv_font_dejavu_20_cyrillic.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_20_cyrillic.c rename to lv_fonts/lv_font_dejavu_20_cyrillic.c index 0006e30e7..106c87a22 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_20_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_20_cyrillic.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_20_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_20_latin_sup.c b/lv_fonts/lv_font_dejavu_20_latin_sup.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_20_latin_sup.c rename to lv_fonts/lv_font_dejavu_20_latin_sup.c index 733fadb75..0d62c8b38 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_20_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_20_latin_sup.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_20_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_30.c b/lv_fonts/lv_font_dejavu_30.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_30.c rename to lv_fonts/lv_font_dejavu_30.c index 310110a9f..346d34774 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_30.c +++ b/lv_fonts/lv_font_dejavu_30.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_30 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_30_cyrillic.c b/lv_fonts/lv_font_dejavu_30_cyrillic.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_30_cyrillic.c rename to lv_fonts/lv_font_dejavu_30_cyrillic.c index 616ac9d84..a9e3c8f59 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_30_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_30_cyrillic.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_30_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_30_latin_sup.c b/lv_fonts/lv_font_dejavu_30_latin_sup.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_30_latin_sup.c rename to lv_fonts/lv_font_dejavu_30_latin_sup.c index 2e754bcbd..4ec5b3236 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_30_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_30_latin_sup.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_30_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_40.c b/lv_fonts/lv_font_dejavu_40.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_40.c rename to lv_fonts/lv_font_dejavu_40.c index 4c9ce1cb2..53fc8b845 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_40.c +++ b/lv_fonts/lv_font_dejavu_40.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_40 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_40_cyrillic.c b/lv_fonts/lv_font_dejavu_40_cyrillic.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_40_cyrillic.c rename to lv_fonts/lv_font_dejavu_40_cyrillic.c index 1b8b39bf0..0a174300d 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_40_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_40_cyrillic.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_40_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_40_latin_sup.c b/lv_fonts/lv_font_dejavu_40_latin_sup.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_40_latin_sup.c rename to lv_fonts/lv_font_dejavu_40_latin_sup.c index 3b0332c8a..bea148ff1 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_40_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_40_latin_sup.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_40_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_symbol_10.c b/lv_fonts/lv_font_symbol_10.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_symbol_10.c rename to lv_fonts/lv_font_symbol_10.c index 074a95328..959a24792 100644 --- a/lv_misc/lv_fonts/lv_font_symbol_10.c +++ b/lv_fonts/lv_font_symbol_10.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_SYMBOL_10 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_symbol_20.c b/lv_fonts/lv_font_symbol_20.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_symbol_20.c rename to lv_fonts/lv_font_symbol_20.c index 700d90815..f4db8d5a2 100644 --- a/lv_misc/lv_fonts/lv_font_symbol_20.c +++ b/lv_fonts/lv_font_symbol_20.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_SYMBOL_20 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_symbol_30.c b/lv_fonts/lv_font_symbol_30.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_symbol_30.c rename to lv_fonts/lv_font_symbol_30.c index 7ba222f64..ae110cc1d 100644 --- a/lv_misc/lv_fonts/lv_font_symbol_30.c +++ b/lv_fonts/lv_font_symbol_30.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_SYMBOL_30 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_symbol_40.c b/lv_fonts/lv_font_symbol_40.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_symbol_40.c rename to lv_fonts/lv_font_symbol_40.c index f79767229..f7400a224 100644 --- a/lv_misc/lv_fonts/lv_font_symbol_40.c +++ b/lv_fonts/lv_font_symbol_40.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_SYMBOL_40 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_fonts.mk b/lv_fonts/lv_fonts.mk similarity index 81% rename from lv_misc/lv_fonts/lv_fonts.mk rename to lv_fonts/lv_fonts.mk index 936301ab8..ba59d0f27 100644 --- a/lv_misc/lv_fonts/lv_fonts.mk +++ b/lv_fonts/lv_fonts.mk @@ -15,7 +15,7 @@ CSRCS += lv_font_symbol_20.c CSRCS += lv_font_symbol_30.c CSRCS += lv_font_symbol_40.c -DEPPATH += --dep-path lvgl/lv_misc/lv_fonts -VPATH += :lvgl/lv_misc/lv_fonts +DEPPATH += --dep-path lvgl/lv_fonts +VPATH += :lvgl/lv_fonts -CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_misc/lv_fonts" +CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_fonts" diff --git a/lv_hal/lv_hal_tick.c b/lv_hal/lv_hal_tick.c index c582e1bc2..f02e5d6bb 100644 --- a/lv_hal/lv_hal_tick.c +++ b/lv_hal/lv_hal_tick.c @@ -6,7 +6,7 @@ /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_misc/lv_anim.h b/lv_misc/lv_anim.h index 36c304234..9c98402b8 100644 --- a/lv_misc/lv_anim.h +++ b/lv_misc/lv_anim.h @@ -14,7 +14,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_misc/lv_color.h b/lv_misc/lv_color.h index fb71c0335..a2611c595 100644 --- a/lv_misc/lv_color.h +++ b/lv_misc/lv_color.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_misc/lv_font.h b/lv_misc/lv_font.h index 664369538..a7db603e0 100644 --- a/lv_misc/lv_font.h +++ b/lv_misc/lv_font.h @@ -14,7 +14,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" @@ -24,7 +24,7 @@ extern "C" { #include #include -#include "lv_fonts/lv_symbol_def.h" +#include "../lv_misc/lv_symbol_def.h" /********************* * DEFINES @@ -102,6 +102,14 @@ const uint8_t * lv_font_get_bitmap(const lv_font_t * font_p, uint32_t letter); uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter); +/** + * Get the width of the letter without overwriting it with the `monospace` attribute + * @param font_p pointer to a font + * @param letter an UNICODE character code + * @return the width of a letter + */ +uint8_t lv_font_get_real_width(const lv_font_t * font_p, uint32_t letter); + /** * Get the height of a font * @param font_p pointer to a font diff --git a/lv_misc/lv_log.c b/lv_misc/lv_log.c index a796af47a..b920cb57c 100644 --- a/lv_misc/lv_log.c +++ b/lv_misc/lv_log.c @@ -10,7 +10,7 @@ #if USE_LV_LOG #if LV_LOG_PRINTF -#include +#include #endif /********************* * DEFINES diff --git a/lv_misc/lv_mem.h b/lv_misc/lv_mem.h index bdde8d4bc..ae224cfbd 100644 --- a/lv_misc/lv_mem.h +++ b/lv_misc/lv_mem.h @@ -14,7 +14,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_misc/lv_misc.mk b/lv_misc/lv_misc.mk index fc07f49af..e6034070c 100644 --- a/lv_misc/lv_misc.mk +++ b/lv_misc/lv_misc.mk @@ -10,6 +10,7 @@ CSRCS += lv_color.c CSRCS += lv_txt.c CSRCS += lv_ufs.c CSRCS += lv_math.c +CSRCS += lv_log.c DEPPATH += --dep-path lvgl/lv_misc VPATH += :lvgl/lv_misc diff --git a/lv_misc/lv_fonts/lv_symbol_def.h b/lv_misc/lv_symbol_def.h similarity index 98% rename from lv_misc/lv_fonts/lv_symbol_def.h rename to lv_misc/lv_symbol_def.h index 925b9886d..9d46d7792 100644 --- a/lv_misc/lv_fonts/lv_symbol_def.h +++ b/lv_misc/lv_symbol_def.h @@ -4,8 +4,11 @@ #ifdef __cplusplus extern "C" { #endif - -#include "../../../lv_conf.h" +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../lv_conf.h" +#endif /* * With no UTF-8 support (192-255) diff --git a/lv_misc/lv_task.h b/lv_misc/lv_task.h index aa8cb8205..d4106c0d0 100644 --- a/lv_misc/lv_task.h +++ b/lv_misc/lv_task.h @@ -14,7 +14,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_misc/lv_txt.h b/lv_misc/lv_txt.h index 852c5cdcb..56664ecbe 100644 --- a/lv_misc/lv_txt.h +++ b/lv_misc/lv_txt.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_misc/lv_ufs.h b/lv_misc/lv_ufs.h index b3a83fff8..3ee1fa3fc 100644 --- a/lv_misc/lv_ufs.h +++ b/lv_misc/lv_ufs.h @@ -15,7 +15,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_bar.h b/lv_objx/lv_bar.h index e3c76beb4..1a9ef5c2f 100644 --- a/lv_objx/lv_bar.h +++ b/lv_objx/lv_bar.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_btn.h b/lv_objx/lv_btn.h index 206e11110..6ab035020 100644 --- a/lv_objx/lv_btn.h +++ b/lv_objx/lv_btn.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index 735496142..03e62ade6 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -14,7 +14,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_cb.h b/lv_objx/lv_cb.h index 1f522000b..f80b300d3 100644 --- a/lv_objx/lv_cb.h +++ b/lv_objx/lv_cb.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_chart.h b/lv_objx/lv_chart.h index 09b68f542..84a393142 100644 --- a/lv_objx/lv_chart.h +++ b/lv_objx/lv_chart.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_cont.h b/lv_objx/lv_cont.h index 3be3eb4f1..335b8c282 100644 --- a/lv_objx/lv_cont.h +++ b/lv_objx/lv_cont.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index a05ef924d..bf2a198cb 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -14,7 +14,7 @@ #include "../lv_core/lv_group.h" #include "../lv_core/lv_indev.h" #include "../lv_themes/lv_theme.h" -#include "../lv_misc/lv_fonts/lv_symbol_def.h" +#include "../lv_misc/lv_symbol_def.h" #include "../lv_misc/lv_anim.h" /********************* diff --git a/lv_objx/lv_ddlist.h b/lv_objx/lv_ddlist.h index 722100d02..e6f27b194 100644 --- a/lv_objx/lv_ddlist.h +++ b/lv_objx/lv_ddlist.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_gauge.h b/lv_objx/lv_gauge.h index 9354371f5..3ac1908fc 100644 --- a/lv_objx/lv_gauge.h +++ b/lv_objx/lv_gauge.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_img.h b/lv_objx/lv_img.h index cba7a0f28..4922af074 100644 --- a/lv_objx/lv_img.h +++ b/lv_objx/lv_img.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" @@ -23,7 +23,7 @@ extern "C" { #include "../lv_core/lv_obj.h" #include "../lv_misc/lv_fs.h" -#include "../lv_misc/lv_fonts/lv_symbol_def.h" +#include "../lv_misc/lv_symbol_def.h" #include "lv_label.h" #include "../lv_draw/lv_draw.h" diff --git a/lv_objx/lv_kb.h b/lv_objx/lv_kb.h index 7d9abbacc..5042432c5 100644 --- a/lv_objx/lv_kb.h +++ b/lv_objx/lv_kb.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_label.h b/lv_objx/lv_label.h index 294013335..d30110ab5 100644 --- a/lv_objx/lv_label.h +++ b/lv_objx/lv_label.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" @@ -24,7 +24,7 @@ extern "C" { #include "../lv_core/lv_obj.h" #include "../lv_misc/lv_font.h" #include "../lv_misc/lv_txt.h" -#include "../lv_misc/lv_fonts/lv_symbol_def.h" +#include "../lv_misc/lv_symbol_def.h" /********************* * DEFINES diff --git a/lv_objx/lv_led.h b/lv_objx/lv_led.h index 8815f1b2a..63f7898fb 100644 --- a/lv_objx/lv_led.h +++ b/lv_objx/lv_led.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_line.h b/lv_objx/lv_line.h index a5e6966d8..70883bac5 100644 --- a/lv_objx/lv_line.h +++ b/lv_objx/lv_line.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_list.h b/lv_objx/lv_list.h index 70293db2c..2b40f7ffe 100644 --- a/lv_objx/lv_list.h +++ b/lv_objx/lv_list.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_lmeter.h b/lv_objx/lv_lmeter.h index 0bee226b9..f33acbe57 100644 --- a/lv_objx/lv_lmeter.h +++ b/lv_objx/lv_lmeter.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_mbox.h b/lv_objx/lv_mbox.h index f64f47e28..66588b3c3 100644 --- a/lv_objx/lv_mbox.h +++ b/lv_objx/lv_mbox.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_objx.mk b/lv_objx/lv_objx.mk index 2100ee5a2..65553680e 100644 --- a/lv_objx/lv_objx.mk +++ b/lv_objx/lv_objx.mk @@ -5,7 +5,7 @@ CSRCS += lv_ddlist.c CSRCS += lv_kb.c CSRCS += lv_line.c CSRCS += lv_mbox.c -CSRCS += lv_preloader.c +CSRCS += lv_preload.c CSRCS += lv_roller.c CSRCS += lv_tabview.c CSRCS += lv_btn.c diff --git a/lv_objx/lv_objx_templ.h b/lv_objx/lv_objx_templ.h index 3520128f2..b921a24c0 100644 --- a/lv_objx/lv_objx_templ.h +++ b/lv_objx/lv_objx_templ.h @@ -21,7 +21,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_page.h b/lv_objx/lv_page.h index d2cb909af..f6c746516 100644 --- a/lv_objx/lv_page.h +++ b/lv_objx/lv_page.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_roller.h b/lv_objx/lv_roller.h index 0d89e1450..71c5d9543 100644 --- a/lv_objx/lv_roller.h +++ b/lv_objx/lv_roller.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_slider.h b/lv_objx/lv_slider.h index b09a8bf8c..1cae9b00e 100644 --- a/lv_objx/lv_slider.h +++ b/lv_objx/lv_slider.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_sw.h b/lv_objx/lv_sw.h index eec83ae76..898b4efe0 100644 --- a/lv_objx/lv_sw.h +++ b/lv_objx/lv_sw.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_ta.h b/lv_objx/lv_ta.h index 172915cf4..a89383d7c 100644 --- a/lv_objx/lv_ta.h +++ b/lv_objx/lv_ta.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_tabview.h b/lv_objx/lv_tabview.h index 810f21dc3..beee8e112 100644 --- a/lv_objx/lv_tabview.h +++ b/lv_objx/lv_tabview.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_objx/lv_win.h b/lv_objx/lv_win.h index b1df228ba..94be309de 100644 --- a/lv_objx/lv_win.h +++ b/lv_objx/lv_win.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_themes/lv_theme.h b/lv_themes/lv_theme.h index 3fad52820..65f34b7fa 100644 --- a/lv_themes/lv_theme.h +++ b/lv_themes/lv_theme.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_themes/lv_theme_alien.h b/lv_themes/lv_theme_alien.h index 9430d7748..7d97cb8c6 100644 --- a/lv_themes/lv_theme_alien.h +++ b/lv_themes/lv_theme_alien.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_themes/lv_theme_default.h b/lv_themes/lv_theme_default.h index c6e18bc9d..9ec74a951 100644 --- a/lv_themes/lv_theme_default.h +++ b/lv_themes/lv_theme_default.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_themes/lv_theme_material.h b/lv_themes/lv_theme_material.h index 5894e2d7f..306f0957e 100644 --- a/lv_themes/lv_theme_material.h +++ b/lv_themes/lv_theme_material.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_themes/lv_theme_mono.h b/lv_themes/lv_theme_mono.h index ad07e31e8..a7c8c8c2f 100644 --- a/lv_themes/lv_theme_mono.h +++ b/lv_themes/lv_theme_mono.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_themes/lv_theme_night.h b/lv_themes/lv_theme_night.h index e132ba4ff..3c760c319 100644 --- a/lv_themes/lv_theme_night.h +++ b/lv_themes/lv_theme_night.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_themes/lv_theme_templ.h b/lv_themes/lv_theme_templ.h index 2d2f1cdec..e70af4fe1 100644 --- a/lv_themes/lv_theme_templ.h +++ b/lv_themes/lv_theme_templ.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h" diff --git a/lv_themes/lv_theme_zen.h b/lv_themes/lv_theme_zen.h index 3a60cd8b6..27b190922 100644 --- a/lv_themes/lv_theme_zen.h +++ b/lv_themes/lv_theme_zen.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#if LV_CONF_INCLUDE_SIMPLE +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else #include "../../lv_conf.h"