From 702fb9565d04a3c49f9dd214f7d0ec74b23efecc Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 7 Mar 2019 00:05:16 +0100 Subject: [PATCH] Add LV_ prefix to symbols and vhange USE_LV_... to LV_USE_... --- lv_conf_checker.h | 292 +++++++++++----------- lv_conf_templ.h | 166 ++++++------- lv_core/lv_group.c | 18 +- lv_core/lv_group.h | 16 +- lv_core/lv_i18n.c | 4 +- lv_core/lv_i18n.h | 4 +- lv_core/lv_indev.c | 83 ++++--- lv_core/lv_indev.h | 2 +- lv_core/lv_obj.c | 97 +++++--- lv_core/lv_obj.h | 15 +- lv_core/lv_refr.c | 6 +- lv_core/lv_style.c | 8 +- lv_core/lv_style.h | 4 +- lv_draw/lv_draw_basic.c | 4 +- lv_draw/lv_draw_img.c | 34 +-- lv_draw/lv_draw_img.h | 2 +- lv_draw/lv_draw_rect.c | 6 +- lv_draw/lv_draw_triangle.c | 4 +- lv_draw/lv_draw_triangle.h | 4 +- lv_fonts/lv_font_builtin.c | 56 ++--- lv_fonts/lv_font_builtin.h | 34 +-- lv_fonts/lv_font_dejavu_10.c | 28 +-- lv_fonts/lv_font_dejavu_10_cyrillic.c | 28 +-- lv_fonts/lv_font_dejavu_10_latin_sup.c | 28 +-- lv_fonts/lv_font_dejavu_20.c | 28 +-- lv_fonts/lv_font_dejavu_20_cyrillic.c | 28 +-- lv_fonts/lv_font_dejavu_20_latin_sup.c | 28 +-- lv_fonts/lv_font_dejavu_30.c | 28 +-- lv_fonts/lv_font_dejavu_30_cyrillic.c | 28 +-- lv_fonts/lv_font_dejavu_30_latin_sup.c | 28 +-- lv_fonts/lv_font_dejavu_40.c | 28 +-- lv_fonts/lv_font_dejavu_40_cyrillic.c | 28 +-- lv_fonts/lv_font_dejavu_40_latin_sup.c | 28 +-- lv_fonts/lv_font_monospace_8.c | 28 +-- lv_fonts/lv_font_symbol_10.c | 28 +-- lv_fonts/lv_font_symbol_20.c | 28 +-- lv_fonts/lv_font_symbol_30.c | 28 +-- lv_fonts/lv_font_symbol_40.c | 28 +-- lv_hal/lv_hal_disp.c | 2 +- lv_hal/lv_hal_disp.h | 6 +- lv_hal/lv_hal_indev.c | 6 +- lv_hal/lv_hal_indev.h | 13 +- lv_misc/lv_anim.c | 6 +- lv_misc/lv_anim.h | 4 +- lv_misc/lv_fs.c | 8 +- lv_misc/lv_fs.h | 4 +- lv_misc/lv_ll.h | 4 +- lv_misc/lv_log.c | 4 +- lv_misc/lv_log.h | 10 +- lv_misc/lv_mem.h | 2 +- lv_misc/lv_symbol_def.h | 328 ++++++++++++------------- lv_misc/lv_task.c | 2 +- lv_objx/lv_arc.c | 2 +- lv_objx/lv_arc.h | 4 +- lv_objx/lv_bar.c | 10 +- lv_objx/lv_bar.h | 4 +- lv_objx/lv_btn.c | 44 ++-- lv_objx/lv_btn.h | 8 +- lv_objx/lv_btnm.c | 6 +- lv_objx/lv_btnm.h | 4 +- lv_objx/lv_calendar.c | 8 +- lv_objx/lv_calendar.h | 4 +- lv_objx/lv_canvas.c | 2 +- lv_objx/lv_canvas.h | 4 +- lv_objx/lv_cb.c | 6 +- lv_objx/lv_cb.h | 12 +- lv_objx/lv_chart.c | 14 +- lv_objx/lv_chart.h | 4 +- lv_objx/lv_cont.c | 16 +- lv_objx/lv_cont.h | 4 +- lv_objx/lv_ddlist.c | 22 +- lv_objx/lv_ddlist.h | 12 +- lv_objx/lv_gauge.c | 2 +- lv_objx/lv_gauge.h | 8 +- lv_objx/lv_img.c | 8 +- lv_objx/lv_img.h | 4 +- lv_objx/lv_imgbtn.c | 2 +- lv_objx/lv_imgbtn.h | 8 +- lv_objx/lv_kb.c | 22 +- lv_objx/lv_kb.h | 12 +- lv_objx/lv_label.c | 14 +- lv_objx/lv_label.h | 4 +- lv_objx/lv_led.c | 2 +- lv_objx/lv_led.h | 4 +- lv_objx/lv_line.c | 2 +- lv_objx/lv_line.h | 4 +- lv_objx/lv_list.c | 40 +-- lv_objx/lv_list.h | 22 +- lv_objx/lv_lmeter.c | 4 +- lv_objx/lv_lmeter.h | 4 +- lv_objx/lv_mbox.c | 12 +- lv_objx/lv_mbox.h | 16 +- lv_objx/lv_objx_templ.c | 2 +- lv_objx/lv_objx_templ.h | 4 +- lv_objx/lv_page.c | 16 +- lv_objx/lv_page.h | 8 +- lv_objx/lv_preload.c | 6 +- lv_objx/lv_preload.h | 12 +- lv_objx/lv_roller.c | 16 +- lv_objx/lv_roller.h | 8 +- lv_objx/lv_slider.c | 8 +- lv_objx/lv_slider.h | 8 +- lv_objx/lv_spinbox.c | 2 +- lv_objx/lv_spinbox.h | 8 +- lv_objx/lv_sw.c | 20 +- lv_objx/lv_sw.h | 12 +- lv_objx/lv_ta.c | 18 +- lv_objx/lv_ta.h | 12 +- lv_objx/lv_table.c | 2 +- lv_objx/lv_table.h | 8 +- lv_objx/lv_tabview.c | 14 +- lv_objx/lv_tabview.h | 12 +- lv_objx/lv_tileview.c | 8 +- lv_objx/lv_tileview.h | 4 +- lv_objx/lv_win.c | 18 +- lv_objx/lv_win.h | 28 +-- lv_porting/lv_port_disp_templ.c | 8 +- lv_porting/lv_port_indev_templ.c | 2 +- lv_themes/lv_theme.c | 4 +- lv_themes/lv_theme.h | 62 ++--- lv_themes/lv_theme_alien.c | 76 +++--- lv_themes/lv_theme_alien.h | 2 +- lv_themes/lv_theme_default.c | 52 ++-- lv_themes/lv_theme_default.h | 2 +- lv_themes/lv_theme_material.c | 66 ++--- lv_themes/lv_theme_material.h | 2 +- lv_themes/lv_theme_mono.c | 56 ++--- lv_themes/lv_theme_mono.h | 2 +- lv_themes/lv_theme_nemo.c | 74 +++--- lv_themes/lv_theme_nemo.h | 2 +- lv_themes/lv_theme_night.c | 66 ++--- lv_themes/lv_theme_night.h | 2 +- lv_themes/lv_theme_templ.c | 62 ++--- lv_themes/lv_theme_templ.h | 2 +- lv_themes/lv_theme_zen.c | 66 ++--- lv_themes/lv_theme_zen.h | 2 +- 136 files changed, 1505 insertions(+), 1477 deletions(-) diff --git a/lv_conf_checker.h b/lv_conf_checker.h index 323483350..969d79873 100644 --- a/lv_conf_checker.h +++ b/lv_conf_checker.h @@ -110,7 +110,7 @@ #define LV_INDEV_READ_PERIOD 30 /*Input device read period in milliseconds*/ #endif #ifndef LV_INDEV_POINT_MARKER -#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: USE_LV_REAL_DRAW = 1)*/ +#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: LV_USE_REAL_DRAW = 1)*/ #endif #ifndef LV_INDEV_DRAG_LIMIT #define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */ @@ -143,29 +143,29 @@ #endif /*Feature usage*/ -#ifndef USE_LV_ANIMATION -#define USE_LV_ANIMATION 1 /*1: Enable all animations*/ +#ifndef LV_USE_ANIMATION +#define LV_USE_ANIMATION 1 /*1: Enable all animations*/ #endif -#ifndef USE_LV_SHADOW -#define USE_LV_SHADOW 1 /*1: Enable shadows*/ +#ifndef LV_USE_SHADOW +#define LV_USE_SHADOW 1 /*1: Enable shadows*/ #endif -#ifndef USE_LV_GROUP -#define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/ +#ifndef LV_USE_GROUP +#define LV_USE_GROUP 1 /*1: Enable object groups (for keyboards)*/ #endif -#ifndef USE_LV_GPU -#define USE_LV_GPU 1 /*1: Enable GPU interface*/ +#ifndef LV_USE_GPU +#define LV_USE_GPU 1 /*1: Enable GPU interface*/ #endif -#ifndef USE_LV_FILESYSTEM -#define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ +#ifndef LV_USE_FILESYSTEM +#define LV_USE_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ #endif -#ifndef USE_LV_I18N -#define USE_LV_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ +#ifndef LV_USE_I18N +#define LV_USE_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ #endif -#ifndef USE_LV_USER_DATA_SINGLE -#define USE_LV_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ +#ifndef LV_USE_USER_DATA_SINGLE +#define LV_USE_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ #endif -#ifndef USE_LV_USER_DATA_MULTI -#define USE_LV_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ +#ifndef LV_USE_USER_DATA_MULTI +#define LV_USE_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ #endif /*Compiler settings*/ @@ -197,10 +197,10 @@ /*Log settings*/ -#ifndef USE_LV_LOG -#define USE_LV_LOG 1 /*Enable/disable the log module*/ +#ifndef LV_USE_LOG +#define LV_USE_LOG 1 /*Enable/disable the log module*/ #endif -#if USE_LV_LOG +#if LV_USE_LOG /* How important log should be added: * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information * LV_LOG_LEVEL_INFO Log important events @@ -215,7 +215,7 @@ #ifndef LV_LOG_PRINTF # define LV_LOG_PRINTF 0 #endif -#endif /*USE_LV_LOG*/ +#endif /*LV_USE_LOG*/ /*================ * THEME USAGE @@ -224,29 +224,29 @@ #define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ #endif -#ifndef USE_LV_THEME_TEMPL -#define USE_LV_THEME_TEMPL 0 /*Just for test*/ +#ifndef LV_USE_THEME_TEMPL +#define LV_USE_THEME_TEMPL 0 /*Just for test*/ #endif -#ifndef USE_LV_THEME_DEFAULT -#define USE_LV_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ +#ifndef LV_USE_THEME_DEFAULT +#define LV_USE_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ #endif -#ifndef USE_LV_THEME_ALIEN -#define USE_LV_THEME_ALIEN 1 /*Dark futuristic theme*/ +#ifndef LV_USE_THEME_ALIEN +#define LV_USE_THEME_ALIEN 1 /*Dark futuristic theme*/ #endif -#ifndef USE_LV_THEME_NIGHT -#define USE_LV_THEME_NIGHT 1 /*Dark elegant theme*/ +#ifndef LV_USE_THEME_NIGHT +#define LV_USE_THEME_NIGHT 1 /*Dark elegant theme*/ #endif -#ifndef USE_LV_THEME_MONO -#define USE_LV_THEME_MONO 1 /*Mono color theme for monochrome displays*/ +#ifndef LV_USE_THEME_MONO +#define LV_USE_THEME_MONO 1 /*Mono color theme for monochrome displays*/ #endif -#ifndef USE_LV_THEME_MATERIAL -#define USE_LV_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ +#ifndef LV_USE_THEME_MATERIAL +#define LV_USE_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ #endif -#ifndef USE_LV_THEME_ZEN -#define USE_LV_THEME_ZEN 1 /*Peaceful, mainly light theme */ +#ifndef LV_USE_THEME_ZEN +#define LV_USE_THEME_ZEN 1 /*Peaceful, mainly light theme */ #endif -#ifndef USE_LV_THEME_NEMO -#define USE_LV_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ +#ifndef LV_USE_THEME_NEMO +#define LV_USE_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ #endif /*================== @@ -256,60 +256,60 @@ /* More info about fonts: https://docs.littlevgl.com/#Fonts * To enable a built-in font use 1,2,4 or 8 values * which will determine the bit-per-pixel. Higher value means smoother fonts */ -#ifndef USE_LV_FONT_DEJAVU_10 -#define USE_LV_FONT_DEJAVU_10 0 +#ifndef LV_USE_FONT_DEJAVU_10 +#define LV_USE_FONT_DEJAVU_10 0 #endif -#ifndef USE_LV_FONT_DEJAVU_10_LATIN_SUP -#define USE_LV_FONT_DEJAVU_10_LATIN_SUP 0 +#ifndef LV_USE_FONT_DEJAVU_10_LATIN_SUP +#define LV_USE_FONT_DEJAVU_10_LATIN_SUP 0 #endif -#ifndef USE_LV_FONT_DEJAVU_10_CYRILLIC -#define USE_LV_FONT_DEJAVU_10_CYRILLIC 0 +#ifndef LV_USE_FONT_DEJAVU_10_CYRILLIC +#define LV_USE_FONT_DEJAVU_10_CYRILLIC 0 #endif -#ifndef USE_LV_FONT_SYMBOL_10 -#define USE_LV_FONT_SYMBOL_10 0 +#ifndef LV_USE_FONT_SYMBOL_10 +#define LV_USE_FONT_SYMBOL_10 0 #endif -#ifndef USE_LV_FONT_DEJAVU_20 -#define USE_LV_FONT_DEJAVU_20 4 +#ifndef LV_USE_FONT_DEJAVU_20 +#define LV_USE_FONT_DEJAVU_20 4 #endif -#ifndef USE_LV_FONT_DEJAVU_20_LATIN_SUP -#define USE_LV_FONT_DEJAVU_20_LATIN_SUP 4 +#ifndef LV_USE_FONT_DEJAVU_20_LATIN_SUP +#define LV_USE_FONT_DEJAVU_20_LATIN_SUP 4 #endif -#ifndef USE_LV_FONT_DEJAVU_20_CYRILLIC -#define USE_LV_FONT_DEJAVU_20_CYRILLIC 4 +#ifndef LV_USE_FONT_DEJAVU_20_CYRILLIC +#define LV_USE_FONT_DEJAVU_20_CYRILLIC 4 #endif -#ifndef USE_LV_FONT_SYMBOL_20 -#define USE_LV_FONT_SYMBOL_20 4 +#ifndef LV_USE_FONT_SYMBOL_20 +#define LV_USE_FONT_SYMBOL_20 4 #endif -#ifndef USE_LV_FONT_DEJAVU_30 -#define USE_LV_FONT_DEJAVU_30 0 +#ifndef LV_USE_FONT_DEJAVU_30 +#define LV_USE_FONT_DEJAVU_30 0 #endif -#ifndef USE_LV_FONT_DEJAVU_30_LATIN_SUP -#define USE_LV_FONT_DEJAVU_30_LATIN_SUP 0 +#ifndef LV_USE_FONT_DEJAVU_30_LATIN_SUP +#define LV_USE_FONT_DEJAVU_30_LATIN_SUP 0 #endif -#ifndef USE_LV_FONT_DEJAVU_30_CYRILLIC -#define USE_LV_FONT_DEJAVU_30_CYRILLIC 0 +#ifndef LV_USE_FONT_DEJAVU_30_CYRILLIC +#define LV_USE_FONT_DEJAVU_30_CYRILLIC 0 #endif -#ifndef USE_LV_FONT_SYMBOL_30 -#define USE_LV_FONT_SYMBOL_30 0 +#ifndef LV_USE_FONT_SYMBOL_30 +#define LV_USE_FONT_SYMBOL_30 0 #endif -#ifndef USE_LV_FONT_DEJAVU_40 -#define USE_LV_FONT_DEJAVU_40 0 +#ifndef LV_USE_FONT_DEJAVU_40 +#define LV_USE_FONT_DEJAVU_40 0 #endif -#ifndef USE_LV_FONT_DEJAVU_40_LATIN_SUP -#define USE_LV_FONT_DEJAVU_40_LATIN_SUP 0 +#ifndef LV_USE_FONT_DEJAVU_40_LATIN_SUP +#define LV_USE_FONT_DEJAVU_40_LATIN_SUP 0 #endif -#ifndef USE_LV_FONT_DEJAVU_40_CYRILLIC -#define USE_LV_FONT_DEJAVU_40_CYRILLIC 0 +#ifndef LV_USE_FONT_DEJAVU_40_CYRILLIC +#define LV_USE_FONT_DEJAVU_40_CYRILLIC 0 #endif -#ifndef USE_LV_FONT_SYMBOL_40 -#define USE_LV_FONT_SYMBOL_40 0 +#ifndef LV_USE_FONT_SYMBOL_40 +#define LV_USE_FONT_SYMBOL_40 0 #endif -#ifndef USE_LV_FONT_MONOSPACE_8 -#define USE_LV_FONT_MONOSPACE_8 1 +#ifndef LV_USE_FONT_MONOSPACE_8 +#define LV_USE_FONT_MONOSPACE_8 1 #endif /* Optionally declare your custom fonts here. @@ -346,20 +346,20 @@ *****************/ /*Label (dependencies: -*/ -#ifndef USE_LV_LABEL -#define USE_LV_LABEL 1 +#ifndef LV_USE_LABEL +#define LV_USE_LABEL 1 #endif -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 #ifndef LV_LABEL_SCROLL_SPEED # define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ #endif #endif /*Image (dependencies: lv_label*/ -#ifndef USE_LV_IMG -#define USE_LV_IMG 1 +#ifndef LV_USE_IMG +#define LV_USE_IMG 1 #endif -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 #ifndef LV_IMG_CF_INDEXED # define LV_IMG_CF_INDEXED 1 /*Enable indexed (palette) images*/ #endif @@ -369,13 +369,13 @@ #endif /*Line (dependencies: -*/ -#ifndef USE_LV_LINE -#define USE_LV_LINE 1 +#ifndef LV_USE_LINE +#define LV_USE_LINE 1 #endif /*Arc (dependencies: -)*/ -#ifndef USE_LV_ARC -#define USE_LV_ARC 1 +#ifndef LV_USE_ARC +#define LV_USE_ARC 1 #endif /******************* @@ -383,35 +383,35 @@ *******************/ /*Container (dependencies: -*/ -#ifndef USE_LV_CONT -#define USE_LV_CONT 1 +#ifndef LV_USE_CONT +#define LV_USE_CONT 1 #endif /*Page (dependencies: lv_cont)*/ -#ifndef USE_LV_PAGE -#define USE_LV_PAGE 1 +#ifndef LV_USE_PAGE +#define LV_USE_PAGE 1 #endif /*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ -#ifndef USE_LV_WIN -#define USE_LV_WIN 1 +#ifndef LV_USE_WIN +#define LV_USE_WIN 1 #endif /*Tab (dependencies: lv_page, lv_btnm)*/ -#ifndef USE_LV_TABVIEW -#define USE_LV_TABVIEW 1 +#ifndef LV_USE_TABVIEW +#define LV_USE_TABVIEW 1 #endif -# if USE_LV_TABVIEW != 0 +# if LV_USE_TABVIEW != 0 #ifndef LV_TABVIEW_ANIM_TIME # define LV_TABVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ #endif #endif /*Tileview (dependencies: lv_page) */ -#ifndef USE_LV_TILEVIEW -#define USE_LV_TILEVIEW 1 +#ifndef LV_USE_TILEVIEW +#define LV_USE_TILEVIEW 1 #endif -#if USE_LV_TILEVIEW +#if LV_USE_TILEVIEW #ifndef LV_TILEVIEW_ANIM_TIME # define LV_TILEVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ #endif @@ -422,50 +422,50 @@ *************************/ /*Bar (dependencies: -)*/ -#ifndef USE_LV_BAR -#define USE_LV_BAR 1 +#ifndef LV_USE_BAR +#define LV_USE_BAR 1 #endif /*Line meter (dependencies: *;)*/ -#ifndef USE_LV_LMETER -#define USE_LV_LMETER 1 +#ifndef LV_USE_LMETER +#define LV_USE_LMETER 1 #endif /*Gauge (dependencies:lv_bar, lv_lmeter)*/ -#ifndef USE_LV_GAUGE -#define USE_LV_GAUGE 1 +#ifndef LV_USE_GAUGE +#define LV_USE_GAUGE 1 #endif /*Chart (dependencies: -)*/ -#ifndef USE_LV_CHART -#define USE_LV_CHART 1 +#ifndef LV_USE_CHART +#define LV_USE_CHART 1 #endif /*Table (dependencies: lv_label)*/ -#ifndef USE_LV_TABLE -#define USE_LV_TABLE 1 +#ifndef LV_USE_TABLE +#define LV_USE_TABLE 1 #endif -#if USE_LV_TABLE +#if LV_USE_TABLE #ifndef LV_TABLE_COL_MAX # define LV_TABLE_COL_MAX 12 #endif #endif /*LED (dependencies: -)*/ -#ifndef USE_LV_LED -#define USE_LV_LED 1 +#ifndef LV_USE_LED +#define LV_USE_LED 1 #endif /*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ -#ifndef USE_LV_MBOX -#define USE_LV_MBOX 1 +#ifndef LV_USE_MBOX +#define LV_USE_MBOX 1 #endif /*Text area (dependencies: lv_label, lv_page)*/ -#ifndef USE_LV_TA -#define USE_LV_TA 1 +#ifndef LV_USE_TA +#define LV_USE_TA 1 #endif -#if USE_LV_TA != 0 +#if LV_USE_TA != 0 #ifndef LV_TA_CURSOR_BLINK_TIME # define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ #endif @@ -475,20 +475,20 @@ #endif /*Spinbox (dependencies: lv_ta)*/ -#ifndef USE_LV_SPINBOX -#define USE_LV_SPINBOX 1 +#ifndef LV_USE_SPINBOX +#define LV_USE_SPINBOX 1 #endif /*Calendar (dependencies: -)*/ -#ifndef USE_LV_CALENDAR -#define USE_LV_CALENDAR 1 +#ifndef LV_USE_CALENDAR +#define LV_USE_CALENDAR 1 #endif /*Preload (dependencies: lv_arc)*/ -#ifndef USE_LV_PRELOAD -#define USE_LV_PRELOAD 1 +#ifndef LV_USE_PRELOAD +#define LV_USE_PRELOAD 1 #endif -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 #ifndef LV_PRELOAD_DEF_ARC_LENGTH # define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/ #endif @@ -501,86 +501,86 @@ #endif /*Canvas (dependencies: lv_img)*/ -#ifndef USE_LV_CANVAS -#define USE_LV_CANVAS 1 +#ifndef LV_USE_CANVAS +#define LV_USE_CANVAS 1 #endif /************************* * User input objects *************************/ /*Button (dependencies: lv_cont*/ -#ifndef USE_LV_BTN -#define USE_LV_BTN 1 +#ifndef LV_USE_BTN +#define LV_USE_BTN 1 #endif -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 #ifndef LV_BTN_INK_EFFECT -# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: USE_LV_ANIMATION)*/ +# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/ #endif #endif /*Image Button (dependencies: lv_btn*/ -#ifndef USE_LV_IMGBTN -#define USE_LV_IMGBTN 1 +#ifndef LV_USE_IMGBTN +#define LV_USE_IMGBTN 1 #endif -#if USE_LV_IMGBTN +#if LV_USE_IMGBTN #ifndef LV_IMGBTN_TILED # define LV_IMGBTN_TILED 0 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/ #endif #endif /*Button matrix (dependencies: -)*/ -#ifndef USE_LV_BTNM -#define USE_LV_BTNM 1 +#ifndef LV_USE_BTNM +#define LV_USE_BTNM 1 #endif /*Keyboard (dependencies: lv_btnm)*/ -#ifndef USE_LV_KB -#define USE_LV_KB 1 +#ifndef LV_USE_KB +#define LV_USE_KB 1 #endif /*Check box (dependencies: lv_btn, lv_label)*/ -#ifndef USE_LV_CB -#define USE_LV_CB 1 +#ifndef LV_USE_CB +#define LV_USE_CB 1 #endif /*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/ -#ifndef USE_LV_LIST -#define USE_LV_LIST 1 +#ifndef LV_USE_LIST +#define LV_USE_LIST 1 #endif -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 #ifndef LV_LIST_FOCUS_TIME # define LV_LIST_FOCUS_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */ #endif #endif /*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ -#ifndef USE_LV_DDLIST -#define USE_LV_DDLIST 1 +#ifndef LV_USE_DDLIST +#define LV_USE_DDLIST 1 #endif -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 #ifndef LV_DDLIST_ANIM_TIME # define LV_DDLIST_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/ #endif #endif /*Roller (dependencies: lv_ddlist)*/ -#ifndef USE_LV_ROLLER -#define USE_LV_ROLLER 1 +#ifndef LV_USE_ROLLER +#define LV_USE_ROLLER 1 #endif -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 #ifndef LV_ROLLER_ANIM_TIME # define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/ #endif #endif /*Slider (dependencies: lv_bar)*/ -#ifndef USE_LV_SLIDER -#define USE_LV_SLIDER 1 +#ifndef LV_USE_SLIDER +#define LV_USE_SLIDER 1 #endif /*Switch (dependencies: lv_slider)*/ -#ifndef USE_LV_SW -#define USE_LV_SW 1 +#ifndef LV_USE_SW +#define LV_USE_SW 1 #endif /************************* diff --git a/lv_conf_templ.h b/lv_conf_templ.h index a7a3b3ee3..14918fb28 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -71,7 +71,7 @@ /*Input device settings*/ #define LV_INDEV_READ_PERIOD 30 /*Input device read period in milliseconds*/ -#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: USE_LV_REAL_DRAW = 1)*/ +#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: LV_USE_REAL_DRAW = 1)*/ #define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */ #define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */ #define LV_INDEV_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/ @@ -85,17 +85,17 @@ #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 /* Minimum number of characters of a word to put on a line after a break */ /*Feature usage*/ -#define USE_LV_ANIMATION 1 /*1: Enable all animations*/ -#define USE_LV_SHADOW 1 /*1: Enable shadows*/ -#define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/ -#if USE_LV_GROUP +#define LV_USE_ANIMATION 1 /*1: Enable all animations*/ +#define LV_USE_SHADOW 1 /*1: Enable shadows*/ +#define LV_USE_GROUP 1 /*1: Enable object groups (for keyboards)*/ +#if LV_USE_GROUP typedef void * lv_group_user_data_t; -#endif /*USE_LV_GROUP*/ -#define USE_LV_GPU 1 /*1: Enable GPU interface*/ -#define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ -#define USE_LV_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ -#define USE_LV_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ -#define USE_LV_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ +#endif /*LV_USE_GROUP*/ +#define LV_USE_GPU 1 /*1: Enable GPU interface*/ +#define LV_USE_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ +#define LV_USE_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ +#define LV_USE_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ +#define LV_USE_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ /*Compiler settings*/ #define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */ @@ -114,8 +114,8 @@ typedef void * lv_disp_drv_user_data_t; /*Type of user data in t typedef void * lv_indev_drv_user_data_t; /*Type of user data in the display driver*/ /*Log settings*/ -#define USE_LV_LOG 1 /*Enable/disable the log module*/ -#if USE_LV_LOG +#define LV_USE_LOG 1 /*Enable/disable the log module*/ +#if LV_USE_LOG /* How important log should be added: * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information * LV_LOG_LEVEL_INFO Log important events @@ -126,21 +126,21 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t /* 1: Print the log with 'printf'; 0: user need to register a callback*/ # define LV_LOG_PRINTF 0 -#endif /*USE_LV_LOG*/ +#endif /*LV_USE_LOG*/ /*================ * THEME USAGE *================*/ #define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ -#define USE_LV_THEME_TEMPL 0 /*Just for test*/ -#define USE_LV_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ -#define USE_LV_THEME_ALIEN 1 /*Dark futuristic theme*/ -#define USE_LV_THEME_NIGHT 1 /*Dark elegant theme*/ -#define USE_LV_THEME_MONO 1 /*Mono color theme for monochrome displays*/ -#define USE_LV_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ -#define USE_LV_THEME_ZEN 1 /*Peaceful, mainly light theme */ -#define USE_LV_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ +#define LV_USE_THEME_TEMPL 0 /*Just for test*/ +#define LV_USE_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ +#define LV_USE_THEME_ALIEN 1 /*Dark futuristic theme*/ +#define LV_USE_THEME_NIGHT 1 /*Dark elegant theme*/ +#define LV_USE_THEME_MONO 1 /*Mono color theme for monochrome displays*/ +#define LV_USE_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ +#define LV_USE_THEME_ZEN 1 /*Peaceful, mainly light theme */ +#define LV_USE_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ /*================== * FONT USAGE @@ -149,27 +149,27 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t /* More info about fonts: https://docs.littlevgl.com/#Fonts * To enable a built-in font use 1,2,4 or 8 values * which will determine the bit-per-pixel. Higher value means smoother fonts */ -#define USE_LV_FONT_DEJAVU_10 0 -#define USE_LV_FONT_DEJAVU_10_LATIN_SUP 0 -#define USE_LV_FONT_DEJAVU_10_CYRILLIC 0 -#define USE_LV_FONT_SYMBOL_10 0 +#define LV_USE_FONT_DEJAVU_10 0 +#define LV_USE_FONT_DEJAVU_10_LATIN_SUP 0 +#define LV_USE_FONT_DEJAVU_10_CYRILLIC 0 +#define LV_USE_FONT_SYMBOL_10 0 -#define USE_LV_FONT_DEJAVU_20 4 -#define USE_LV_FONT_DEJAVU_20_LATIN_SUP 4 -#define USE_LV_FONT_DEJAVU_20_CYRILLIC 4 -#define USE_LV_FONT_SYMBOL_20 4 +#define LV_USE_FONT_DEJAVU_20 4 +#define LV_USE_FONT_DEJAVU_20_LATIN_SUP 4 +#define LV_USE_FONT_DEJAVU_20_CYRILLIC 4 +#define LV_USE_FONT_SYMBOL_20 4 -#define USE_LV_FONT_DEJAVU_30 0 -#define USE_LV_FONT_DEJAVU_30_LATIN_SUP 0 -#define USE_LV_FONT_DEJAVU_30_CYRILLIC 0 -#define USE_LV_FONT_SYMBOL_30 0 +#define LV_USE_FONT_DEJAVU_30 0 +#define LV_USE_FONT_DEJAVU_30_LATIN_SUP 0 +#define LV_USE_FONT_DEJAVU_30_CYRILLIC 0 +#define LV_USE_FONT_SYMBOL_30 0 -#define USE_LV_FONT_DEJAVU_40 0 -#define USE_LV_FONT_DEJAVU_40_LATIN_SUP 0 -#define USE_LV_FONT_DEJAVU_40_CYRILLIC 0 -#define USE_LV_FONT_SYMBOL_40 0 +#define LV_USE_FONT_DEJAVU_40 0 +#define LV_USE_FONT_DEJAVU_40_LATIN_SUP 0 +#define LV_USE_FONT_DEJAVU_40_CYRILLIC 0 +#define LV_USE_FONT_SYMBOL_40 0 -#define USE_LV_FONT_MONOSPACE_8 1 +#define LV_USE_FONT_MONOSPACE_8 1 /* Optionally declare your custom fonts here. * You can use these fonts as default font too @@ -200,46 +200,46 @@ typedef void * lv_obj_user_data_t; /*Declare the type of the user data *****************/ /*Label (dependencies: -*/ -#define USE_LV_LABEL 1 -#if USE_LV_LABEL != 0 +#define LV_USE_LABEL 1 +#if LV_USE_LABEL != 0 # define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ #endif /*Image (dependencies: lv_label*/ -#define USE_LV_IMG 1 -#if USE_LV_IMG != 0 +#define LV_USE_IMG 1 +#if LV_USE_IMG != 0 # define LV_IMG_CF_INDEXED 1 /*Enable indexed (palette) images*/ # define LV_IMG_CF_ALPHA 1 /*Enable alpha indexed images*/ #endif /*Line (dependencies: -*/ -#define USE_LV_LINE 1 +#define LV_USE_LINE 1 /*Arc (dependencies: -)*/ -#define USE_LV_ARC 1 +#define LV_USE_ARC 1 /******************* * Container objects *******************/ /*Container (dependencies: -*/ -#define USE_LV_CONT 1 +#define LV_USE_CONT 1 /*Page (dependencies: lv_cont)*/ -#define USE_LV_PAGE 1 +#define LV_USE_PAGE 1 /*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ -#define USE_LV_WIN 1 +#define LV_USE_WIN 1 /*Tab (dependencies: lv_page, lv_btnm)*/ -#define USE_LV_TABVIEW 1 -# if USE_LV_TABVIEW != 0 +#define LV_USE_TABVIEW 1 +# if LV_USE_TABVIEW != 0 # define LV_TABVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ #endif /*Tileview (dependencies: lv_page) */ -#define USE_LV_TILEVIEW 1 -#if USE_LV_TILEVIEW +#define LV_USE_TILEVIEW 1 +#if LV_USE_TILEVIEW # define LV_TILEVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ #endif @@ -248,100 +248,100 @@ typedef void * lv_obj_user_data_t; /*Declare the type of the user data *************************/ /*Bar (dependencies: -)*/ -#define USE_LV_BAR 1 +#define LV_USE_BAR 1 /*Line meter (dependencies: *;)*/ -#define USE_LV_LMETER 1 +#define LV_USE_LMETER 1 /*Gauge (dependencies:lv_bar, lv_lmeter)*/ -#define USE_LV_GAUGE 1 +#define LV_USE_GAUGE 1 /*Chart (dependencies: -)*/ -#define USE_LV_CHART 1 +#define LV_USE_CHART 1 /*Table (dependencies: lv_label)*/ -#define USE_LV_TABLE 1 -#if USE_LV_TABLE +#define LV_USE_TABLE 1 +#if LV_USE_TABLE # define LV_TABLE_COL_MAX 12 #endif /*LED (dependencies: -)*/ -#define USE_LV_LED 1 +#define LV_USE_LED 1 /*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ -#define USE_LV_MBOX 1 +#define LV_USE_MBOX 1 /*Text area (dependencies: lv_label, lv_page)*/ -#define USE_LV_TA 1 -#if USE_LV_TA != 0 +#define LV_USE_TA 1 +#if LV_USE_TA != 0 # define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ # define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ #endif /*Spinbox (dependencies: lv_ta)*/ -#define USE_LV_SPINBOX 1 +#define LV_USE_SPINBOX 1 /*Calendar (dependencies: -)*/ -#define USE_LV_CALENDAR 1 +#define LV_USE_CALENDAR 1 /*Preload (dependencies: lv_arc)*/ -#define USE_LV_PRELOAD 1 -#if USE_LV_PRELOAD != 0 +#define LV_USE_PRELOAD 1 +#if LV_USE_PRELOAD != 0 # define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/ # define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/ # define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC #endif /*Canvas (dependencies: lv_img)*/ -#define USE_LV_CANVAS 1 +#define LV_USE_CANVAS 1 /************************* * User input objects *************************/ /*Button (dependencies: lv_cont*/ -#define USE_LV_BTN 1 -#if USE_LV_BTN != 0 -# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: USE_LV_ANIMATION)*/ +#define LV_USE_BTN 1 +#if LV_USE_BTN != 0 +# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/ #endif /*Image Button (dependencies: lv_btn*/ -#define USE_LV_IMGBTN 1 -#if USE_LV_IMGBTN +#define LV_USE_IMGBTN 1 +#if LV_USE_IMGBTN # define LV_IMGBTN_TILED 0 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/ #endif /*Button matrix (dependencies: -)*/ -#define USE_LV_BTNM 1 +#define LV_USE_BTNM 1 /*Keyboard (dependencies: lv_btnm)*/ -#define USE_LV_KB 1 +#define LV_USE_KB 1 /*Check box (dependencies: lv_btn, lv_label)*/ -#define USE_LV_CB 1 +#define LV_USE_CB 1 /*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/ -#define USE_LV_LIST 1 -#if USE_LV_LIST != 0 +#define LV_USE_LIST 1 +#if LV_USE_LIST != 0 # define LV_LIST_FOCUS_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */ #endif /*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ -#define USE_LV_DDLIST 1 -#if USE_LV_DDLIST != 0 +#define LV_USE_DDLIST 1 +#if LV_USE_DDLIST != 0 # define LV_DDLIST_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/ #endif /*Roller (dependencies: lv_ddlist)*/ -#define USE_LV_ROLLER 1 -#if USE_LV_ROLLER != 0 +#define LV_USE_ROLLER 1 +#if LV_USE_ROLLER != 0 # define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/ #endif /*Slider (dependencies: lv_bar)*/ -#define USE_LV_SLIDER 1 +#define LV_USE_SLIDER 1 /*Switch (dependencies: lv_slider)*/ -#define USE_LV_SW 1 +#define LV_USE_SW 1 /************************* * Non-user section diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index ed1636aca..d44940258 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_group.h" -#if USE_LV_GROUP != 0 +#if LV_USE_GROUP != 0 #include "../lv_themes/lv_theme.h" #include #include "../lv_misc/lv_gc.h" @@ -71,11 +71,11 @@ lv_group_t * lv_group_create(void) group->refocus_policy = LV_GROUP_REFOCUS_POLICY_PREV; group->wrap = 1; -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE memset(&group->user_data, 0, sizeof(lv_group_user_data_t)); #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI memset(&group->focus_user_data, 0, sizeof(lv_group_user_data_t)); memset(&group->style_mod_user_data, 0, sizeof(lv_group_user_data_t)); memset(&group->style_mod_edit_user_data, 0, sizeof(lv_group_user_data_t)); @@ -102,7 +102,7 @@ void lv_group_del(lv_group_t * group) /*Remove the objects from the group*/ lv_obj_t ** obj; - LL_READ(group->obj_ll, obj) { + LV_LL_READ(group->obj_ll, obj) { (*obj)->group_p = NULL; } @@ -171,7 +171,7 @@ void lv_group_remove_obj(lv_obj_t * obj) /*Search the object and remove it from its group */ lv_obj_t ** i; - LL_READ(g->obj_ll, i) { + LV_LL_READ(g->obj_ll, i) { if(*i == obj) { lv_ll_rem(&g->obj_ll, i); lv_mem_free(i); @@ -196,7 +196,7 @@ void lv_group_focus_obj(lv_obj_t * obj) lv_group_set_editing(g, false); lv_obj_t ** i; - LL_READ(g->obj_ll, i) { + LV_LL_READ(g->obj_ll, i) { if(*i == obj) { if(g->obj_focus == i) return; /*Don't focus the already focused object again*/ if(g->obj_focus != NULL) { @@ -374,7 +374,7 @@ lv_obj_t * lv_group_get_focused(const lv_group_t * group) return *group->obj_focus; } -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE /** * Get a pointer to the group's user data * @param group pointer to an group @@ -467,7 +467,7 @@ void lv_group_report_style_mod(lv_group_t * group) } lv_group_t * i; - LL_READ(LV_GC_ROOT(_lv_group_ll), i) { + LV_LL_READ(LV_GC_ROOT(_lv_group_ll), i) { refresh_theme(i, th); } } @@ -645,4 +645,4 @@ static void obj_to_foreground(lv_obj_t * obj) } } -#endif /*USE_LV_GROUP != 0*/ +#endif /*LV_USE_GROUP != 0*/ diff --git a/lv_core/lv_group.h b/lv_core/lv_group.h index 7e3099c60..4cb730f2b 100644 --- a/lv_core/lv_group.h +++ b/lv_core/lv_group.h @@ -39,7 +39,7 @@ extern "C" { #define LV_GROUP_KEY_HOME 2 /*0x02, STX*/ #define LV_GROUP_KEY_END 3 /*0x03, ETX*/ -#if USE_LV_GROUP != 0 +#if LV_USE_GROUP != 0 /********************** * TYPEDEFS **********************/ @@ -56,11 +56,11 @@ typedef struct _lv_group_t lv_group_style_mod_func_t style_mod_edit;/*A function which modifies the style of the focused object*/ lv_group_focus_cb_t focus_cb; /*A function to call when a new object is focused (optional)*/ lv_style_t style_tmp; /*Stores the modified style of the focused object */ -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE lv_group_user_data_t user_data; #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI lv_group_user_data_t focus_user_data; lv_group_user_data_t style_mod_user_data; lv_group_user_data_t style_mod_edit_user_data; @@ -210,16 +210,14 @@ lv_style_t * lv_group_mod_style(lv_group_t * group, const lv_style_t * style); */ lv_obj_t * lv_group_get_focused(const lv_group_t * group); -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE /** * Get a pointer to the group's user data * @param group pointer to an group * @return pointer to the user data */ -lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group) -{ - return &group->user_data; -} +lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group); + #endif /** @@ -274,7 +272,7 @@ void lv_group_report_style_mod(lv_group_t * group); * MACROS **********************/ -#endif /*USE_LV_GROUP != 0*/ +#endif /*LV_USE_GROUP != 0*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c index f1816c0f2..0e4abce3e 100644 --- a/lv_core/lv_i18n.c +++ b/lv_core/lv_i18n.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_i18n.h" -#if USE_LV_I18N +#if LV_USE_I18N #include "lv_obj.h" #include "../lv_misc/lv_gc.h" @@ -253,4 +253,4 @@ static const void * lv_i18n_get_text_core(const lv_i18n_trans_t * trans, const c } -#endif /*USE_LV_I18N*/ +#endif /*LV_USE_I18N*/ diff --git a/lv_core/lv_i18n.h b/lv_core/lv_i18n.h index 15b822c41..7bfdcef3e 100644 --- a/lv_core/lv_i18n.h +++ b/lv_core/lv_i18n.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_I18N +#if LV_USE_I18N #include @@ -99,7 +99,7 @@ const char * lv_i18n_get_current_local(void); * MACROS **********************/ -#endif /*USE_LV_I18N*/ +#endif /*LV_USE_I18N*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 107ecc8eb..dd6b9d622 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -143,12 +143,12 @@ void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj) { if(indev->driver.type != LV_INDEV_TYPE_POINTER) return; - indev->custom_data.cursor = cur_obj; - lv_obj_set_parent(indev->custom_data.cursor, lv_disp_get_layer_sys(indev->driver.disp)); - lv_obj_set_pos(indev->custom_data.cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act_point.y); + indev->cursor = cur_obj; + lv_obj_set_parent(indev->cursor, lv_disp_get_layer_sys(indev->driver.disp)); + lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act_point.y); } -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Set a destination group for a keypad input device (for LV_INDEV_TYPE_KEYPAD) * @param indev pointer to an input device @@ -157,7 +157,7 @@ void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj) void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group) { if(indev->driver.type == LV_INDEV_TYPE_KEYPAD || indev->driver.type == LV_INDEV_TYPE_ENCODER) { - indev->custom_data.group = group; + indev->group = group; } } #endif @@ -171,7 +171,7 @@ void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group) void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t * points) { if(indev->driver.type == LV_INDEV_TYPE_BUTTON) { - indev->custom_data.btn_points = points; + indev->btn_points = points; } } @@ -326,7 +326,6 @@ static void indev_proc_task(void * param) if(i->proc.state == LV_INDEV_STATE_PR) { i->last_activity_time = lv_tick_get(); } - if(i->driver.type == LV_INDEV_TYPE_POINTER) { indev_pointer_proc(i, &data); } else if(i->driver.type == LV_INDEV_TYPE_KEYPAD) { @@ -357,10 +356,10 @@ static void indev_proc_task(void * param) static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) { /*Move the cursor if set and moved*/ - if(i->custom_data.cursor != NULL && + if(i->cursor != NULL && (i->proc.types.pointer.last_point.x != data->point.x || i->proc.types.pointer.last_point.y != data->point.y)) { - lv_obj_set_pos(i->custom_data.cursor, data->point.x, data->point.y); + lv_obj_set_pos(i->cursor, data->point.x, data->point.y); } i->proc.types.pointer.act_point.x = data->point.x; @@ -383,8 +382,8 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) { -#if USE_LV_GROUP - lv_group_t * g = i->custom_data.group; +#if LV_USE_GROUP + lv_group_t * g = i->group; if(g == NULL) return; lv_obj_t * focused = lv_group_get_focused(g); @@ -399,8 +398,8 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Simulate a press on the object if ENTER was pressed*/ if(data->key == LV_GROUP_KEY_ENTER) { lv_obj_send_event(focused, LV_EVENT_PRESSED); - lv_group_send_data(g, LV_GROUP_KEY_ENTER); if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_group_send_data(g, LV_GROUP_KEY_ENTER); } /*Move the focus on NEXT*/ else if(data->key == LV_GROUP_KEY_NEXT) { @@ -492,8 +491,8 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) { -#if USE_LV_GROUP - lv_group_t * g = i->custom_data.group; +#if LV_USE_GROUP + lv_group_t * g = i->group; if(g == NULL) return; lv_obj_t * focused = lv_group_get_focused(g); @@ -534,7 +533,10 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) { i->proc.pr_timestamp = lv_tick_get(); - if(lv_group_get_editing(g) == true || editable == false) lv_obj_send_event(focused, LV_EVENT_PRESSED); + if(lv_group_get_editing(g) == true || editable == false) { + lv_obj_send_event(focused, LV_EVENT_PRESSED); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } } /*Pressing*/ else if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { @@ -547,11 +549,13 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) else { /*Don't leave edit mode if there is only one object (nowhere to navigate)*/ lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); + if(i->proc.reset_query) return; /*The object might be deleted*/ } } /*If not editable then just send a long press signal*/ else { lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); + if(i->proc.reset_query) return; /*The object might be deleted*/ } i->proc.long_pr_sent = 1; } @@ -563,7 +567,10 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(editable == false) { lv_group_send_data(g, LV_GROUP_KEY_ENTER); if(i->proc.long_pr_sent == 0) lv_obj_send_event(focused, LV_EVENT_CLICKED); - else lv_obj_send_event(focused, LV_EVENT_RELEASED); + if(i->proc.reset_query) return; /*The object might be deleted*/ + + lv_obj_send_event(focused, LV_EVENT_RELEASED); + if(i->proc.reset_query) return; /*The object might be deleted*/ if(i->proc.reset_query) return; /*The object might be deleted*/ } @@ -572,7 +579,6 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(!i->proc.long_pr_sent || lv_ll_is_empty(&g->obj_ll)) { lv_group_send_data(g, LV_GROUP_KEY_ENTER); /*Ignore long pressed enter release because it comes from mode switch*/ lv_obj_send_event(focused, LV_EVENT_CLICKED); - if(i->proc.reset_query) return; /*The object might be deleted*/ } } @@ -581,8 +587,6 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) lv_group_set_editing(g, true); /*Set edit mode*/ } - if(i->proc.reset_query) return; /*The object might be deleted in `focus_cb` or due to any other user event*/ - i->proc.pr_timestamp = 0; i->proc.long_pr_sent = 0; } @@ -603,8 +607,8 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) { - i->proc.types.pointer.act_point.x = i->custom_data.btn_points[data->btn_id].x; - i->proc.types.pointer.act_point.y = i->custom_data.btn_points[data->btn_id].y; + i->proc.types.pointer.act_point.x = i->btn_points[data->btn_id].x; + i->proc.types.pointer.act_point.y = i->btn_points[data->btn_id].y; /*Still the same point is pressed*/ if(i->proc.types.pointer.last_point.x == i->proc.types.pointer.act_point.x && @@ -624,6 +628,7 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) /** * Process the pressed state of LV_INDEV_TYPE_POINER input devices * @param indev pointer to an input device 'proc' + * @return LV_RES_OK: no indev reset required; LV_RES_INV: indev reset is required */ static void indev_proc_press(lv_indev_proc_t * proc) { @@ -661,8 +666,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST, indev_act); lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST); - - if(proc->reset_query != 0) return; + if(proc->reset_query) return; /*The object might be deleted*/ } proc->types.pointer.act_obj = pr_obj; /*Save the pressed object*/ @@ -699,7 +703,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the press*/ proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSED, indev_act); lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESSED); - if(proc->reset_query != 0) return; + if(proc->reset_query) return; /*The object might be deleted*/ } } @@ -723,7 +727,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSING, indev_act); lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESSING); - if(proc->reset_query != 0) return; + if(proc->reset_query) return; /*The object might be deleted*/ indev_drag(proc); if(proc->reset_query != 0) return; @@ -734,7 +738,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(lv_tick_elaps(proc->pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); lv_obj_send_event(pr_obj, LV_EVENT_LONG_PRESSED); - if(proc->reset_query != 0) return; + if(proc->reset_query) return; /*The object might be deleted*/ /*Mark the signal sending to do not send it again*/ proc->long_pr_sent = 1; @@ -749,7 +753,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(lv_tick_elaps(proc->longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); lv_obj_send_event(pr_obj, LV_EVENT_LONG_PRESSED_REPEAT); - if(proc->reset_query != 0) return; + if(proc->reset_query) return; /*The object might be deleted*/ proc->longpr_rep_timestamp = lv_tick_get(); } @@ -775,31 +779,36 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj) { /* If the object was protected against press lost then it possible that * the object is already not pressed but still it is the `act_obj`. - * In this case send the `LV_SIGNAL_RELEASED/CLICKED` of `LV_SIGNAL_PRESS_LOST` if the indev is ON the `types.pointer.act_obj` */ + * In this case send the `LV_SIGNAL_RELEASED/CLICKED` instead of `LV_SIGNAL_PRESS_LOST` if the indev is ON the `types.pointer.act_obj` */ if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST)) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); - } else { - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + if(proc->reset_query) return; /*The object might be deleted*/ } + + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + if(proc->reset_query) return; /*The object might be deleted*/ } - /* The simple case: `types.pointer.act_obj` was not protected against press lost. + /* The simple case: `act_obj` was not protected against press lost. * If it is already not pressed then was `indev_proc_press` would set `act_obj = NULL`*/ else { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); - } else { - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + if(proc->reset_query) return; /*The object might be deleted*/ } + + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + if(proc->reset_query) return; /*The object might be deleted*/ + } if(proc->reset_query != 0) return; /*Handle click focus*/ -#if USE_LV_GROUP +#if LV_USE_GROUP /*Edit mode is not used by POINTER devices. So leave edit mode if we are in it*/ lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); if(lv_group_get_editing(g)) lv_group_set_editing(g, false); @@ -833,7 +842,11 @@ static void indev_proc_release(lv_indev_proc_t * proc) * a focus/defucus signal because of `click focus`*/ if(proc->types.pointer.last_pressed != proc->types.pointer.act_obj) { lv_obj_send_event(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED); + if(proc->reset_query) return; /*Not so strict as it's only the previous object and indev not uses it.*/ + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_FOCUSED); + if(proc->reset_query) return; /*The object might be deleted*/ + proc->types.pointer.last_pressed = proc->types.pointer.act_obj; } @@ -891,7 +904,7 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) if(lv_area_is_point_on(&obj->coords, &proc->types.pointer.act_point)) { lv_obj_t * i; - LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) { found_p = indev_search_obj(proc, i); /*If a child was found then break*/ diff --git a/lv_core/lv_indev.h b/lv_core/lv_indev.h index 19b047ce2..2e55c2371 100644 --- a/lv_core/lv_indev.h +++ b/lv_core/lv_indev.h @@ -74,7 +74,7 @@ void lv_indev_enable(lv_hal_indev_type_t type, bool enable); */ void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj); -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Set a destination group for a keypad input device (for LV_INDEV_TYPE_KEYPAD) * @param indev pointer to an input device diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 238097451..aef9cb28a 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -48,9 +48,9 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param); /********************** * STATIC VARIABLES **********************/ - -static bool _lv_initialized = false; - +static bool lv_initialized = false; +static lv_obj_t * obj_act_event; /*Stores the which event is currently being executed*/ +static bool obj_act_event_deleted; /*Shows that the object was deleted in the event function*/ /********************** * MACROS **********************/ @@ -65,7 +65,7 @@ static bool _lv_initialized = false; void lv_init(void) { /* Do nothing if already initialized */ - if (_lv_initialized) { + if (lv_initialized) { LV_LOG_WARN("lv_init: already inited"); return; } @@ -76,16 +76,16 @@ void lv_init(void) lv_mem_init(); lv_task_init(); -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_fs_init(); #endif lv_font_init(); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_init(); #endif -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_init(); #endif @@ -104,7 +104,7 @@ void lv_init(void) lv_indev_init(); #endif - _lv_initialized = true; + lv_initialized = true; LV_LOG_INFO("lv_init ready"); } @@ -168,16 +168,16 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->event_cb = NULL; /*Init. user date*/ -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t)); #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI memset(&new_obj->event_user_data, 0, sizeof(lv_obj_user_data_t)); memset(&new_obj->signal_user_data, 0, sizeof(lv_obj_user_data_t)); memset(&new_obj->design_user_data, 0, sizeof(lv_obj_user_data_t)); #endif -#if USE_LV_GROUP +#if LV_USE_GROUP new_obj->group_p = NULL; #endif /*Set attributes*/ @@ -238,16 +238,16 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->event_cb = NULL; /*Init. user date*/ -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t)); #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI memset(&new_obj->event_user_data, 0, sizeof(lv_obj_user_data_t)); memset(&new_obj->signal_user_data, 0, sizeof(lv_obj_user_data_t)); memset(&new_obj->design_user_data, 0, sizeof(lv_obj_user_data_t)); #endif -#if USE_LV_GROUP +#if LV_USE_GROUP new_obj->group_p = NULL; #endif @@ -271,10 +271,10 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->ext_size = copy->ext_size; /*Set free data*/ -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE memcpy(&new_obj->user_data, ©->user_data, sizeof(lv_obj_user_data_t)); #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI memcpy(&new_obj->event_user_data, ©->event_user_data, sizeof(lv_obj_user_data_t)); memcpy(&new_obj->signal_user_data, ©->signal_user_data, sizeof(lv_obj_user_data_t)); memcpy(&new_obj->design_user_data, ©->design_user_data, sizeof(lv_obj_user_data_t)); @@ -306,7 +306,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->style_p = copy->style_p; -#if USE_LV_GROUP +#if LV_USE_GROUP /*Add to the same group*/ if(copy->group_p != NULL) { lv_group_add_obj(copy->group_p, new_obj); @@ -339,13 +339,15 @@ lv_res_t lv_obj_del(lv_obj_t * obj) { lv_obj_invalidate(obj); + if(obj_act_event == obj) obj_act_event_deleted = true; + /*Delete from the group*/ -#if USE_LV_GROUP +#if LV_USE_GROUP if(obj->group_p != NULL) lv_group_remove_obj(obj); #endif /*Remove the animations from this object*/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_del(obj, NULL); #endif @@ -374,12 +376,15 @@ lv_res_t lv_obj_del(lv_obj_t * obj) } /* Reset all input devices if - * the currently pressed object is deleted*/ + * the object to delete is used*/ lv_indev_t * indev = lv_indev_next(NULL); while(indev) { if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); } + if(lv_group_get_focused(indev->group) == obj) { + lv_indev_reset(indev); + } indev = lv_indev_next(indev); } @@ -613,7 +618,7 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) /*Tell the children the parent's size has changed*/ lv_obj_t * i; - LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) { i->signal_cb(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); } @@ -1013,7 +1018,7 @@ void lv_obj_report_style_mod(lv_style_t * style) while(d) { lv_obj_t * i; - LL_READ(d->scr_ll, i) { + LV_LL_READ(d->scr_ll, i) { if(i->style_p == style || style == NULL) { lv_obj_refresh_style(i); } @@ -1156,16 +1161,25 @@ void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb) * Send an event to the object * @param obj pointer to an object * @param event the type of the event from `lv_event_t`. + * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event */ -void lv_obj_send_event(lv_obj_t * obj, lv_event_t event) +lv_res_t lv_obj_send_event(lv_obj_t * obj, lv_event_t event) { - if(obj == NULL) return; + if(obj == NULL) return LV_RES_OK; + obj_act_event = obj; + obj_act_event_deleted = false; if(obj->event_cb) obj->event_cb(obj, event); + obj_act_event = NULL; + + if(obj_act_event_deleted) return LV_RES_INV; if(obj->event_parent && obj->par) { - lv_obj_send_event(obj->par, event); + lv_res_t res = lv_obj_send_event(obj->par, event); + if(res != LV_RES_OK) return LV_RES_INV; } + + return LV_RES_OK; } /** @@ -1228,7 +1242,7 @@ void lv_obj_refresh_ext_size(lv_obj_t * obj) lv_obj_invalidate(obj); } -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Animate an object * @param obj pointer to an object to animate @@ -1344,9 +1358,9 @@ lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj) else scr = lv_obj_get_screen(obj); /*get the screen of `obj`*/ lv_disp_t * d; - LL_READ(LV_GC_ROOT(_lv_disp_ll), d) { + LV_LL_READ(LV_GC_ROOT(_lv_disp_ll), d) { lv_obj_t * s; - LL_READ(d->scr_ll, s) { + LV_LL_READ(d->scr_ll, s) { if(s == scr) return d; } } @@ -1419,7 +1433,7 @@ uint16_t lv_obj_count_children(const lv_obj_t * obj) lv_obj_t * i; uint16_t cnt = 0; - LL_READ(obj->child_ll, i) cnt++; + LV_LL_READ(obj->child_ll, i) cnt++; return cnt; } @@ -1530,7 +1544,7 @@ lv_style_t * lv_obj_get_style(const lv_obj_t * obj) while(par) { if(par->style_p) { if(par->style_p->glass == 0) { -#if USE_LV_GROUP == 0 +#if LV_USE_GROUP == 0 style_act = par->style_p; #else /*Is a parent is focused then use then focused style*/ @@ -1547,7 +1561,7 @@ lv_style_t * lv_obj_get_style(const lv_obj_t * obj) par = par->par; } } -#if USE_LV_GROUP +#if LV_USE_GROUP if(obj->group_p) { if(lv_group_get_focused(obj->group_p) == obj) { style_act = lv_group_mod_style(obj->group_p, style_act); @@ -1735,7 +1749,7 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf) } } -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE /** * Get a pointer to the object's user data * @param obj pointer to an object @@ -1747,7 +1761,7 @@ lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj) } #endif -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Get the group of the object * @param obj pointer to an object @@ -1871,7 +1885,7 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param) static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coord_t y_diff) { lv_obj_t * i; - LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) { i->coords.x1 += x_diff; i->coords.y1 += y_diff; i->coords.x2 += x_diff; @@ -1889,7 +1903,7 @@ static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coor static void report_style_mod_core(void * style_p, lv_obj_t * obj) { lv_obj_t * i; - LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) { if(i->style_p == style_p || style_p == NULL) { refresh_children_style(i); lv_obj_refresh_style(i); @@ -1925,6 +1939,9 @@ static void refresh_children_style(lv_obj_t * obj) */ static void delete_children(lv_obj_t * obj) { + + if(obj_act_event == obj) obj_act_event_deleted = true; + lv_obj_t * i; lv_obj_t * i_next; i = lv_ll_get_head(&(obj->child_ll)); @@ -1932,7 +1949,7 @@ static void delete_children(lv_obj_t * obj) /*Remove from the group; remove before transversing children so that * the object still has access to all children during the * LV_SIGNAL_DEFOCUS call*/ -#if USE_LV_GROUP +#if LV_USE_GROUP if(obj->group_p != NULL) lv_group_remove_obj(obj); #endif @@ -1948,18 +1965,20 @@ static void delete_children(lv_obj_t * obj) } /*Remove the animations from this object*/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_del(obj, NULL); #endif - /* Reset the input devices if - * the currently pressed object is deleted*/ + * the object to delete is used*/ lv_indev_t * indev = lv_indev_next(NULL); while(indev) { if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); } + if(lv_group_get_focused(indev->group) == obj) { + lv_indev_reset(indev); + } indev = lv_indev_next(indev); } diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index aec434436..769c0a2be 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -180,7 +180,7 @@ typedef struct _lv_obj_t void * ext_attr; /*Object type specific extended data*/ lv_style_t * style_p; /*Pointer to the object's style*/ -#if USE_LV_GROUP != 0 +#if LV_USE_GROUP != 0 void * group_p; /*Pointer to the group of the object*/ #endif /*Attributes and states*/ @@ -200,11 +200,11 @@ typedef struct _lv_obj_t lv_reailgn_t realign; #endif -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE lv_obj_user_data_t user_data; #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI lv_obj_user_data_t event_user_data; lv_obj_user_data_t signal_user_data; lv_obj_user_data_t design_user_data; @@ -500,8 +500,9 @@ void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb); * Send an event to the object * @param obj pointer to an object * @param event the type of the event from `lv_event_t`. + * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event */ -void lv_obj_send_event(lv_obj_t * obj, lv_event_t event); +lv_res_t lv_obj_send_event(lv_obj_t * obj, lv_event_t event); /** * Set the a signal function of an object. Used internally by the library. @@ -543,7 +544,7 @@ void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size); */ void lv_obj_refresh_ext_size(lv_obj_t * obj); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Animate an object * @param obj pointer to an object to animate @@ -784,7 +785,7 @@ void * lv_obj_get_ext_attr(const lv_obj_t * obj); void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE /** * Get a pointer to the object's user data * @param obj pointer to an object @@ -793,7 +794,7 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj); #endif -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Get the group of the object * @param obj pointer to an object diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index 1d50ee17b..52c5afa1b 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -145,7 +145,7 @@ static void lv_refr_task(void * param) uint32_t start = lv_tick_get(); - LL_READ(LV_GC_ROOT(_lv_disp_ll), disp_refr) { + LV_LL_READ(LV_GC_ROOT(_lv_disp_ll), disp_refr) { LV_LOG_TRACE("lv_refr_task: refreshing a display"); lv_refr_join_area(); @@ -388,7 +388,7 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj) /*If this object is fully cover the draw area check the children too */ if(lv_area_is_in(area_p, &obj->coords) && obj->hidden == 0) { - LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) { found_p = lv_refr_get_top_obj(area_p, i); /*If a children is ok then break*/ @@ -498,7 +498,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) lv_area_t mask_child; /*Mask from obj and its child*/ lv_obj_t * child_p; lv_area_t child_area; - LL_READ_BACK(obj->child_ll, child_p) { + LV_LL_READ_BACK(obj->child_ll, child_p) { lv_obj_get_coords(child_p, &child_area); ext_size = child_p->ext_size; child_area.x1 -= ext_size; diff --git a/lv_core/lv_style.c b/lv_core/lv_style.c index 487d2e1f1..1e04116c0 100644 --- a/lv_core/lv_style.c +++ b/lv_core/lv_style.c @@ -22,7 +22,7 @@ /********************** * TYPEDEFS **********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION typedef struct { lv_style_t style_start; /*Save not only pointers because can be same as 'style_anim' then it will be modified too*/ lv_style_t style_end; @@ -34,7 +34,7 @@ typedef struct { /********************** * STATIC PROTOTYPES **********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION static void style_animator(lv_style_anim_dsc_t * dsc, int32_t val); static void style_animation_common_end_cb(void * ptr); #endif @@ -268,7 +268,7 @@ void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * } } -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Create an animation from a pre-configured 'lv_style_anim_t' variable @@ -312,7 +312,7 @@ void * lv_style_anim_create(lv_style_anim_t * anim) /********************** * STATIC FUNCTIONS **********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Used by the style animations to set the values of a style according to start and end style. * @param dsc the 'animated variable' set by lv_style_anim_create() diff --git a/lv_core/lv_style.h b/lv_core/lv_style.h index 38f714d26..0f0accdf7 100644 --- a/lv_core/lv_style.h +++ b/lv_core/lv_style.h @@ -102,7 +102,7 @@ typedef struct } line; } lv_style_t; -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION typedef struct { const lv_style_t * style_start; /*Pointer to the starting style*/ const lv_style_t * style_end; /*Pointer to the destination style*/ @@ -158,7 +158,7 @@ void lv_style_copy(lv_style_t * dest, const lv_style_t * src); */ void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, uint16_t ratio); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Create an animation from a pre-configured 'lv_style_anim_t' variable diff --git a/lv_draw/lv_draw_basic.c b/lv_draw/lv_draw_basic.c index 31b8ba481..65d5517bc 100644 --- a/lv_draw/lv_draw_basic.c +++ b/lv_draw/lv_draw_basic.c @@ -143,7 +143,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, vdb_buf_tmp += vdb_width * vdb_rel_a.y1; -#if USE_LV_GPU +#if LV_USE_GPU static LV_ATTRIBUTE_MEM_ALIGN lv_color_t color_array_tmp[LV_HOR_RES_MAX]; /*Used by 'lv_disp_mem_blend'*/ static lv_coord_t last_width = -1; @@ -442,7 +442,7 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, /*Normal native VDB*/ else { for(row = masked_a.y1; row <= masked_a.y2; row++) { -#if USE_LV_GPU +#if LV_USE_GPU if(disp->driver.mem_blend == false) { sw_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa); } else { diff --git a/lv_draw/lv_draw_img.c b/lv_draw/lv_draw_img.c index ea8ba8cee..026de429b 100644 --- a/lv_draw/lv_draw_img.c +++ b/lv_draw/lv_draw_img.c @@ -37,7 +37,7 @@ static const void * decoder_src; static lv_img_src_t decoder_src_type; static lv_img_header_t decoder_header; static const lv_style_t * decoder_style; -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM static lv_fs_file_t decoder_file; #endif #if LV_IMG_CF_INDEXED @@ -110,7 +110,7 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) header->h = ((lv_img_dsc_t *)src)->header.h; header->cf = ((lv_img_dsc_t *)src)->header.cf; } -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM else if(src_type == LV_IMG_SRC_FILE) { lv_fs_file_t file; lv_fs_res_t res; @@ -233,7 +233,7 @@ bool lv_img_color_format_has_alpha(lv_img_cf_t cf) * @param src pointer to an image source: * - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code) * - a path to a file (e.g. "S:/folder/image.bin") - * - or a symbol (e.g. SYMBOL_CLOSE) + * - or a symbol (e.g. LV_SYMBOL_CLOSE) * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN */ lv_img_src_t lv_img_src_get_type(const void * src) @@ -383,14 +383,14 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * /*Open the file if it's a file*/ if(decoder_src_type == LV_IMG_SRC_FILE) { -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_fs_res_t res = lv_fs_open(&decoder_file, src, LV_FS_MODE_RD); if(res != LV_FS_RES_OK) { LV_LOG_WARN("Built-in image decoder can't open the file"); return LV_IMG_DECODER_OPEN_FAIL; } #else - LV_LOG_WARN("Image built-in decoder can read file because USE_LV_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in decoder can read file because LV_USE_FILESYSTEM = 0"); return LV_IMG_DECODER_OPEN_FAIL; #endif } @@ -414,7 +414,7 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * cf == LV_IMG_CF_INDEXED_8BIT) { #if LV_IMG_CF_INDEXED -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_color32_t palette_file[256]; #endif @@ -424,12 +424,12 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * if(decoder_src_type == LV_IMG_SRC_FILE) { /*Read the palette from file*/ -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_fs_seek(&decoder_file, 4); /*Skip the header*/ lv_fs_read(&decoder_file, palette_file, palette_size * sizeof(lv_color32_t), NULL); palette_p = palette_file; #else - LV_LOG_WARN("Image built-in decoder can read the palette because USE_LV_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in decoder can read the palette because LV_USE_FILESYSTEM = 0"); return LV_IMG_DECODER_OPEN_FAIL; #endif } else { @@ -478,7 +478,7 @@ static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t } if(decoder_src_type == LV_IMG_SRC_FILE) { -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); lv_fs_res_t res; @@ -516,7 +516,7 @@ static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t return false; } #else - LV_LOG_WARN("Image built-in decoder can't read file because USE_LV_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in decoder can't read file because LV_USE_FILESYSTEM = 0"); return false; #endif } else if(decoder_src_type == LV_IMG_SRC_VARIABLE) { @@ -551,7 +551,7 @@ static void lv_img_decoder_close(void) /*It was opened with built-in decoder*/ if(decoder_src) { -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM if(decoder_src_type == LV_IMG_SRC_FILE) { lv_fs_close(&decoder_file); } @@ -626,7 +626,7 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, l break; } -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM # if LV_COMPILER_VLA_SUPPORTED uint8_t fs_buf[w]; # else @@ -638,12 +638,12 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, l const lv_img_dsc_t * img_dsc = decoder_src; data_tmp = img_dsc->data + ofs; } else { -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ lv_fs_read(&decoder_file, fs_buf, w, NULL); data_tmp = fs_buf; #else - LV_LOG_WARN("Image built-in alpha line reader can't read file because USE_LV_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in alpha line reader can't read file because LV_USE_FILESYSTEM = 0"); data_tmp = NULL; /*To avoid warnings*/ return LV_RES_INV; #endif @@ -713,7 +713,7 @@ static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, break; } -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM # if LV_COMPILER_VLA_SUPPORTED uint8_t fs_buf[w]; # else @@ -725,12 +725,12 @@ static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, const lv_img_dsc_t * img_dsc = decoder_src; data_tmp = img_dsc->data + ofs; } else { -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ lv_fs_read(&decoder_file, fs_buf, w, NULL); data_tmp = fs_buf; #else - LV_LOG_WARN("Image built-in indexed line reader can't read file because USE_LV_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in indexed line reader can't read file because LV_USE_FILESYSTEM = 0"); data_tmp = NULL; /*To avoid warnings*/ return LV_RES_INV; #endif diff --git a/lv_draw/lv_draw_img.h b/lv_draw/lv_draw_img.h index b6ebf814d..4f8137676 100644 --- a/lv_draw/lv_draw_img.h +++ b/lv_draw/lv_draw_img.h @@ -131,7 +131,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, * @param src pointer to an image source: * - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code) * - a path to a file (e.g. "S:/folder/image.bin") - * - or a symbol (e.g. SYMBOL_CLOSE) + * - or a symbol (e.g. LV_SYMBOL_CLOSE) * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN */ lv_img_src_t lv_img_src_get_type(const void * src); diff --git a/lv_draw/lv_draw_rect.c b/lv_draw/lv_draw_rect.c index 7bde1d883..1f0202797 100644 --- a/lv_draw/lv_draw_rect.c +++ b/lv_draw/lv_draw_rect.c @@ -30,7 +30,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -#if USE_LV_SHADOW +#if LV_USE_SHADOW static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); @@ -66,7 +66,7 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty { if(lv_area_get_height(coords) < 1 || lv_area_get_width(coords) < 1) return; -#if USE_LV_SHADOW +#if LV_USE_SHADOW if(style->body.shadow.width != 0) { lv_draw_shadow(coords, mask, style, opa_scale); } @@ -1025,7 +1025,7 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t } -#if USE_LV_SHADOW +#if LV_USE_SHADOW /** * Draw a shadow diff --git a/lv_draw/lv_draw_triangle.c b/lv_draw/lv_draw_triangle.c index 954d3541b..24c0f390d 100644 --- a/lv_draw/lv_draw_triangle.c +++ b/lv_draw/lv_draw_triangle.c @@ -33,7 +33,7 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2); /********************** * GLOBAL FUNCTIONS **********************/ -#if USE_LV_TRIANGLE != 0 +#if LV_USE_TRIANGLE != 0 /** * * @param points pointer to an array with 3 points @@ -145,7 +145,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_colo **********************/ -#if USE_LV_TRIANGLE != 0 +#if LV_USE_TRIANGLE != 0 /** * Swap two points * p1 pointer to the first point diff --git a/lv_draw/lv_draw_triangle.h b/lv_draw/lv_draw_triangle.h index c3c6208da..af5c4891f 100644 --- a/lv_draw/lv_draw_triangle.h +++ b/lv_draw/lv_draw_triangle.h @@ -27,9 +27,9 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ /*Experimental use for 3D modeling*/ -#define USE_LV_TRIANGLE 1 +#define LV_USE_TRIANGLE 1 -#if USE_LV_TRIANGLE != 0 +#if LV_USE_TRIANGLE != 0 /** * * @param points pointer to an array with 3 points diff --git a/lv_fonts/lv_font_builtin.c b/lv_fonts/lv_font_builtin.c index bce3c87bd..5236ae786 100644 --- a/lv_fonts/lv_font_builtin.c +++ b/lv_fonts/lv_font_builtin.c @@ -38,20 +38,20 @@ void lv_font_builtin_init(void) { /*DEJAVU 10*/ -#if USE_LV_FONT_DEJAVU_10 != 0 +#if LV_USE_FONT_DEJAVU_10 != 0 lv_font_add(&lv_font_dejavu_10, NULL); #endif -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_10 != 0 +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP != 0 +#if LV_USE_FONT_DEJAVU_10 != 0 lv_font_add(&lv_font_dejavu_10_latin_sup, &lv_font_dejavu_10); #else lv_font_add(&lv_font_dejavu_10_latin_sup, NULL); #endif #endif -#if USE_LV_FONT_DEJAVU_10_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_10 != 0 +#if LV_USE_FONT_DEJAVU_10_CYRILLIC != 0 +#if LV_USE_FONT_DEJAVU_10 != 0 lv_font_add(&lv_font_dejavu_10_cyrillic, &lv_font_dejavu_10); #else lv_font_add(&lv_font_dejavu_10_cyrillic, NULL); @@ -59,8 +59,8 @@ void lv_font_builtin_init(void) #endif /*SYMBOL 10*/ -#if USE_LV_FONT_SYMBOL_10 != 0 -#if USE_LV_FONT_DEJAVU_10 != 0 +#if LV_USE_FONT_SYMBOL_10 != 0 +#if LV_USE_FONT_DEJAVU_10 != 0 lv_font_add(&lv_font_symbol_10, &lv_font_dejavu_10); #else lv_font_add(&lv_font_symbol_10, NULL); @@ -69,20 +69,20 @@ void lv_font_builtin_init(void) /*DEJAVU 20*/ -#if USE_LV_FONT_DEJAVU_20 != 0 +#if LV_USE_FONT_DEJAVU_20 != 0 lv_font_add(&lv_font_dejavu_20, NULL); #endif -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_20 != 0 +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP != 0 +#if LV_USE_FONT_DEJAVU_20 != 0 lv_font_add(&lv_font_dejavu_20_latin_sup, &lv_font_dejavu_20); #else lv_font_add(&lv_font_symbol_20_latin_sup, NULL); #endif #endif -#if USE_LV_FONT_DEJAVU_20_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_20 != 0 +#if LV_USE_FONT_DEJAVU_20_CYRILLIC != 0 +#if LV_USE_FONT_DEJAVU_20 != 0 lv_font_add(&lv_font_dejavu_20_cyrillic, &lv_font_dejavu_20); #else lv_font_add(&lv_font_dejavu_20_cyrillic, NULL); @@ -90,8 +90,8 @@ void lv_font_builtin_init(void) #endif /*SYMBOL 20*/ -#if USE_LV_FONT_SYMBOL_20 != 0 -#if USE_LV_FONT_DEJAVU_20 != 0 +#if LV_USE_FONT_SYMBOL_20 != 0 +#if LV_USE_FONT_DEJAVU_20 != 0 lv_font_add(&lv_font_symbol_20, &lv_font_dejavu_20); #else lv_font_add(&lv_font_symbol_20, NULL); @@ -100,20 +100,20 @@ void lv_font_builtin_init(void) /*DEJAVU 30*/ -#if USE_LV_FONT_DEJAVU_30 != 0 +#if LV_USE_FONT_DEJAVU_30 != 0 lv_font_add(&lv_font_dejavu_30, NULL); #endif -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_30 != 0 +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP != 0 +#if LV_USE_FONT_DEJAVU_30 != 0 lv_font_add(&lv_font_dejavu_30_latin_sup, &lv_font_dejavu_30); #else lv_font_add(&lv_font_dejavu_30_latin_sup, NULL); #endif #endif -#if USE_LV_FONT_DEJAVU_30_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_30 != 0 +#if LV_USE_FONT_DEJAVU_30_CYRILLIC != 0 +#if LV_USE_FONT_DEJAVU_30 != 0 lv_font_add(&lv_font_dejavu_30_cyrillic, &lv_font_dejavu_30); #else lv_font_add(&lv_font_dejavu_30_cyrillic, NULL); @@ -121,8 +121,8 @@ void lv_font_builtin_init(void) #endif /*SYMBOL 30*/ -#if USE_LV_FONT_SYMBOL_30 != 0 -#if USE_LV_FONT_DEJAVU_30 != 0 +#if LV_USE_FONT_SYMBOL_30 != 0 +#if LV_USE_FONT_DEJAVU_30 != 0 lv_font_add(&lv_font_symbol_30, &lv_font_dejavu_30); #else lv_font_add(&lv_font_symbol_30_basic, NULL); @@ -130,20 +130,20 @@ void lv_font_builtin_init(void) #endif /*DEJAVU 40*/ -#if USE_LV_FONT_DEJAVU_40 != 0 +#if LV_USE_FONT_DEJAVU_40 != 0 lv_font_add(&lv_font_dejavu_40, NULL); #endif -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_40 != 0 +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP != 0 +#if LV_USE_FONT_DEJAVU_40 != 0 lv_font_add(&lv_font_dejavu_40_latin_sup, &lv_font_dejavu_40); #else lv_font_add(&lv_font_dejavu_40_latin_sup, NULL); #endif #endif -#if USE_LV_FONT_DEJAVU_40_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_40 != 0 +#if LV_USE_FONT_DEJAVU_40_CYRILLIC != 0 +#if LV_USE_FONT_DEJAVU_40 != 0 lv_font_add(&lv_font_dejavu_40_cyrillic, &lv_font_dejavu_40); #else lv_font_add(&lv_font_dejavu_40_cyrillic, NULL); @@ -151,8 +151,8 @@ void lv_font_builtin_init(void) #endif /*SYMBOL 40*/ -#if USE_LV_FONT_SYMBOL_40 != 0 -#if USE_LV_FONT_DEJAVU_40 != 0 +#if LV_USE_FONT_SYMBOL_40 != 0 +#if LV_USE_FONT_DEJAVU_40 != 0 lv_font_add(&lv_font_symbol_40, &lv_font_dejavu_40); #else lv_font_add(&lv_font_symbol_40, NULL); diff --git a/lv_fonts/lv_font_builtin.h b/lv_fonts/lv_font_builtin.h index c7f93c136..07667ef32 100644 --- a/lv_fonts/lv_font_builtin.h +++ b/lv_fonts/lv_font_builtin.h @@ -47,74 +47,74 @@ void lv_font_builtin_init(void); **********************/ /*10 px */ -#if USE_LV_FONT_DEJAVU_10 +#if LV_USE_FONT_DEJAVU_10 LV_FONT_DECLARE(lv_font_dejavu_10) #endif -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP LV_FONT_DECLARE(lv_font_dejavu_10_latin_sup) #endif -#if USE_LV_FONT_DEJAVU_10_CYRILLIC +#if LV_USE_FONT_DEJAVU_10_CYRILLIC LV_FONT_DECLARE(lv_font_dejavu_10_cyrillic) #endif -#if USE_LV_FONT_SYMBOL_10 +#if LV_USE_FONT_SYMBOL_10 LV_FONT_DECLARE(lv_font_symbol_10) #endif /*20 px */ -#if USE_LV_FONT_DEJAVU_20 +#if LV_USE_FONT_DEJAVU_20 LV_FONT_DECLARE(lv_font_dejavu_20) #endif -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP LV_FONT_DECLARE(lv_font_dejavu_20_latin_sup) #endif -#if USE_LV_FONT_DEJAVU_20_CYRILLIC +#if LV_USE_FONT_DEJAVU_20_CYRILLIC LV_FONT_DECLARE(lv_font_dejavu_20_cyrillic) #endif -#if USE_LV_FONT_SYMBOL_20 +#if LV_USE_FONT_SYMBOL_20 LV_FONT_DECLARE(lv_font_symbol_20) #endif /*30 px */ -#if USE_LV_FONT_DEJAVU_30 +#if LV_USE_FONT_DEJAVU_30 LV_FONT_DECLARE(lv_font_dejavu_30) #endif -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP LV_FONT_DECLARE(lv_font_dejavu_30_latin_sup) #endif -#if USE_LV_FONT_DEJAVU_30_CYRILLIC +#if LV_USE_FONT_DEJAVU_30_CYRILLIC LV_FONT_DECLARE(lv_font_dejavu_30_cyrillic) #endif -#if USE_LV_FONT_SYMBOL_30 +#if LV_USE_FONT_SYMBOL_30 LV_FONT_DECLARE(lv_font_symbol_30) #endif /*40 px */ -#if USE_LV_FONT_DEJAVU_40 +#if LV_USE_FONT_DEJAVU_40 LV_FONT_DECLARE(lv_font_dejavu_40) #endif -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP LV_FONT_DECLARE(lv_font_dejavu_40_latin_sup) #endif -#if USE_LV_FONT_DEJAVU_40_CYRILLIC +#if LV_USE_FONT_DEJAVU_40_CYRILLIC LV_FONT_DECLARE(lv_font_dejavu_40_cyrillic) #endif -#if USE_LV_FONT_SYMBOL_40 +#if LV_USE_FONT_SYMBOL_40 LV_FONT_DECLARE(lv_font_symbol_40) #endif -#if USE_LV_FONT_MONOSPACE_8 +#if LV_USE_FONT_MONOSPACE_8 LV_FONT_DECLARE(lv_font_monospace_8) #endif diff --git a/lv_fonts/lv_font_dejavu_10.c b/lv_fonts/lv_font_dejavu_10.c index f90844ece..47731bb45 100644 --- a/lv_fonts/lv_font_dejavu_10.c +++ b/lv_fonts/lv_font_dejavu_10.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_10 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_10 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 10 px Font in U+0020 ( ) .. U+007e (~) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_10_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_10 == 1 +#if LV_USE_FONT_DEJAVU_10 == 1 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -1246,7 +1246,7 @@ static const uint8_t lv_font_dejavu_10_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10 == 2 +#elif LV_USE_FONT_DEJAVU_10 == 2 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -2483,7 +2483,7 @@ static const uint8_t lv_font_dejavu_10_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10 == 4 +#elif LV_USE_FONT_DEJAVU_10 == 4 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, 0x00, //... 0x00, 0x00, //... @@ -3720,7 +3720,7 @@ static const uint8_t lv_font_dejavu_10_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10 == 8 +#elif LV_USE_FONT_DEJAVU_10 == 8 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, 0x00, 0x00, //... 0x00, 0x00, 0x00, //... @@ -4963,7 +4963,7 @@ static const uint8_t lv_font_dejavu_10_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_10_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_10 == 1 +#if LV_USE_FONT_DEJAVU_10 == 1 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 10}, /*Unicode: U+0021 (!)*/ {.w_px = 3, .glyph_index = 20}, /*Unicode: U+0022 (")*/ @@ -5060,7 +5060,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_glyph_dsc[] = { {.w_px = 3, .glyph_index = 930}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 940}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_10 == 2 +#elif LV_USE_FONT_DEJAVU_10 == 2 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 10}, /*Unicode: U+0021 (!)*/ {.w_px = 3, .glyph_index = 20}, /*Unicode: U+0022 (")*/ @@ -5157,7 +5157,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_glyph_dsc[] = { {.w_px = 3, .glyph_index = 1220}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 1230}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_10 == 4 +#elif LV_USE_FONT_DEJAVU_10 == 4 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 20}, /*Unicode: U+0021 (!)*/ {.w_px = 3, .glyph_index = 30}, /*Unicode: U+0022 (")*/ @@ -5254,7 +5254,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_glyph_dsc[] = { {.w_px = 3, .glyph_index = 2010}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 2030}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_10 == 8 +#elif LV_USE_FONT_DEJAVU_10 == 8 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 30}, /*Unicode: U+0021 (!)*/ {.w_px = 3, .glyph_index = 40}, /*Unicode: U+0022 (")*/ @@ -5364,17 +5364,17 @@ lv_font_t lv_font_dejavu_10 = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_10 == 1 +#if LV_USE_FONT_DEJAVU_10 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10 == 2 +#elif LV_USE_FONT_DEJAVU_10 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10 == 4 +#elif LV_USE_FONT_DEJAVU_10 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10 == 8 +#elif LV_USE_FONT_DEJAVU_10 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_10*/ +#endif /*LV_USE_FONT_DEJAVU_10*/ diff --git a/lv_fonts/lv_font_dejavu_10_cyrillic.c b/lv_fonts/lv_font_dejavu_10_cyrillic.c index 0bbc3c93f..07a2071e2 100644 --- a/lv_fonts/lv_font_dejavu_10_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_10_cyrillic.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_10_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_10_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 10 px Font in U+0410 (А) .. U+044f (я) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_10_cyrillic_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_10_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_10_CYRILLIC == 1 /*Unicode: U+0410 (А) , Width: 5 */ 0x00, //..... 0x20, //..@.. @@ -843,7 +843,7 @@ static const uint8_t lv_font_dejavu_10_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 2 /*Unicode: U+0410 (А) , Width: 5 */ 0x00, 0x00, //..... 0x0c, 0x00, //..@.. @@ -1677,7 +1677,7 @@ static const uint8_t lv_font_dejavu_10_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 4 /*Unicode: U+0410 (А) , Width: 5 */ 0x00, 0x00, 0x00, //..... 0x01, 0xf1, 0x00, //..@.. @@ -2511,7 +2511,7 @@ static const uint8_t lv_font_dejavu_10_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 8 /*Unicode: U+0410 (А) , Width: 5 */ 0x00, 0x00, 0x00, 0x00, 0x00, //..... 0x00, 0x18, 0xfa, 0x18, 0x00, //..@.. @@ -3351,7 +3351,7 @@ static const uint8_t lv_font_dejavu_10_cyrillic_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_10_cyrillic_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_10_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_10_CYRILLIC == 1 {.w_px = 5, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 4, .glyph_index = 10}, /*Unicode: U+0411 (Б)*/ {.w_px = 4, .glyph_index = 20}, /*Unicode: U+0412 (В)*/ @@ -3417,7 +3417,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_cyrillic_glyph_dsc[] = { {.w_px = 6, .glyph_index = 630}, /*Unicode: U+044e (ю)*/ {.w_px = 3, .glyph_index = 640}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 2 {.w_px = 5, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 4, .glyph_index = 20}, /*Unicode: U+0411 (Б)*/ {.w_px = 4, .glyph_index = 30}, /*Unicode: U+0412 (В)*/ @@ -3483,7 +3483,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_cyrillic_glyph_dsc[] = { {.w_px = 6, .glyph_index = 920}, /*Unicode: U+044e (ю)*/ {.w_px = 3, .glyph_index = 940}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 4 {.w_px = 5, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 4, .glyph_index = 30}, /*Unicode: U+0411 (Б)*/ {.w_px = 4, .glyph_index = 50}, /*Unicode: U+0412 (В)*/ @@ -3549,7 +3549,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_cyrillic_glyph_dsc[] = { {.w_px = 6, .glyph_index = 1590}, /*Unicode: U+044e (ю)*/ {.w_px = 3, .glyph_index = 1620}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 8 {.w_px = 5, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 4, .glyph_index = 50}, /*Unicode: U+0411 (Б)*/ {.w_px = 4, .glyph_index = 90}, /*Unicode: U+0412 (В)*/ @@ -3628,17 +3628,17 @@ lv_font_t lv_font_dejavu_10_cyrillic = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_10_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_10_CYRILLIC == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_10_CYRILLIC*/ +#endif /*LV_USE_FONT_DEJAVU_10_CYRILLIC*/ diff --git a/lv_fonts/lv_font_dejavu_10_latin_sup.c b/lv_fonts/lv_font_dejavu_10_latin_sup.c index ecfca44e3..adb173eb8 100644 --- a/lv_fonts/lv_font_dejavu_10_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_10_latin_sup.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 10 px Font in U+00a0 ( ) .. U+00ff (ÿ) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_10_latin_sup_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP == 1 /*Unicode: U+00a0 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -1259,7 +1259,7 @@ static const uint8_t lv_font_dejavu_10_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 2 /*Unicode: U+00a0 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -2509,7 +2509,7 @@ static const uint8_t lv_font_dejavu_10_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 4 /*Unicode: U+00a0 ( ) , Width: 3 */ 0x00, 0x00, //... 0x00, 0x00, //... @@ -3759,7 +3759,7 @@ static const uint8_t lv_font_dejavu_10_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 8 /*Unicode: U+00a0 ( ) , Width: 3 */ 0x00, 0x00, 0x00, //... 0x00, 0x00, 0x00, //... @@ -5015,7 +5015,7 @@ static const uint8_t lv_font_dejavu_10_latin_sup_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_10_latin_sup_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP == 1 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 1, .glyph_index = 10}, /*Unicode: U+00a1 (¡)*/ {.w_px = 3, .glyph_index = 20}, /*Unicode: U+00a2 (¢)*/ @@ -5113,7 +5113,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_latin_sup_glyph_dsc[] = { {.w_px = 4, .glyph_index = 940}, /*Unicode: U+00fe (þ)*/ {.w_px = 4, .glyph_index = 950}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 2 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 1, .glyph_index = 10}, /*Unicode: U+00a1 (¡)*/ {.w_px = 3, .glyph_index = 20}, /*Unicode: U+00a2 (¢)*/ @@ -5211,7 +5211,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_latin_sup_glyph_dsc[] = { {.w_px = 4, .glyph_index = 1240}, /*Unicode: U+00fe (þ)*/ {.w_px = 4, .glyph_index = 1250}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 4 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 1, .glyph_index = 20}, /*Unicode: U+00a1 (¡)*/ {.w_px = 3, .glyph_index = 30}, /*Unicode: U+00a2 (¢)*/ @@ -5309,7 +5309,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_latin_sup_glyph_dsc[] = { {.w_px = 4, .glyph_index = 2110}, /*Unicode: U+00fe (þ)*/ {.w_px = 4, .glyph_index = 2130}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 8 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 1, .glyph_index = 30}, /*Unicode: U+00a1 (¡)*/ {.w_px = 3, .glyph_index = 40}, /*Unicode: U+00a2 (¢)*/ @@ -5420,17 +5420,17 @@ lv_font_t lv_font_dejavu_10_latin_sup = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_10_LATIN_SUP*/ +#endif /*LV_USE_FONT_DEJAVU_10_LATIN_SUP*/ diff --git a/lv_fonts/lv_font_dejavu_20.c b/lv_fonts/lv_font_dejavu_20.c index 2163fccef..de3f09ad5 100644 --- a/lv_fonts/lv_font_dejavu_20.c +++ b/lv_fonts/lv_font_dejavu_20.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_20 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_20 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 20 px Font in U+0020 ( ) .. U+007e (~) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_20 == 1 +#if LV_USE_FONT_DEJAVU_20 == 1 /*Unicode: U+0020 ( ) , Width: 6 */ 0x00, //...... 0x00, //...... @@ -2196,7 +2196,7 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20 == 2 +#elif LV_USE_FONT_DEJAVU_20 == 2 /*Unicode: U+0020 ( ) , Width: 6 */ 0x00, 0x00, //...... 0x00, 0x00, //...... @@ -4383,7 +4383,7 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20 == 4 +#elif LV_USE_FONT_DEJAVU_20 == 4 /*Unicode: U+0020 ( ) , Width: 6 */ 0x00, 0x00, 0x00, //...... 0x00, 0x00, 0x00, //...... @@ -6570,7 +6570,7 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20 == 8 +#elif LV_USE_FONT_DEJAVU_20 == 8 /*Unicode: U+0020 ( ) , Width: 6 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... @@ -8763,7 +8763,7 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_20 == 1 +#if LV_USE_FONT_DEJAVU_20 == 1 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 2, .glyph_index = 20}, /*Unicode: U+0021 (!)*/ {.w_px = 6, .glyph_index = 40}, /*Unicode: U+0022 (")*/ @@ -8860,7 +8860,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { {.w_px = 8, .glyph_index = 2900}, /*Unicode: U+007d (})*/ {.w_px = 11, .glyph_index = 2920}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_20 == 2 +#elif LV_USE_FONT_DEJAVU_20 == 2 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 2, .glyph_index = 40}, /*Unicode: U+0021 (!)*/ {.w_px = 6, .glyph_index = 60}, /*Unicode: U+0022 (")*/ @@ -8957,7 +8957,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { {.w_px = 8, .glyph_index = 4520}, /*Unicode: U+007d (})*/ {.w_px = 11, .glyph_index = 4560}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_20 == 4 +#elif LV_USE_FONT_DEJAVU_20 == 4 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 2, .glyph_index = 60}, /*Unicode: U+0021 (!)*/ {.w_px = 6, .glyph_index = 80}, /*Unicode: U+0022 (")*/ @@ -9054,7 +9054,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { {.w_px = 8, .glyph_index = 8220}, /*Unicode: U+007d (})*/ {.w_px = 11, .glyph_index = 8300}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_20 == 8 +#elif LV_USE_FONT_DEJAVU_20 == 8 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 2, .glyph_index = 120}, /*Unicode: U+0021 (!)*/ {.w_px = 6, .glyph_index = 160}, /*Unicode: U+0022 (")*/ @@ -9164,17 +9164,17 @@ lv_font_t lv_font_dejavu_20 = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_20 == 1 +#if LV_USE_FONT_DEJAVU_20 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20 == 2 +#elif LV_USE_FONT_DEJAVU_20 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20 == 4 +#elif LV_USE_FONT_DEJAVU_20 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20 == 8 +#elif LV_USE_FONT_DEJAVU_20 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_20*/ +#endif /*LV_USE_FONT_DEJAVU_20*/ diff --git a/lv_fonts/lv_font_dejavu_20_cyrillic.c b/lv_fonts/lv_font_dejavu_20_cyrillic.c index fe2948a9b..94782fa28 100644 --- a/lv_fonts/lv_font_dejavu_20_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_20_cyrillic.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_20_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_20_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 20 px Font in U+0410 (А) .. U+044f (я) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_20_cyrillic_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_20_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_20_CYRILLIC == 1 /*Unicode: U+0410 (А) , Width: 12 */ 0x00, 0x00, //............ 0x00, 0x00, //............ @@ -1483,7 +1483,7 @@ static const uint8_t lv_font_dejavu_20_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 2 /*Unicode: U+0410 (А) , Width: 12 */ 0x00, 0x00, 0x00, //............ 0x00, 0x00, 0x00, //............ @@ -2957,7 +2957,7 @@ static const uint8_t lv_font_dejavu_20_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 4 /*Unicode: U+0410 (А) , Width: 12 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ @@ -4431,7 +4431,7 @@ static const uint8_t lv_font_dejavu_20_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 8 /*Unicode: U+0410 (А) , Width: 12 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ @@ -5911,7 +5911,7 @@ static const uint8_t lv_font_dejavu_20_cyrillic_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_20_cyrillic_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_20_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_20_CYRILLIC == 1 {.w_px = 12, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 9, .glyph_index = 40}, /*Unicode: U+0411 (Б)*/ {.w_px = 9, .glyph_index = 80}, /*Unicode: U+0412 (В)*/ @@ -5977,7 +5977,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_cyrillic_glyph_dsc[] = { {.w_px = 12, .glyph_index = 2260}, /*Unicode: U+044e (ю)*/ {.w_px = 9, .glyph_index = 2300}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 2 {.w_px = 12, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 9, .glyph_index = 60}, /*Unicode: U+0411 (Б)*/ {.w_px = 9, .glyph_index = 120}, /*Unicode: U+0412 (В)*/ @@ -6043,7 +6043,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_cyrillic_glyph_dsc[] = { {.w_px = 12, .glyph_index = 3680}, /*Unicode: U+044e (ю)*/ {.w_px = 9, .glyph_index = 3740}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 4 {.w_px = 12, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 9, .glyph_index = 120}, /*Unicode: U+0411 (Б)*/ {.w_px = 9, .glyph_index = 220}, /*Unicode: U+0412 (В)*/ @@ -6109,7 +6109,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_cyrillic_glyph_dsc[] = { {.w_px = 12, .glyph_index = 6800}, /*Unicode: U+044e (ю)*/ {.w_px = 9, .glyph_index = 6920}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 8 {.w_px = 12, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 9, .glyph_index = 240}, /*Unicode: U+0411 (Б)*/ {.w_px = 9, .glyph_index = 420}, /*Unicode: U+0412 (В)*/ @@ -6188,17 +6188,17 @@ lv_font_t lv_font_dejavu_20_cyrillic = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_20_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_20_CYRILLIC == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_20_CYRILLIC*/ +#endif /*LV_USE_FONT_DEJAVU_20_CYRILLIC*/ diff --git a/lv_fonts/lv_font_dejavu_20_latin_sup.c b/lv_fonts/lv_font_dejavu_20_latin_sup.c index c6b6f9391..f7cbab55e 100644 --- a/lv_fonts/lv_font_dejavu_20_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_20_latin_sup.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 20 px Font in U+00a0 ( ) .. U+00ff (ÿ) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_20_latin_sup_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP == 1 /*Unicode: U+00a0 ( ) , Width: 6 */ 0x00, //...... 0x00, //...... @@ -2219,7 +2219,7 @@ static const uint8_t lv_font_dejavu_20_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 2 /*Unicode: U+00a0 ( ) , Width: 6 */ 0x00, 0x00, //...... 0x00, 0x00, //...... @@ -4429,7 +4429,7 @@ static const uint8_t lv_font_dejavu_20_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 4 /*Unicode: U+00a0 ( ) , Width: 6 */ 0x00, 0x00, 0x00, //...... 0x00, 0x00, 0x00, //...... @@ -6639,7 +6639,7 @@ static const uint8_t lv_font_dejavu_20_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 8 /*Unicode: U+00a0 ( ) , Width: 6 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... @@ -8855,7 +8855,7 @@ static const uint8_t lv_font_dejavu_20_latin_sup_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_20_latin_sup_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP == 1 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 2, .glyph_index = 20}, /*Unicode: U+00a1 (¡)*/ {.w_px = 8, .glyph_index = 40}, /*Unicode: U+00a2 (¢)*/ @@ -8953,7 +8953,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_latin_sup_glyph_dsc[] = { {.w_px = 9, .glyph_index = 2840}, /*Unicode: U+00fe (þ)*/ {.w_px = 12, .glyph_index = 2880}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 2 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 2, .glyph_index = 40}, /*Unicode: U+00a1 (¡)*/ {.w_px = 8, .glyph_index = 60}, /*Unicode: U+00a2 (¢)*/ @@ -9051,7 +9051,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_latin_sup_glyph_dsc[] = { {.w_px = 9, .glyph_index = 4740}, /*Unicode: U+00fe (þ)*/ {.w_px = 12, .glyph_index = 4800}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 4 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 2, .glyph_index = 60}, /*Unicode: U+00a1 (¡)*/ {.w_px = 8, .glyph_index = 80}, /*Unicode: U+00a2 (¢)*/ @@ -9149,7 +9149,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_latin_sup_glyph_dsc[] = { {.w_px = 9, .glyph_index = 8660}, /*Unicode: U+00fe (þ)*/ {.w_px = 12, .glyph_index = 8760}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 8 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 2, .glyph_index = 120}, /*Unicode: U+00a1 (¡)*/ {.w_px = 8, .glyph_index = 160}, /*Unicode: U+00a2 (¢)*/ @@ -9260,17 +9260,17 @@ lv_font_t lv_font_dejavu_20_latin_sup = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_20_LATIN_SUP*/ +#endif /*LV_USE_FONT_DEJAVU_20_LATIN_SUP*/ diff --git a/lv_fonts/lv_font_dejavu_30.c b/lv_fonts/lv_font_dejavu_30.c index 6154b4937..ce6c4a75d 100644 --- a/lv_fonts/lv_font_dejavu_30.c +++ b/lv_fonts/lv_font_dejavu_30.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_30 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_30 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 30 px Font in U+0020 ( ) .. U+007e (~) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_30_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_30 == 1 +#if LV_USE_FONT_DEJAVU_30 == 1 /*Unicode: U+0020 ( ) , Width: 8 */ 0x00, //........ 0x00, //........ @@ -3146,7 +3146,7 @@ static const uint8_t lv_font_dejavu_30_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30 == 2 +#elif LV_USE_FONT_DEJAVU_30 == 2 /*Unicode: U+0020 ( ) , Width: 8 */ 0x00, 0x00, //........ 0x00, 0x00, //........ @@ -6283,7 +6283,7 @@ static const uint8_t lv_font_dejavu_30_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30 == 4 +#elif LV_USE_FONT_DEJAVU_30 == 4 /*Unicode: U+0020 ( ) , Width: 8 */ 0x00, 0x00, 0x00, 0x00, //........ 0x00, 0x00, 0x00, 0x00, //........ @@ -9420,7 +9420,7 @@ static const uint8_t lv_font_dejavu_30_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30 == 8 +#elif LV_USE_FONT_DEJAVU_30 == 8 /*Unicode: U+0020 ( ) , Width: 8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ @@ -12563,7 +12563,7 @@ static const uint8_t lv_font_dejavu_30_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_30_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_30 == 1 +#if LV_USE_FONT_DEJAVU_30 == 1 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 30}, /*Unicode: U+0021 (!)*/ {.w_px = 7, .glyph_index = 60}, /*Unicode: U+0022 (")*/ @@ -12660,7 +12660,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_glyph_dsc[] = { {.w_px = 11, .glyph_index = 5400}, /*Unicode: U+007d (})*/ {.w_px = 16, .glyph_index = 5460}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_30 == 2 +#elif LV_USE_FONT_DEJAVU_30 == 2 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 60}, /*Unicode: U+0021 (!)*/ {.w_px = 7, .glyph_index = 90}, /*Unicode: U+0022 (")*/ @@ -12757,7 +12757,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_glyph_dsc[] = { {.w_px = 11, .glyph_index = 9480}, /*Unicode: U+007d (})*/ {.w_px = 16, .glyph_index = 9570}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_30 == 4 +#elif LV_USE_FONT_DEJAVU_30 == 4 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 120}, /*Unicode: U+0021 (!)*/ {.w_px = 7, .glyph_index = 180}, /*Unicode: U+0022 (")*/ @@ -12854,7 +12854,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_glyph_dsc[] = { {.w_px = 11, .glyph_index = 17490}, /*Unicode: U+007d (})*/ {.w_px = 16, .glyph_index = 17670}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_30 == 8 +#elif LV_USE_FONT_DEJAVU_30 == 8 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 240}, /*Unicode: U+0021 (!)*/ {.w_px = 7, .glyph_index = 330}, /*Unicode: U+0022 (")*/ @@ -12964,17 +12964,17 @@ lv_font_t lv_font_dejavu_30 = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_30 == 1 +#if LV_USE_FONT_DEJAVU_30 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30 == 2 +#elif LV_USE_FONT_DEJAVU_30 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30 == 4 +#elif LV_USE_FONT_DEJAVU_30 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30 == 8 +#elif LV_USE_FONT_DEJAVU_30 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_30*/ +#endif /*LV_USE_FONT_DEJAVU_30*/ diff --git a/lv_fonts/lv_font_dejavu_30_cyrillic.c b/lv_fonts/lv_font_dejavu_30_cyrillic.c index 702865fe1..3a17470e2 100644 --- a/lv_fonts/lv_font_dejavu_30_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_30_cyrillic.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_30_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_30_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 30 px Font in U+0410 (А) .. U+044f (я) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_30_cyrillic_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_30_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_30_CYRILLIC == 1 /*Unicode: U+0410 (А) , Width: 17 */ 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, //................. @@ -2123,7 +2123,7 @@ static const uint8_t lv_font_dejavu_30_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 2 /*Unicode: U+0410 (А) , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -4237,7 +4237,7 @@ static const uint8_t lv_font_dejavu_30_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 4 /*Unicode: U+0410 (А) , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -6351,7 +6351,7 @@ static const uint8_t lv_font_dejavu_30_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 8 /*Unicode: U+0410 (А) , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -8471,7 +8471,7 @@ static const uint8_t lv_font_dejavu_30_cyrillic_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_30_cyrillic_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_30_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_30_CYRILLIC == 1 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 13, .glyph_index = 90}, /*Unicode: U+0411 (Б)*/ {.w_px = 13, .glyph_index = 150}, /*Unicode: U+0412 (В)*/ @@ -8537,7 +8537,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_cyrillic_glyph_dsc[] = { {.w_px = 18, .glyph_index = 4260}, /*Unicode: U+044e (ю)*/ {.w_px = 12, .glyph_index = 4350}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 2 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 13, .glyph_index = 150}, /*Unicode: U+0411 (Б)*/ {.w_px = 13, .glyph_index = 270}, /*Unicode: U+0412 (В)*/ @@ -8603,7 +8603,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_cyrillic_glyph_dsc[] = { {.w_px = 18, .glyph_index = 7680}, /*Unicode: U+044e (ю)*/ {.w_px = 12, .glyph_index = 7830}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 4 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 13, .glyph_index = 270}, /*Unicode: U+0411 (Б)*/ {.w_px = 13, .glyph_index = 480}, /*Unicode: U+0412 (В)*/ @@ -8669,7 +8669,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_cyrillic_glyph_dsc[] = { {.w_px = 18, .glyph_index = 14520}, /*Unicode: U+044e (ю)*/ {.w_px = 12, .glyph_index = 14790}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 8 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 13, .glyph_index = 510}, /*Unicode: U+0411 (Б)*/ {.w_px = 13, .glyph_index = 900}, /*Unicode: U+0412 (В)*/ @@ -8748,17 +8748,17 @@ lv_font_t lv_font_dejavu_30_cyrillic = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_30_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_30_CYRILLIC == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_30_CYRILLIC*/ +#endif /*LV_USE_FONT_DEJAVU_30_CYRILLIC*/ diff --git a/lv_fonts/lv_font_dejavu_30_latin_sup.c b/lv_fonts/lv_font_dejavu_30_latin_sup.c index 0cc81d319..8665a44e8 100644 --- a/lv_fonts/lv_font_dejavu_30_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_30_latin_sup.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 30 px Font in U+00a0 ( ) .. U+00ff (ÿ) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_30_latin_sup_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP == 1 /*Unicode: U+00a0 ( ) , Width: 8 */ 0x00, //........ 0x00, //........ @@ -3179,7 +3179,7 @@ static const uint8_t lv_font_dejavu_30_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 2 /*Unicode: U+00a0 ( ) , Width: 8 */ 0x00, 0x00, //........ 0x00, 0x00, //........ @@ -6349,7 +6349,7 @@ static const uint8_t lv_font_dejavu_30_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 4 /*Unicode: U+00a0 ( ) , Width: 8 */ 0x00, 0x00, 0x00, 0x00, //........ 0x00, 0x00, 0x00, 0x00, //........ @@ -9519,7 +9519,7 @@ static const uint8_t lv_font_dejavu_30_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 8 /*Unicode: U+00a0 ( ) , Width: 8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ @@ -12695,7 +12695,7 @@ static const uint8_t lv_font_dejavu_30_latin_sup_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_30_latin_sup_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP == 1 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 30}, /*Unicode: U+00a1 (¡)*/ {.w_px = 11, .glyph_index = 60}, /*Unicode: U+00a2 (¢)*/ @@ -12793,7 +12793,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_latin_sup_glyph_dsc[] = { {.w_px = 13, .glyph_index = 5670}, /*Unicode: U+00fe (þ)*/ {.w_px = 14, .glyph_index = 5730}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 2 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 60}, /*Unicode: U+00a1 (¡)*/ {.w_px = 11, .glyph_index = 90}, /*Unicode: U+00a2 (¢)*/ @@ -12891,7 +12891,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_latin_sup_glyph_dsc[] = { {.w_px = 13, .glyph_index = 9990}, /*Unicode: U+00fe (þ)*/ {.w_px = 14, .glyph_index = 10110}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 4 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 120}, /*Unicode: U+00a1 (¡)*/ {.w_px = 11, .glyph_index = 180}, /*Unicode: U+00a2 (¢)*/ @@ -12989,7 +12989,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_latin_sup_glyph_dsc[] = { {.w_px = 13, .glyph_index = 18690}, /*Unicode: U+00fe (þ)*/ {.w_px = 14, .glyph_index = 18900}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 8 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 240}, /*Unicode: U+00a1 (¡)*/ {.w_px = 11, .glyph_index = 330}, /*Unicode: U+00a2 (¢)*/ @@ -13100,17 +13100,17 @@ lv_font_t lv_font_dejavu_30_latin_sup = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_30_LATIN_SUP*/ +#endif /*LV_USE_FONT_DEJAVU_30_LATIN_SUP*/ diff --git a/lv_fonts/lv_font_dejavu_40.c b/lv_fonts/lv_font_dejavu_40.c index 00cac6d7d..c7f9c9a96 100644 --- a/lv_fonts/lv_font_dejavu_40.c +++ b/lv_fonts/lv_font_dejavu_40.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_40 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_40 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 40 px Font in U+0020 ( ) .. U+007e (~) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_40_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_40 == 1 +#if LV_USE_FONT_DEJAVU_40 == 1 /*Unicode: U+0020 ( ) , Width: 11 */ 0x00, 0x00, //........... 0x00, 0x00, //........... @@ -4096,7 +4096,7 @@ static const uint8_t lv_font_dejavu_40_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40 == 2 +#elif LV_USE_FONT_DEJAVU_40 == 2 /*Unicode: U+0020 ( ) , Width: 11 */ 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, //........... @@ -8183,7 +8183,7 @@ static const uint8_t lv_font_dejavu_40_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40 == 4 +#elif LV_USE_FONT_DEJAVU_40 == 4 /*Unicode: U+0020 ( ) , Width: 11 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... @@ -12270,7 +12270,7 @@ static const uint8_t lv_font_dejavu_40_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40 == 8 +#elif LV_USE_FONT_DEJAVU_40 == 8 /*Unicode: U+0020 ( ) , Width: 11 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... @@ -16363,7 +16363,7 @@ static const uint8_t lv_font_dejavu_40_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_40_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_40 == 1 +#if LV_USE_FONT_DEJAVU_40 == 1 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 80}, /*Unicode: U+0021 (!)*/ {.w_px = 9, .glyph_index = 120}, /*Unicode: U+0022 (")*/ @@ -16460,7 +16460,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_glyph_dsc[] = { {.w_px = 13, .glyph_index = 8920}, /*Unicode: U+007d (})*/ {.w_px = 21, .glyph_index = 9000}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_40 == 2 +#elif LV_USE_FONT_DEJAVU_40 == 2 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 120}, /*Unicode: U+0021 (!)*/ {.w_px = 9, .glyph_index = 160}, /*Unicode: U+0022 (")*/ @@ -16557,7 +16557,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_glyph_dsc[] = { {.w_px = 13, .glyph_index = 15960}, /*Unicode: U+007d (})*/ {.w_px = 21, .glyph_index = 16120}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_40 == 4 +#elif LV_USE_FONT_DEJAVU_40 == 4 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 240}, /*Unicode: U+0021 (!)*/ {.w_px = 9, .glyph_index = 320}, /*Unicode: U+0022 (")*/ @@ -16654,7 +16654,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_glyph_dsc[] = { {.w_px = 13, .glyph_index = 30280}, /*Unicode: U+007d (})*/ {.w_px = 21, .glyph_index = 30560}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_40 == 8 +#elif LV_USE_FONT_DEJAVU_40 == 8 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 440}, /*Unicode: U+0021 (!)*/ {.w_px = 9, .glyph_index = 560}, /*Unicode: U+0022 (")*/ @@ -16764,17 +16764,17 @@ lv_font_t lv_font_dejavu_40 = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_40 == 1 +#if LV_USE_FONT_DEJAVU_40 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40 == 2 +#elif LV_USE_FONT_DEJAVU_40 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40 == 4 +#elif LV_USE_FONT_DEJAVU_40 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40 == 8 +#elif LV_USE_FONT_DEJAVU_40 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_40*/ +#endif /*LV_USE_FONT_DEJAVU_40*/ diff --git a/lv_fonts/lv_font_dejavu_40_cyrillic.c b/lv_fonts/lv_font_dejavu_40_cyrillic.c index 7ef4a5f14..c3dfcb09d 100644 --- a/lv_fonts/lv_font_dejavu_40_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_40_cyrillic.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_40_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_40_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 40 px Font in U+0410 (А) .. U+044f (я) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_40_cyrillic_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_40_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_40_CYRILLIC == 1 /*Unicode: U+0410 (А) , Width: 23 */ 0x00, 0x00, 0x00, //....................... 0x00, 0x00, 0x00, //....................... @@ -2763,7 +2763,7 @@ static const uint8_t lv_font_dejavu_40_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 2 /*Unicode: U+0410 (А) , Width: 23 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... @@ -5517,7 +5517,7 @@ static const uint8_t lv_font_dejavu_40_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 4 /*Unicode: U+0410 (А) , Width: 23 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... @@ -8271,7 +8271,7 @@ static const uint8_t lv_font_dejavu_40_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 8 /*Unicode: U+0410 (А) , Width: 23 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... @@ -11031,7 +11031,7 @@ static const uint8_t lv_font_dejavu_40_cyrillic_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_40_cyrillic_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_40_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_40_CYRILLIC == 1 {.w_px = 23, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 18, .glyph_index = 120}, /*Unicode: U+0411 (Б)*/ {.w_px = 18, .glyph_index = 240}, /*Unicode: U+0412 (В)*/ @@ -11097,7 +11097,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_cyrillic_glyph_dsc[] = { {.w_px = 24, .glyph_index = 7280}, /*Unicode: U+044e (ю)*/ {.w_px = 15, .glyph_index = 7400}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 2 {.w_px = 23, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 18, .glyph_index = 240}, /*Unicode: U+0411 (Б)*/ {.w_px = 18, .glyph_index = 440}, /*Unicode: U+0412 (В)*/ @@ -11163,7 +11163,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_cyrillic_glyph_dsc[] = { {.w_px = 24, .glyph_index = 13280}, /*Unicode: U+044e (ю)*/ {.w_px = 15, .glyph_index = 13520}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 4 {.w_px = 23, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 18, .glyph_index = 480}, /*Unicode: U+0411 (Б)*/ {.w_px = 18, .glyph_index = 840}, /*Unicode: U+0412 (В)*/ @@ -11229,7 +11229,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_cyrillic_glyph_dsc[] = { {.w_px = 24, .glyph_index = 25440}, /*Unicode: U+044e (ю)*/ {.w_px = 15, .glyph_index = 25920}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 8 {.w_px = 23, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 18, .glyph_index = 920}, /*Unicode: U+0411 (Б)*/ {.w_px = 18, .glyph_index = 1640}, /*Unicode: U+0412 (В)*/ @@ -11308,16 +11308,16 @@ lv_font_t lv_font_dejavu_40_cyrillic = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_40_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_40_CYRILLIC == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 8 .bpp = 8, /*Bit per pixel*/ #endif .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_40_CYRILLIC*/ +#endif /*LV_USE_FONT_DEJAVU_40_CYRILLIC*/ diff --git a/lv_fonts/lv_font_dejavu_40_latin_sup.c b/lv_fonts/lv_font_dejavu_40_latin_sup.c index e02804cd1..fc7d202e9 100644 --- a/lv_fonts/lv_font_dejavu_40_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_40_latin_sup.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 40 px Font in U+00a0 ( ) .. U+00ff (ÿ) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_40_latin_sup_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP == 1 /*Unicode: U+00a0 ( ) , Width: 11 */ 0x00, 0x00, //........... 0x00, 0x00, //........... @@ -4139,7 +4139,7 @@ static const uint8_t lv_font_dejavu_40_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 2 /*Unicode: U+00a0 ( ) , Width: 11 */ 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, //........... @@ -8269,7 +8269,7 @@ static const uint8_t lv_font_dejavu_40_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 4 /*Unicode: U+00a0 ( ) , Width: 11 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... @@ -12399,7 +12399,7 @@ static const uint8_t lv_font_dejavu_40_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 8 /*Unicode: U+00a0 ( ) , Width: 11 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... @@ -16535,7 +16535,7 @@ static const uint8_t lv_font_dejavu_40_latin_sup_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_40_latin_sup_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP == 1 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 80}, /*Unicode: U+00a1 (¡)*/ {.w_px = 15, .glyph_index = 120}, /*Unicode: U+00a2 (¢)*/ @@ -16633,7 +16633,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_latin_sup_glyph_dsc[] = { {.w_px = 17, .glyph_index = 9320}, /*Unicode: U+00fe (þ)*/ {.w_px = 18, .glyph_index = 9440}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 2 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 120}, /*Unicode: U+00a1 (¡)*/ {.w_px = 15, .glyph_index = 160}, /*Unicode: U+00a2 (¢)*/ @@ -16731,7 +16731,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_latin_sup_glyph_dsc[] = { {.w_px = 17, .glyph_index = 16960}, /*Unicode: U+00fe (þ)*/ {.w_px = 18, .glyph_index = 17160}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 4 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 240}, /*Unicode: U+00a1 (¡)*/ {.w_px = 15, .glyph_index = 320}, /*Unicode: U+00a2 (¢)*/ @@ -16829,7 +16829,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_latin_sup_glyph_dsc[] = { {.w_px = 17, .glyph_index = 32480}, /*Unicode: U+00fe (þ)*/ {.w_px = 18, .glyph_index = 32840}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 8 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 440}, /*Unicode: U+00a1 (¡)*/ {.w_px = 15, .glyph_index = 560}, /*Unicode: U+00a2 (¢)*/ @@ -16940,17 +16940,17 @@ lv_font_t lv_font_dejavu_40_latin_sup = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_40_LATIN_SUP*/ +#endif /*LV_USE_FONT_DEJAVU_40_LATIN_SUP*/ diff --git a/lv_fonts/lv_font_monospace_8.c b/lv_fonts/lv_font_monospace_8.c index 371bec555..402ae0ac2 100644 --- a/lv_fonts/lv_font_monospace_8.c +++ b/lv_fonts/lv_font_monospace_8.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_MONOSPACE_8 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_MONOSPACE_8 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * unscii_8_mod.ttf 8 px Font in U+0020 ( ) .. U+007e (~) range with all bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_monospace_8_glyph_bitmap[] = { -#if USE_LV_FONT_MONOSPACE_8 == 1 +#if LV_USE_FONT_MONOSPACE_8 == 1 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -1056,7 +1056,7 @@ static const uint8_t lv_font_monospace_8_glyph_bitmap[] = { -#elif USE_LV_FONT_MONOSPACE_8 == 2 +#elif LV_USE_FONT_MONOSPACE_8 == 2 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -2103,7 +2103,7 @@ static const uint8_t lv_font_monospace_8_glyph_bitmap[] = { -#elif USE_LV_FONT_MONOSPACE_8 == 4 +#elif LV_USE_FONT_MONOSPACE_8 == 4 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, 0x00, //... 0x00, 0x00, //... @@ -3150,7 +3150,7 @@ static const uint8_t lv_font_monospace_8_glyph_bitmap[] = { -#elif USE_LV_FONT_MONOSPACE_8 == 8 +#elif LV_USE_FONT_MONOSPACE_8 == 8 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, 0x00, 0x00, //... 0x00, 0x00, 0x00, //... @@ -4203,7 +4203,7 @@ static const uint8_t lv_font_monospace_8_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_monospace_8_glyph_dsc[] = { -#if USE_LV_FONT_MONOSPACE_8 == 1 +#if LV_USE_FONT_MONOSPACE_8 == 1 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 8}, /*Unicode: U+0021 (!)*/ {.w_px = 4, .glyph_index = 16}, /*Unicode: U+0022 (")*/ @@ -4300,7 +4300,7 @@ static const lv_font_glyph_dsc_t lv_font_monospace_8_glyph_dsc[] = { {.w_px = 4, .glyph_index = 744}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 752}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_MONOSPACE_8 == 2 +#elif LV_USE_FONT_MONOSPACE_8 == 2 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 8}, /*Unicode: U+0021 (!)*/ {.w_px = 4, .glyph_index = 16}, /*Unicode: U+0022 (")*/ @@ -4397,7 +4397,7 @@ static const lv_font_glyph_dsc_t lv_font_monospace_8_glyph_dsc[] = { {.w_px = 4, .glyph_index = 1320}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 1328}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_MONOSPACE_8 == 4 +#elif LV_USE_FONT_MONOSPACE_8 == 4 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 16}, /*Unicode: U+0021 (!)*/ {.w_px = 4, .glyph_index = 24}, /*Unicode: U+0022 (")*/ @@ -4494,7 +4494,7 @@ static const lv_font_glyph_dsc_t lv_font_monospace_8_glyph_dsc[] = { {.w_px = 4, .glyph_index = 2032}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 2048}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_MONOSPACE_8 == 8 +#elif LV_USE_FONT_MONOSPACE_8 == 8 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 24}, /*Unicode: U+0021 (!)*/ {.w_px = 4, .glyph_index = 32}, /*Unicode: U+0022 (")*/ @@ -4603,17 +4603,17 @@ lv_font_t lv_font_monospace_8 = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_MONOSPACE_8 == 1 +#if LV_USE_FONT_MONOSPACE_8 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_MONOSPACE_8 == 2 +#elif LV_USE_FONT_MONOSPACE_8 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_MONOSPACE_8 == 4 +#elif LV_USE_FONT_MONOSPACE_8 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_MONOSPACE_8 == 8 +#elif LV_USE_FONT_MONOSPACE_8 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 6, /*Fix width (0: if not used)*/ .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_MONOSPACE_8*/ +#endif /*LV_USE_FONT_MONOSPACE_8*/ diff --git a/lv_fonts/lv_font_symbol_10.c b/lv_fonts/lv_font_symbol_10.c index 586b3d817..016113573 100644 --- a/lv_fonts/lv_font_symbol_10.c +++ b/lv_fonts/lv_font_symbol_10.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_SYMBOL_10 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_SYMBOL_10 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * fontawesome-webfont.ttf 10 px Font in U+f000 () .. U+f2ee () range with 1 bpp @@ -10,7 +10,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_symbol_10_glyph_bitmap[] = { -#if USE_LV_FONT_SYMBOL_10 == 1 +#if LV_USE_FONT_SYMBOL_10 == 1 /*Unicode: U+f001 () , Width: 8 */ 0x00, //........ 0x0f, //...+%@@% @@ -662,7 +662,7 @@ static const uint8_t lv_font_symbol_10_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_10 == 2 +#elif LV_USE_FONT_SYMBOL_10 == 2 /*Unicode: U+f001 () , Width: 8 */ 0x00, 0x00, //........ 0x01, 0xbe, //...+%@@% @@ -1314,7 +1314,7 @@ static const uint8_t lv_font_symbol_10_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_10 == 4 +#elif LV_USE_FONT_SYMBOL_10 == 4 /*Unicode: U+f001 () , Width: 8 */ 0x00, 0x00, 0x00, 0x22, //........ 0x00, 0x04, 0x9d, 0xfb, //...+%@@% @@ -1966,7 +1966,7 @@ static const uint8_t lv_font_symbol_10_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_10 == 8 +#elif LV_USE_FONT_SYMBOL_10 == 8 /*Unicode: U+f001 () , Width: 8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x2e, //........ 0x00, 0x00, 0x08, 0x4c, 0x96, 0xde, 0xff, 0xba, //...+%@@% @@ -2624,7 +2624,7 @@ static const uint8_t lv_font_symbol_10_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_symbol_10_glyph_dsc[] = { -#if USE_LV_FONT_SYMBOL_10 == 1 +#if LV_USE_FONT_SYMBOL_10 == 1 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 10, .glyph_index = 10}, /*Unicode: U+f008 ()*/ {.w_px = 9, .glyph_index = 30}, /*Unicode: U+f00b ()*/ @@ -2676,7 +2676,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_10_glyph_dsc[] = { {.w_px = 12, .glyph_index = 710}, /*Unicode: U+f244 ()*/ {.w_px = 8, .glyph_index = 730}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_10 == 2 +#elif LV_USE_FONT_SYMBOL_10 == 2 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 10, .glyph_index = 20}, /*Unicode: U+f008 ()*/ {.w_px = 9, .glyph_index = 50}, /*Unicode: U+f00b ()*/ @@ -2728,7 +2728,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_10_glyph_dsc[] = { {.w_px = 12, .glyph_index = 1180}, /*Unicode: U+f244 ()*/ {.w_px = 8, .glyph_index = 1210}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_10 == 4 +#elif LV_USE_FONT_SYMBOL_10 == 4 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 10, .glyph_index = 40}, /*Unicode: U+f008 ()*/ {.w_px = 9, .glyph_index = 90}, /*Unicode: U+f00b ()*/ @@ -2780,7 +2780,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_10_glyph_dsc[] = { {.w_px = 12, .glyph_index = 2100}, /*Unicode: U+f244 ()*/ {.w_px = 8, .glyph_index = 2160}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_10 == 8 +#elif LV_USE_FONT_SYMBOL_10 == 8 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 10, .glyph_index = 80}, /*Unicode: U+f008 ()*/ {.w_px = 9, .glyph_index = 180}, /*Unicode: U+f00b ()*/ @@ -2845,17 +2845,17 @@ lv_font_t lv_font_symbol_10 = { .unicode_list = NULL, .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_SYMBOL_10 == 1 +#if LV_USE_FONT_SYMBOL_10 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_10 == 2 +#elif LV_USE_FONT_SYMBOL_10 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_10 == 4 +#elif LV_USE_FONT_SYMBOL_10 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_10 == 8 +#elif LV_USE_FONT_SYMBOL_10 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_SYMBOL_10*/ +#endif /*LV_USE_FONT_SYMBOL_10*/ diff --git a/lv_fonts/lv_font_symbol_20.c b/lv_fonts/lv_font_symbol_20.c index 3a691f599..1a04acda5 100644 --- a/lv_fonts/lv_font_symbol_20.c +++ b/lv_fonts/lv_font_symbol_20.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_SYMBOL_20 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_SYMBOL_20 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * fontawesome-webfont.ttf 20 px Font in U+f000 () .. U+f2ee () range with 1 bpp @@ -10,7 +10,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_symbol_20_glyph_bitmap[] = { -#if USE_LV_FONT_SYMBOL_20 == 1 +#if LV_USE_FONT_SYMBOL_20 == 1 /*Unicode: U+f001 () , Width: 17 */ 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, //................. @@ -1162,7 +1162,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_20 == 2 +#elif LV_USE_FONT_SYMBOL_20 == 2 /*Unicode: U+f001 () , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -2314,7 +2314,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_20 == 4 +#elif LV_USE_FONT_SYMBOL_20 == 4 /*Unicode: U+f001 () , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -3466,7 +3466,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_20 == 8 +#elif LV_USE_FONT_SYMBOL_20 == 8 /*Unicode: U+f001 () , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -4624,7 +4624,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_symbol_20_glyph_dsc[] = { -#if USE_LV_FONT_SYMBOL_20 == 1 +#if LV_USE_FONT_SYMBOL_20 == 1 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 21, .glyph_index = 60}, /*Unicode: U+f008 ()*/ {.w_px = 19, .glyph_index = 120}, /*Unicode: U+f00b ()*/ @@ -4676,7 +4676,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_20_glyph_dsc[] = { {.w_px = 25, .glyph_index = 2660}, /*Unicode: U+f244 ()*/ {.w_px = 14, .glyph_index = 2740}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_20 == 2 +#elif LV_USE_FONT_SYMBOL_20 == 2 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 21, .glyph_index = 100}, /*Unicode: U+f008 ()*/ {.w_px = 19, .glyph_index = 220}, /*Unicode: U+f00b ()*/ @@ -4728,7 +4728,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_20_glyph_dsc[] = { {.w_px = 25, .glyph_index = 4640}, /*Unicode: U+f244 ()*/ {.w_px = 14, .glyph_index = 4780}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_20 == 4 +#elif LV_USE_FONT_SYMBOL_20 == 4 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 21, .glyph_index = 180}, /*Unicode: U+f008 ()*/ {.w_px = 19, .glyph_index = 400}, /*Unicode: U+f00b ()*/ @@ -4780,7 +4780,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_20_glyph_dsc[] = { {.w_px = 25, .glyph_index = 8640}, /*Unicode: U+f244 ()*/ {.w_px = 14, .glyph_index = 8900}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_20 == 8 +#elif LV_USE_FONT_SYMBOL_20 == 8 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 21, .glyph_index = 340}, /*Unicode: U+f008 ()*/ {.w_px = 19, .glyph_index = 760}, /*Unicode: U+f00b ()*/ @@ -4845,17 +4845,17 @@ lv_font_t lv_font_symbol_20 = { .unicode_list = NULL, .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_SYMBOL_20 == 1 +#if LV_USE_FONT_SYMBOL_20 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_20 == 2 +#elif LV_USE_FONT_SYMBOL_20 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_20 == 4 +#elif LV_USE_FONT_SYMBOL_20 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_20 == 8 +#elif LV_USE_FONT_SYMBOL_20 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_SYMBOL_20*/ +#endif /*LV_USE_FONT_SYMBOL_20*/ diff --git a/lv_fonts/lv_font_symbol_30.c b/lv_fonts/lv_font_symbol_30.c index 0a0f38684..faf015b93 100644 --- a/lv_fonts/lv_font_symbol_30.c +++ b/lv_fonts/lv_font_symbol_30.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_SYMBOL_30 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_SYMBOL_30 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * fontawesome-webfont.ttf 30 px Font in U+f000 () .. U+f2ee () range with 1 bpp @@ -10,7 +10,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_symbol_30_glyph_bitmap[] = { -#if USE_LV_FONT_SYMBOL_30 == 1 +#if LV_USE_FONT_SYMBOL_30 == 1 /*Unicode: U+f001 () , Width: 25 */ 0x00, 0x00, 0x00, 0x00, //......................... 0x00, 0x00, 0x00, 0x00, //......................... @@ -1662,7 +1662,7 @@ static const uint8_t lv_font_symbol_30_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_30 == 2 +#elif LV_USE_FONT_SYMBOL_30 == 2 /*Unicode: U+f001 () , Width: 25 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... @@ -3314,7 +3314,7 @@ static const uint8_t lv_font_symbol_30_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_30 == 4 +#elif LV_USE_FONT_SYMBOL_30 == 4 /*Unicode: U+f001 () , Width: 25 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... @@ -4966,7 +4966,7 @@ static const uint8_t lv_font_symbol_30_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_30 == 8 +#elif LV_USE_FONT_SYMBOL_30 == 8 /*Unicode: U+f001 () , Width: 25 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... @@ -6624,7 +6624,7 @@ static const uint8_t lv_font_symbol_30_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_symbol_30_glyph_dsc[] = { -#if USE_LV_FONT_SYMBOL_30 == 1 +#if LV_USE_FONT_SYMBOL_30 == 1 {.w_px = 25, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 32, .glyph_index = 120}, /*Unicode: U+f008 ()*/ {.w_px = 29, .glyph_index = 240}, /*Unicode: U+f00b ()*/ @@ -6676,7 +6676,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_30_glyph_dsc[] = { {.w_px = 38, .glyph_index = 5400}, /*Unicode: U+f244 ()*/ {.w_px = 22, .glyph_index = 5550}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_30 == 2 +#elif LV_USE_FONT_SYMBOL_30 == 2 {.w_px = 25, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 32, .glyph_index = 210}, /*Unicode: U+f008 ()*/ {.w_px = 29, .glyph_index = 450}, /*Unicode: U+f00b ()*/ @@ -6728,7 +6728,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_30_glyph_dsc[] = { {.w_px = 38, .glyph_index = 10020}, /*Unicode: U+f244 ()*/ {.w_px = 22, .glyph_index = 10320}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_30 == 4 +#elif LV_USE_FONT_SYMBOL_30 == 4 {.w_px = 25, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 32, .glyph_index = 390}, /*Unicode: U+f008 ()*/ {.w_px = 29, .glyph_index = 870}, /*Unicode: U+f00b ()*/ @@ -6780,7 +6780,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_30_glyph_dsc[] = { {.w_px = 38, .glyph_index = 19260}, /*Unicode: U+f244 ()*/ {.w_px = 22, .glyph_index = 19830}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_30 == 8 +#elif LV_USE_FONT_SYMBOL_30 == 8 {.w_px = 25, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 32, .glyph_index = 750}, /*Unicode: U+f008 ()*/ {.w_px = 29, .glyph_index = 1710}, /*Unicode: U+f00b ()*/ @@ -6844,17 +6844,17 @@ lv_font_t lv_font_symbol_30 = { .unicode_list = NULL, .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_SYMBOL_30 == 1 +#if LV_USE_FONT_SYMBOL_30 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_30 == 2 +#elif LV_USE_FONT_SYMBOL_30 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_30 == 4 +#elif LV_USE_FONT_SYMBOL_30 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_30 == 8 +#elif LV_USE_FONT_SYMBOL_30 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_SYMBOL_30*/ +#endif /*LV_USE_FONT_SYMBOL_30*/ diff --git a/lv_fonts/lv_font_symbol_40.c b/lv_fonts/lv_font_symbol_40.c index eacbde0c9..8b84a0beb 100644 --- a/lv_fonts/lv_font_symbol_40.c +++ b/lv_fonts/lv_font_symbol_40.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_SYMBOL_40 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_SYMBOL_40 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * fontawesome-webfont.ttf 40 px Font in U+f000 () .. U+f2ee () range with 1 bpp @@ -10,7 +10,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_symbol_40_glyph_bitmap[] = { -#if USE_LV_FONT_SYMBOL_40 == 1 +#if LV_USE_FONT_SYMBOL_40 == 1 /*Unicode: U+f001 () , Width: 34 */ 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. @@ -2162,7 +2162,7 @@ static const uint8_t lv_font_symbol_40_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_40 == 2 +#elif LV_USE_FONT_SYMBOL_40 == 2 /*Unicode: U+f001 () , Width: 34 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. @@ -4314,7 +4314,7 @@ static const uint8_t lv_font_symbol_40_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_40 == 4 +#elif LV_USE_FONT_SYMBOL_40 == 4 /*Unicode: U+f001 () , Width: 34 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. @@ -6466,7 +6466,7 @@ static const uint8_t lv_font_symbol_40_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_40 == 8 +#elif LV_USE_FONT_SYMBOL_40 == 8 /*Unicode: U+f001 () , Width: 34 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. @@ -8624,7 +8624,7 @@ static const uint8_t lv_font_symbol_40_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_symbol_40_glyph_dsc[] = { -#if USE_LV_FONT_SYMBOL_40 == 1 +#if LV_USE_FONT_SYMBOL_40 == 1 {.w_px = 34, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 42, .glyph_index = 200}, /*Unicode: U+f008 ()*/ {.w_px = 39, .glyph_index = 440}, /*Unicode: U+f00b ()*/ @@ -8676,7 +8676,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_40_glyph_dsc[] = { {.w_px = 51, .glyph_index = 9320}, /*Unicode: U+f244 ()*/ {.w_px = 29, .glyph_index = 9600}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_40 == 2 +#elif LV_USE_FONT_SYMBOL_40 == 2 {.w_px = 34, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 42, .glyph_index = 360}, /*Unicode: U+f008 ()*/ {.w_px = 39, .glyph_index = 800}, /*Unicode: U+f00b ()*/ @@ -8728,7 +8728,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_40_glyph_dsc[] = { {.w_px = 51, .glyph_index = 17400}, /*Unicode: U+f244 ()*/ {.w_px = 29, .glyph_index = 17920}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_40 == 4 +#elif LV_USE_FONT_SYMBOL_40 == 4 {.w_px = 34, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 42, .glyph_index = 680}, /*Unicode: U+f008 ()*/ {.w_px = 39, .glyph_index = 1520}, /*Unicode: U+f00b ()*/ @@ -8780,7 +8780,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_40_glyph_dsc[] = { {.w_px = 51, .glyph_index = 34000}, /*Unicode: U+f244 ()*/ {.w_px = 29, .glyph_index = 35040}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_40 == 8 +#elif LV_USE_FONT_SYMBOL_40 == 8 {.w_px = 34, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 42, .glyph_index = 1360}, /*Unicode: U+f008 ()*/ {.w_px = 39, .glyph_index = 3040}, /*Unicode: U+f00b ()*/ @@ -8845,17 +8845,17 @@ lv_font_t lv_font_symbol_40 = { .unicode_list = NULL, .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_SYMBOL_40 == 1 +#if LV_USE_FONT_SYMBOL_40 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_40 == 2 +#elif LV_USE_FONT_SYMBOL_40 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_40 == 4 +#elif LV_USE_FONT_SYMBOL_40 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_40 == 8 +#elif LV_USE_FONT_SYMBOL_40 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_SYMBOL_40*/ +#endif /*LV_USE_FONT_SYMBOL_40*/ diff --git a/lv_hal/lv_hal_disp.c b/lv_hal/lv_hal_disp.c index 339f2853e..c3d1683b7 100644 --- a/lv_hal/lv_hal_disp.c +++ b/lv_hal/lv_hal_disp.c @@ -61,7 +61,7 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) driver->ver_res = LV_VER_RES_MAX; driver->buffer = NULL; -#if USE_LV_GPU +#if LV_USE_GPU driver->mem_blend = NULL; driver->mem_fill = NULL; #endif diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 6725c854c..e1397b5d2 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -83,18 +83,18 @@ typedef struct _disp_drv_t { void (*monitor_cb)(struct _disp_drv_t * disp_drv, uint32_t time, uint32_t px); -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE lv_disp_drv_user_data_t user_data; #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI lv_disp_drv_user_data_t flush_user_data; lv_disp_drv_user_data_t rounder_user_data; lv_disp_drv_user_data_t set_px_user_data; lv_disp_drv_user_data_t monitor_user_data; #endif -#if USE_LV_GPU +#if LV_USE_GPU /*OPTIONAL: Blend two memories using opacity (GPU only)*/ void (*mem_blend)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); diff --git a/lv_hal/lv_hal_indev.c b/lv_hal/lv_hal_indev.c index 5026f7f65..7ee8530e3 100644 --- a/lv_hal/lv_hal_indev.c +++ b/lv_hal/lv_hal_indev.c @@ -80,9 +80,9 @@ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver) memcpy(&node->driver, driver, sizeof(lv_indev_drv_t)); node->proc.reset_query = 1; - node->custom_data.cursor = NULL; - node->custom_data.group = NULL; - node->custom_data.btn_points = NULL; + node->cursor = NULL; + node->group = NULL; + node->btn_points = NULL; return node; } diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index 63ad23068..68e279982 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -71,11 +71,11 @@ typedef struct _lv_indev_drv_t { lv_hal_indev_type_t type; /*Input device type*/ bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t *data); /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb (buffered)*/ -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI lv_indev_drv_user_data_t read_user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/ #endif -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE lv_indev_drv_user_data_t user_data; #endif struct _disp_t * disp; /*Pointer to the assigned display*/ @@ -127,12 +127,9 @@ typedef struct _lv_indev_t { lv_indev_proc_t proc; lv_indev_feedback_t feedback; uint32_t last_activity_time; - union { - struct _lv_obj_t *cursor; /*Cursor for LV_INPUT_TYPE_POINTER*/ - struct _lv_group_t *group; /*Keypad destination group*/ - const lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed here by the buttons*/ - - }custom_data; + struct _lv_obj_t *cursor; /*Cursor for LV_INPUT_TYPE_POINTER*/ + struct _lv_group_t *group; /*Keypad destination group*/ + const lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed here by the buttons*/ } lv_indev_t; /********************** diff --git a/lv_misc/lv_anim.c b/lv_misc/lv_anim.c index 578c5566d..c18c1a866 100644 --- a/lv_misc/lv_anim.c +++ b/lv_misc/lv_anim.c @@ -8,7 +8,7 @@ *********************/ #include "lv_anim.h" -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION #include #include #include "../lv_hal/lv_hal_tick.h" @@ -128,7 +128,7 @@ uint16_t lv_anim_count_running(void) { uint16_t cnt = 0; lv_anim_t * a; - LL_READ(LV_GC_ROOT(_lv_anim_ll), a) cnt++; + LV_LL_READ(LV_GC_ROOT(_lv_anim_ll), a) cnt++; return cnt++; } @@ -357,7 +357,7 @@ static void anim_task(void * param) (void)param; lv_anim_t * a; - LL_READ(LV_GC_ROOT(_lv_anim_ll), a) { + LV_LL_READ(LV_GC_ROOT(_lv_anim_ll), a) { a->has_run = 0; } diff --git a/lv_misc/lv_anim.h b/lv_misc/lv_anim.h index 7e8a0b627..611f38611 100644 --- a/lv_misc/lv_anim.h +++ b/lv_misc/lv_anim.h @@ -20,7 +20,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION #include #include @@ -167,7 +167,7 @@ int32_t lv_anim_path_step(const lv_anim_t *a); * MACROS **********************/ -#endif /*USE_LV_ANIMATION == 0*/ +#endif /*LV_USE_ANIMATION == 0*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_misc/lv_fs.c b/lv_misc/lv_fs.c index 9465d59bf..9b5c2f267 100644 --- a/lv_misc/lv_fs.c +++ b/lv_misc/lv_fs.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_fs.h" -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM #include "lv_ll.h" #include @@ -492,7 +492,7 @@ char * lv_fs_get_letters(char * buf) lv_fs_drv_t * drv; uint8_t i = 0; - LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) { + LV_LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) { buf[i] = drv->letter; i++; } @@ -615,7 +615,7 @@ static lv_fs_drv_t * lv_fs_get_drv(char letter) { lv_fs_drv_t * drv; - LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) { + LV_LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) { if(drv->letter == letter) { return drv; } @@ -624,4 +624,4 @@ static lv_fs_drv_t * lv_fs_get_drv(char letter) return NULL; } -#endif /*USE_LV_FILESYSTEM*/ +#endif /*LV_USE_FILESYSTEM*/ diff --git a/lv_misc/lv_fs.h b/lv_misc/lv_fs.h index e7180022b..35e70408e 100644 --- a/lv_misc/lv_fs.h +++ b/lv_misc/lv_fs.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM #include #include @@ -268,7 +268,7 @@ const char * lv_fs_get_last(const char * path); * MACROS **********************/ -#endif /*USE_LV_FILESYSTEM*/ +#endif /*LV_USE_FILESYSTEM*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_misc/lv_ll.h b/lv_misc/lv_ll.h index b49d0ea36..6fc4827ac 100644 --- a/lv_misc/lv_ll.h +++ b/lv_misc/lv_ll.h @@ -141,9 +141,9 @@ bool lv_ll_is_empty(lv_ll_t * ll_p); * MACROS **********************/ -#define LL_READ(list, i) for(i = lv_ll_get_head(&list); i != NULL; i = lv_ll_get_next(&list, i)) +#define LV_LL_READ(list, i) for(i = lv_ll_get_head(&list); i != NULL; i = lv_ll_get_next(&list, i)) -#define LL_READ_BACK(list, i) for(i = lv_ll_get_tail(&list); i != NULL; i = lv_ll_get_prev(&list, i)) +#define LV_LL_READ_BACK(list, i) for(i = lv_ll_get_tail(&list); i != NULL; i = lv_ll_get_prev(&list, i)) #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_misc/lv_log.c b/lv_misc/lv_log.c index ef23d04de..7c9e2c53e 100644 --- a/lv_misc/lv_log.c +++ b/lv_misc/lv_log.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_log.h" -#if USE_LV_LOG +#if LV_USE_LOG #if LV_LOG_PRINTF #include @@ -73,4 +73,4 @@ void lv_log_add(lv_log_level_t level, const char * file, int line, const char * * STATIC FUNCTIONS **********************/ -#endif /*USE_LV_LOG*/ +#endif /*LV_USE_LOG*/ diff --git a/lv_misc/lv_log.h b/lv_misc/lv_log.h index 8e99763d4..b124a9294 100644 --- a/lv_misc/lv_log.h +++ b/lv_misc/lv_log.h @@ -24,7 +24,7 @@ extern "C" { * DEFINES *********************/ -/*Possible log level. For compatibility declare it independently from `USE_LV_LOG`*/ +/*Possible log level. For compatibility declare it independently from `LV_USE_LOG`*/ #define LV_LOG_LEVEL_TRACE 0 /*A lot of logs to give detailed information*/ #define LV_LOG_LEVEL_INFO 1 /*Log important events*/ @@ -34,7 +34,7 @@ extern "C" { typedef int8_t lv_log_level_t; -#if USE_LV_LOG +#if LV_USE_LOG /********************** * TYPEDEFS **********************/ @@ -69,15 +69,15 @@ void lv_log_add(lv_log_level_t level, const char * file, int line, const char * #define LV_LOG_WARN(dsc) lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, dsc); #define LV_LOG_ERROR(dsc) lv_log_add(LV_LOG_LEVEL_ERROR, __FILE__, __LINE__, dsc); -#else /*USE_LV_LOG*/ +#else /*LV_USE_LOG*/ -/*Do nothing if `USE_LV_LOG 0`*/ +/*Do nothing if `LV_USE_LOG 0`*/ #define lv_log_add(level, file, line, dsc) {;} #define LV_LOG_TRACE(dsc) {;} #define LV_LOG_INFO(dsc) {;} #define LV_LOG_WARN(dsc) {;} #define LV_LOG_ERROR(dsc) {;} -#endif /*USE_LV_LOG*/ +#endif /*LV_USE_LOG*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_misc/lv_mem.h b/lv_misc/lv_mem.h index 0af68d391..f195f7ac2 100644 --- a/lv_misc/lv_mem.h +++ b/lv_misc/lv_mem.h @@ -114,7 +114,7 @@ uint32_t lv_mem_get_size(const void * data); * Halt on NULL pointer * p pointer to a memory */ -#if USE_LV_LOG == 0 +#if LV_USE_LOG == 0 # define lv_mem_assert(p) {if(p == NULL) while(1); } #else # define lv_mem_assert(p) {if(p == NULL) {LV_LOG_ERROR("Out of memory!"); while(1); }} diff --git a/lv_misc/lv_symbol_def.h b/lv_misc/lv_symbol_def.h index e60952b6a..fd73d29be 100644 --- a/lv_misc/lv_symbol_def.h +++ b/lv_misc/lv_symbol_def.h @@ -22,186 +22,186 @@ extern "C" { #if LV_TXT_UTF8 == 0 #define LV_SYMBOL_GLYPH_FIRST 0xC0 -#define SYMBOL_AUDIO _SYMBOL_VALUE1(C0) -#define SYMBOL_VIDEO _SYMBOL_VALUE1(C1) -#define SYMBOL_LIST _SYMBOL_VALUE1(C2) -#define SYMBOL_OK _SYMBOL_VALUE1(C3) -#define SYMBOL_CLOSE _SYMBOL_VALUE1(C4) -#define SYMBOL_POWER _SYMBOL_VALUE1(C5) -#define SYMBOL_SETTINGS _SYMBOL_VALUE1(C6) -#define SYMBOL_TRASH _SYMBOL_VALUE1(C7) -#define SYMBOL_HOME _SYMBOL_VALUE1(C8) -#define SYMBOL_DOWNLOAD _SYMBOL_VALUE1(C9) -#define SYMBOL_DRIVE _SYMBOL_VALUE1(CA) -#define SYMBOL_REFRESH _SYMBOL_VALUE1(CB) -#define SYMBOL_MUTE _SYMBOL_VALUE1(CC) -#define SYMBOL_VOLUME_MID _SYMBOL_VALUE1(CD) -#define SYMBOL_VOLUME_MAX _SYMBOL_VALUE1(CE) -#define SYMBOL_IMAGE _SYMBOL_VALUE1(CF) -#define SYMBOL_EDIT _SYMBOL_VALUE1(D0) -#define SYMBOL_PREV _SYMBOL_VALUE1(D1) -#define SYMBOL_PLAY _SYMBOL_VALUE1(D2) -#define SYMBOL_PAUSE _SYMBOL_VALUE1(D3) -#define SYMBOL_STOP _SYMBOL_VALUE1(D4) -#define SYMBOL_NEXT _SYMBOL_VALUE1(D5) -#define SYMBOL_EJECT _SYMBOL_VALUE1(D6) -#define SYMBOL_LEFT _SYMBOL_VALUE1(D7) -#define SYMBOL_RIGHT _SYMBOL_VALUE1(D8) -#define SYMBOL_PLUS _SYMBOL_VALUE1(D9) -#define SYMBOL_MINUS _SYMBOL_VALUE1(DA) -#define SYMBOL_WARNING _SYMBOL_VALUE1(DB) -#define SYMBOL_SHUFFLE _SYMBOL_VALUE1(DC) -#define SYMBOL_UP _SYMBOL_VALUE1(DD) -#define SYMBOL_DOWN _SYMBOL_VALUE1(DE) -#define SYMBOL_LOOP _SYMBOL_VALUE1(DF) -#define SYMBOL_DIRECTORY _SYMBOL_VALUE1(E0) -#define SYMBOL_UPLOAD _SYMBOL_VALUE1(E1) -#define SYMBOL_CALL _SYMBOL_VALUE1(E2) -#define SYMBOL_CUT _SYMBOL_VALUE1(E3) -#define SYMBOL_COPY _SYMBOL_VALUE1(E4) -#define SYMBOL_SAVE _SYMBOL_VALUE1(E5) -#define SYMBOL_CHARGE _SYMBOL_VALUE1(E6) -#define SYMBOL_BELL _SYMBOL_VALUE1(E7) -#define SYMBOL_KEYBOARD _SYMBOL_VALUE1(E8) -#define SYMBOL_GPS _SYMBOL_VALUE1(E9) -#define SYMBOL_FILE _SYMBOL_VALUE1(EA) -#define SYMBOL_WIFI _SYMBOL_VALUE1(EB) -#define SYMBOL_BATTERY_FULL _SYMBOL_VALUE1(EC) -#define SYMBOL_BATTERY_3 _SYMBOL_VALUE1(ED) -#define SYMBOL_BATTERY_2 _SYMBOL_VALUE1(EE) -#define SYMBOL_BATTERY_1 _SYMBOL_VALUE1(EF) -#define SYMBOL_BATTERY_EMPTY _SYMBOL_VALUE1(F0) -#define SYMBOL_BLUETOOTH _SYMBOL_VALUE1(F1) +#define LV_SYMBOL_AUDIO _LV_SYMBOL_VALUE1(C0) +#define LV_SYMBOL_VIDEO _LV_SYMBOL_VALUE1(C1) +#define LV_SYMBOL_LIST _LV_SYMBOL_VALUE1(C2) +#define LV_SYMBOL_OK _LV_SYMBOL_VALUE1(C3) +#define LV_SYMBOL_CLOSE _LV_SYMBOL_VALUE1(C4) +#define LV_SYMBOL_POWER _LV_SYMBOL_VALUE1(C5) +#define LV_SYMBOL_SETTINGS _LV_SYMBOL_VALUE1(C6) +#define LV_SYMBOL_TRASH _LV_SYMBOL_VALUE1(C7) +#define LV_SYMBOL_HOME _LV_SYMBOL_VALUE1(C8) +#define LV_SYMBOL_DOWNLOAD _LV_SYMBOL_VALUE1(C9) +#define LV_SYMBOL_DRIVE _LV_SYMBOL_VALUE1(CA) +#define LV_SYMBOL_REFRESH _LV_SYMBOL_VALUE1(CB) +#define LV_SYMBOL_MUTE _LV_SYMBOL_VALUE1(CC) +#define LV_SYMBOL_VOLUME_MID _LV_SYMBOL_VALUE1(CD) +#define LV_SYMBOL_VOLUME_MAX _LV_SYMBOL_VALUE1(CE) +#define LV_SYMBOL_IMAGE _LV_SYMBOL_VALUE1(CF) +#define LV_SYMBOL_EDIT _LV_SYMBOL_VALUE1(D0) +#define LV_SYMBOL_PREV _LV_SYMBOL_VALUE1(D1) +#define LV_SYMBOL_PLAY _LV_SYMBOL_VALUE1(D2) +#define LV_SYMBOL_PAUSE _LV_SYMBOL_VALUE1(D3) +#define LV_SYMBOL_STOP _LV_SYMBOL_VALUE1(D4) +#define LV_SYMBOL_NEXT _LV_SYMBOL_VALUE1(D5) +#define LV_SYMBOL_EJECT _LV_SYMBOL_VALUE1(D6) +#define LV_SYMBOL_LEFT _LV_SYMBOL_VALUE1(D7) +#define LV_SYMBOL_RIGHT _LV_SYMBOL_VALUE1(D8) +#define LV_SYMBOL_PLUS _LV_SYMBOL_VALUE1(D9) +#define LV_SYMBOL_MINUS _LV_SYMBOL_VALUE1(DA) +#define LV_SYMBOL_WARNING _LV_SYMBOL_VALUE1(DB) +#define LV_SYMBOL_SHUFFLE _LV_SYMBOL_VALUE1(DC) +#define LV_SYMBOL_UP _LV_SYMBOL_VALUE1(DD) +#define LV_SYMBOL_DOWN _LV_SYMBOL_VALUE1(DE) +#define LV_SYMBOL_LOOP _LV_SYMBOL_VALUE1(DF) +#define LV_SYMBOL_DIRECTORY _LV_SYMBOL_VALUE1(E0) +#define LV_SYMBOL_UPLOAD _LV_SYMBOL_VALUE1(E1) +#define LV_SYMBOL_CALL _LV_SYMBOL_VALUE1(E2) +#define LV_SYMBOL_CUT _LV_SYMBOL_VALUE1(E3) +#define LV_SYMBOL_COPY _LV_SYMBOL_VALUE1(E4) +#define LV_SYMBOL_SAVE _LV_SYMBOL_VALUE1(E5) +#define LV_SYMBOL_CHARGE _LV_SYMBOL_VALUE1(E6) +#define LV_SYMBOL_BELL _LV_SYMBOL_VALUE1(E7) +#define LV_SYMBOL_KEYBOARD _LV_SYMBOL_VALUE1(E8) +#define LV_SYMBOL_GPS _LV_SYMBOL_VALUE1(E9) +#define LV_SYMBOL_FILE _LV_SYMBOL_VALUE1(EA) +#define LV_SYMBOL_WIFI _LV_SYMBOL_VALUE1(EB) +#define LV_SYMBOL_BATTERY_FULL _LV_SYMBOL_VALUE1(EC) +#define LV_SYMBOL_BATTERY_3 _LV_SYMBOL_VALUE1(ED) +#define LV_SYMBOL_BATTERY_2 _LV_SYMBOL_VALUE1(EE) +#define LV_SYMBOL_BATTERY_1 _LV_SYMBOL_VALUE1(EF) +#define LV_SYMBOL_BATTERY_EMPTY _LV_SYMBOL_VALUE1(F0) +#define LV_SYMBOL_BLUETOOTH _LV_SYMBOL_VALUE1(F1) #define LV_SYMBOL_GLYPH_LAST 0xF1 -#define SYMBOL_DUMMY _SYMBOL_VALUE1(FF) /*Invalid symbol. If written before a string then `lv_img` will show it as a label*/ +#define LV_SYMBOL_DUMMY _LV_SYMBOL_VALUE1(FF) /*Invalid symbol. If written before a string then `lv_img` will show it as a label*/ #else #define LV_SYMBOL_GLYPH_FIRST 0xF800 -#define SYMBOL_AUDIO _SYMBOL_VALUE3(EF,A0,80) -#define SYMBOL_VIDEO _SYMBOL_VALUE3(EF,A0,81) -#define SYMBOL_LIST _SYMBOL_VALUE3(EF,A0,82) -#define SYMBOL_OK _SYMBOL_VALUE3(EF,A0,83) -#define SYMBOL_CLOSE _SYMBOL_VALUE3(EF,A0,84) -#define SYMBOL_POWER _SYMBOL_VALUE3(EF,A0,85) -#define SYMBOL_SETTINGS _SYMBOL_VALUE3(EF,A0,86) -#define SYMBOL_TRASH _SYMBOL_VALUE3(EF,A0,87) -#define SYMBOL_HOME _SYMBOL_VALUE3(EF,A0,88) -#define SYMBOL_DOWNLOAD _SYMBOL_VALUE3(EF,A0,89) -#define SYMBOL_DRIVE _SYMBOL_VALUE3(EF,A0,8A) -#define SYMBOL_REFRESH _SYMBOL_VALUE3(EF,A0,8B) -#define SYMBOL_MUTE _SYMBOL_VALUE3(EF,A0,8C) -#define SYMBOL_VOLUME_MID _SYMBOL_VALUE3(EF,A0,8D) -#define SYMBOL_VOLUME_MAX _SYMBOL_VALUE3(EF,A0,8E) -#define SYMBOL_IMAGE _SYMBOL_VALUE3(EF,A0,8F) -#define SYMBOL_EDIT _SYMBOL_VALUE3(EF,A0,90) -#define SYMBOL_PREV _SYMBOL_VALUE3(EF,A0,91) -#define SYMBOL_PLAY _SYMBOL_VALUE3(EF,A0,92) -#define SYMBOL_PAUSE _SYMBOL_VALUE3(EF,A0,93) -#define SYMBOL_STOP _SYMBOL_VALUE3(EF,A0,94) -#define SYMBOL_NEXT _SYMBOL_VALUE3(EF,A0,95) -#define SYMBOL_EJECT _SYMBOL_VALUE3(EF,A0,96) -#define SYMBOL_LEFT _SYMBOL_VALUE3(EF,A0,97) -#define SYMBOL_RIGHT _SYMBOL_VALUE3(EF,A0,98) -#define SYMBOL_PLUS _SYMBOL_VALUE3(EF,A0,99) -#define SYMBOL_MINUS _SYMBOL_VALUE3(EF,A0,9A) -#define SYMBOL_WARNING _SYMBOL_VALUE3(EF,A0,9B) -#define SYMBOL_SHUFFLE _SYMBOL_VALUE3(EF,A0,9C) -#define SYMBOL_UP _SYMBOL_VALUE3(EF,A0,9D) -#define SYMBOL_DOWN _SYMBOL_VALUE3(EF,A0,9E) -#define SYMBOL_LOOP _SYMBOL_VALUE3(EF,A0,9F) -#define SYMBOL_DIRECTORY _SYMBOL_VALUE3(EF,A0,A0) -#define SYMBOL_UPLOAD _SYMBOL_VALUE3(EF,A0,A1) -#define SYMBOL_CALL _SYMBOL_VALUE3(EF,A0,A2) -#define SYMBOL_CUT _SYMBOL_VALUE3(EF,A0,A3) -#define SYMBOL_COPY _SYMBOL_VALUE3(EF,A0,A4) -#define SYMBOL_SAVE _SYMBOL_VALUE3(EF,A0,A5) -#define SYMBOL_CHARGE _SYMBOL_VALUE3(EF,A0,A6) -#define SYMBOL_BELL _SYMBOL_VALUE3(EF,A0,A7) -#define SYMBOL_KEYBOARD _SYMBOL_VALUE3(EF,A0,A8) -#define SYMBOL_GPS _SYMBOL_VALUE3(EF,A0,A9) -#define SYMBOL_FILE _SYMBOL_VALUE3(EF,A0,AA) -#define SYMBOL_WIFI _SYMBOL_VALUE3(EF,A0,AB) -#define SYMBOL_BATTERY_FULL _SYMBOL_VALUE3(EF,A0,AC) -#define SYMBOL_BATTERY_3 _SYMBOL_VALUE3(EF,A0,AD) -#define SYMBOL_BATTERY_2 _SYMBOL_VALUE3(EF,A0,AE) -#define SYMBOL_BATTERY_1 _SYMBOL_VALUE3(EF,A0,AF) -#define SYMBOL_BATTERY_EMPTY _SYMBOL_VALUE3(EF,A0,B0) -#define SYMBOL_BLUETOOTH _SYMBOL_VALUE3(EF,A0,B1) +#define LV_SYMBOL_AUDIO _LV_SYMBOL_VALUE3(EF,A0,80) +#define LV_SYMBOL_VIDEO _LV_SYMBOL_VALUE3(EF,A0,81) +#define LV_SYMBOL_LIST _LV_SYMBOL_VALUE3(EF,A0,82) +#define LV_SYMBOL_OK _LV_SYMBOL_VALUE3(EF,A0,83) +#define LV_SYMBOL_CLOSE _LV_SYMBOL_VALUE3(EF,A0,84) +#define LV_SYMBOL_POWER _LV_SYMBOL_VALUE3(EF,A0,85) +#define LV_SYMBOL_SETTINGS _LV_SYMBOL_VALUE3(EF,A0,86) +#define LV_SYMBOL_TRASH _LV_SYMBOL_VALUE3(EF,A0,87) +#define LV_SYMBOL_HOME _LV_SYMBOL_VALUE3(EF,A0,88) +#define LV_SYMBOL_DOWNLOAD _LV_SYMBOL_VALUE3(EF,A0,89) +#define LV_SYMBOL_DRIVE _LV_SYMBOL_VALUE3(EF,A0,8A) +#define LV_SYMBOL_REFRESH _LV_SYMBOL_VALUE3(EF,A0,8B) +#define LV_SYMBOL_MUTE _LV_SYMBOL_VALUE3(EF,A0,8C) +#define LV_SYMBOL_VOLUME_MID _LV_SYMBOL_VALUE3(EF,A0,8D) +#define LV_SYMBOL_VOLUME_MAX _LV_SYMBOL_VALUE3(EF,A0,8E) +#define LV_SYMBOL_IMAGE _LV_SYMBOL_VALUE3(EF,A0,8F) +#define LV_SYMBOL_EDIT _LV_SYMBOL_VALUE3(EF,A0,90) +#define LV_SYMBOL_PREV _LV_SYMBOL_VALUE3(EF,A0,91) +#define LV_SYMBOL_PLAY _LV_SYMBOL_VALUE3(EF,A0,92) +#define LV_SYMBOL_PAUSE _LV_SYMBOL_VALUE3(EF,A0,93) +#define LV_SYMBOL_STOP _LV_SYMBOL_VALUE3(EF,A0,94) +#define LV_SYMBOL_NEXT _LV_SYMBOL_VALUE3(EF,A0,95) +#define LV_SYMBOL_EJECT _LV_SYMBOL_VALUE3(EF,A0,96) +#define LV_SYMBOL_LEFT _LV_SYMBOL_VALUE3(EF,A0,97) +#define LV_SYMBOL_RIGHT _LV_SYMBOL_VALUE3(EF,A0,98) +#define LV_SYMBOL_PLUS _LV_SYMBOL_VALUE3(EF,A0,99) +#define LV_SYMBOL_MINUS _LV_SYMBOL_VALUE3(EF,A0,9A) +#define LV_SYMBOL_WARNING _LV_SYMBOL_VALUE3(EF,A0,9B) +#define LV_SYMBOL_SHUFFLE _LV_SYMBOL_VALUE3(EF,A0,9C) +#define LV_SYMBOL_UP _LV_SYMBOL_VALUE3(EF,A0,9D) +#define LV_SYMBOL_DOWN _LV_SYMBOL_VALUE3(EF,A0,9E) +#define LV_SYMBOL_LOOP _LV_SYMBOL_VALUE3(EF,A0,9F) +#define LV_SYMBOL_DIRECTORY _LV_SYMBOL_VALUE3(EF,A0,A0) +#define LV_SYMBOL_UPLOAD _LV_SYMBOL_VALUE3(EF,A0,A1) +#define LV_SYMBOL_CALL _LV_SYMBOL_VALUE3(EF,A0,A2) +#define LV_SYMBOL_CUT _LV_SYMBOL_VALUE3(EF,A0,A3) +#define LV_SYMBOL_COPY _LV_SYMBOL_VALUE3(EF,A0,A4) +#define LV_SYMBOL_SAVE _LV_SYMBOL_VALUE3(EF,A0,A5) +#define LV_SYMBOL_CHARGE _LV_SYMBOL_VALUE3(EF,A0,A6) +#define LV_SYMBOL_BELL _LV_SYMBOL_VALUE3(EF,A0,A7) +#define LV_SYMBOL_KEYBOARD _LV_SYMBOL_VALUE3(EF,A0,A8) +#define LV_SYMBOL_GPS _LV_SYMBOL_VALUE3(EF,A0,A9) +#define LV_SYMBOL_FILE _LV_SYMBOL_VALUE3(EF,A0,AA) +#define LV_SYMBOL_WIFI _LV_SYMBOL_VALUE3(EF,A0,AB) +#define LV_SYMBOL_BATTERY_FULL _LV_SYMBOL_VALUE3(EF,A0,AC) +#define LV_SYMBOL_BATTERY_3 _LV_SYMBOL_VALUE3(EF,A0,AD) +#define LV_SYMBOL_BATTERY_2 _LV_SYMBOL_VALUE3(EF,A0,AE) +#define LV_SYMBOL_BATTERY_1 _LV_SYMBOL_VALUE3(EF,A0,AF) +#define LV_SYMBOL_BATTERY_EMPTY _LV_SYMBOL_VALUE3(EF,A0,B0) +#define LV_SYMBOL_BLUETOOTH _LV_SYMBOL_VALUE3(EF,A0,B1) #define LV_SYMBOL_GLYPH_LAST 0xF831 -#define SYMBOL_DUMMY _SYMBOL_VALUE3(EF,A3,BF) /*Invalid symbol at (U+F831). If written before a string then `lv_img` will show it as a label*/ +#define LV_SYMBOL_DUMMY _LV_SYMBOL_VALUE3(EF,A3,BF) /*Invalid symbol at (U+F831). If written before a string then `lv_img` will show it as a label*/ #endif -#define _SYMBOL_VALUE1(x) (0x ## x) -#define _SYMBOL_VALUE3(x, y, z) (0x ## z ## y ## x) -#define _SYMBOL_NUMSTR(sym) LV_ ## sym ## _NUMSTR = sym +#define _LV_SYMBOL_VALUE1(x) (0x ## x) +#define _LV_SYMBOL_VALUE3(x, y, z) (0x ## z ## y ## x) +#define _LV_SYMBOL_NUMSTR(sym) LV_ ## sym ## _NUMSTR = sym enum { - _SYMBOL_NUMSTR(SYMBOL_AUDIO), - _SYMBOL_NUMSTR(SYMBOL_VIDEO), - _SYMBOL_NUMSTR(SYMBOL_LIST), - _SYMBOL_NUMSTR(SYMBOL_OK), - _SYMBOL_NUMSTR(SYMBOL_CLOSE), - _SYMBOL_NUMSTR(SYMBOL_POWER), - _SYMBOL_NUMSTR(SYMBOL_SETTINGS), - _SYMBOL_NUMSTR(SYMBOL_TRASH), - _SYMBOL_NUMSTR(SYMBOL_HOME), - _SYMBOL_NUMSTR(SYMBOL_DOWNLOAD), - _SYMBOL_NUMSTR(SYMBOL_DRIVE), - _SYMBOL_NUMSTR(SYMBOL_REFRESH), - _SYMBOL_NUMSTR(SYMBOL_MUTE), - _SYMBOL_NUMSTR(SYMBOL_VOLUME_MID), - _SYMBOL_NUMSTR(SYMBOL_VOLUME_MAX), - _SYMBOL_NUMSTR(SYMBOL_IMAGE), - _SYMBOL_NUMSTR(SYMBOL_EDIT), - _SYMBOL_NUMSTR(SYMBOL_PREV), - _SYMBOL_NUMSTR(SYMBOL_PLAY), - _SYMBOL_NUMSTR(SYMBOL_PAUSE), - _SYMBOL_NUMSTR(SYMBOL_STOP), - _SYMBOL_NUMSTR(SYMBOL_NEXT), - _SYMBOL_NUMSTR(SYMBOL_EJECT), - _SYMBOL_NUMSTR(SYMBOL_LEFT), - _SYMBOL_NUMSTR(SYMBOL_RIGHT), - _SYMBOL_NUMSTR(SYMBOL_PLUS), - _SYMBOL_NUMSTR(SYMBOL_MINUS), - _SYMBOL_NUMSTR(SYMBOL_WARNING), - _SYMBOL_NUMSTR(SYMBOL_SHUFFLE), - _SYMBOL_NUMSTR(SYMBOL_UP), - _SYMBOL_NUMSTR(SYMBOL_DOWN), - _SYMBOL_NUMSTR(SYMBOL_LOOP), - _SYMBOL_NUMSTR(SYMBOL_DIRECTORY), - _SYMBOL_NUMSTR(SYMBOL_UPLOAD), - _SYMBOL_NUMSTR(SYMBOL_CALL), - _SYMBOL_NUMSTR(SYMBOL_CUT), - _SYMBOL_NUMSTR(SYMBOL_COPY), - _SYMBOL_NUMSTR(SYMBOL_SAVE), - _SYMBOL_NUMSTR(SYMBOL_CHARGE), - _SYMBOL_NUMSTR(SYMBOL_BELL), - _SYMBOL_NUMSTR(SYMBOL_KEYBOARD), - _SYMBOL_NUMSTR(SYMBOL_GPS), - _SYMBOL_NUMSTR(SYMBOL_FILE), - _SYMBOL_NUMSTR(SYMBOL_WIFI), - _SYMBOL_NUMSTR(SYMBOL_BATTERY_FULL), - _SYMBOL_NUMSTR(SYMBOL_BATTERY_3), - _SYMBOL_NUMSTR(SYMBOL_BATTERY_2), - _SYMBOL_NUMSTR(SYMBOL_BATTERY_1), - _SYMBOL_NUMSTR(SYMBOL_BATTERY_EMPTY), - _SYMBOL_NUMSTR(SYMBOL_BLUETOOTH), - _SYMBOL_NUMSTR(SYMBOL_DUMMY), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_AUDIO), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_VIDEO), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_LIST), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_OK), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_CLOSE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_POWER), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_SETTINGS), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_TRASH), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_HOME), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_DOWNLOAD), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_DRIVE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_REFRESH), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_MUTE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_VOLUME_MID), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_VOLUME_MAX), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_IMAGE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_EDIT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_PREV), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_PLAY), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_PAUSE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_STOP), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_NEXT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_EJECT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_LEFT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_RIGHT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_PLUS), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_MINUS), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_WARNING), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_SHUFFLE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_UP), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_DOWN), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_LOOP), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_DIRECTORY), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_UPLOAD), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_CALL), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_CUT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_COPY), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_SAVE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_CHARGE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BELL), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_KEYBOARD), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_GPS), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_FILE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_WIFI), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_FULL), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_3), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_2), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_1), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_EMPTY), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BLUETOOTH), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_DUMMY), }; -#undef _SYMBOL_VALUE1 -#undef _SYMBOL_VALUE3 +#undef _LV_SYMBOL_VALUE1 +#undef _LV_SYMBOL_VALUE3 -#define _SYMBOL_STR_(x) #x -#define _SYMBOL_STR(x) _SYMBOL_STR_(x) -#define _SYMBOL_CHAR(c) \x ## c -#define _SYMBOL_VALUE1(x) _SYMBOL_STR(_SYMBOL_CHAR(x)) -#define _SYMBOL_VALUE3(x, y, z) _SYMBOL_STR(_SYMBOL_CHAR(x)_SYMBOL_CHAR(y)_SYMBOL_CHAR(z)) +#define _LV_SYMBOL_STR_(x) #x +#define _LV_SYMBOL_STR(x) _LV_SYMBOL_STR_(x) +#define _LV_SYMBOL_CHAR(c) \x ## c +#define _LV_SYMBOL_VALUE1(x) _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x)) +#define _LV_SYMBOL_VALUE3(x, y, z) _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x)_LV_SYMBOL_CHAR(y)_LV_SYMBOL_CHAR(z)) #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_SYMBOL_DEF_H*/ +#endif /*LV_LV_SYMBOL_DEF_H*/ diff --git a/lv_misc/lv_task.c b/lv_misc/lv_task.c index aac9c12cc..c43213a71 100644 --- a/lv_misc/lv_task.c +++ b/lv_misc/lv_task.c @@ -224,7 +224,7 @@ void lv_task_set_prio(lv_task_t * lv_task_p, lv_task_prio_t prio) { /*Find the tasks with new priority*/ lv_task_t * i; - LL_READ(LV_GC_ROOT(_lv_task_ll), i) { + LV_LL_READ(LV_GC_ROOT(_lv_task_ll), i) { if(i->prio <= prio) { if(i != lv_task_p) lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), lv_task_p, i); break; diff --git a/lv_objx/lv_arc.c b/lv_objx/lv_arc.c index 7f4d677e3..e11ebe7e0 100644 --- a/lv_objx/lv_arc.c +++ b/lv_objx/lv_arc.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_arc.h" -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 #include "../lv_misc/lv_math.h" #include "../lv_draw/lv_draw_arc.h" diff --git a/lv_objx/lv_arc.h b/lv_objx/lv_arc.h index 76231d875..b37efee2e 100644 --- a/lv_objx/lv_arc.h +++ b/lv_objx/lv_arc.h @@ -20,7 +20,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 #include "../lv_core/lv_obj.h" @@ -118,7 +118,7 @@ lv_style_t * lv_arc_get_style(const lv_obj_t * arc, lv_arc_style_t type); * MACROS **********************/ -#endif /*USE_LV_ARC*/ +#endif /*LV_USE_ARC*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_bar.c b/lv_objx/lv_bar.c index 323b22807..e0735ce1b 100644 --- a/lv_objx/lv_bar.c +++ b/lv_objx/lv_bar.c @@ -9,7 +9,7 @@ * INCLUDES *********************/ #include "lv_bar.h" -#if USE_LV_BAR != 0 +#if LV_USE_BAR != 0 #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" @@ -126,7 +126,7 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) */ void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim = false; #endif lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); @@ -142,7 +142,7 @@ void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim) ext->cur_value = new_value; lv_obj_invalidate(bar); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /*No animation in progress -> simply set the values*/ if(ext->anim_state == LV_BAR_ANIM_STATE_INV) { ext->anim_start = ext->cur_value; @@ -329,7 +329,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode } else if(mode == LV_DESIGN_DRAW_MAIN) { lv_opa_t opa_scale = lv_obj_get_opa_scale(bar); -#if USE_LV_GROUP == 0 +#if LV_USE_GROUP == 0 ancestor_design_f(bar, mask, mode); #else /* Draw the borders later if the bar is focused. @@ -413,7 +413,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode lv_draw_rect(&indic_area, mask, style_indic, opa_scale); } } else if(mode == LV_DESIGN_DRAW_POST) { -#if USE_LV_GROUP +#if LV_USE_GROUP /*Draw the border*/ if(lv_obj_is_focused(bar)) { lv_opa_t opa_scale = lv_obj_get_opa_scale(bar); diff --git a/lv_objx/lv_bar.h b/lv_objx/lv_bar.h index 0501f4cf3..c9e98d25a 100644 --- a/lv_objx/lv_bar.h +++ b/lv_objx/lv_bar.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_BAR != 0 +#if LV_USE_BAR != 0 #include "../lv_core/lv_obj.h" #include "lv_cont.h" @@ -151,7 +151,7 @@ lv_style_t * lv_bar_get_style(const lv_obj_t *bar, lv_bar_style_t type); * MACROS **********************/ -#endif /*USE_LV_BAR*/ +#endif /*LV_USE_BAR*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_btn.c b/lv_objx/lv_btn.c index 03ff1559d..9ce2c56e0 100644 --- a/lv_objx/lv_btn.c +++ b/lv_objx/lv_btn.c @@ -8,7 +8,7 @@ *********************/ #include "lv_btn.h" -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 #include #include "../lv_core/lv_group.h" @@ -34,7 +34,7 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode_t mode); static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param); -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT static void lv_btn_ink_effect_anim(lv_obj_t * btn, int32_t val); static void lv_btn_ink_effect_anim_ready(void * p); #endif @@ -45,7 +45,7 @@ static void lv_btn_ink_effect_anim_ready(void * p); static lv_signal_cb_t ancestor_signal; static lv_design_cb_t ancestor_design; -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT static lv_coord_t ink_act_value; static lv_obj_t * ink_obj; static lv_btn_state_t ink_bg_state; @@ -96,7 +96,7 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) ext->styles[LV_BTN_STATE_INA] = &lv_style_btn_ina; ext->toggle = 0; -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT ext->ink_in_time = 0; ext->ink_wait_time = 0; ext->ink_out_time = 0; @@ -131,7 +131,7 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) lv_btn_ext_t * copy_ext = lv_obj_get_ext_attr(copy); ext->state = copy_ext->state; ext->toggle = copy_ext->toggle; -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT ext->ink_in_time = copy_ext->ink_in_time; ext->ink_wait_time = copy_ext->ink_wait_time; ext->ink_out_time = copy_ext->ink_out_time; @@ -209,13 +209,13 @@ void lv_btn_toggle(lv_obj_t * btn) */ void lv_btn_set_ink_in_time(lv_obj_t * btn, uint16_t time) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); ext->ink_in_time = time; #else (void)btn; /*Unused*/ (void)time; /*Unused*/ - LV_LOG_WARN("`lv_btn_set_ink_ink_time` has no effect if LV_BTN_INK_EFEFCT or USE_LV_ANIMATION is disabled") + LV_LOG_WARN("`lv_btn_set_ink_ink_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION is disabled") #endif } @@ -227,13 +227,13 @@ void lv_btn_set_ink_in_time(lv_obj_t * btn, uint16_t time) void lv_btn_set_ink_wait_time(lv_obj_t * btn, uint16_t time) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); ext->ink_wait_time = time; #else (void)btn; /*Unused*/ (void)time; /*Unused*/ - LV_LOG_WARN("`lv_btn_set_ink_wait_time` has no effect if LV_BTN_INK_EFEFCT or USE_LV_ANIMATION is disabled") + LV_LOG_WARN("`lv_btn_set_ink_wait_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION is disabled") #endif } @@ -244,13 +244,13 @@ void lv_btn_set_ink_wait_time(lv_obj_t * btn, uint16_t time) */ void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); ext->ink_out_time = time; #else (void)btn; /*Unused*/ (void)time; /*Unused*/ - LV_LOG_WARN("`lv_btn_set_ink_out_time` has no effect if LV_BTN_INK_EFEFCT or USE_LV_ANIMATION is disabled") + LV_LOG_WARN("`lv_btn_set_ink_out_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION is disabled") #endif } @@ -321,7 +321,7 @@ bool lv_btn_get_toggle(const lv_obj_t * btn) */ uint16_t lv_btn_get_ink_in_time(const lv_obj_t * btn) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); return ext->ink_in_time; #else @@ -338,7 +338,7 @@ uint16_t lv_btn_get_ink_in_time(const lv_obj_t * btn) */ uint16_t lv_btn_get_ink_wait_time(const lv_obj_t * btn) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); return ext->ink_wait_time; #else @@ -353,7 +353,7 @@ uint16_t lv_btn_get_ink_wait_time(const lv_obj_t * btn) */ uint16_t lv_btn_get_ink_out_time(const lv_obj_t * btn) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); return ext->ink_in_time; #else @@ -418,7 +418,7 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode return false; } else if(mode == LV_DESIGN_DRAW_MAIN) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT if(btn != ink_obj) { ancestor_design(btn, mask, mode); } else { @@ -508,19 +508,19 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) /*Refresh the state*/ if(ext->state == LV_BTN_STATE_REL) { lv_btn_set_state(btn, LV_BTN_STATE_PR); -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT ink_bg_state = LV_BTN_STATE_REL; ink_top_state = LV_BTN_STATE_PR; #endif } else if(ext->state == LV_BTN_STATE_TGL_REL) { lv_btn_set_state(btn, LV_BTN_STATE_TGL_PR); -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT ink_bg_state = LV_BTN_STATE_TGL_REL; ink_top_state = LV_BTN_STATE_TGL_PR; #endif } -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT /*Forget the old inked button*/ if(ink_obj != NULL && ink_obj != btn) { lv_anim_del(ink_obj, (lv_anim_fp_t)lv_btn_ink_effect_anim); @@ -586,7 +586,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } } -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT /*Draw the toggled state in the inking instead*/ if(ext->toggle) { ink_top_state = ext->state; @@ -631,7 +631,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); } } else if(sign == LV_SIGNAL_CLEANUP) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT if(btn == ink_obj) { lv_anim_del(ink_obj, (lv_anim_fp_t)lv_btn_ink_effect_anim); ink_obj = NULL; @@ -649,7 +649,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) return res; } -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT /** * The animator function of inking. CAlled to increase the radius of ink @@ -699,6 +699,6 @@ static void lv_btn_ink_effect_anim_ready(void * p) ink_obj = NULL; } } -#endif /*USE_LV_ANIMATION*/ +#endif /*LV_USE_ANIMATION*/ #endif diff --git a/lv_objx/lv_btn.h b/lv_objx/lv_btn.h index c49b0b176..7612cb44e 100644 --- a/lv_objx/lv_btn.h +++ b/lv_objx/lv_btn.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 /*Testing of dependencies*/ -#if USE_LV_CONT == 0 -#error "lv_btn: lv_cont is required. Enable it in lv_conf.h (USE_LV_CONT 1) " +#if LV_USE_CONT == 0 +#error "lv_btn: lv_cont is required. Enable it in lv_conf.h (LV_USE_CONT 1) " #endif #include "lv_cont.h" @@ -289,7 +289,7 @@ lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type); * MACROS **********************/ -#endif /*USE_LV_BUTTON*/ +#endif /*LV_USE_BUTTON*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index bcd88239b..d10bf848b 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_btnm.h" -#if USE_LV_BTNM != 0 +#if LV_USE_BTNM != 0 #include "../lv_core/lv_group.h" #include "../lv_draw/lv_draw.h" @@ -765,7 +765,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } - #if USE_LV_GROUP + #if LV_USE_GROUP /*Leave the clicked button when releases if this not the focused object in a group*/ lv_group_t * g = lv_obj_get_group(btnm); if(lv_group_get_focused(g) != btnm) { @@ -782,7 +782,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_pr = LV_BTNM_PR_NONE; lv_obj_invalidate(btnm); } else if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_indev_t * indev = lv_indev_get_act(); lv_hal_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_POINTER) { diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index 8fa67e8f6..7cb87efe7 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -20,7 +20,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_BTNM != 0 +#if LV_USE_BTNM != 0 #include "../lv_core/lv_obj.h" #include "lv_label.h" @@ -269,7 +269,7 @@ bool lv_btnm_get_recolor(const lv_obj_t * btnm); * MACROS **********************/ -#endif /*USE_LV_BTNM*/ +#endif /*LV_USE_BTNM*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_calendar.c b/lv_objx/lv_calendar.c index 971609407..2b390582c 100644 --- a/lv_objx/lv_calendar.c +++ b/lv_objx/lv_calendar.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_calendar.h" -#if USE_LV_CALENDAR != 0 +#if LV_USE_CALENDAR != 0 #include "../lv_draw/lv_draw.h" #include "../lv_hal/lv_hal_indev.h" @@ -690,14 +690,14 @@ static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) /*Add the left arrow*/ lv_style_t * arrow_style = ext->btn_pressing < 0 ? ext->style_header_pr : ext->style_header; header_area.x1 += ext->style_header->body.padding.hor; - lv_draw_label(&header_area, mask, arrow_style, opa_scale, SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL); /*Add the right arrow*/ arrow_style = ext->btn_pressing > 0 ? ext->style_header_pr : ext->style_header; header_area.x1 = header_area.x2 - ext->style_header->body.padding.hor - - lv_txt_get_width(SYMBOL_RIGHT, strlen(SYMBOL_RIGHT), arrow_style->text.font, + lv_txt_get_width(LV_SYMBOL_RIGHT, strlen(LV_SYMBOL_RIGHT), arrow_style->text.font, arrow_style->text.line_space, LV_TXT_FLAG_NONE); - lv_draw_label(&header_area, mask, arrow_style, opa_scale, SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL); } diff --git a/lv_objx/lv_calendar.h b/lv_objx/lv_calendar.h index e82c909b4..9064ee2fb 100644 --- a/lv_objx/lv_calendar.h +++ b/lv_objx/lv_calendar.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_CALENDAR != 0 +#if LV_USE_CALENDAR != 0 #include "../lv_core/lv_obj.h" @@ -214,7 +214,7 @@ lv_style_t * lv_calendar_get_style(const lv_obj_t * calendar, lv_calendar_style_ * MACROS **********************/ -#endif /*USE_LV_CALENDAR*/ +#endif /*LV_USE_CALENDAR*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_canvas.c b/lv_objx/lv_canvas.c index 3c0ab20a3..3fe54c589 100644 --- a/lv_objx/lv_canvas.c +++ b/lv_objx/lv_canvas.c @@ -8,7 +8,7 @@ *********************/ #include #include "lv_canvas.h" -#if USE_LV_CANVAS != 0 +#if LV_USE_CANVAS != 0 /********************* * DEFINES diff --git a/lv_objx/lv_canvas.h b/lv_objx/lv_canvas.h index 74e1134ef..f8d6e94d4 100644 --- a/lv_objx/lv_canvas.h +++ b/lv_objx/lv_canvas.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_CANVAS != 0 +#if LV_USE_CANVAS != 0 #include "../lv_core/lv_obj.h" #include "../lv_objx/lv_img.h" @@ -220,7 +220,7 @@ void lv_canvas_flood_fill(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_colo * MACROS **********************/ -#endif /*USE_LV_CANVAS*/ +#endif /*LV_USE_CANVAS*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_cb.c b/lv_objx/lv_cb.c index 9145a5b27..8f5c3bfd3 100644 --- a/lv_objx/lv_cb.c +++ b/lv_objx/lv_cb.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_cb.h" -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 #include "../lv_core/lv_group.h" #include "../lv_themes/lv_theme.h" @@ -283,7 +283,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig if(mode == LV_DESIGN_COVER_CHK) { return ancestor_bullet_design(bullet, mask, mode); } else if(mode == LV_DESIGN_DRAW_MAIN) { -#if USE_LV_GROUP +#if LV_USE_GROUP /* If the check box is the active in a group and * the background is not visible (transparent) * then activate the style of the bullet*/ @@ -301,7 +301,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig #endif ancestor_bullet_design(bullet, mask, mode); -#if USE_LV_GROUP +#if LV_USE_GROUP bullet->style_p = style_ori; /*Revert the style*/ #endif } else if(mode == LV_DESIGN_DRAW_POST) { diff --git a/lv_objx/lv_cb.h b/lv_objx/lv_cb.h index f9519355f..5c6c0b04e 100644 --- a/lv_objx/lv_cb.h +++ b/lv_objx/lv_cb.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 /*Testing of dependencies*/ -#if USE_LV_BTN == 0 -#error "lv_cb: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) " +#if LV_USE_BTN == 0 +#error "lv_cb: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_cb: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_cb: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif #include "../lv_core/lv_obj.h" @@ -153,7 +153,7 @@ lv_style_t * lv_cb_get_style(const lv_obj_t * cb, lv_cb_style_t type); * MACROS **********************/ -#endif /*USE_LV_CB*/ +#endif /*LV_USE_CB*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index 39e394ac2..18f156a17 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_chart.h" -#if USE_LV_CHART != 0 +#if LV_USE_CHART != 0 #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" @@ -257,7 +257,7 @@ void lv_chart_set_point_count(lv_obj_t * chart, uint16_t point_cnt) if(point_cnt < 1) point_cnt = 1; - LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) { if(ser->start_point != 0) { lv_coord_t * new_points = lv_mem_alloc(sizeof(lv_coord_t) * point_cnt); lv_mem_assert(new_points); @@ -511,7 +511,7 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param if(sign == LV_SIGNAL_CLEANUP) { lv_coord_t ** datal; lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - LL_READ(ext->series_ll, datal) { + LV_LL_READ(ext->series_ll, datal) { lv_mem_free(*datal); } lv_ll_clear(&ext->series_ll); @@ -620,7 +620,7 @@ static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask) style.line.width = ext->series.width; /*Go through all data lines*/ - LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) { style.line.color = ser->color; p1.x = 0 + x_ofs; @@ -679,7 +679,7 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask) style_point.body.radius = ext->series.width; /*Go through all data lines*/ - LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) { style_point.body.main_color = ser->color; style_point.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark); @@ -737,7 +737,7 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask) x_act += chart->coords.x1 + x_ofs; /*Draw the current point of all data line*/ - LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) { rects.body.main_color = ser->color; rects.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark); col_a.x1 = x_act; @@ -787,7 +787,7 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas style.line.width = ext->series.width; /*Go through all data lines*/ - LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) { style.line.color = ser->color; p1.x = 0 + x_ofs; diff --git a/lv_objx/lv_chart.h b/lv_objx/lv_chart.h index baea9d0f4..7fc8af114 100644 --- a/lv_objx/lv_chart.h +++ b/lv_objx/lv_chart.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_CHART != 0 +#if LV_USE_CHART != 0 #include "../lv_core/lv_obj.h" #include "lv_line.h" @@ -253,7 +253,7 @@ void lv_chart_refresh(lv_obj_t * chart); * MACROS **********************/ -#endif /*USE_LV_CHART*/ +#endif /*LV_USE_CHART*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index a8789fb97..81fb4e3fe 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -8,7 +8,7 @@ *********************/ #include "lv_cont.h" -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 #include #include @@ -359,7 +359,7 @@ static void lv_cont_layout_col(lv_obj_t * cont) lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG); /* Align the children */ lv_coord_t last_cord = style->body.padding.ver; - LL_READ_BACK(cont->child_ll, child) { + LV_LL_READ_BACK(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; @@ -409,7 +409,7 @@ static void lv_cont_layout_row(lv_obj_t * cont) /* Align the children */ lv_coord_t last_cord = style->body.padding.hor; - LL_READ_BACK(cont->child_ll, child) { + LV_LL_READ_BACK(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; @@ -431,7 +431,7 @@ static void lv_cont_layout_center(lv_obj_t * cont) uint32_t obj_num = 0; lv_coord_t h_tot = 0; - LL_READ(cont->child_ll, child) { + LV_LL_READ(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; h_tot += lv_obj_get_height(child) + style->body.padding.inner; @@ -448,7 +448,7 @@ static void lv_cont_layout_center(lv_obj_t * cont) /* Align the children */ lv_coord_t last_cord = - (h_tot / 2); - LL_READ_BACK(cont->child_ll, child) { + LV_LL_READ_BACK(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; @@ -582,7 +582,7 @@ static void lv_cont_layout_grid(lv_obj_t * cont) lv_coord_t act_x = style->body.padding.hor; lv_coord_t act_y = style->body.padding.ver; uint16_t obj_cnt = 0; - LL_READ_BACK(cont->child_ll, child) { + LV_LL_READ_BACK(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; @@ -648,7 +648,7 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) tight_area.x2 = LV_COORD_MIN; tight_area.y2 = LV_COORD_MIN; - LL_READ(cont->child_ll, i) { + LV_LL_READ(cont->child_ll, i) { if(lv_obj_get_hidden(i) != false) continue; tight_area.x1 = LV_MATH_MIN(tight_area.x1, i->coords.x1); tight_area.y1 = LV_MATH_MIN(tight_area.y1, i->coords.y1); @@ -713,7 +713,7 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) /*Tell the children the parent's size has changed*/ lv_obj_t * i; - LL_READ(cont->child_ll, i) { + LV_LL_READ(cont->child_ll, i) { i->signal_cb(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); } } diff --git a/lv_objx/lv_cont.h b/lv_objx/lv_cont.h index cf78574b5..6f24056e0 100644 --- a/lv_objx/lv_cont.h +++ b/lv_objx/lv_cont.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 #include "../lv_core/lv_obj.h" @@ -204,7 +204,7 @@ static inline lv_style_t * lv_cont_get_style(const lv_obj_t *cont) * MACROS **********************/ -#endif /*USE_LV_CONT*/ +#endif /*LV_USE_CONT*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index e73bea98a..db39452ee 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_ddlist.h" -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 #include "../lv_draw/lv_draw.h" #include "../lv_core/lv_group.h" @@ -21,7 +21,7 @@ /********************* * DEFINES *********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_DDLIST_ANIM_TIME # define LV_DDLIST_ANIM_TIME 200 /*ms*/ # endif @@ -256,7 +256,7 @@ void lv_ddlist_set_stay_open(lv_obj_t * ddlist, bool en) void lv_ddlist_set_anim_time(lv_obj_t * ddlist, uint16_t anim_time) { lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_time = 0; #endif @@ -434,7 +434,7 @@ lv_label_align_t lv_ddlist_get_align(const lv_obj_t *ddlist) */ void lv_ddlist_open(lv_obj_t * ddlist, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -450,7 +450,7 @@ void lv_ddlist_open(lv_obj_t * ddlist, bool anim_en) */ void lv_ddlist_close(lv_obj_t * ddlist, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -581,7 +581,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig new_style.text.opa = sel_style->text.opa; lv_area_t area_arrow; area_arrow.x2 = ddlist->coords.x2 - style->body.padding.hor; - area_arrow.x1 = area_arrow.x2 - lv_txt_get_width(SYMBOL_DOWN, strlen(SYMBOL_DOWN), sel_style->text.font, 0, 0); + area_arrow.x1 = area_arrow.x2 - lv_txt_get_width(LV_SYMBOL_DOWN, strlen(LV_SYMBOL_DOWN), sel_style->text.font, 0, 0); area_arrow.y1 = ddlist->coords.y1 + style->text.line_space; area_arrow.y2 = area_arrow.y1 + font_h; @@ -593,7 +593,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig if (area_ok) { lv_draw_label(&area_arrow, &mask_arrow, &new_style, opa_scale, - SYMBOL_DOWN, LV_TXT_FLAG_NONE, NULL); /*Use a down arrow in ddlist, you can replace it with your custom symbol*/ + LV_SYMBOL_DOWN, LV_TXT_FLAG_NONE, NULL); /*Use a down arrow in ddlist, you can replace it with your custom symbol*/ } } } @@ -625,7 +625,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par } else if(sign == LV_SIGNAL_CLEANUP) { ext->label = NULL; } else if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(ddlist); bool editing = lv_group_get_editing(g); lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); @@ -692,7 +692,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par ext->sel_opt_id_ori = ext->sel_opt_id; ext->opened = 0; lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(ddlist); bool editing = lv_group_get_editing(g); if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ @@ -817,7 +817,7 @@ static lv_res_t release_handler(lv_obj_t * ddlist) */ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -840,7 +840,7 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) if(anim_en == 0) { lv_obj_set_height(ddlist, new_height); lv_ddlist_pos_current_option(ddlist); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_del(ddlist, (lv_anim_fp_t)lv_obj_set_height); /*If an animation is in progress then it will overwrite this changes*/ } else { lv_anim_t a; diff --git a/lv_objx/lv_ddlist.h b/lv_objx/lv_ddlist.h index 9e45b9ac7..390352ea9 100644 --- a/lv_objx/lv_ddlist.h +++ b/lv_objx/lv_ddlist.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 /*Testing of dependencies*/ -#if USE_LV_PAGE == 0 -#error "lv_ddlist: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) " +#if LV_USE_PAGE == 0 +#error "lv_ddlist: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_ddlist: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_ddlist: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif #include "../lv_core/lv_obj.h" @@ -257,7 +257,7 @@ void lv_ddlist_close(lv_obj_t * ddlist, bool anim_en); * MACROS **********************/ -#endif /*USE_LV_DDLIST*/ +#endif /*LV_USE_DDLIST*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_gauge.c b/lv_objx/lv_gauge.c index 34da4bd1e..f4a2c3805 100644 --- a/lv_objx/lv_gauge.c +++ b/lv_objx/lv_gauge.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_gauge.h" -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" diff --git a/lv_objx/lv_gauge.h b/lv_objx/lv_gauge.h index beef9dc55..b37be3909 100644 --- a/lv_objx/lv_gauge.h +++ b/lv_objx/lv_gauge.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 /*Testing of dependencies*/ -#if USE_LV_LMETER == 0 -#error "lv_gauge: lv_lmeter is required. Enable it in lv_conf.h (USE_LV_LMETER 1) " +#if LV_USE_LMETER == 0 +#error "lv_gauge: lv_lmeter is required. Enable it in lv_conf.h (LV_USE_LMETER 1) " #endif #include "../lv_core/lv_obj.h" @@ -213,7 +213,7 @@ static inline lv_style_t * lv_gauge_get_style(const lv_obj_t *gauge) * MACROS **********************/ -#endif /*USE_LV_GAUGE*/ +#endif /*LV_USE_GAUGE*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index 72d19229b..5bdb29226 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -7,11 +7,11 @@ * INCLUDES *********************/ #include "lv_img.h" -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 /*Testing of dependencies*/ -#if USE_LV_LABEL == 0 -#error "lv_img: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_img: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif #include "../lv_core/lv_i18n.h" @@ -125,7 +125,7 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) lv_img_src_t src_type = lv_img_src_get_type(src_img); lv_img_ext_t * ext = lv_obj_get_ext_attr(img); -#if USE_LV_LOG && LV_LOG_LEVEL >= LV_LOG_LEVEL_INFO +#if LV_USE_LOG && LV_LOG_LEVEL >= LV_LOG_LEVEL_INFO switch(src_type) { case LV_IMG_SRC_FILE: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_FILE` type found"); diff --git a/lv_objx/lv_img.h b/lv_objx/lv_img.h index 86c2170b9..aa97b84f4 100644 --- a/lv_objx/lv_img.h +++ b/lv_objx/lv_img.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 #include "../lv_core/lv_obj.h" #include "../lv_misc/lv_fs.h" @@ -165,7 +165,7 @@ static inline bool lv_img_get_upscale(const lv_obj_t * img) /*Use this macro to declare an image in a c file*/ #define LV_IMG_DECLARE(var_name) extern const lv_img_dsc_t var_name; -#endif /*USE_LV_IMG*/ +#endif /*LV_USE_IMG*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_imgbtn.c b/lv_objx/lv_imgbtn.c index 83f5ecbe5..ed59c4f8f 100644 --- a/lv_objx/lv_imgbtn.c +++ b/lv_objx/lv_imgbtn.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_imgbtn.h" -#if USE_LV_IMGBTN != 0 +#if LV_USE_IMGBTN != 0 /********************* * DEFINES diff --git a/lv_objx/lv_imgbtn.h b/lv_objx/lv_imgbtn.h index 09b5dc045..a3d4e7ff4 100644 --- a/lv_objx/lv_imgbtn.h +++ b/lv_objx/lv_imgbtn.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_IMGBTN != 0 +#if LV_USE_IMGBTN != 0 /*Testing of dependencies*/ -#if USE_LV_BTN == 0 -#error "lv_imgbtn: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) " +#if LV_USE_BTN == 0 +#error "lv_imgbtn: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) " #endif #include "../lv_core/lv_obj.h" @@ -219,7 +219,7 @@ lv_style_t * lv_imgbtn_get_style(const lv_obj_t * imgbtn, lv_imgbtn_style_t type * MACROS **********************/ -#endif /*USE_LV_IMGBTN*/ +#endif /*LV_USE_IMGBTN*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index 660663f51..e262fc2e9 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_kb.h" -#if USE_LV_KB != 0 +#if LV_USE_KB != 0 #include "lv_ta.h" #include "../lv_themes/lv_theme.h" @@ -36,7 +36,7 @@ static const char * kb_map_lc[] = { "\2051#", "\204q", "\204w", "\204e", "\204r", "\204t", "\204y", "\204u", "\204i", "\204o", "\204p", "\207Bksp", "\n", "\226ABC", "\203a", "\203s", "\203d", "\203f", "\203g", "\203h", "\203j", "\203k", "\203l", "\207Enter", "\n", "_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n", - "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" + "\202"LV_SYMBOL_CLOSE, "\202"LV_SYMBOL_LEFT, "\206 ", "\202"LV_SYMBOL_RIGHT, "\202"LV_SYMBOL_OK, "" }; static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { @@ -50,7 +50,7 @@ static const char * kb_map_uc[] = { "\2051#", "\204Q", "\204W", "\204E", "\204R", "\204T", "\204Y", "\204U", "\204I", "\204O", "\204P", "\207Bksp", "\n", "\226abc", "\203A", "\203S", "\203D", "\203F", "\203G", "\203H", "\203J", "\203K", "\203L", "\207Enter", "\n", "_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n", - "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" + "\202"LV_SYMBOL_CLOSE, "\202"LV_SYMBOL_LEFT, "\206 ", "\202"LV_SYMBOL_RIGHT, "\202"LV_SYMBOL_OK, "" }; static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { @@ -64,7 +64,7 @@ static const char * kb_map_spec[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "\202Bksp", "\n", "\222abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", "\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n", - "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" + "\202"LV_SYMBOL_CLOSE, "\202"LV_SYMBOL_LEFT, "\206 ", "\202"LV_SYMBOL_RIGHT, "\202"LV_SYMBOL_OK, "" }; static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { @@ -75,10 +75,10 @@ static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { }; static const char * kb_map_num[] = { - "1", "2", "3", "\202"SYMBOL_CLOSE, "\n", - "4", "5", "6", "\202"SYMBOL_OK, "\n", + "1", "2", "3", "\202"LV_SYMBOL_CLOSE, "\n", + "4", "5", "6", "\202"LV_SYMBOL_OK, "\n", "7", "8", "9", "\202Bksp", "\n", - "+/-", "0", ".", SYMBOL_LEFT, SYMBOL_RIGHT, "" + "+/-", "0", ".", LV_SYMBOL_LEFT, LV_SYMBOL_RIGHT, "" }; static const lv_btnm_ctrl_t kb_ctrl_num_map[] = { @@ -403,14 +403,14 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) lv_btnm_set_map(kb, kb_map_spec); lv_btnm_set_ctrl_map(kb, kb_ctrl_spec_map); return LV_RES_OK; - } else if(strcmp(txt, SYMBOL_CLOSE) == 0) { + } else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0) { if(kb->event_cb) lv_obj_send_event(kb, LV_EVENT_CANCEL); else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ lv_obj_del(kb); } return res; - } else if(strcmp(txt, SYMBOL_OK) == 0) { + } else if(strcmp(txt, LV_SYMBOL_OK) == 0) { if(kb->event_cb) lv_obj_send_event(kb, LV_EVENT_APPLY); else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ @@ -425,8 +425,8 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) if(ext->ta == NULL) return res; if(strcmp(txt, "Enter") == 0)lv_ta_add_char(ext->ta, '\n'); - else if(strcmp(txt, SYMBOL_LEFT) == 0) lv_ta_cursor_left(ext->ta); - else if(strcmp(txt, SYMBOL_RIGHT) == 0) lv_ta_cursor_right(ext->ta); + else if(strcmp(txt, LV_SYMBOL_LEFT) == 0) lv_ta_cursor_left(ext->ta); + else if(strcmp(txt, LV_SYMBOL_RIGHT) == 0) lv_ta_cursor_right(ext->ta); else if(strcmp(txt, "Bksp") == 0) lv_ta_del_char(ext->ta); else if(strcmp(txt, "+/-") == 0) { uint16_t cur = lv_ta_get_cursor_pos(ext->ta); diff --git a/lv_objx/lv_kb.h b/lv_objx/lv_kb.h index 335df1eef..1ae5e3156 100644 --- a/lv_objx/lv_kb.h +++ b/lv_objx/lv_kb.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_KB != 0 +#if LV_USE_KB != 0 /*Testing of dependencies*/ -#if USE_LV_BTNM == 0 -#error "lv_kb: lv_btnm is required. Enable it in lv_conf.h (USE_LV_BTNM 1) " +#if LV_USE_BTNM == 0 +#error "lv_kb: lv_btnm is required. Enable it in lv_conf.h (LV_USE_BTNM 1) " #endif -#if USE_LV_TA == 0 -#error "lv_kb: lv_ta is required. Enable it in lv_conf.h (USE_LV_TA 1) " +#if LV_USE_TA == 0 +#error "lv_kb: lv_ta is required. Enable it in lv_conf.h (LV_USE_TA 1) " #endif #include "../lv_core/lv_obj.h" @@ -160,7 +160,7 @@ lv_style_t * lv_kb_get_style(const lv_obj_t *kb, lv_kb_style_t type); * MACROS **********************/ -#endif /*USE_LV_KB*/ +#endif /*LV_USE_KB*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_label.c b/lv_objx/lv_label.c index d166cd615..1d3f6d4fc 100644 --- a/lv_objx/lv_label.c +++ b/lv_objx/lv_label.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_label.h" -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 #include "../lv_core/lv_obj.h" #include "../lv_core/lv_group.h" @@ -40,7 +40,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ static void lv_label_refr_text(lv_obj_t * label); static void lv_label_revert_dots(lv_obj_t * label); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x); static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y); #endif @@ -244,7 +244,7 @@ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode) { lv_label_ext_t * ext = lv_obj_get_ext_attr(label); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /*Delete the old animation (if exists)*/ lv_anim_del(label, (lv_anim_fp_t) lv_obj_set_x); lv_anim_del(label, (lv_anim_fp_t) lv_obj_set_y); @@ -635,7 +635,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ lv_opa_t opa_scale = lv_obj_get_opa_scale(label); lv_obj_get_coords(label, &coords); -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(label); if(lv_group_get_focused(g) == label) { lv_draw_rect(&coords, mask, style, opa_scale); @@ -766,7 +766,7 @@ static void lv_label_refr_text(lv_obj_t * label) /*Start scrolling if the label is greater then its parent*/ if(ext->long_mode == LV_LABEL_LONG_SCROLL) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_obj_t * parent = lv_obj_get_parent(label); /*Delete the potential previous scroller animations*/ @@ -802,7 +802,7 @@ static void lv_label_refr_text(lv_obj_t * label) } /*In roll mode keep the size but start offset animations*/ else if(ext->long_mode == LV_LABEL_LONG_ROLL) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t anim; anim.var = label; anim.repeat = 1; @@ -926,7 +926,7 @@ static void lv_label_revert_dots(lv_obj_t * label) ext->dot_end = LV_LABEL_DOT_END_INV; } -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x) { lv_label_ext_t * ext = lv_obj_get_ext_attr(label); diff --git a/lv_objx/lv_label.h b/lv_objx/lv_label.h index 84f5b5e5a..2acc9c965 100644 --- a/lv_objx/lv_label.h +++ b/lv_objx/lv_label.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 #include "../lv_core/lv_obj.h" #include "../lv_misc/lv_font.h" @@ -265,7 +265,7 @@ void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt); * MACROS **********************/ -#endif /*USE_LV_LABEL*/ +#endif /*LV_USE_LABEL*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_led.c b/lv_objx/lv_led.c index 839bcf588..9edefe0c6 100644 --- a/lv_objx/lv_led.c +++ b/lv_objx/lv_led.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_led.h" -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 #include "../lv_themes/lv_theme.h" #include "../lv_draw/lv_draw.h" diff --git a/lv_objx/lv_led.h b/lv_objx/lv_led.h index 25e48a79c..8711570b5 100644 --- a/lv_objx/lv_led.h +++ b/lv_objx/lv_led.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 #include "../lv_core/lv_obj.h" @@ -107,7 +107,7 @@ static inline lv_style_t* lv_led_get_style(const lv_obj_t *led) * MACROS **********************/ -#endif /*USE_LV_LED*/ +#endif /*LV_USE_LED*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_line.c b/lv_objx/lv_line.c index 882ba3620..702eda68b 100644 --- a/lv_objx/lv_line.c +++ b/lv_objx/lv_line.c @@ -8,7 +8,7 @@ *********************/ #include "lv_line.h" -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 #include "../lv_draw/lv_draw.h" #include "../lv_misc/lv_math.h" #include diff --git a/lv_objx/lv_line.h b/lv_objx/lv_line.h index 377d39981..d0c546062 100644 --- a/lv_objx/lv_line.h +++ b/lv_objx/lv_line.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 #include "../lv_core/lv_obj.h" @@ -149,7 +149,7 @@ static inline bool lv_line_get_upscale(const lv_obj_t * line) * MACROS **********************/ -#endif /*USE_LV_LINE*/ +#endif /*LV_USE_LINE*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 67823f7d3..054905af4 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_list.h" -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 #include "../lv_core/lv_group.h" #include "../lv_themes/lv_theme.h" @@ -19,7 +19,7 @@ *********************/ #define LV_LIST_LAYOUT_DEF LV_LAYOUT_COL_M -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_LIST_FOCUS_TIME # define LV_LIST_FOCUS_TIME 100 /*Animation time of focusing to the a list element [ms] (0: no animation) */ # endif @@ -43,13 +43,13 @@ static void lv_list_btn_single_selected(lv_obj_t *btn); /********************** * STATIC VARIABLES **********************/ -#if USE_LV_IMG +#if LV_USE_IMG static lv_signal_cb_t img_signal; #endif static lv_signal_cb_t label_signal; static lv_signal_cb_t ancestor_page_signal; static lv_signal_cb_t ancestor_btn_signal; -#if USE_LV_GROUP +#if LV_USE_GROUP /*Used to make the last clicked button pressed (selected) when the list become focused and `click_focus == 1`*/ static lv_obj_t * last_clicked_btn; #endif @@ -93,7 +93,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) ext->single_mode = false; ext->size = 0; -#if USE_LV_GROUP +#if LV_USE_GROUP ext->last_sel = NULL; ext->selected_btn = NULL; #endif @@ -128,7 +128,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_t * copy_btn = lv_list_get_next_btn(copy, NULL); while(copy_btn) { const void * img_src = NULL; -#if USE_LV_IMG +#if LV_USE_IMG lv_obj_t * copy_img = lv_list_get_btn_img(copy_btn); if(copy_img) img_src = lv_img_get_src(copy_img); #endif @@ -210,7 +210,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, w -= pad_hor_tot * 2; lv_obj_set_width(liste, w); -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 lv_obj_t * img = NULL; if(img_src) { img = lv_img_create(liste, NULL); @@ -229,7 +229,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_obj_set_width(label, liste->coords.x2 - label->coords.x1 - btn_hor_pad); if(label_signal == NULL) label_signal = lv_obj_get_signal_func(label); } -#if USE_LV_GROUP +#if LV_USE_GROUP /* If this is the first item to be added to the list and the list is * focussed, select it */ { @@ -283,7 +283,7 @@ void lv_list_set_single_mode(lv_obj_t *list, bool mode) ext->single_mode = mode; } -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Make a button selected @@ -324,7 +324,7 @@ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn) void lv_list_set_anim_time(lv_obj_t * list, uint16_t anim_time) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_time = 0; #endif @@ -446,7 +446,7 @@ lv_obj_t * lv_list_get_btn_label(const lv_obj_t * btn) */ lv_obj_t * lv_list_get_btn_img(const lv_obj_t * btn) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 lv_obj_t * img = lv_obj_get_child(btn, NULL); if(img == NULL) return NULL; @@ -548,7 +548,7 @@ uint32_t lv_list_get_size(const lv_obj_t * list) return ext->size; } -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Get the currently selected button * @param list pointer to a list object @@ -643,7 +643,7 @@ void lv_list_up(const lv_obj_t * list) if(ext->anim_time == 0) { lv_obj_set_y(scrl, new_y); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = scrl; a.start = lv_obj_get_y(scrl); @@ -686,7 +686,7 @@ void lv_list_down(const lv_obj_t * list) if(ext->anim_time == 0) { lv_obj_set_y(scrl, new_y); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = scrl; a.start = lv_obj_get_y(scrl); @@ -718,7 +718,7 @@ void lv_list_down(const lv_obj_t * list) void lv_list_focus(const lv_obj_t * btn, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif @@ -757,7 +757,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) refr_btn_width(list); } else if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*With ENCODER select the first button only in edit mode*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { @@ -796,7 +796,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) #endif } else if(sign == LV_SIGNAL_DEFOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP /*De-select the selected btn*/ lv_list_set_btn_selected(list, NULL); last_clicked_btn = NULL; /*button click will be set if click happens before focus*/ @@ -808,7 +808,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) *editable = true; } else if(sign == LV_SIGNAL_CONTROLL) { -#if USE_LV_GROUP +#if LV_USE_GROUP char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); @@ -882,7 +882,7 @@ static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * para lv_list_ext_t * ext = lv_obj_get_ext_attr(list); ext->page.scroll_prop_ip = 0; -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(list); if(lv_group_get_focused(g) == list && lv_indev_is_dragging(lv_indev_get_act()) == false) { /* Is the list is focused then be sure only the button being released @@ -915,7 +915,7 @@ static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * para } else if(sign == LV_SIGNAL_CLEANUP) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn)); lv_obj_t * sel = lv_list_get_btn_selected(list); if(sel == btn) lv_list_set_btn_selected(list, lv_list_get_next_btn(list, btn)); diff --git a/lv_objx/lv_list.h b/lv_objx/lv_list.h index 5c6816f12..ccf294b52 100644 --- a/lv_objx/lv_list.h +++ b/lv_objx/lv_list.h @@ -19,19 +19,19 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 /*Testing of dependencies*/ -#if USE_LV_PAGE == 0 -#error "lv_list: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) " +#if LV_USE_PAGE == 0 +#error "lv_list: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) " #endif -#if USE_LV_BTN == 0 -#error "lv_list: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) " +#if LV_USE_BTN == 0 +#error "lv_list: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_list: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_list: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif @@ -58,7 +58,7 @@ typedef struct lv_style_t *style_img; /*Style of the list element images on buttons*/ uint32_t size; /*the number of items(buttons) in the list*/ bool single_mode; /* whether single selected mode is enabled */ -#if USE_LV_GROUP +#if LV_USE_GROUP lv_obj_t * last_sel; /* The last selected button. It will be reverted when the list is focused again */ lv_obj_t * selected_btn; /* The button is currently being selected*/ #endif @@ -129,7 +129,7 @@ bool lv_list_remove(const lv_obj_t * list, uint32_t index); */ void lv_list_set_single_mode(lv_obj_t *list, bool mode); -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Make a button selected. Can be used while navigating in the list with a keypad. @@ -245,7 +245,7 @@ int32_t lv_list_get_btn_index(const lv_obj_t * list, const lv_obj_t * btn); */ uint32_t lv_list_get_size(const lv_obj_t * list); -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Get the currently selected button. Can be used while navigating in the list with a keypad. * @param list pointer to a list object @@ -327,7 +327,7 @@ void lv_list_focus(const lv_obj_t *btn, bool anim_en); * MACROS **********************/ -#endif /*USE_LV_LIST*/ +#endif /*LV_USE_LIST*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_lmeter.c b/lv_objx/lv_lmeter.c index 06b3fbed6..c912f9d3d 100644 --- a/lv_objx/lv_lmeter.c +++ b/lv_objx/lv_lmeter.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_lmeter.h" -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" @@ -257,7 +257,7 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig memcpy(&style_tmp, style, sizeof(lv_style_t)); -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(lmeter); if(lv_group_get_focused(g) == lmeter) { style_tmp.line.width += 1; diff --git a/lv_objx/lv_lmeter.h b/lv_objx/lv_lmeter.h index 0235d34f9..7852b870e 100644 --- a/lv_objx/lv_lmeter.h +++ b/lv_objx/lv_lmeter.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 #include "../lv_core/lv_obj.h" @@ -144,7 +144,7 @@ static inline lv_style_t * lv_lmeter_get_style(const lv_obj_t * lmeter) * MACROS **********************/ -#endif /*USE_LV_LMETER*/ +#endif /*LV_USE_LMETER*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index 42118c66b..ad86867b9 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_mbox.h" -#if USE_LV_MBOX != 0 +#if LV_USE_MBOX != 0 #include "../lv_core/lv_group.h" #include "../lv_themes/lv_theme.h" @@ -19,7 +19,7 @@ * DEFINES *********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_MBOX_CLOSE_ANIM_TIME # define LV_MBOX_CLOSE_ANIM_TIME 200 /*List close animation time) */ # endif @@ -197,7 +197,7 @@ void lv_mbox_set_action(lv_obj_t * mbox, lv_btnm_action_t action) void lv_mbox_set_anim_time(lv_obj_t * mbox, uint16_t anim_time) { lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_time = 0; #endif @@ -211,7 +211,7 @@ void lv_mbox_set_anim_time(lv_obj_t * mbox, uint16_t anim_time) */ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); if(ext->anim_time != 0) { @@ -236,7 +236,7 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) */ void lv_mbox_stop_auto_close(lv_obj_t * mbox) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_del(mbox, NULL); #else (void)mbox; /*Unused*/ @@ -449,7 +449,7 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) /* The button matrix with ENCODER input supposes it's in a group but in this case it isn't (Only the message box's container) * So so some actions here instead*/ if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_indev_t * indev = lv_indev_get_act(); lv_hal_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_ENCODER) { diff --git a/lv_objx/lv_mbox.h b/lv_objx/lv_mbox.h index 0526fae88..d3c0deffb 100644 --- a/lv_objx/lv_mbox.h +++ b/lv_objx/lv_mbox.h @@ -19,19 +19,19 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_MBOX != 0 +#if LV_USE_MBOX != 0 /*Testing of dependencies*/ -#if USE_LV_CONT == 0 -#error "lv_mbox: lv_cont is required. Enable it in lv_conf.h (USE_LV_CONT 1) " +#if LV_USE_CONT == 0 +#error "lv_mbox: lv_cont is required. Enable it in lv_conf.h (LV_USE_CONT 1) " #endif -#if USE_LV_BTNM == 0 -#error "lv_mbox: lv_btnm is required. Enable it in lv_conf.h (USE_LV_BTNM 1) " +#if LV_USE_BTNM == 0 +#error "lv_mbox: lv_btnm is required. Enable it in lv_conf.h (LV_USE_BTNM 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_mbox: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_mbox: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif @@ -202,7 +202,7 @@ lv_obj_t * lv_mbox_get_btnm(lv_obj_t * mbox); **********************/ -#endif /*USE_LV_MBOX*/ +#endif /*LV_USE_MBOX*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_objx_templ.c b/lv_objx/lv_objx_templ.c index f605450ca..fc154e982 100644 --- a/lv_objx/lv_objx_templ.c +++ b/lv_objx/lv_objx_templ.c @@ -14,7 +14,7 @@ * INCLUDES *********************/ //#include "lv_templ.h" /*TODO uncomment this*/ -#if USE_LV_TEMPL != 0 +#if LV_USE_TEMPL != 0 /********************* * DEFINES diff --git a/lv_objx/lv_objx_templ.h b/lv_objx/lv_objx_templ.h index ab6d09066..13a75d179 100644 --- a/lv_objx/lv_objx_templ.h +++ b/lv_objx/lv_objx_templ.h @@ -27,7 +27,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_TEMPL != 0 +#if LV_USE_TEMPL != 0 #include "../lv_core/lv_obj.h" @@ -102,7 +102,7 @@ lv_style_t * lv_templ_get_style(const lv_obj_t * templ, lv_templ_style_t type); * MACROS **********************/ -#endif /*USE_LV_TEMPL*/ +#endif /*LV_USE_TEMPL*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index b2fef00bb..380789f56 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "../lv_objx/lv_page.h" -#if USE_LV_PAGE != 0 +#if LV_USE_PAGE != 0 #include "../lv_core/lv_group.h" #include "../lv_draw/lv_draw.h" @@ -404,7 +404,7 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) { lv_page_ext_t * ext = lv_obj_get_ext_attr(page); -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_time = 0; #else /* Be sure there is no position changing animation in progress @@ -473,7 +473,7 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) if(anim_time == 0) { lv_obj_set_y(ext->scrl, scrlable_y); lv_obj_set_x(ext->scrl, scrlable_x); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION } else { lv_anim_t a; a.act_time = 0; @@ -505,7 +505,7 @@ void lv_page_scroll_hor(lv_obj_t * page, lv_coord_t dist) { lv_obj_t * scrl = lv_page_get_scrl(page); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = scrl; a.start = lv_obj_get_x(scrl); @@ -534,7 +534,7 @@ void lv_page_scroll_ver(lv_obj_t * page, lv_coord_t dist) { lv_obj_t * scrl = lv_page_get_scrl(page); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = scrl; a.start = lv_obj_get_y(scrl); @@ -561,7 +561,7 @@ void lv_page_scroll_ver(lv_obj_t * page, lv_coord_t dist) */ void lv_page_start_edge_flash(lv_obj_t * page) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_page_ext_t * ext = lv_obj_get_ext_attr(page); if(ext->edge_flash.enabled) { lv_anim_t a; @@ -704,7 +704,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo if(mode == LV_DESIGN_COVER_CHK) { return ancestor_design(scrl, mask, mode); } else if(mode == LV_DESIGN_DRAW_MAIN) { -#if USE_LV_GROUP +#if LV_USE_GROUP /* If the page is focused in a group and * the background object is not visible (transparent) * then "activate" the style of the scrollable*/ @@ -730,7 +730,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo #endif ancestor_design(scrl, mask, mode); -#if USE_LV_GROUP +#if LV_USE_GROUP scrl->style_p = style_scrl_ori; /*Revert the style*/ #endif } else if(mode == LV_DESIGN_DRAW_POST) { diff --git a/lv_objx/lv_page.h b/lv_objx/lv_page.h index 917ec0b48..365708669 100644 --- a/lv_objx/lv_page.h +++ b/lv_objx/lv_page.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_PAGE != 0 +#if LV_USE_PAGE != 0 /*Testing of dependencies*/ -#if USE_LV_CONT == 0 -#error "lv_page: lv_cont is required. Enable it in lv_conf.h (USE_LV_CONT 1) " +#if LV_USE_CONT == 0 +#error "lv_page: lv_cont is required. Enable it in lv_conf.h (LV_USE_CONT 1) " #endif #include "lv_cont.h" @@ -388,7 +388,7 @@ void lv_page_start_edge_flash(lv_obj_t * page); * MACROS **********************/ -#endif /*USE_LV_PAGE*/ +#endif /*LV_USE_PAGE*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_preload.c b/lv_objx/lv_preload.c index 20cd2a4f2..663c7ac7a 100644 --- a/lv_objx/lv_preload.c +++ b/lv_objx/lv_preload.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_preload.h" -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 #include "../lv_misc/lv_math.h" #include "../lv_draw/lv_draw_rect.h" @@ -172,7 +172,7 @@ void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, lv_style_ * */ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preloader_type_t type) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); /*delete previous animation*/ @@ -235,7 +235,7 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preloader_type_t type) } } -#endif //USE_LV_ANIMATION +#endif //LV_USE_ANIMATION } /*===================== diff --git a/lv_objx/lv_preload.h b/lv_objx/lv_preload.h index 4f12f0221..965c2e278 100644 --- a/lv_objx/lv_preload.h +++ b/lv_objx/lv_preload.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 /*Testing of dependencies*/ -#if USE_LV_ARC == 0 -#error "lv_preload: lv_arc is required. Enable it in lv_conf.h (USE_LV_ARC 1) " +#if LV_USE_ARC == 0 +#error "lv_preload: lv_arc is required. Enable it in lv_conf.h (LV_USE_ARC 1) " #endif -#if USE_LV_ANIMATION == 0 -#error "lv_preload: animations are required. Enable it in lv_conf.h (USE_LV_ANIMATION 1) " +#if LV_USE_ANIMATION == 0 +#error "lv_preload: animations are required. Enable it in lv_conf.h (LV_USE_ANIMATION 1) " #endif #include "../lv_core/lv_obj.h" @@ -159,7 +159,7 @@ void lv_preload_spinner_animation(void * ptr, int32_t val); * MACROS **********************/ -#endif /*USE_LV_PRELOAD*/ +#endif /*LV_USE_PRELOAD*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index 4a6f41dd6..fe50d975f 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_roller.h" -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 #include "../lv_draw/lv_draw.h" #include "../lv_core/lv_group.h" @@ -16,7 +16,7 @@ /********************* * DEFINES *********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_ROLLER_ANIM_TIME # define LV_ROLLER_ANIM_TIME 200 /*ms*/ # endif @@ -144,7 +144,7 @@ void lv_roller_set_align(lv_obj_t * roller, lv_label_align_t align) */ void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif @@ -361,7 +361,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par refr_position(roller, false); } } else if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(roller); bool editing = lv_group_get_editing(g); lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); @@ -385,7 +385,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par } #endif } else if(sign == LV_SIGNAL_DEFOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP /*Revert the original state*/ if(ext->ddlist.sel_opt_id != ext->ddlist.sel_opt_id_ori) { ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id_ori; @@ -406,7 +406,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Set the entered value as default*/ lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(roller); bool editing = lv_group_get_editing(g); if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ @@ -544,7 +544,7 @@ static void draw_bg(lv_obj_t * roller, const lv_area_t * mask) */ static void refr_position(lv_obj_t * roller, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif lv_obj_t * roller_scrl = lv_page_get_scrl(roller); @@ -560,7 +560,7 @@ static void refr_position(lv_obj_t * roller, bool anim_en) if(ext->ddlist.anim_time == 0 || anim_en == false) { lv_obj_set_y(roller_scrl, new_y); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = roller_scrl; a.start = lv_obj_get_y(roller_scrl); diff --git a/lv_objx/lv_roller.h b/lv_objx/lv_roller.h index 6301c1389..f3779f5f2 100644 --- a/lv_objx/lv_roller.h +++ b/lv_objx/lv_roller.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 /*Testing of dependencies*/ -#if USE_LV_DDLIST == 0 -#error "lv_roller: lv_ddlist is required. Enable it in lv_conf.h (USE_LV_DDLIST 1) " +#if LV_USE_DDLIST == 0 +#error "lv_roller: lv_ddlist is required. Enable it in lv_conf.h (LV_USE_DDLIST 1) " #endif #include "../lv_core/lv_obj.h" @@ -195,7 +195,7 @@ lv_style_t * lv_roller_get_style(const lv_obj_t *roller, lv_roller_style_t type) * MACROS **********************/ -#endif /*USE_LV_ROLLER*/ +#endif /*LV_USE_ROLLER*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index f91a0b7ce..503e7cb07 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_slider.h" -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 #include "../lv_core/lv_group.h" #include "../lv_draw/lv_draw.h" @@ -280,7 +280,7 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig area_bg.y2 -= slider_w > slider_h ? pad_ver_bg : 0; /*Pad only for horizontal slider*/ } -#if USE_LV_GROUP == 0 +#if LV_USE_GROUP == 0 lv_draw_rect(&area_bg, mask, style_bg, lv_obj_get_opa_scale(slider)); #else /* Draw the borders later if the slider is focused. @@ -357,7 +357,7 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig } /*Before the knob add the border if required*/ -#if USE_LV_GROUP +#if LV_USE_GROUP /* Draw the borders later if the bar is focused. * At value = 100% the indicator can cover to whole background and the focused style won't be visible*/ if(lv_obj_is_focused(slider)) { @@ -503,7 +503,7 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par ext->drag_value = LV_SLIDER_NOT_PRESSED; -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(slider); bool editing = lv_group_get_editing(g); lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); diff --git a/lv_objx/lv_slider.h b/lv_objx/lv_slider.h index 6c0fb292a..edf376d08 100644 --- a/lv_objx/lv_slider.h +++ b/lv_objx/lv_slider.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 /*Testing of dependencies*/ -#if USE_LV_BAR == 0 -#error "lv_slider: lv_bar is required. Enable it in lv_conf.h (USE_LV_BAR 1) " +#if LV_USE_BAR == 0 +#error "lv_slider: lv_bar is required. Enable it in lv_conf.h (LV_USE_BAR 1) " #endif #include "../lv_core/lv_obj.h" @@ -168,7 +168,7 @@ lv_style_t * lv_slider_get_style(const lv_obj_t *slider, lv_slider_style_t type) * MACROS **********************/ -#endif /*USE_LV_SLIDER*/ +#endif /*LV_USE_SLIDER*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_spinbox.c b/lv_objx/lv_spinbox.c index 7a237f533..7111db07c 100644 --- a/lv_objx/lv_spinbox.c +++ b/lv_objx/lv_spinbox.c @@ -8,7 +8,7 @@ *********************/ #include "lv_spinbox.h" -#if USE_LV_SPINBOX != 0 +#if LV_USE_SPINBOX != 0 #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_math.h" diff --git a/lv_objx/lv_spinbox.h b/lv_objx/lv_spinbox.h index ca5761487..104715c7d 100644 --- a/lv_objx/lv_spinbox.h +++ b/lv_objx/lv_spinbox.h @@ -20,11 +20,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_SPINBOX != 0 +#if LV_USE_SPINBOX != 0 /*Testing of dependencies*/ -#if USE_LV_TA == 0 -#error "lv_spinbox: lv_ta is required. Enable it in lv_conf.h (USE_LV_TA 1) " +#if LV_USE_TA == 0 +#error "lv_spinbox: lv_ta is required. Enable it in lv_conf.h (LV_USE_TA 1) " #endif #include "../lv_core/lv_obj.h" @@ -192,7 +192,7 @@ void lv_spinbox_decrement(lv_obj_t * spinbox); * MACROS **********************/ -#endif /*USE_LV_SPINBOX*/ +#endif /*LV_USE_SPINBOX*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_sw.c b/lv_objx/lv_sw.c index cff895a5a..62b8d7e7b 100644 --- a/lv_objx/lv_sw.c +++ b/lv_objx/lv_sw.c @@ -8,11 +8,11 @@ *********************/ #include "lv_sw.h" -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 /*Testing of dependencies*/ -#if USE_LV_SLIDER == 0 -#error "lv_sw: lv_slider is required. Enable it in lv_conf.h (USE_LV_SLIDER 1) " +#if LV_USE_SLIDER == 0 +#error "lv_sw: lv_slider is required. Enable it in lv_conf.h (LV_USE_SLIDER 1) " #endif #include "../lv_themes/lv_theme.h" @@ -68,7 +68,7 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->changed = 0; -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION ext->anim_time = 0; #endif ext->style_knob_off = ext->slider.style_knob; @@ -100,7 +100,7 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) lv_sw_ext_t * copy_ext = lv_obj_get_ext_attr(copy); ext->style_knob_off = copy_ext->style_knob_off; ext->style_knob_on = copy_ext->style_knob_on; -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION ext->anim_time = copy_ext->anim_time; #endif @@ -128,7 +128,7 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) */ void lv_sw_on(lv_obj_t * sw, bool anim) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim = false; #endif lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); @@ -143,7 +143,7 @@ void lv_sw_on(lv_obj_t * sw, bool anim) */ void lv_sw_off(lv_obj_t * sw, bool anim) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim = false; #endif lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); @@ -159,7 +159,7 @@ void lv_sw_off(lv_obj_t * sw, bool anim) */ bool lv_sw_toggle(lv_obj_t *sw, bool anim) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim = false; #endif @@ -200,7 +200,7 @@ void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, lv_style_t * style) void lv_sw_set_anim_time(lv_obj_t *sw, uint16_t anim_time) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); ext->anim_time = anim_time; #endif @@ -246,7 +246,7 @@ lv_style_t * lv_sw_get_style(const lv_obj_t * sw, lv_sw_style_t type) uint16_t lv_sw_get_anim_time(const lv_obj_t *sw) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); return ext->anim_time; #else diff --git a/lv_objx/lv_sw.h b/lv_objx/lv_sw.h index 9c0834962..b8e72ef55 100644 --- a/lv_objx/lv_sw.h +++ b/lv_objx/lv_sw.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 /*Testing of dependencies*/ -#if USE_LV_SLIDER == 0 -#error "lv_sw: lv_slider is required. Enable it in lv_conf.h (USE_LV_SLIDER 1)" +#if LV_USE_SLIDER == 0 +#error "lv_sw: lv_slider is required. Enable it in lv_conf.h (LV_USE_SLIDER 1)" #endif #include "../lv_core/lv_obj.h" @@ -47,7 +47,7 @@ typedef struct lv_coord_t start_x; uint8_t changed :1; /*Indicates the switch state explicitly changed by drag*/ uint8_t slided :1; -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION uint16_t anim_time; /*switch animation time */ #endif } lv_sw_ext_t; @@ -106,7 +106,7 @@ bool lv_sw_toggle(lv_obj_t *sw, bool anim); */ void lv_sw_set_style(lv_obj_t *sw, lv_sw_style_t type, lv_style_t *style); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Set the animation time of the switch * @param sw pointer to a switch object @@ -149,7 +149,7 @@ uint16_t lv_sw_get_anim_time(const lv_obj_t *sw); * MACROS **********************/ -#endif /*USE_LV_SW*/ +#endif /*LV_USE_SW*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 76c0e90c7..4c11b1a39 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_ta.h" -#if USE_LV_TA != 0 +#if LV_USE_TA != 0 #include "../lv_core/lv_group.h" #include "../lv_core/lv_refr.h" @@ -45,7 +45,7 @@ static bool lv_ta_design(lv_obj_t * ta, const lv_area_t * mask, lv_design_mode_t static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mode_t mode); static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param); static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION static void cursor_blink_anim(lv_obj_t * ta, uint8_t show); static void pwd_char_hider_anim(lv_obj_t * ta, int32_t x); #endif @@ -158,7 +158,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_refresh_style(new_ta); } -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /*Create a cursor blinker animation*/ lv_anim_t a; a.var = new_ta; @@ -226,7 +226,7 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, (const char *)letter_buf); -#if USE_LV_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 +#if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 /*Auto hide characters*/ lv_anim_t a; a.var = ta; @@ -293,7 +293,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, txt); -#if USE_LV_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 +#if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 /*Auto hide characters*/ lv_anim_t a; a.var = ta; @@ -419,7 +419,7 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) if(ext->pwd_tmp == NULL) return; strcpy(ext->pwd_tmp, txt); -#if USE_LV_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 +#if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 /*Auto hide characters*/ lv_anim_t a; a.var = ta; @@ -523,7 +523,7 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) ext->cursor.valid_x = cur_pos.x; -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /*Reset cursor blink animation*/ lv_anim_t a; a.var = ta; @@ -1168,7 +1168,7 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) cur_type = lv_ta_get_cursor_type(ta); lv_ta_set_cursor_type(ta, cur_type | LV_CURSOR_HIDDEN); } else if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_cursor_type_t cur_type; cur_type = lv_ta_get_cursor_type(ta); lv_group_t * g = lv_obj_get_group(ta); @@ -1239,7 +1239,7 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void return res; } -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Called to blink the cursor diff --git a/lv_objx/lv_ta.h b/lv_objx/lv_ta.h index f5d1b8067..3a29998df 100644 --- a/lv_objx/lv_ta.h +++ b/lv_objx/lv_ta.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_TA != 0 +#if LV_USE_TA != 0 /*Testing of dependencies*/ -#if USE_LV_PAGE == 0 -#error "lv_ta: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) " +#if LV_USE_PAGE == 0 +#error "lv_ta: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_ta: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_ta: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif #include "../lv_core/lv_obj.h" @@ -383,7 +383,7 @@ void lv_ta_cursor_up(lv_obj_t * ta); * MACROS **********************/ -#endif /*USE_LV_TA_H*/ +#endif /*LV_USE_TA_H*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_table.c b/lv_objx/lv_table.c index c584b3e9e..ee0a87b30 100644 --- a/lv_objx/lv_table.c +++ b/lv_objx/lv_table.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_table.h" -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 #include "../lv_misc/lv_txt.h" #include "../lv_misc/lv_math.h" diff --git a/lv_objx/lv_table.h b/lv_objx/lv_table.h index 94c3575a2..ad47224c5 100644 --- a/lv_objx/lv_table.h +++ b/lv_objx/lv_table.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 /*Testing of dependencies*/ -#if USE_LV_LABEL == 0 -#error "lv_table: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_table: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif #include "../lv_core/lv_obj.h" @@ -252,7 +252,7 @@ lv_style_t * lv_table_get_style(const lv_obj_t * table, lv_table_style_t type); * MACROS **********************/ -#endif /*USE_LV_TABLE*/ +#endif /*LV_USE_TABLE*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index bf6fdae09..d745882e5 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_tabview.h" -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 #include "lv_btnm.h" #include "../lv_themes/lv_theme.h" @@ -16,7 +16,7 @@ /********************* * DEFINES *********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_TABVIEW_ANIM_TIME # define LV_TABVIEW_ANIM_TIME 300 /*Animation time of focusing to the a list element [ms] (0: no animation) */ # endif @@ -269,7 +269,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) */ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); @@ -287,7 +287,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) if(ext->anim_time == 0 || anim_en == false) { lv_obj_set_x(ext->content, cont_x); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = ext->content; a.start = lv_obj_get_x(ext->content); @@ -313,7 +313,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) if(ext->anim_time == 0 || anim_en == false) { lv_obj_set_x(ext->indic, indic_x); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = ext->indic; a.start = lv_obj_get_x(ext->indic); @@ -365,7 +365,7 @@ void lv_tabview_set_sliding(lv_obj_t * tabview, bool en) void lv_tabview_set_anim_time(lv_obj_t * tabview, uint16_t anim_time) { lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_time = 0; #endif ext->anim_time = anim_time; @@ -621,7 +621,7 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*With ENCODER select the first button only in edit mode*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(tabview); if(lv_group_get_editing(g)) { lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btns); diff --git a/lv_objx/lv_tabview.h b/lv_objx/lv_tabview.h index 2d60c3c85..1b77a5f33 100644 --- a/lv_objx/lv_tabview.h +++ b/lv_objx/lv_tabview.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 /*Testing of dependencies*/ -#if USE_LV_BTNM == 0 -#error "lv_tabview: lv_btnm is required. Enable it in lv_conf.h (USE_LV_BTNM 1) " +#if LV_USE_BTNM == 0 +#error "lv_tabview: lv_btnm is required. Enable it in lv_conf.h (LV_USE_BTNM 1) " #endif -#if USE_LV_PAGE == 0 -#error "lv_tabview: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) " +#if LV_USE_PAGE == 0 +#error "lv_tabview: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) " #endif #include "../lv_core/lv_obj.h" @@ -243,7 +243,7 @@ bool lv_tabview_get_btns_hidden(const lv_obj_t *tabview); * MACROS **********************/ -#endif /*USE_LV_TABVIEW*/ +#endif /*LV_USE_TABVIEW*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_tileview.c b/lv_objx/lv_tileview.c index e4cc04429..9ce57a083 100644 --- a/lv_objx/lv_tileview.c +++ b/lv_objx/lv_tileview.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_tileview.h" -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 #include #include "lv_cont.h" @@ -16,7 +16,7 @@ /********************* * DEFINES *********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_TILEVIEW_ANIM_TIME # define LV_TILEVIEW_ANIM_TIME 300 /*Animation time loading a tile [ms] (0: no animation) */ # endif @@ -164,7 +164,7 @@ void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * val */ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif @@ -192,7 +192,7 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b lv_coord_t y_coord = -y * lv_obj_get_height(tileview); lv_obj_t * scrl = lv_page_get_scrl(tileview); if(anim_en) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_coord_t x_act = lv_obj_get_x(scrl); lv_coord_t y_act = lv_obj_get_y(scrl); diff --git a/lv_objx/lv_tileview.h b/lv_objx/lv_tileview.h index d276feaad..7aa597aaf 100644 --- a/lv_objx/lv_tileview.h +++ b/lv_objx/lv_tileview.h @@ -20,7 +20,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 #include "../lv_objx/lv_page.h" @@ -154,7 +154,7 @@ lv_style_t * lv_tileview_get_style(const lv_obj_t * tileview, lv_tileview_style_ * MACROS **********************/ -#endif /*USE_LV_TILEVIEW*/ +#endif /*LV_USE_TILEVIEW*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_win.c b/lv_objx/lv_win.c index 65272f09c..59b13e490 100644 --- a/lv_objx/lv_win.c +++ b/lv_objx/lv_win.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_win.h" -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 #include "../lv_themes/lv_theme.h" #include "../lv_core/lv_disp.h" @@ -190,17 +190,17 @@ lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * img_src, lv_event_cb_t ev *====================*/ /** - * A release action which can be assigned to a window control button to close it - * @param btn pointer to the released button - * @return always LV_ACTION_RES_INV because the button is deleted with the window + * Can be assigned to a window control button to close the window + * @param btn pointer to the control button on teh widows header + * @param evet the event type */ -lv_res_t lv_win_close_action(lv_obj_t * btn) +void lv_win_close_event(lv_obj_t * btn, lv_event_t event) { - lv_obj_t * win = lv_win_get_from_btn(btn); + if(event == LV_EVENT_RELEASED) { + lv_obj_t * win = lv_win_get_from_btn(btn); - lv_obj_del(win); - - return LV_RES_INV; + lv_obj_del(win); + } } /** diff --git a/lv_objx/lv_win.h b/lv_objx/lv_win.h index 28c5a1302..37d0fd55e 100644 --- a/lv_objx/lv_win.h +++ b/lv_objx/lv_win.h @@ -19,24 +19,24 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 /*Testing of dependencies*/ -#if USE_LV_BTN == 0 -#error "lv_win: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) " +#if LV_USE_BTN == 0 +#error "lv_win: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_win: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_win: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif -#if USE_LV_IMG == 0 -#error "lv_win: lv_img is required. Enable it in lv_conf.h (USE_LV_IMG 1) " +#if LV_USE_IMG == 0 +#error "lv_win: lv_img is required. Enable it in lv_conf.h (LV_USE_IMG 1) " #endif -#if USE_LV_PAGE == 0 -#error "lv_win: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) " +#if LV_USE_PAGE == 0 +#error "lv_win: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) " #endif #include "../lv_core/lv_obj.h" @@ -115,11 +115,11 @@ lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * img_src, lv_event_cb_t ev *====================*/ /** - * A release action which can be assigned to a window control button to close it - * @param btn pointer to the released button - * @return always LV_ACTION_RES_INV because the button is deleted with the window + * Can be assigned to a window control button to close the window + * @param btn pointer to the control button on teh widows header + * @param evet the event type */ -lv_res_t lv_win_close_action(lv_obj_t * btn); +void lv_win_close_event(lv_obj_t * btn, lv_event_t event); /** * Set the title of a window @@ -273,7 +273,7 @@ static inline void lv_win_scroll_ver(lv_obj_t * win, lv_coord_t dist) * MACROS **********************/ -#endif /*USE_LV_WIN*/ +#endif /*LV_USE_WIN*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_porting/lv_port_disp_templ.c b/lv_porting/lv_port_disp_templ.c index 39f928d23..cbb2341de 100644 --- a/lv_porting/lv_port_disp_templ.c +++ b/lv_porting/lv_port_disp_templ.c @@ -25,7 +25,7 @@ static void disp_init(void); static void disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_p); -#if USE_LV_GPU +#if LV_USE_GPU static void mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); static void mem_fill(lv_color_t * dest, uint32_t length, lv_color_t color); #endif @@ -103,7 +103,7 @@ void lv_port_disp_init(void) /*Set a display buffer*/ disp_drv.buffer = &disp_buf_2; -#if USE_LV_GPU +#if LV_USE_GPU /*Optionally add functions to access the GPU. (Only in buffered mode, LV_VDB_SIZE != 0)*/ /*Blend two color array using opacity*/ @@ -151,7 +151,7 @@ static void disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * co /*OPTIONAL: GPU INTERFACE*/ -#if USE_LV_GPU +#if LV_USE_GPU /* If your MCU has hardware accelerator (GPU) then you can use it to blend to memories using opacity * It can be used only in buffered mode (LV_VDB_SIZE != 0 in lv_conf.h)*/ @@ -177,6 +177,6 @@ static void mem_fill(lv_color_t * dest, uint32_t length, lv_color_t color) } } -#endif /*USE_LV_GPU*/ +#endif /*LV_USE_GPU*/ #endif diff --git a/lv_porting/lv_port_indev_templ.c b/lv_porting/lv_port_indev_templ.c index c89eb0744..7c1f0505f 100644 --- a/lv_porting/lv_port_indev_templ.c +++ b/lv_porting/lv_port_indev_templ.c @@ -110,7 +110,7 @@ void lv_port_indev_init(void) /*Set cursor. For simplicity set a HOME symbol now.*/ lv_obj_t * mouse_cursor = lv_img_create(lv_disp_get_scr_act(NULL), NULL); - lv_img_set_src(mouse_cursor, SYMBOL_HOME); + lv_img_set_src(mouse_cursor, LV_SYMBOL_HOME); lv_indev_set_cursor(indev_mouse, mouse_cursor); /*------------------ diff --git a/lv_themes/lv_theme.c b/lv_themes/lv_theme.c index 3db5a4cdc..35811155f 100644 --- a/lv_themes/lv_theme.c +++ b/lv_themes/lv_theme.c @@ -80,7 +80,7 @@ void lv_theme_set_current(lv_theme_t * th) if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t)); } -#if USE_LV_GROUP +#if LV_USE_GROUP /*Copy group style modification callback functions*/ memcpy(¤t_theme.group, &th->group, sizeof(th->group)); #endif @@ -88,7 +88,7 @@ void lv_theme_set_current(lv_theme_t * th) /*Let the object know their style might change*/ lv_obj_report_style_mod(NULL); -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_report_style_mod(NULL); #endif diff --git a/lv_themes/lv_theme.h b/lv_themes/lv_theme.h index 66bbd3d2d..855699979 100644 --- a/lv_themes/lv_theme.h +++ b/lv_themes/lv_theme.h @@ -35,11 +35,11 @@ typedef struct { lv_style_t *bg; lv_style_t *panel; -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 lv_style_t *cont; #endif -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 struct { lv_style_t *rel; lv_style_t *pr; @@ -50,7 +50,7 @@ typedef struct { #endif -#if USE_LV_IMGBTN != 0 +#if LV_USE_IMGBTN != 0 struct { lv_style_t *rel; lv_style_t *pr; @@ -60,7 +60,7 @@ typedef struct { } imgbtn; #endif -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 struct { lv_style_t *prim; lv_style_t *sec; @@ -68,31 +68,31 @@ typedef struct { } label; #endif -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 struct { lv_style_t *light; lv_style_t *dark; } img; #endif -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 struct { lv_style_t *decor; } line; #endif -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 lv_style_t *led; #endif -#if USE_LV_BAR != 0 +#if LV_USE_BAR != 0 struct { lv_style_t *bg; lv_style_t *indic; } bar; #endif -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 struct { lv_style_t *bg; lv_style_t *indic; @@ -100,23 +100,23 @@ typedef struct { } slider; #endif -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 lv_style_t *lmeter; #endif -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 lv_style_t *gauge; #endif -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 lv_style_t *arc; #endif -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 lv_style_t *preload; #endif -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 struct { lv_style_t *bg; lv_style_t *indic; @@ -125,11 +125,11 @@ typedef struct { } sw; #endif -#if USE_LV_CHART != 0 +#if LV_USE_CHART != 0 lv_style_t *chart; #endif -#if USE_LV_CALENDAR != 0 +#if LV_USE_CALENDAR != 0 struct { lv_style_t *bg; lv_style_t *header; @@ -142,7 +142,7 @@ typedef struct { } calendar; #endif -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 struct { lv_style_t *bg; struct { @@ -155,7 +155,7 @@ typedef struct { } cb; #endif -#if USE_LV_BTNM != 0 +#if LV_USE_BTNM != 0 struct { lv_style_t *bg; struct { @@ -168,7 +168,7 @@ typedef struct { } btnm; #endif -#if USE_LV_KB != 0 +#if LV_USE_KB != 0 struct { lv_style_t *bg; struct { @@ -181,7 +181,7 @@ typedef struct { } kb; #endif -#if USE_LV_MBOX != 0 +#if LV_USE_MBOX != 0 struct { lv_style_t *bg; struct { @@ -192,7 +192,7 @@ typedef struct { } mbox; #endif -#if USE_LV_PAGE != 0 +#if LV_USE_PAGE != 0 struct { lv_style_t *bg; lv_style_t *scrl; @@ -200,7 +200,7 @@ typedef struct { } page; #endif -#if USE_LV_TA != 0 +#if LV_USE_TA != 0 struct { lv_style_t *area; lv_style_t *oneline; @@ -209,7 +209,7 @@ typedef struct { } ta; #endif -#if USE_LV_SPINBOX != 0 +#if LV_USE_SPINBOX != 0 struct { lv_style_t *bg; lv_style_t *cursor; @@ -217,7 +217,7 @@ typedef struct { } spinbox; #endif -#if USE_LV_LIST +#if LV_USE_LIST struct { lv_style_t *bg; lv_style_t *scrl; @@ -232,7 +232,7 @@ typedef struct { } list; #endif -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 struct { lv_style_t *bg; lv_style_t *sel; @@ -240,14 +240,14 @@ typedef struct { } ddlist; #endif -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 struct { lv_style_t *bg; lv_style_t *sel; } roller; #endif -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 struct { lv_style_t *bg; lv_style_t *indic; @@ -261,7 +261,7 @@ typedef struct { } tabview; #endif -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 struct { lv_style_t *bg; lv_style_t *scrl; @@ -269,14 +269,14 @@ typedef struct { } tileview; #endif -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 struct { lv_style_t *bg; lv_style_t *cell; } table; #endif -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 struct { lv_style_t *bg; lv_style_t *sb; @@ -293,7 +293,7 @@ typedef struct { #endif } style; -#if USE_LV_GROUP +#if LV_USE_GROUP struct { lv_group_style_mod_func_t style_mod; diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index a66f15d39..5d163412e 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -8,7 +8,7 @@ *********************/ #include "lv_theme.h" -#if USE_LV_THEME_ALIEN +#if LV_USE_THEME_ALIEN /********************* * DEFINES @@ -36,23 +36,23 @@ static lv_style_t panel; /*General fancy background (e.g. to chart or ta) static lv_style_t sb; static lv_style_t btn_rel, btn_pr, btn_trel, btn_tpr, btn_ina; -#if USE_LV_BAR +#if LV_USE_BAR static lv_style_t bar_bg, bar_indic; #endif -#if USE_LV_SLIDER +#if LV_USE_SLIDER static lv_style_t slider_knob; #endif -#if USE_LV_LMETER +#if LV_USE_LMETER static lv_style_t lmeter_bg; #endif -#if USE_LV_DDLIST +#if LV_USE_DDLIST static lv_style_t ddlist_bg, ddlist_sel; #endif -#if USE_LV_BTNM +#if LV_USE_BTNM static lv_style_t btnm_bg, btnm_rel, btnm_pr, btnm_trel, btnm_ina; #endif @@ -136,14 +136,14 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = &panel; #endif } static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 lv_style_copy(&btn_rel, &def); btn_rel.glass = 0; btn_rel.body.opa = LV_OPA_TRANSP; @@ -204,7 +204,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 static lv_style_t label_prim, label_sec, label_hint; lv_style_copy(&label_prim, &def); @@ -226,7 +226,7 @@ static void label_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR lv_style_copy(&bar_bg, &def); bar_bg.body.opa = LV_OPA_30; bar_bg.body.radius = LV_RADIUS_CIRCLE; @@ -258,7 +258,7 @@ static void bar_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); @@ -275,7 +275,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 static lv_style_t line_decor; lv_style_copy(&line_decor, &def); line_decor.line.color = lv_color_hsv_to_rgb(_hue, 50, 50); @@ -287,7 +287,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &lv_style_pretty_color); led.body.shadow.width = LV_DPI / 10; @@ -305,7 +305,7 @@ static void led_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 lv_style_copy(&slider_knob, &def); slider_knob.body.opa = LV_OPA_60; slider_knob.body.radius = LV_RADIUS_CIRCLE; @@ -323,7 +323,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 static lv_style_t sw_bg, sw_indic, sw_knob; lv_style_copy(&sw_bg, &bar_bg); sw_bg.body.opa = LV_OPA_COVER; @@ -352,7 +352,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 lv_style_copy(&lmeter_bg, &def); lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); @@ -367,7 +367,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge_bg; lv_style_copy(&gauge_bg, &def); gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); @@ -387,7 +387,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 static lv_style_t arc; lv_style_copy(&arc, &def); @@ -407,7 +407,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = theme.style.arc; #endif @@ -415,14 +415,14 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &panel; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR +#if LV_USE_CALENDAR static lv_style_t header; static lv_style_t color_text; static lv_style_t gray_text; @@ -462,7 +462,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 static lv_style_t cb_bg, cb_rel, cb_pr, cb_trel, cb_tpr, cb_ina; lv_style_copy(&cb_rel, &bg); cb_rel.body.radius = LV_DPI / 20; @@ -514,7 +514,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM lv_style_copy(&btnm_bg, &lv_style_transp_tight); btnm_bg.body.border.width = 1; btnm_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 80); @@ -552,7 +552,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &btnm_bg; theme.style.kb.btn.rel = &btnm_rel; theme.style.kb.btn.pr = &btnm_pr; @@ -565,7 +565,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX static lv_style_t mbox_bg; lv_style_copy(&mbox_bg, &panel); mbox_bg.body.shadow.width = LV_DPI / 12; @@ -579,7 +579,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = &panel; theme.style.page.scrl = &lv_style_transp_fit; theme.style.page.sb = &sb; @@ -588,7 +588,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &panel; theme.style.ta.oneline = &panel; theme.style.ta.cursor = NULL; @@ -598,7 +598,7 @@ static void ta_init(void) static void spinbox_init(void) { -#if USE_LV_SPINBOX +#if LV_USE_SPINBOX theme.style.spinbox.bg= &panel; theme.style.spinbox.cursor = theme.style.ta.cursor; theme.style.spinbox.sb = theme.style.ta.sb; @@ -607,7 +607,7 @@ static void spinbox_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 static lv_style_t list_bg, list_rel, list_pr, list_trel, list_tpr, list_ina; lv_style_copy(&list_rel, &def); list_rel.body.opa = LV_OPA_TRANSP; @@ -646,7 +646,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &panel); ddlist_bg.text.line_space = LV_DPI / 8; ddlist_bg.body.padding.hor = LV_DPI / 6; @@ -666,7 +666,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t roller_bg, roller_sel; lv_style_copy(&roller_bg, &ddlist_bg); roller_bg.text.line_space = LV_DPI / 6; @@ -691,7 +691,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 static lv_style_t tab_rel, tab_pr, tab_trel, tab_tpr, tab_indic; lv_style_copy(&tab_rel, &def); tab_rel.body.main_color = LV_COLOR_HEX3(0x666); @@ -750,7 +750,7 @@ static void tabview_init(void) static void tileview_init(void) { -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; theme.style.tileview.sb = theme.style.page.sb; @@ -759,7 +759,7 @@ static void tileview_init(void) static void table_init(void) { -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, &panel); cell.body.radius = 0; @@ -775,7 +775,7 @@ static void table_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t header; lv_style_copy(&header, &def); @@ -801,7 +801,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -840,7 +840,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -898,7 +898,7 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_alien.h b/lv_themes/lv_theme_alien.h index 7d97cb8c6..ca88696ed 100644 --- a/lv_themes/lv_theme_alien.h +++ b/lv_themes/lv_theme_alien.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_ALIEN +#if LV_USE_THEME_ALIEN /********************* * DEFINES diff --git a/lv_themes/lv_theme_default.c b/lv_themes/lv_theme_default.c index 427532cf5..6bdd32c3e 100644 --- a/lv_themes/lv_theme_default.c +++ b/lv_themes/lv_theme_default.c @@ -8,7 +8,7 @@ *********************/ #include "lv_theme.h" -#if USE_LV_THEME_DEFAULT +#if LV_USE_THEME_DEFAULT /********************* * DEFINES @@ -70,7 +70,7 @@ static void basic_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 theme.style.btn.rel = &lv_style_btn_rel; theme.style.btn.pr = &lv_style_btn_pr; theme.style.btn.tgl_rel = &lv_style_btn_tgl_rel; @@ -81,7 +81,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 lv_style_copy(&label_prim, &lv_style_plain); lv_style_copy(&label_sec, &lv_style_plain); @@ -101,7 +101,7 @@ static void label_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 theme.style.img.light = &def; @@ -111,7 +111,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = &def; #endif @@ -119,7 +119,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &lv_style_pretty_color); @@ -136,7 +136,7 @@ static void led_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR theme.style.bar.bg = &lv_style_pretty; theme.style.bar.indic = &lv_style_pretty_color; @@ -145,7 +145,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 lv_style_copy(&slider_bg, &lv_style_pretty); slider_bg.body.padding.hor = LV_DPI / 20; slider_bg.body.padding.ver = LV_DPI / 20; @@ -158,7 +158,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 lv_style_copy(&sw_bg, &lv_style_pretty); sw_bg.body.padding.hor = 3; sw_bg.body.padding.ver = 3; @@ -173,7 +173,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 lv_style_copy(&lmeter, &lv_style_pretty_color); lmeter.line.color = LV_COLOR_HEX3(0xddd); @@ -187,7 +187,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge; lv_style_copy(&gauge, &lmeter); gauge.line.color = lmeter.body.grad_color; @@ -202,7 +202,7 @@ static void gauge_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &lv_style_pretty; @@ -211,7 +211,7 @@ static void chart_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 theme.style.cb.bg = &lv_style_transp; @@ -226,7 +226,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM theme.style.btnm.bg = &lv_style_pretty; @@ -240,7 +240,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &lv_style_pretty; @@ -255,7 +255,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX theme.style.mbox.bg = &lv_style_pretty; @@ -267,7 +267,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = &lv_style_pretty; @@ -278,7 +278,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &lv_style_pretty; @@ -290,7 +290,7 @@ static void ta_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 theme.style.list.bg = &lv_style_pretty; theme.style.list.scrl = &lv_style_transp_fit; @@ -305,7 +305,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 theme.style.ddlist.bg = &lv_style_pretty; @@ -316,7 +316,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 theme.style.roller.bg = &lv_style_pretty; @@ -326,7 +326,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 theme.style.tabview.bg = &plain_bordered; @@ -342,7 +342,7 @@ static void tabview_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 theme.style.win.bg = &plain_bordered; @@ -355,7 +355,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -403,7 +403,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -456,7 +456,7 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_default.h b/lv_themes/lv_theme_default.h index 9ec74a951..772d76430 100644 --- a/lv_themes/lv_theme_default.h +++ b/lv_themes/lv_theme_default.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_DEFAULT +#if LV_USE_THEME_DEFAULT /********************* * DEFINES diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index 6c8f71183..7ee8e0b40 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -8,7 +8,7 @@ *********************/ #include "lv_theme.h" -#if USE_LV_THEME_MATERIAL +#if LV_USE_THEME_MATERIAL /********************* * DEFINES @@ -87,7 +87,7 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = theme.style.panel; @@ -96,7 +96,7 @@ static void cont_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&rel, &def); @@ -146,7 +146,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 static lv_style_t prim, sec, hint; lv_style_copy(&prim, &def); @@ -167,7 +167,7 @@ static void label_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); @@ -185,7 +185,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = &def; @@ -194,7 +194,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &def); led.body.shadow.width = LV_DPI / 10; @@ -213,7 +213,7 @@ static void led_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR static lv_style_t bar_bg, bar_indic; lv_style_copy(&bar_bg, &def); @@ -237,7 +237,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 static lv_style_t knob; lv_style_copy(&knob, &def); @@ -254,7 +254,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 static lv_style_t sw_bg, sw_indic, sw_knob_off, sw_knob_on; lv_style_copy(&sw_bg, theme.style.slider.bg); sw_bg.body.radius = LV_RADIUS_CIRCLE; @@ -285,7 +285,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 static lv_style_t lmeter; lv_style_copy(&lmeter, &def); lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 90); @@ -300,7 +300,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge; lv_style_copy(&gauge, &def); @@ -319,7 +319,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 static lv_style_t arc; lv_style_copy(&arc, &def); @@ -338,7 +338,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = theme.style.arc; #endif @@ -346,14 +346,14 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = theme.style.panel; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR +#if LV_USE_CALENDAR static lv_style_t ina_days; lv_style_copy(&ina_days, &def); ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 70); @@ -391,7 +391,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&rel, theme.style.panel); rel.body.shadow.type = LV_SHADOW_BOTTOM; @@ -427,7 +427,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, theme.style.panel); @@ -476,7 +476,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB static lv_style_t rel; lv_style_copy(&rel, &lv_style_transp); @@ -494,7 +494,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX static lv_style_t pr, rel; lv_style_copy(&rel, &lv_style_transp); @@ -514,7 +514,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = theme.style.panel; @@ -525,7 +525,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA static lv_style_t oneline; lv_style_copy(&oneline, &def); @@ -546,7 +546,7 @@ static void ta_init(void) static void spinbox_init(void) { -#if USE_LV_SPINBOX +#if LV_USE_SPINBOX theme.style.spinbox.bg= theme.style.panel; theme.style.spinbox.cursor = theme.style.ta.cursor; theme.style.spinbox.sb = theme.style.ta.sb; @@ -555,7 +555,7 @@ static void spinbox_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 static lv_style_t list_bg, rel, pr, tgl_rel, tgl_pr, ina; @@ -610,7 +610,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 static lv_style_t bg, sel; lv_style_copy(&bg, theme.style.panel); bg.body.padding.hor = LV_DPI / 6; @@ -633,7 +633,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t roller_bg, roller_sel; lv_style_copy(&roller_bg, &lv_style_transp); @@ -654,7 +654,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 static lv_style_t indic, btn_bg, rel, pr, tgl_rel, tgl_pr; lv_style_copy(&indic, &def); @@ -722,7 +722,7 @@ static void tabview_init(void) static void tileview_init(void) { -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; theme.style.tileview.sb = theme.style.page.sb; @@ -731,7 +731,7 @@ static void tileview_init(void) static void table_init(void) { -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, theme.style.panel); cell.body.radius = 0; @@ -747,7 +747,7 @@ static void table_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t header, pr; lv_style_copy(&header, &def); @@ -784,7 +784,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -832,7 +832,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -892,7 +892,7 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_material.h b/lv_themes/lv_theme_material.h index 306f0957e..572801f2c 100644 --- a/lv_themes/lv_theme_material.h +++ b/lv_themes/lv_theme_material.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_MATERIAL +#if LV_USE_THEME_MATERIAL /********************* * DEFINES diff --git a/lv_themes/lv_theme_mono.c b/lv_themes/lv_theme_mono.c index 51bd7f8e5..953a29e8b 100644 --- a/lv_themes/lv_theme_mono.c +++ b/lv_themes/lv_theme_mono.c @@ -9,7 +9,7 @@ #include "lv_theme.h" -#if USE_LV_THEME_MONO +#if LV_USE_THEME_MONO /********************* * DEFINES @@ -98,7 +98,7 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = &def; @@ -107,7 +107,7 @@ static void cont_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 theme.style.btn.rel = &light_frame; @@ -121,7 +121,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 theme.style.label.prim = NULL; @@ -132,7 +132,7 @@ static void label_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 theme.style.img.light = &def; @@ -142,14 +142,14 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = NULL; #endif } static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &light_frame); led.body.radius = LV_RADIUS_CIRCLE; @@ -163,7 +163,7 @@ static void led_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR static lv_style_t bar_bg; static lv_style_t bar_indic; @@ -184,7 +184,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 static lv_style_t slider_knob; lv_style_copy(&slider_knob, &light_frame); slider_knob.body.radius = LV_RADIUS_CIRCLE; @@ -199,7 +199,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 theme.style.sw.bg = theme.style.slider.bg; @@ -212,7 +212,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 static lv_style_t lmeter_bg; lv_style_copy(&lmeter_bg, &light_frame); lmeter_bg.body.opa = LV_OPA_TRANSP; @@ -229,7 +229,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge_bg; lv_style_copy(&gauge_bg, theme.style.lmeter); gauge_bg.line.color = LV_COLOR_BLACK; @@ -242,14 +242,14 @@ static void gauge_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &light_frame; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR +#if LV_USE_CALENDAR static lv_style_t box; lv_style_copy(&box, &light_plain); box.body.padding.ver = LV_DPI / 20; @@ -262,7 +262,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 theme.style.cb.bg = &lv_style_transp; @@ -277,7 +277,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM theme.style.btnm.bg = &light_frame; @@ -291,7 +291,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &lv_style_transp_fit; theme.style.kb.btn.rel = &light_frame; theme.style.kb.btn.pr = &light_frame; @@ -304,7 +304,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX theme.style.mbox.bg = &dark_frame; @@ -316,7 +316,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = &light_frame; @@ -327,7 +327,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &light_frame; @@ -339,7 +339,7 @@ static void ta_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 theme.style.list.sb = &dark_frame; @@ -355,7 +355,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 static lv_style_t bg; lv_style_copy(&bg, &light_frame); bg.text.line_space = LV_DPI / 12; @@ -368,7 +368,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t bg; lv_style_copy(&bg, &light_frame); bg.text.line_space = LV_DPI / 12; @@ -380,7 +380,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 theme.style.tabview.bg = &light_frame; @@ -396,7 +396,7 @@ static void tabview_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t win_header; lv_style_copy(&win_header, &dark_plain); win_header.body.padding.hor = LV_DPI / 30; @@ -412,7 +412,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -448,7 +448,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -505,7 +505,7 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_mono.h b/lv_themes/lv_theme_mono.h index a7c8c8c2f..8e0e0553a 100644 --- a/lv_themes/lv_theme_mono.h +++ b/lv_themes/lv_theme_mono.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_MONO +#if LV_USE_THEME_MONO /********************* * DEFINES diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index 96a5d6fc2..4bae8bf17 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -9,7 +9,7 @@ #include "lv_theme.h" -#if USE_LV_THEME_NEMO +#if LV_USE_THEME_NEMO /********************* * DEFINES @@ -39,23 +39,23 @@ static lv_style_t panel; /*General fancy background (e.g. to chart or ta) static lv_style_t sb; static lv_style_t btn_rel, btn_pr, btn_trel, btn_tpr, btn_ina; -#if USE_LV_BAR +#if LV_USE_BAR static lv_style_t bar_bg, bar_indic; #endif -#if USE_LV_SLIDER +#if LV_USE_SLIDER static lv_style_t slider_knob; #endif -#if USE_LV_LMETER +#if LV_USE_LMETER static lv_style_t lmeter_bg; #endif -#if USE_LV_DDLIST +#if LV_USE_DDLIST static lv_style_t ddlist_bg, ddlist_sel; #endif -#if USE_LV_BTNM +#if LV_USE_BTNM static lv_style_t btnm_bg, btnm_rel, btnm_pr, btnm_trel, btnm_ina; #endif @@ -138,7 +138,7 @@ static void basic_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 lv_style_copy(&btn_rel, &def); btn_rel.glass = 0; btn_rel.body.opa = LV_OPA_TRANSP; @@ -195,7 +195,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 static lv_style_t label_prim, label_sec, label_hint; lv_style_copy(&label_prim, &def); @@ -217,7 +217,7 @@ static void label_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR lv_style_copy(&bar_bg, &def); bar_bg.body.opa = LV_OPA_30; bar_bg.body.radius = LV_RADIUS_CIRCLE; @@ -249,7 +249,7 @@ static void bar_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); @@ -266,7 +266,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 static lv_style_t line_decor; lv_style_copy(&line_decor, &def); line_decor.line.color = lv_color_hsv_to_rgb(_hue, 50, 50); @@ -278,7 +278,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &lv_style_pretty_color); led.body.shadow.width = LV_DPI / 10; @@ -296,7 +296,7 @@ static void led_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 lv_style_copy(&slider_knob, &def); slider_knob.body.opa = LV_OPA_60; slider_knob.body.radius = LV_RADIUS_CIRCLE; @@ -314,7 +314,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 static lv_style_t sw_bg, sw_indic, sw_knob; lv_style_copy(&sw_bg, &bar_bg); sw_bg.body.opa = LV_OPA_COVER; @@ -343,7 +343,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 lv_style_copy(&lmeter_bg, &def); lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); @@ -358,7 +358,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge_bg; lv_style_copy(&gauge_bg, &def); gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 20, 100); @@ -378,7 +378,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 static lv_style_t arc; lv_style_copy(&arc, &def); @@ -395,7 +395,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = theme.style.arc; #endif @@ -403,14 +403,14 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &panel; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR != 0 +#if LV_USE_CALENDAR != 0 static lv_style_t ina_days; lv_style_copy(&ina_days, &def); ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 50); @@ -444,7 +444,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 static lv_style_t cb_bg, cb_rel, cb_pr, cb_trel, cb_tpr, cb_ina; lv_style_copy(&cb_rel, &bg); cb_rel.body.radius = LV_DPI / 20; @@ -496,7 +496,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM lv_style_copy(&btnm_bg, &lv_style_transp_tight); btnm_bg.body.border.width = 1; btnm_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 80); @@ -534,7 +534,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &btnm_bg; theme.style.kb.btn.rel = &btnm_rel; theme.style.kb.btn.pr = &btnm_pr; @@ -547,7 +547,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX static lv_style_t mbox_bg; lv_style_copy(&mbox_bg, &panel); mbox_bg.body.shadow.width = LV_DPI / 12; @@ -561,7 +561,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = &panel; theme.style.page.scrl = &lv_style_transp_fit; theme.style.page.sb = &sb; @@ -570,7 +570,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &panel; theme.style.ta.oneline = &panel; theme.style.ta.cursor = NULL; @@ -580,7 +580,7 @@ static void ta_init(void) static void spinbox_init(void) { -#if USE_LV_SPINBOX +#if LV_USE_SPINBOX theme.style.spinbox.bg= &panel; theme.style.spinbox.cursor = theme.style.ta.cursor; theme.style.spinbox.sb = theme.style.ta.sb; @@ -589,7 +589,7 @@ static void spinbox_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 static lv_style_t list_bg, list_rel, list_pr, list_trel, list_tpr, list_ina; lv_style_copy(&list_rel, &def); list_rel.body.opa = LV_OPA_TRANSP; @@ -627,7 +627,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &panel); ddlist_bg.text.line_space = LV_DPI / 8; ddlist_bg.body.padding.hor = LV_DPI / 6; @@ -647,7 +647,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t roller_bg, roller_sel; lv_style_copy(&roller_bg, &ddlist_bg); roller_bg.text.line_space = LV_DPI / 6; @@ -672,7 +672,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 static lv_style_t tab_rel, tab_pr, tab_trel, tab_tpr, tab_indic; lv_style_copy(&tab_rel, &def); tab_rel.body.main_color = LV_COLOR_HEX3(0x500); @@ -731,7 +731,7 @@ static void tabview_init(void) static void tileview_init(void) { -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; theme.style.tileview.sb = theme.style.page.sb; @@ -740,7 +740,7 @@ static void tileview_init(void) static void table_init(void) { -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, &panel); cell.body.radius = 0; @@ -753,7 +753,7 @@ static void table_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t win_header; lv_style_copy(&win_header, &panel); @@ -775,7 +775,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -820,7 +820,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -877,7 +877,7 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_nemo.h b/lv_themes/lv_theme_nemo.h index 4e62dc12d..1f8c70263 100644 --- a/lv_themes/lv_theme_nemo.h +++ b/lv_themes/lv_theme_nemo.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_NEMO +#if LV_USE_THEME_NEMO /********************* * DEFINES diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index 5bd30cc90..a2d2e348d 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -8,7 +8,7 @@ *********************/ #include "lv_theme.h" -#if USE_LV_THEME_NIGHT +#if LV_USE_THEME_NIGHT /********************* * DEFINES @@ -88,7 +88,7 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = &panel; @@ -96,7 +96,7 @@ static void cont_init(void) } static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 lv_style_copy(&btn_rel, &def); btn_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); @@ -148,7 +148,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 lv_style_copy(&prim, &bg); prim.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); @@ -167,7 +167,7 @@ static void label_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = &def; @@ -176,7 +176,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &def); led.body.shadow.width = LV_DPI / 10; @@ -194,7 +194,7 @@ static void led_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 theme.style.img.light = &def; @@ -204,7 +204,7 @@ static void img_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR lv_style_copy(&bar_bg, &panel); bar_bg.body.padding.ver = LV_DPI / 16; bar_bg.body.padding.hor = LV_DPI / 16; @@ -227,7 +227,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 lv_style_copy(&slider_knob, &btn_rel); slider_knob.body.radius = LV_RADIUS_CIRCLE; @@ -240,7 +240,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 theme.style.sw.bg = &bar_bg; @@ -253,7 +253,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 lv_style_copy(&lmeter_bg, &def); lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 95, 90); @@ -270,7 +270,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge_bg; lv_style_copy(&gauge_bg, &def); gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); @@ -285,7 +285,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 static lv_style_t arc; lv_style_copy(&arc, &def); @@ -305,7 +305,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = theme.style.arc; #endif @@ -313,14 +313,14 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &panel; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR +#if LV_USE_CALENDAR static lv_style_t cal_bg; lv_style_copy(&cal_bg, &bg); cal_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); @@ -378,7 +378,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; @@ -424,7 +424,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM static lv_style_t btnm_bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&btnm_bg, &btn_rel); @@ -469,7 +469,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &bg; theme.style.kb.btn.rel = &btn_rel; theme.style.kb.btn.pr = &btn_pr; @@ -482,7 +482,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX static lv_style_t mbox_bg; lv_style_copy(&mbox_bg, &bg); mbox_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 30); @@ -501,7 +501,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE static lv_style_t page_scrl; lv_style_copy(&page_scrl, &bg); @@ -519,7 +519,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &panel; theme.style.ta.oneline = &panel; theme.style.ta.cursor = NULL; @@ -529,7 +529,7 @@ static void ta_init(void) static void spinbox_init(void) { -#if USE_LV_SPINBOX +#if LV_USE_SPINBOX theme.style.spinbox.bg= &panel; theme.style.spinbox.cursor = theme.style.ta.cursor; theme.style.spinbox.sb = theme.style.ta.sb; @@ -538,7 +538,7 @@ static void spinbox_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 static lv_style_t list_bg, list_btn_rel, list_btn_pr, list_btn_tgl_rel, list_btn_tgl_pr; lv_style_copy(&list_bg, &panel); @@ -589,7 +589,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &btn_rel); ddlist_bg.text.line_space = LV_DPI / 8; ddlist_bg.body.padding.ver = LV_DPI / 8; @@ -609,7 +609,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t roller_bg; lv_style_copy(&roller_bg, &ddlist_bg); @@ -625,7 +625,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 theme.style.tabview.bg = &bg; theme.style.tabview.indic = &lv_style_transp; theme.style.tabview.btn.bg = &lv_style_transp; @@ -638,7 +638,7 @@ static void tabview_init(void) static void tileview_init(void) { -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; theme.style.tileview.sb = theme.style.page.sb; @@ -647,7 +647,7 @@ static void tileview_init(void) static void table_init(void) { -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, &panel); cell.body.radius = 0; @@ -663,7 +663,7 @@ static void table_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t win_bg; lv_style_copy(&win_bg, &bg); win_bg.body.border.color = LV_COLOR_HEX3(0x333); @@ -695,7 +695,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -731,7 +731,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -791,7 +791,7 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_night.h b/lv_themes/lv_theme_night.h index 3c760c319..7c1270c40 100644 --- a/lv_themes/lv_theme_night.h +++ b/lv_themes/lv_theme_night.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_NIGHT +#if LV_USE_THEME_NIGHT /********************* * DEFINES diff --git a/lv_themes/lv_theme_templ.c b/lv_themes/lv_theme_templ.c index 46f3793b7..9c1404f29 100644 --- a/lv_themes/lv_theme_templ.c +++ b/lv_themes/lv_theme_templ.c @@ -9,7 +9,7 @@ #include "lv_theme.h" -#if USE_LV_THEME_TEMPL +#if LV_USE_THEME_TEMPL /********************* * DEFINES @@ -54,7 +54,7 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = &def; @@ -63,7 +63,7 @@ static void cont_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 theme.style.btn.rel = &def; @@ -76,7 +76,7 @@ static void btn_init(void) static void imgbtn_init(void) { -#if USE_LV_IMGBTN != 0 +#if LV_USE_IMGBTN != 0 theme.style.imgbtn.rel = &def; theme.style.imgbtn.pr = &def; theme.style.imgbtn.tgl_rel = &def; @@ -87,7 +87,7 @@ static void imgbtn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 theme.style.label.prim = &def; @@ -98,7 +98,7 @@ static void label_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 theme.style.img.light = &def; @@ -108,7 +108,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = &def; @@ -117,7 +117,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 theme.style.led = &def; @@ -126,7 +126,7 @@ static void led_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR theme.style.bar.bg = &def; @@ -136,7 +136,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 theme.style.slider.bg = &def; @@ -147,7 +147,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 theme.style.sw.bg = &def; @@ -160,7 +160,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 theme.style.lmeter = &def; @@ -169,7 +169,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 theme.style.gauge = &def; @@ -178,7 +178,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 theme.style.arc = &def; @@ -187,7 +187,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = &def; @@ -196,7 +196,7 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &def; #endif @@ -204,7 +204,7 @@ static void chart_init(void) static void calendar_init(void) { -#if USE_LV_CALENDAR +#if LV_USE_CALENDAR theme.style.calendar.bg = theme.style.panel; theme.style.calendar.header = &def; @@ -219,7 +219,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 theme.style.cb.bg = &def; @@ -234,7 +234,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM theme.style.btnm.bg = &def; @@ -248,7 +248,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &def; @@ -263,7 +263,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX theme.style.mbox.bg = &def; @@ -275,7 +275,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = &def; @@ -286,7 +286,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &def; @@ -298,7 +298,7 @@ static void ta_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 theme.style.list.sb = &def; @@ -314,7 +314,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 theme.style.ddlist.bg = &def; @@ -325,7 +325,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 theme.style.roller.bg = &def; @@ -335,7 +335,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 theme.style.tabview.bg = &def; @@ -351,7 +351,7 @@ static void tabview_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 theme.style.win.bg = &def; @@ -364,7 +364,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_style_t * style) { @@ -410,7 +410,7 @@ static void style_mod_edit(lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -467,7 +467,7 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_templ.h b/lv_themes/lv_theme_templ.h index e70af4fe1..9d17c4d9b 100644 --- a/lv_themes/lv_theme_templ.h +++ b/lv_themes/lv_theme_templ.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_TEMPL +#if LV_USE_THEME_TEMPL /********************* * DEFINES diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index 522b1c6d5..df0dd9b73 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -9,7 +9,7 @@ #include "lv_theme.h" -#if USE_LV_THEME_ZEN +#if LV_USE_THEME_ZEN /********************* * DEFINES @@ -85,7 +85,7 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = theme.style.panel; @@ -94,7 +94,7 @@ static void cont_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 static lv_style_t rel, pr, tgl_pr, ina; lv_style_copy(&rel, &def); rel.body.opa = LV_OPA_TRANSP; @@ -135,7 +135,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 static lv_style_t prim, sec, hint; lv_style_copy(&prim, &def); lv_style_copy(&sec, &def); @@ -153,7 +153,7 @@ static void label_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); @@ -170,7 +170,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = &def; @@ -179,7 +179,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &lv_style_pretty_color); @@ -198,7 +198,7 @@ static void led_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR static lv_style_t bg, indic; lv_style_copy(&bg, &def); @@ -224,7 +224,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 static lv_style_t knob; lv_style_copy(&knob, &def); @@ -241,7 +241,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 static lv_style_t indic; lv_style_copy(&indic, theme.style.slider.indic); @@ -266,7 +266,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 static lv_style_t lmeter; lv_style_copy(&lmeter, &def); @@ -282,7 +282,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge; lv_style_copy(&gauge, &def); @@ -299,7 +299,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 static lv_style_t arc; lv_style_copy(&arc, &def); @@ -316,7 +316,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = theme.style.arc; #endif @@ -324,14 +324,14 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = theme.style.panel; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR != 0 +#if LV_USE_CALENDAR != 0 static lv_style_t ina_days; lv_style_copy(&ina_days, &def); ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 70); @@ -358,7 +358,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&rel, &def); rel.body.radius = LV_DPI / 20; @@ -401,7 +401,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, &lv_style_transp); @@ -450,7 +450,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, &def); bg.body.main_color = LV_COLOR_HEX3(0x666); @@ -506,7 +506,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX static lv_style_t bg, rel, pr; lv_style_copy(&bg, theme.style.panel); bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 95); @@ -539,7 +539,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = theme.style.panel; @@ -550,7 +550,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA static lv_style_t oneline; lv_style_copy(&oneline, theme.style.panel); oneline.body.radius = LV_RADIUS_CIRCLE; @@ -567,7 +567,7 @@ static void ta_init(void) static void spinbox_init(void) { -#if USE_LV_SPINBOX +#if LV_USE_SPINBOX theme.style.spinbox.bg= theme.style.panel; theme.style.spinbox.cursor = theme.style.ta.cursor; theme.style.spinbox.sb = theme.style.ta.sb; @@ -576,7 +576,7 @@ static void spinbox_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, theme.style.panel); @@ -619,7 +619,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 static lv_style_t bg, sel; lv_style_copy(&bg, theme.style.panel); bg.text.line_space = LV_DPI / 8; @@ -640,7 +640,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t bg, sel; lv_style_copy(&bg, &def); bg.body.border.width = 0; @@ -659,7 +659,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 static lv_style_t btn_bg, indic, rel, pr, tgl_rel, tgl_pr; lv_style_copy(&btn_bg, &def); @@ -702,7 +702,7 @@ static void tabview_init(void) static void tileview_init(void) { -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; theme.style.tileview.sb = theme.style.page.sb; @@ -711,7 +711,7 @@ static void tileview_init(void) static void table_init(void) { -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, theme.style.panel); cell.body.radius = 0; @@ -727,7 +727,7 @@ static void table_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t header, rel, pr; lv_style_copy(&header, &def); @@ -758,7 +758,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_style_t * style) { @@ -798,7 +798,7 @@ static void style_mod_edit(lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -858,7 +858,7 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_zen.h b/lv_themes/lv_theme_zen.h index 27b190922..b43167335 100644 --- a/lv_themes/lv_theme_zen.h +++ b/lv_themes/lv_theme_zen.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_ZEN +#if LV_USE_THEME_ZEN /********************* * DEFINES