mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-27 11:57:48 +08:00
fix(formatting): various improvements (#2028)
* fix(formatting): Remove the duplicated space * fix(formatting): Remove the duplicated 'the' * fix(spell): run codespell -w for the code base
This commit is contained in:
+11
-11
@@ -3,10 +3,10 @@
|
|||||||
## v7.9.1 (Planned at 19.01.2020
|
## v7.9.1 (Planned at 19.01.2020
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
- fix(cpicker) fix division by zero
|
- fix(cpicker) fix division by zero
|
||||||
- fix(dropdown) fix selecting options after the last one
|
- fix(dropdown) fix selecting options after the last one
|
||||||
- fix(msgbox) use the animation time provided
|
- fix(msgbox) use the animation time provided
|
||||||
- fix(gpu_nxp_pxp) fix incorrent define name
|
- fix(gpu_nxp_pxp) fix incorrect define name
|
||||||
- fix(indev) don't leave edit mode if there is only one object in the group
|
- fix(indev) don't leave edit mode if there is only one object in the group
|
||||||
|
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
### New features
|
### New features
|
||||||
- feat(chart) add lv_chart_remove_series and lv_chart_hide_series
|
- feat(chart) add lv_chart_remove_series and lv_chart_hide_series
|
||||||
- feat(img_cahce) allow disabling image cacheing
|
- feat(img_cahce) allow disabling image caching
|
||||||
- calendar: make get_day_of_week() public
|
- calendar: make get_day_of_week() public
|
||||||
- Added support for Zephyr integration
|
- Added support for Zephyr integration
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
- fix reference to LV_DRAW_BUF_MAX_NUM in lv_mem.c
|
- fix reference to LV_DRAW_BUF_MAX_NUM in lv_mem.c
|
||||||
- fix(polygon draw) join adjacent points if they are on the same coordinate
|
- fix(polygon draw) join adjacent points if they are on the same coordinate
|
||||||
- fix(linemeter) fix invalidation when setting new value
|
- fix(linemeter) fix invalidation when setting new value
|
||||||
- fix(table) add missing invalidation when changeing cell type
|
- fix(table) add missing invalidation when changing cell type
|
||||||
- refactor(roller) rename LV_ROLLER_MODE_INIFINITE -> LV_ROLLER_MODE_INFINITE
|
- refactor(roller) rename LV_ROLLER_MODE_INIFINITE -> LV_ROLLER_MODE_INFINITE
|
||||||
|
|
||||||
## v7.7.2 (17.11.2020)
|
## v7.7.2 (17.11.2020)
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
- fix(arc) fix and improve arc dragging
|
- fix(arc) fix and improve arc dragging
|
||||||
- label: Repair calculate back `dot` character logical error which cause infinite loop.
|
- label: Repair calculate back `dot` character logical error which cause infinite loop.
|
||||||
- fix(theme_material): remove the bottom border from tabview header
|
- fix(theme_material): remove the bottom border from tabview header
|
||||||
- fix(imgbtn) guess a the closest availabe state with valid src
|
- fix(imgbtn) guess a the closest available state with valid src
|
||||||
- fix(spinbox) update cursor position in lv_spinbox_set_step
|
- fix(spinbox) update cursor position in lv_spinbox_set_step
|
||||||
|
|
||||||
## v7.7.1 (03.11.2020)
|
## v7.7.1 (03.11.2020)
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
- Allow max. 16 cell types for table
|
- Allow max. 16 cell types for table
|
||||||
- Add `lv_table_set_text_fmt()`
|
- Add `lv_table_set_text_fmt()`
|
||||||
- Use margin on calendar header to set distances and padding to the size of the header
|
- Use margin on calendar header to set distances and padding to the size of the header
|
||||||
- Add `text_sel_bg` style proeprty
|
- Add `text_sel_bg` style property
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
- Theme update to support text selection background
|
- Theme update to support text selection background
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
- Add 10px and 8ox built in fonts
|
- Add 10px and 8ox built in fonts
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
- Fix unexpeted DEFOCUS on lv_page when clicking to bg after the scrollable
|
- Fix unexpected DEFOCUS on lv_page when clicking to bg after the scrollable
|
||||||
- Fix `lv_obj_del` and `lv_obj_clean` if the children list changed during deletion.
|
- Fix `lv_obj_del` and `lv_obj_clean` if the children list changed during deletion.
|
||||||
- Adjust button matrix button width to include padding when spanning multiple units.
|
- Adjust button matrix button width to include padding when spanning multiple units.
|
||||||
- Add rounding to btnmatrix line height calculation
|
- Add rounding to btnmatrix line height calculation
|
||||||
@@ -138,10 +138,10 @@ The main new features of v7.4 are run-time font loading, style caching and arc k
|
|||||||
### New features
|
### New features
|
||||||
- Add `lv_font_load()` function - Loads a `lv_font_t` object from a binary font file
|
- Add `lv_font_load()` function - Loads a `lv_font_t` object from a binary font file
|
||||||
- Add `lv_font_free()` function - Frees the memory allocated by the `lv_font_load()` function
|
- Add `lv_font_free()` function - Frees the memory allocated by the `lv_font_load()` function
|
||||||
- Add style caching to reduce acces time of properties with default value
|
- Add style caching to reduce access time of properties with default value
|
||||||
- arc: add set value by click feature
|
- arc: add set value by click feature
|
||||||
- arc: add `LV_ARC_PART_KNOB` similarly to slider
|
- arc: add `LV_ARC_PART_KNOB` similarly to slider
|
||||||
- send gestures even if the the obejct was dragged. User can check dragging with `lv_indev_is_dragging(lv_indev_act())` in the event function.
|
- send gestures event if the object was dragged. User can check dragging with `lv_indev_is_dragging(lv_indev_act())` in the event function.
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
- Fix color bleeding on border drawing
|
- Fix color bleeding on border drawing
|
||||||
@@ -225,7 +225,7 @@ The main new features of v7.4 are run-time font loading, style caching and arc k
|
|||||||
- Add lv_btnmatrix_set/get_align capability
|
- Add lv_btnmatrix_set/get_align capability
|
||||||
- DMA2D: Remove dependency on ST CubeMX HAL
|
- DMA2D: Remove dependency on ST CubeMX HAL
|
||||||
- Added `max_used` propriety to `lv_mem_monitor_t` struct
|
- Added `max_used` propriety to `lv_mem_monitor_t` struct
|
||||||
- In `lv_init` test if the the strings are UTF-8 encoded.
|
- In `lv_init` test if the strings are UTF-8 encoded.
|
||||||
- Add `user_data` to themes
|
- Add `user_data` to themes
|
||||||
- Add LV_BIG_ENDIAN_SYSTEM flag to lv_conf.h in order to fix displaying images on big endian systems.
|
- Add LV_BIG_ENDIAN_SYSTEM flag to lv_conf.h in order to fix displaying images on big endian systems.
|
||||||
- Add inline function lv_checkbox_get_state(const lv_obj_t * cb) to extend the checkbox functionality.
|
- Add inline function lv_checkbox_get_state(const lv_obj_t * cb) to extend the checkbox functionality.
|
||||||
@@ -279,7 +279,7 @@ The main new features of v7.4 are run-time font loading, style caching and arc k
|
|||||||
- Remove memcpy from `lv_ll` (caused issues with some optimization settings)
|
- Remove memcpy from `lv_ll` (caused issues with some optimization settings)
|
||||||
- `lv_chart` fix X tick drawing
|
- `lv_chart` fix X tick drawing
|
||||||
- Fix vertical dashed line drawing
|
- Fix vertical dashed line drawing
|
||||||
- Some additonal minor fixes and formattings
|
- Some additional minor fixes and formattings
|
||||||
|
|
||||||
## v7.0.0 (18.05.2020)
|
## v7.0.0 (18.05.2020)
|
||||||
|
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ menu "LVGL configuration"
|
|||||||
|
|
||||||
menu "Image decoder and cache"
|
menu "Image decoder and cache"
|
||||||
config LV_IMG_CF_INDEXED
|
config LV_IMG_CF_INDEXED
|
||||||
bool "Enable indexed (pallete) images."
|
bool "Enable indexed (palette) images."
|
||||||
default y if !LV_CONF_MINIMAL
|
default y if !LV_CONF_MINIMAL
|
||||||
config LV_IMG_CF_ALPHA
|
config LV_IMG_CF_ALPHA
|
||||||
bool "Enable alpha indexed images."
|
bool "Enable alpha indexed images."
|
||||||
|
|||||||
+4
-4
@@ -27,7 +27,7 @@ Planned to November/December 2020
|
|||||||
- Simplified File system interface ([feat/new_fs_api](https://github.com/lvgl/lvgl/tree/feat/new-fs-api) branch) to make porting easier
|
- Simplified File system interface ([feat/new_fs_api](https://github.com/lvgl/lvgl/tree/feat/new-fs-api) branch) to make porting easier
|
||||||
- Work in progress
|
- Work in progress
|
||||||
- Remove the align parameter from `lv_canvas_draw_text`
|
- Remove the align parameter from `lv_canvas_draw_text`
|
||||||
- Make the copy paramter obsolate in create functions
|
- Make the copy parameter obsolate in create functions
|
||||||
- Optimize and simplifie styles [#1832](https://github.com/lvgl/lvgl/issues/1832)
|
- Optimize and simplifie styles [#1832](https://github.com/lvgl/lvgl/issues/1832)
|
||||||
- Use a more generic inheritenace [#1919](https://github.com/lvgl/lvgl/issues/1919)
|
- Use a more generic inheritenace [#1919](https://github.com/lvgl/lvgl/issues/1919)
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ Planned to November/December 2020
|
|||||||
## v9
|
## v9
|
||||||
- Simplify `group`s. Discussion is [here](https://forum.lvgl.io/t/lv-group-tabindex/2927/3).
|
- Simplify `group`s. Discussion is [here](https://forum.lvgl.io/t/lv-group-tabindex/2927/3).
|
||||||
- Consider direct binary font format support
|
- Consider direct binary font format support
|
||||||
- Optimize line and cirle drawing and masking
|
- Optimize line and circle drawing and masking
|
||||||
- Reconsider color format management for run time color format setting, and custom color format usage. (Also [RGB888](https://github.com/lvgl/lvgl/issues/1722))
|
- Reconsider color format management for run time color format setting, and custom color format usage. (Also [RGB888](https://github.com/lvgl/lvgl/issues/1722))
|
||||||
- 9-patch support for `lv_imgbtn`.
|
- 9-patch support for `lv_imgbtn`.
|
||||||
- Handle stride. See [#1858](https://github.com/lvgl/lvgl/issues/1858)
|
- Handle stride. See [#1858](https://github.com/lvgl/lvgl/issues/1858)
|
||||||
@@ -51,10 +51,10 @@ Planned to November/December 2020
|
|||||||
- lv_mem_alloc_aligned(size, align)
|
- lv_mem_alloc_aligned(size, align)
|
||||||
- Text node. See [#1701](https://github.com/lvgl/lvgl/issues/1701#issuecomment-699479408)
|
- Text node. See [#1701](https://github.com/lvgl/lvgl/issues/1701#issuecomment-699479408)
|
||||||
- CPP binding. See [Forum](https://forum.lvgl.io/t/is-it-possible-to-officially-support-optional-cpp-api/2736)
|
- CPP binding. See [Forum](https://forum.lvgl.io/t/is-it-possible-to-officially-support-optional-cpp-api/2736)
|
||||||
- Optmize font decompression
|
- Optimize font decompression
|
||||||
- Switch to RGBA colors in styles
|
- Switch to RGBA colors in styles
|
||||||
- Need coverage report for tests
|
- Need coverage report for tests
|
||||||
- Need static analize (via coverity.io or somehing else)
|
- Need static analyze (via coverity.io or somehing else)
|
||||||
- Support dot_begin and dot_middle long modes for labels
|
- Support dot_begin and dot_middle long modes for labels
|
||||||
- Add new label alignment modes. [#1656](https://github.com/lvgl/lvgl/issues/1656)
|
- Add new label alignment modes. [#1656](https://github.com/lvgl/lvgl/issues/1656)
|
||||||
- Support larger images: [#1892](https://github.com/lvgl/lvgl/issues/1892)
|
- Support larger images: [#1892](https://github.com/lvgl/lvgl/issues/1892)
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ void lv_port_disp_init(void)
|
|||||||
*----------------------------*/
|
*----------------------------*/
|
||||||
|
|
||||||
/* LVGL requires a buffer where it internally draws the widgets.
|
/* LVGL requires a buffer where it internally draws the widgets.
|
||||||
* Later this buffer will passed your display drivers `flush_cb` to copy its content to your dispay.
|
* Later this buffer will passed your display drivers `flush_cb` to copy its content to your display.
|
||||||
* The buffer has to be greater than 1 display row
|
* The buffer has to be greater than 1 display row
|
||||||
*
|
*
|
||||||
* There are three buffering configurations:
|
* There are three buffering configurations:
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ void lv_port_fs_init(void)
|
|||||||
fs_init();
|
fs_init();
|
||||||
|
|
||||||
/*---------------------------------------------------
|
/*---------------------------------------------------
|
||||||
* Register the file system interface in LVGL
|
* Register the file system interface in LVGL
|
||||||
*--------------------------------------------------*/
|
*--------------------------------------------------*/
|
||||||
|
|
||||||
/* Add a simple drive to open images */
|
/* Add a simple drive to open images */
|
||||||
@@ -117,7 +117,7 @@ void lv_port_fs_init(void)
|
|||||||
/* Initialize your Storage device and File system. */
|
/* Initialize your Storage device and File system. */
|
||||||
static void fs_init(void)
|
static void fs_init(void)
|
||||||
{
|
{
|
||||||
/*E.g. for FatFS initalize the SD card and FatFS itself*/
|
/*E.g. for FatFS initialize the SD card and FatFS itself*/
|
||||||
|
|
||||||
/*You code here*/
|
/*You code here*/
|
||||||
}
|
}
|
||||||
@@ -262,7 +262,7 @@ static lv_fs_res_t fs_tell (lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p)
|
|||||||
* Delete a file
|
* Delete a file
|
||||||
* @param drv pointer to a driver where this function belongs
|
* @param drv pointer to a driver where this function belongs
|
||||||
* @param path path of the file to delete
|
* @param path path of the file to delete
|
||||||
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
||||||
*/
|
*/
|
||||||
static lv_fs_res_t fs_remove (lv_fs_drv_t * drv, const char *path)
|
static lv_fs_res_t fs_remove (lv_fs_drv_t * drv, const char *path)
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -335,7 +335,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
|
|||||||
* If an invalid parameter is found an error log message is printed and
|
* If an invalid parameter is found an error log message is printed and
|
||||||
* the MCU halts at the error. (`LV_USE_LOG` should be enabled)
|
* the MCU halts at the error. (`LV_USE_LOG` should be enabled)
|
||||||
* If you are debugging the MCU you can pause
|
* If you are debugging the MCU you can pause
|
||||||
* the debugger to see exactly where the issue is.
|
* the debugger to see exactly where the issue is.
|
||||||
*
|
*
|
||||||
* The behavior of asserts can be overwritten by redefining them here.
|
* The behavior of asserts can be overwritten by redefining them here.
|
||||||
* E.g. #define LV_ASSERT_MEM(p) <my_assert_code>
|
* E.g. #define LV_ASSERT_MEM(p) <my_assert_code>
|
||||||
@@ -370,7 +370,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
|
|||||||
* FONT USAGE
|
* FONT USAGE
|
||||||
*===================*/
|
*===================*/
|
||||||
|
|
||||||
/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
|
/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
|
||||||
* The symbols are available via `LV_SYMBOL_...` defines
|
* The symbols are available via `LV_SYMBOL_...` defines
|
||||||
* More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html
|
* More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html
|
||||||
* To create a new font go to: https://lvgl.com/ttf-font-to-c-array
|
* To create a new font go to: https://lvgl.com/ttf-font-to-c-array
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ def cmd(c, ask_on_err = True):
|
|||||||
if r:
|
if r:
|
||||||
print("### Error: " + str(r))
|
print("### Error: " + str(r))
|
||||||
if ask_on_err:
|
if ask_on_err:
|
||||||
input("Press Enter to continue exectution...")
|
input("Press Enter to continue execution...")
|
||||||
|
|
||||||
def define_set(fn, name, value):
|
def define_set(fn, name, value):
|
||||||
print("In " + fn + " set " + name + " to " + value)
|
print("In " + fn + " set " + name + " to " + value)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# if(len(sys.argv) != 2):
|
# if(len(sys.argv) != 2):
|
||||||
# print("Missing argument. Usage ./release.py bugfix | minor | major")
|
# print("Missing argument. Usage ./release.py bugfix | minor | major")
|
||||||
# print("Use minor by deafult")
|
# print("Use minor by default")
|
||||||
# else:
|
# else:
|
||||||
# dev_prepare = sys.argv[1]
|
# dev_prepare = sys.argv[1]
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import com
|
|||||||
def make(repo_path, auto_push = False):
|
def make(repo_path, auto_push = False):
|
||||||
os.chdir("./" + repo_path)
|
os.chdir("./" + repo_path)
|
||||||
com.cmd('git checkout master')
|
com.cmd('git checkout master')
|
||||||
print("Upadte lvgl");
|
print("Update lvgl");
|
||||||
os.chdir("./lvgl")
|
os.chdir("./lvgl")
|
||||||
com.cmd("git checkout master")
|
com.cmd("git checkout master")
|
||||||
com.cmd("git pull origin --tags")
|
com.cmd("git pull origin --tags")
|
||||||
@@ -37,11 +37,11 @@ def make(repo_path, auto_push = False):
|
|||||||
com.define_set("lv_conf.h", str(key), str(val))
|
com.define_set("lv_conf.h", str(key), str(val))
|
||||||
|
|
||||||
if os.path.exists("lv_examples"):
|
if os.path.exists("lv_examples"):
|
||||||
print("Upadte lv_examples");
|
print("Update lv_examples");
|
||||||
com.cmd("cd lv_examples; git co " + release_br + "; git pull origin " + release_br)
|
com.cmd("cd lv_examples; git co " + release_br + "; git pull origin " + release_br)
|
||||||
|
|
||||||
if os.path.exists("lv_drivers"):
|
if os.path.exists("lv_drivers"):
|
||||||
print("upadte lv_drivers");
|
print("update lv_drivers");
|
||||||
com.cmd("cd lv_drivers " + release_br + "; git pull origin " + release_br)
|
com.cmd("cd lv_drivers " + release_br + "; git pull origin " + release_br)
|
||||||
|
|
||||||
msg = 'Update to ' + ver_str
|
msg = 'Update to ' + ver_str
|
||||||
|
|||||||
@@ -337,9 +337,9 @@ extern "C" {
|
|||||||
*-----------------*/
|
*-----------------*/
|
||||||
#ifndef LV_TEXT_ENC
|
#ifndef LV_TEXT_ENC
|
||||||
#ifdef CONFIG_LV_TXT_ENC_UTF8
|
#ifdef CONFIG_LV_TXT_ENC_UTF8
|
||||||
#define CONFIG_LV_TXT_ENC LV_TXT_ENC_UTF8
|
#define CONFIG_LV_TXT_ENC LV_TXT_ENC_UTF8
|
||||||
#elif defined CONFIG_LV_TXT_ENC_ASCII
|
#elif defined CONFIG_LV_TXT_ENC_ASCII
|
||||||
#define CONFIG_LV_TXT_ENC LV_TXT_ENC_ASCII
|
#define CONFIG_LV_TXT_ENC LV_TXT_ENC_ASCII
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -363,11 +363,11 @@ extern "C" {
|
|||||||
|
|
||||||
#ifndef LV_USE_EXT_CLICK_AREA
|
#ifndef LV_USE_EXT_CLICK_AREA
|
||||||
#ifdef CONFIG_LV_USE_EXT_CLICK_AREA_OFF
|
#ifdef CONFIG_LV_USE_EXT_CLICK_AREA_OFF
|
||||||
#define CONFIG_LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF
|
#define CONFIG_LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF
|
||||||
#elif defined CONFIG_LV_USE_EXT_CLICK_AREA_TINY
|
#elif defined CONFIG_LV_USE_EXT_CLICK_AREA_TINY
|
||||||
#define CONFIG_LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_TINY
|
#define CONFIG_LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_TINY
|
||||||
#elif defined CONFIG_LV_USE_EXT_CLICK_AREA_FULL
|
#elif defined CONFIG_LV_USE_EXT_CLICK_AREA_FULL
|
||||||
#define CONFIG_LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_FULL
|
#define CONFIG_LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_FULL
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ lv_obj_t * lv_disp_get_layer_top(lv_disp_t * disp)
|
|||||||
/**
|
/**
|
||||||
* Return with the sys. layer. (Same on every screen and it is above the normal screen and the top
|
* Return with the sys. layer. (Same on every screen and it is above the normal screen and the top
|
||||||
* layer)
|
* layer)
|
||||||
* @param disp pointer to display which sys. layer should be get. (NULL to use the default screen)
|
* @param disp pointer to display which sys. layer should be get. (NULL to use the default screen)
|
||||||
* @return pointer to the sys layer object (transparent screen sized lv_obj)
|
* @return pointer to the sys layer object (transparent screen sized lv_obj)
|
||||||
*/
|
*/
|
||||||
lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp)
|
lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp)
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ lv_obj_t * lv_disp_get_layer_top(lv_disp_t * disp);
|
|||||||
/**
|
/**
|
||||||
* Return with the sys. layer. (Same on every screen and it is above the normal screen and the top
|
* Return with the sys. layer. (Same on every screen and it is above the normal screen and the top
|
||||||
* layer)
|
* layer)
|
||||||
* @param disp pointer to display which sys. layer should be get. (NULL to use the default screen)
|
* @param disp pointer to display which sys. layer should be get. (NULL to use the default screen)
|
||||||
* @return pointer to the sys layer object (transparent screen sized lv_obj)
|
* @return pointer to the sys layer object (transparent screen sized lv_obj)
|
||||||
*/
|
*/
|
||||||
lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp);
|
lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp);
|
||||||
@@ -161,7 +161,7 @@ static inline lv_obj_t * lv_scr_act(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the top layer of the default display
|
* Get the top layer of the default display
|
||||||
* @return pointer to the top layer
|
* @return pointer to the top layer
|
||||||
*/
|
*/
|
||||||
static inline lv_obj_t * lv_layer_top(void)
|
static inline lv_obj_t * lv_layer_top(void)
|
||||||
@@ -171,7 +171,7 @@ static inline lv_obj_t * lv_layer_top(void)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the active screen of the default display
|
* Get the active screen of the default display
|
||||||
* @return pointer to the sys layer
|
* @return pointer to the sys layer
|
||||||
*/
|
*/
|
||||||
static inline lv_obj_t * lv_layer_sys(void)
|
static inline lv_obj_t * lv_layer_sys(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ lv_group_t * lv_group_create(void)
|
|||||||
*/
|
*/
|
||||||
void lv_group_del(lv_group_t * group)
|
void lv_group_del(lv_group_t * group)
|
||||||
{
|
{
|
||||||
/*Defocus the the currently focused object*/
|
/*Defocus the currently focused object*/
|
||||||
if(group->obj_focus != NULL) {
|
if(group->obj_focus != NULL) {
|
||||||
(*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
|
(*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
|
||||||
lv_obj_invalidate(*group->obj_focus);
|
lv_obj_invalidate(*group->obj_focus);
|
||||||
@@ -185,7 +185,7 @@ void lv_group_remove_obj(lv_obj_t * obj)
|
|||||||
*/
|
*/
|
||||||
void lv_group_remove_all_objs(lv_group_t * group)
|
void lv_group_remove_all_objs(lv_group_t * group)
|
||||||
{
|
{
|
||||||
/*Defocus the the currently focused object*/
|
/*Defocus the currently focused object*/
|
||||||
if(group->obj_focus != NULL) {
|
if(group->obj_focus != NULL) {
|
||||||
(*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
|
(*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
|
||||||
lv_obj_invalidate(*group->obj_focus);
|
lv_obj_invalidate(*group->obj_focus);
|
||||||
|
|||||||
@@ -597,7 +597,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Save the last keys before anything else.
|
/* Save the last keys before anything else.
|
||||||
* They need to be already saved if the the function returns for any reason*/
|
* They need to be already saved if the function returns for any reason*/
|
||||||
lv_indev_state_t last_state = i->proc.types.keypad.last_state;
|
lv_indev_state_t last_state = i->proc.types.keypad.last_state;
|
||||||
i->proc.types.keypad.last_state = data->state;
|
i->proc.types.keypad.last_state = data->state;
|
||||||
i->proc.types.keypad.last_key = data->key;
|
i->proc.types.keypad.last_key = data->key;
|
||||||
@@ -803,7 +803,7 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
{
|
{
|
||||||
/* Die gracefully if i->btn_points is NULL */
|
/* Die gracefully if i->btn_points is NULL */
|
||||||
if(i->btn_points == NULL) {
|
if(i->btn_points == NULL) {
|
||||||
LV_LOG_WARN("indev_button_proc: btn_points was NULL");
|
LV_LOG_WARN("indev_button_proc: btn_points was NULL");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy)
|
|||||||
lv_style_list_init(&new_obj->style_list);
|
lv_style_list_init(&new_obj->style_list);
|
||||||
if(copy == NULL) {
|
if(copy == NULL) {
|
||||||
if(parent != NULL) lv_theme_apply(new_obj, LV_THEME_OBJ);
|
if(parent != NULL) lv_theme_apply(new_obj, LV_THEME_OBJ);
|
||||||
else lv_theme_apply(new_obj, LV_THEME_SCR);
|
else lv_theme_apply(new_obj, LV_THEME_SCR);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
lv_style_list_copy(&new_obj->style_list, ©->style_list);
|
lv_style_list_copy(&new_obj->style_list, ©->style_list);
|
||||||
@@ -1222,7 +1222,7 @@ void lv_obj_remove_style(lv_obj_t * obj, uint8_t part, lv_style_t * style)
|
|||||||
* Release all used memories and cancel pending related transitions.
|
* Release all used memories and cancel pending related transitions.
|
||||||
* Typically used in `LV_SIGN_CLEAN_UP.
|
* Typically used in `LV_SIGN_CLEAN_UP.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object
|
||||||
* @param part the part of the object which style list should be reseted.
|
* @param part the part of the object which style list should be reset.
|
||||||
* E.g. `LV_OBJ_PART_MAIN`, `LV_BTN_PART_MAIN`, `LV_SLIDER_PART_KNOB`
|
* E.g. `LV_OBJ_PART_MAIN`, `LV_BTN_PART_MAIN`, `LV_SLIDER_PART_KNOB`
|
||||||
*/
|
*/
|
||||||
void lv_obj_clean_style_list(lv_obj_t * obj, uint8_t part)
|
void lv_obj_clean_style_list(lv_obj_t * obj, uint8_t part)
|
||||||
@@ -1244,7 +1244,7 @@ void lv_obj_clean_style_list(lv_obj_t * obj, uint8_t part)
|
|||||||
* Release all used memories and cancel pending related transitions.
|
* Release all used memories and cancel pending related transitions.
|
||||||
* Also notifies the object about the style change.
|
* Also notifies the object about the style change.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object
|
||||||
* @param part the part of the object which style list should be reseted.
|
* @param part the part of the object which style list should be reset.
|
||||||
* E.g. `LV_OBJ_PART_MAIN`, `LV_BTN_PART_MAIN`, `LV_SLIDER_PART_KNOB`
|
* E.g. `LV_OBJ_PART_MAIN`, `LV_BTN_PART_MAIN`, `LV_SLIDER_PART_KNOB`
|
||||||
*/
|
*/
|
||||||
void lv_obj_reset_style_list(lv_obj_t * obj, uint8_t part)
|
void lv_obj_reset_style_list(lv_obj_t * obj, uint8_t part)
|
||||||
@@ -2388,7 +2388,7 @@ lv_coord_t lv_obj_get_width_margin(lv_obj_t * obj)
|
|||||||
* Set that width reduced by the left and right padding of the parent.
|
* Set that width reduced by the left and right padding of the parent.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object
|
||||||
* @param div indicates how many columns are assumed.
|
* @param div indicates how many columns are assumed.
|
||||||
* If 1 the width will be set the the parent's width
|
* If 1 the width will be set the parent's width
|
||||||
* If 2 only half parent width - inner padding of the parent
|
* If 2 only half parent width - inner padding of the parent
|
||||||
* If 3 only third parent width - 2 * inner padding of the parent
|
* If 3 only third parent width - 2 * inner padding of the parent
|
||||||
* @param span how many columns are combined
|
* @param span how many columns are combined
|
||||||
@@ -2409,7 +2409,7 @@ lv_coord_t lv_obj_get_width_grid(lv_obj_t * obj, uint8_t div, uint8_t span)
|
|||||||
* Get that height reduced by the top and bottom padding of the parent.
|
* Get that height reduced by the top and bottom padding of the parent.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object
|
||||||
* @param div indicates how many rows are assumed.
|
* @param div indicates how many rows are assumed.
|
||||||
* If 1 the height will be set the the parent's height
|
* If 1 the height will be set the parent's height
|
||||||
* If 2 only half parent height - inner padding of the parent
|
* If 2 only half parent height - inner padding of the parent
|
||||||
* If 3 only third parent height - 2 * inner padding of the parent
|
* If 3 only third parent height - 2 * inner padding of the parent
|
||||||
* @param span how many rows are combined
|
* @param span how many rows are combined
|
||||||
@@ -2429,7 +2429,7 @@ lv_coord_t lv_obj_get_height_grid(lv_obj_t * obj, uint8_t div, uint8_t span)
|
|||||||
/**
|
/**
|
||||||
* Get the automatic realign property of the object.
|
* Get the automatic realign property of the object.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object
|
||||||
* @return true: auto realign is enabled; false: auto realign is disabled
|
* @return true: auto realign is enabled; false: auto realign is disabled
|
||||||
*/
|
*/
|
||||||
bool lv_obj_get_auto_realign(const lv_obj_t * obj)
|
bool lv_obj_get_auto_realign(const lv_obj_t * obj)
|
||||||
{
|
{
|
||||||
@@ -3860,7 +3860,7 @@ static lv_design_res_t lv_obj_design(lv_obj_t * obj, const lv_area_t * clip_area
|
|||||||
if(lv_obj_get_style_border_blend_mode(obj, LV_OBJ_PART_MAIN) != LV_BLEND_MODE_NORMAL) return LV_DESIGN_RES_NOT_COVER;
|
if(lv_obj_get_style_border_blend_mode(obj, LV_OBJ_PART_MAIN) != LV_BLEND_MODE_NORMAL) return LV_DESIGN_RES_NOT_COVER;
|
||||||
if(lv_obj_get_style_opa_scale(obj, LV_OBJ_PART_MAIN) < LV_OPA_MAX) return LV_DESIGN_RES_NOT_COVER;
|
if(lv_obj_get_style_opa_scale(obj, LV_OBJ_PART_MAIN) < LV_OPA_MAX) return LV_DESIGN_RES_NOT_COVER;
|
||||||
|
|
||||||
return LV_DESIGN_RES_COVER;
|
return LV_DESIGN_RES_COVER;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(mode == LV_DESIGN_DRAW_MAIN) {
|
else if(mode == LV_DESIGN_DRAW_MAIN) {
|
||||||
|
|||||||
+10
-10
@@ -43,9 +43,9 @@ extern "C" {
|
|||||||
|
|
||||||
#define LV_MAX_ANCESTOR_NUM 8
|
#define LV_MAX_ANCESTOR_NUM 8
|
||||||
|
|
||||||
#define LV_EXT_CLICK_AREA_OFF 0
|
#define LV_EXT_CLICK_AREA_OFF 0
|
||||||
#define LV_EXT_CLICK_AREA_TINY 1
|
#define LV_EXT_CLICK_AREA_TINY 1
|
||||||
#define LV_EXT_CLICK_AREA_FULL 2
|
#define LV_EXT_CLICK_AREA_FULL 2
|
||||||
|
|
||||||
#define _LV_OBJ_PART_VIRTUAL_FIRST 0x01
|
#define _LV_OBJ_PART_VIRTUAL_FIRST 0x01
|
||||||
#define _LV_OBJ_PART_REAL_FIRST 0x40
|
#define _LV_OBJ_PART_REAL_FIRST 0x40
|
||||||
@@ -203,7 +203,7 @@ typedef struct _lv_obj_t {
|
|||||||
lv_design_cb_t design_cb; /**< Object type specific design function*/
|
lv_design_cb_t design_cb; /**< Object type specific design function*/
|
||||||
|
|
||||||
void * ext_attr; /**< Object type specific extended data*/
|
void * ext_attr; /**< Object type specific extended data*/
|
||||||
lv_style_list_t style_list;
|
lv_style_list_t style_list;
|
||||||
|
|
||||||
#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
|
#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
|
||||||
uint8_t ext_click_pad_hor; /**< Extra click padding in horizontal direction */
|
uint8_t ext_click_pad_hor; /**< Extra click padding in horizontal direction */
|
||||||
@@ -577,7 +577,7 @@ void lv_obj_remove_style(lv_obj_t * obj, uint8_t part, lv_style_t * style);
|
|||||||
* Release all used memories and cancel pending related transitions.
|
* Release all used memories and cancel pending related transitions.
|
||||||
* Typically used in `LV_SIGN_CLEAN_UP.
|
* Typically used in `LV_SIGN_CLEAN_UP.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object
|
||||||
* @param part the part of the object which style list should be reseted.
|
* @param part the part of the object which style list should be reset.
|
||||||
* E.g. `LV_OBJ_PART_MAIN`, `LV_BTN_PART_MAIN`, `LV_SLIDER_PART_KNOB`
|
* E.g. `LV_OBJ_PART_MAIN`, `LV_BTN_PART_MAIN`, `LV_SLIDER_PART_KNOB`
|
||||||
*/
|
*/
|
||||||
void lv_obj_clean_style_list(lv_obj_t * obj, uint8_t part);
|
void lv_obj_clean_style_list(lv_obj_t * obj, uint8_t part);
|
||||||
@@ -587,7 +587,7 @@ void lv_obj_clean_style_list(lv_obj_t * obj, uint8_t part);
|
|||||||
* Release all used memories and cancel pending related transitions.
|
* Release all used memories and cancel pending related transitions.
|
||||||
* Also notifies the object about the style change.
|
* Also notifies the object about the style change.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object
|
||||||
* @param part the part of the object which style list should be reseted.
|
* @param part the part of the object which style list should be reset.
|
||||||
* E.g. `LV_OBJ_PART_MAIN`, `LV_BTN_PART_MAIN`, `LV_SLIDER_PART_KNOB`
|
* E.g. `LV_OBJ_PART_MAIN`, `LV_BTN_PART_MAIN`, `LV_SLIDER_PART_KNOB`
|
||||||
*/
|
*/
|
||||||
void lv_obj_reset_style_list(lv_obj_t * obj, uint8_t part);
|
void lv_obj_reset_style_list(lv_obj_t * obj, uint8_t part);
|
||||||
@@ -676,7 +676,7 @@ void _lv_obj_set_style_local_ptr(lv_obj_t * obj, uint8_t type, lv_style_property
|
|||||||
bool lv_obj_remove_style_local_prop(lv_obj_t * obj, uint8_t part, lv_style_property_t prop);
|
bool lv_obj_remove_style_local_prop(lv_obj_t * obj, uint8_t part, lv_style_property_t prop);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable/disable the use of style cahche for an object
|
* Enable/disable the use of style cache for an object
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object
|
||||||
* @param dis true: disable; false: enable (re-enable)
|
* @param dis true: disable; false: enable (re-enable)
|
||||||
*/
|
*/
|
||||||
@@ -1055,7 +1055,7 @@ lv_coord_t lv_obj_get_width_margin(lv_obj_t * obj);
|
|||||||
* Take paddings into account.
|
* Take paddings into account.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object
|
||||||
* @param div indicates how many columns are assumed.
|
* @param div indicates how many columns are assumed.
|
||||||
* If 1 the width will be set the the parent's width
|
* If 1 the width will be set the parent's width
|
||||||
* If 2 only half parent width - inner padding of the parent
|
* If 2 only half parent width - inner padding of the parent
|
||||||
* If 3 only third parent width - 2 * inner padding of the parent
|
* If 3 only third parent width - 2 * inner padding of the parent
|
||||||
* @param span how many columns are combined
|
* @param span how many columns are combined
|
||||||
@@ -1068,7 +1068,7 @@ lv_coord_t lv_obj_get_width_grid(lv_obj_t * obj, uint8_t div, uint8_t span);
|
|||||||
* Take paddings into account.
|
* Take paddings into account.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object
|
||||||
* @param div indicates how many rows are assumed.
|
* @param div indicates how many rows are assumed.
|
||||||
* If 1 the height will be set the the parent's height
|
* If 1 the height will be set the parent's height
|
||||||
* If 2 only half parent height - inner padding of the parent
|
* If 2 only half parent height - inner padding of the parent
|
||||||
* If 3 only third parent height - 2 * inner padding of the parent
|
* If 3 only third parent height - 2 * inner padding of the parent
|
||||||
* @param span how many rows are combined
|
* @param span how many rows are combined
|
||||||
@@ -1079,7 +1079,7 @@ lv_coord_t lv_obj_get_height_grid(lv_obj_t * obj, uint8_t div, uint8_t span);
|
|||||||
/**
|
/**
|
||||||
* Get the automatic realign property of the object.
|
* Get the automatic realign property of the object.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object
|
||||||
* @return true: auto realign is enabled; false: auto realign is disabled
|
* @return true: auto realign is enabled; false: auto realign is disabled
|
||||||
*/
|
*/
|
||||||
bool lv_obj_get_auto_realign(const lv_obj_t * obj);
|
bool lv_obj_get_auto_realign(const lv_obj_t * obj);
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ void _lv_refr_init(void)
|
|||||||
/**
|
/**
|
||||||
* Redraw the invalidated areas now.
|
* Redraw the invalidated areas now.
|
||||||
* Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process
|
* Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process
|
||||||
* can prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process
|
* can prevent the call of `lv_task_handler`. In this case if the GUI is updated in the process
|
||||||
* (e.g. progress bar) this function can be called when the screen should be updated.
|
* (e.g. progress bar) this function can be called when the screen should be updated.
|
||||||
* @param disp pointer to display to refresh. NULL to refresh all displays.
|
* @param disp pointer to display to refresh. NULL to refresh all displays.
|
||||||
*/
|
*/
|
||||||
@@ -406,7 +406,7 @@ static void lv_refr_areas(void)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Refresh an area if there is Virtual Display Buffer
|
* Refresh an area if there is Virtual Display Buffer
|
||||||
* @param area_p pointer to an area to refresh
|
* @param area_p pointer to an area to refresh
|
||||||
*/
|
*/
|
||||||
static void lv_refr_area(const lv_area_t * area_p)
|
static void lv_refr_area(const lv_area_t * area_p)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ void _lv_refr_init(void);
|
|||||||
/**
|
/**
|
||||||
* Redraw the invalidated areas now.
|
* Redraw the invalidated areas now.
|
||||||
* Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process
|
* Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process
|
||||||
* can prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process
|
* can prevent the call of `lv_task_handler`. In this case if the GUI is updated in the process
|
||||||
* (e.g. progress bar) this function can be called when the screen should be updated.
|
* (e.g. progress bar) this function can be called when the screen should be updated.
|
||||||
* @param disp pointer to display to refresh. NULL to refresh all displays.
|
* @param disp pointer to display to refresh. NULL to refresh all displays.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ void lv_style_copy(lv_style_t * style_dest, const lv_style_t * style_src)
|
|||||||
/**
|
/**
|
||||||
* Remove a property from a style
|
* Remove a property from a style
|
||||||
* @param style pointer to a style
|
* @param style pointer to a style
|
||||||
* @param prop a style property ORed with a state.
|
* @param prop a style property ORed with a state.
|
||||||
* E.g. `LV_STYLE_BORDER_WIDTH | (LV_STATE_PRESSED << LV_STYLE_STATE_POS)`
|
* E.g. `LV_STYLE_BORDER_WIDTH | (LV_STATE_PRESSED << LV_STYLE_STATE_POS)`
|
||||||
* @return true: the property was found and removed; false: the property wasn't found
|
* @return true: the property was found and removed; false: the property wasn't found
|
||||||
*/
|
*/
|
||||||
@@ -188,7 +188,7 @@ void lv_style_list_copy(lv_style_list_t * list_dest, const lv_style_list_t * lis
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a style to a style list.
|
* Add a style to a style list.
|
||||||
* Only the the style pointer will be saved so the shouldn't be a local variable.
|
* Only the style pointer will be saved so the shouldn't be a local variable.
|
||||||
* (It should be static, global or dynamically allocated)
|
* (It should be static, global or dynamically allocated)
|
||||||
* @param list pointer to a style list
|
* @param list pointer to a style list
|
||||||
* @param style pointer to a style to add
|
* @param style pointer to a style to add
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ extern "C" {
|
|||||||
#define LV_RADIUS_CIRCLE (0x7FFF) /**< A very big radius to always draw as circle*/
|
#define LV_RADIUS_CIRCLE (0x7FFF) /**< A very big radius to always draw as circle*/
|
||||||
LV_EXPORT_CONST_INT(LV_RADIUS_CIRCLE);
|
LV_EXPORT_CONST_INT(LV_RADIUS_CIRCLE);
|
||||||
|
|
||||||
#define LV_DEBUG_STYLE_SENTINEL_VALUE 0x2288AAEE
|
#define LV_DEBUG_STYLE_SENTINEL_VALUE 0x2288AAEE
|
||||||
#define LV_DEBUG_STYLE_LIST_SENTINEL_VALUE 0x9977CCBB
|
#define LV_DEBUG_STYLE_LIST_SENTINEL_VALUE 0x9977CCBB
|
||||||
|
|
||||||
#define LV_STYLE_PROP_INIT(name, group, id, attr) name = (((group << 4) + id) | ((attr) << 8))
|
#define LV_STYLE_PROP_INIT(name, group, id, attr) name = (((group << 4) + id) | ((attr) << 8))
|
||||||
|
|
||||||
@@ -287,7 +287,7 @@ void lv_style_list_copy(lv_style_list_t * list_dest, const lv_style_list_t * lis
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a style to a style list.
|
* Add a style to a style list.
|
||||||
* Only the the style pointer will be saved so the shouldn't be a local variable.
|
* Only the style pointer will be saved so the shouldn't be a local variable.
|
||||||
* (It should be static, global or dynamically allocated)
|
* (It should be static, global or dynamically allocated)
|
||||||
* @param list pointer to a style list
|
* @param list pointer to a style list
|
||||||
* @param style pointer to a style to add
|
* @param style pointer to a style to add
|
||||||
@@ -338,7 +338,7 @@ void lv_style_copy(lv_style_t * dest, const lv_style_t * src);
|
|||||||
/**
|
/**
|
||||||
* Remove a property from a style
|
* Remove a property from a style
|
||||||
* @param style pointer to a style
|
* @param style pointer to a style
|
||||||
* @param prop a style property ORed with a state.
|
* @param prop a style property ORed with a state.
|
||||||
* E.g. `LV_STYLE_BORDER_WIDTH | (LV_STATE_PRESSED << LV_STYLE_STATE_POS)`
|
* E.g. `LV_STYLE_BORDER_WIDTH | (LV_STATE_PRESSED << LV_STYLE_STATE_POS)`
|
||||||
* @return true: the property was found and removed; false: the property wasn't found
|
* @return true: the property was found and removed; false: the property wasn't found
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ LV_ATTRIBUTE_FAST_MEM void _lv_blend_fill(const lv_area_t * clip_area, const lv_
|
|||||||
* @param mask_res LV_MASK_RES_COVER: the mask has only 0xff values (no mask),
|
* @param mask_res LV_MASK_RES_COVER: the mask has only 0xff values (no mask),
|
||||||
* LV_MASK_RES_TRANSP: the mask has only 0x00 values (full transparent),
|
* LV_MASK_RES_TRANSP: the mask has only 0x00 values (full transparent),
|
||||||
* LV_MASK_RES_CHANGED: the mask has mixed values
|
* LV_MASK_RES_CHANGED: the mask has mixed values
|
||||||
* @param opa overall opacity in 0x00..0xff range
|
* @param opa overall opacity in 0x00..0xff range
|
||||||
* @param mode blend mode from `lv_blend_mode_t`
|
* @param mode blend mode from `lv_blend_mode_t`
|
||||||
*/
|
*/
|
||||||
LV_ATTRIBUTE_FAST_MEM void _lv_blend_map(const lv_area_t * clip_area, const lv_area_t * map_area,
|
LV_ATTRIBUTE_FAST_MEM void _lv_blend_map(const lv_area_t * clip_area, const lv_area_t * map_area,
|
||||||
|
|||||||
@@ -553,7 +553,7 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const
|
|||||||
lv_opa_t px_opa = map_px[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
|
lv_opa_t px_opa = map_px[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
|
||||||
mask_buf[px_i] = px_opa;
|
mask_buf[px_i] = px_opa;
|
||||||
if(px_opa == 0) {
|
if(px_opa == 0) {
|
||||||
#if LV_COLOR_DEPTH == 32
|
#if LV_COLOR_DEPTH == 32
|
||||||
map2[px_i].full = 0;
|
map2[px_i].full = 0;
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
@@ -576,7 +576,7 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const
|
|||||||
if(chroma_key) {
|
if(chroma_key) {
|
||||||
if(c.full == chroma_keyed_color.full) {
|
if(c.full == chroma_keyed_color.full) {
|
||||||
mask_buf[px_i] = LV_OPA_TRANSP;
|
mask_buf[px_i] = LV_OPA_TRANSP;
|
||||||
#if LV_COLOR_DEPTH == 32
|
#if LV_COLOR_DEPTH == 32
|
||||||
map2[px_i].full = 0;
|
map2[px_i].full = 0;
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_letter(const lv_point_t * pos_p, const
|
|||||||
lv_font_glyph_dsc_t g;
|
lv_font_glyph_dsc_t g;
|
||||||
bool g_ret = lv_font_get_glyph_dsc(font_p, &g, letter, '\0');
|
bool g_ret = lv_font_get_glyph_dsc(font_p, &g, letter, '\0');
|
||||||
if(g_ret == false) {
|
if(g_ret == false) {
|
||||||
/* Add waring if the dsc is not found
|
/* Add warning if the dsc is not found
|
||||||
* but do not print warning for non printable ASCII chars (e.g. '\n')*/
|
* but do not print warning for non printable ASCII chars (e.g. '\n')*/
|
||||||
if(letter >= 0x20) {
|
if(letter >= 0x20) {
|
||||||
LV_LOG_WARN("lv_draw_letter: glyph dsc. not found");
|
LV_LOG_WARN("lv_draw_letter: glyph dsc. not found");
|
||||||
|
|||||||
@@ -451,7 +451,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_line(lv_opa_t * mas
|
|||||||
int32_t k = - abs_x;
|
int32_t k = - abs_x;
|
||||||
if(k < 0) return LV_DRAW_MASK_RES_TRANSP;
|
if(k < 0) return LV_DRAW_MASK_RES_TRANSP;
|
||||||
if(k >= 0 && k < len) _lv_memset_00(&mask_buf[k], len - k);
|
if(k >= 0 && k < len) _lv_memset_00(&mask_buf[k], len - k);
|
||||||
return LV_DRAW_MASK_RES_CHANGED;
|
return LV_DRAW_MASK_RES_CHANGED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -461,7 +461,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_line(lv_opa_t * mas
|
|||||||
if(k < 0) k = 0;
|
if(k < 0) k = 0;
|
||||||
if(k >= len) return LV_DRAW_MASK_RES_TRANSP;
|
if(k >= len) return LV_DRAW_MASK_RES_TRANSP;
|
||||||
else if(k >= 0 && k < len) _lv_memset_00(&mask_buf[0], k);
|
else if(k >= 0 && k < len) _lv_memset_00(&mask_buf[0], k);
|
||||||
return LV_DRAW_MASK_RES_CHANGED;
|
return LV_DRAW_MASK_RES_CHANGED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1027,7 +1027,7 @@ LV_ATTRIBUTE_FAST_MEM static void shadow_draw_corner_buf(const lv_area_t * coord
|
|||||||
sh_ups_tmp_buf[0] = (mask_line[0] << SHADOW_UPSCALE_SHIFT) / sw;
|
sh_ups_tmp_buf[0] = (mask_line[0] << SHADOW_UPSCALE_SHIFT) / sw;
|
||||||
for(i = 1; i < size; i++) {
|
for(i = 1; i < size; i++) {
|
||||||
if(mask_line[i] == mask_line[i - 1]) sh_ups_tmp_buf[i] = sh_ups_tmp_buf[i - 1];
|
if(mask_line[i] == mask_line[i - 1]) sh_ups_tmp_buf[i] = sh_ups_tmp_buf[i - 1];
|
||||||
else sh_ups_tmp_buf[i] = (mask_line[i] << SHADOW_UPSCALE_SHIFT) / sw;
|
else sh_ups_tmp_buf[i] = (mask_line[i] << SHADOW_UPSCALE_SHIFT) / sw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1060,7 +1060,7 @@ LV_ATTRIBUTE_FAST_MEM static void shadow_draw_corner_buf(const lv_area_t * coord
|
|||||||
sh_buf[0] = (sh_buf[0] << SHADOW_UPSCALE_SHIFT) / sw;
|
sh_buf[0] = (sh_buf[0] << SHADOW_UPSCALE_SHIFT) / sw;
|
||||||
for(i = 1; i < (uint32_t) size * size; i++) {
|
for(i = 1; i < (uint32_t) size * size; i++) {
|
||||||
if(sh_buf[i] == sh_buf[i - 1]) sh_buf[i] = sh_buf[i - 1];
|
if(sh_buf[i] == sh_buf[i - 1]) sh_buf[i] = sh_buf[i - 1];
|
||||||
else sh_buf[i] = (sh_buf[i] << SHADOW_UPSCALE_SHIFT) / sw;
|
else sh_buf[i] = (sh_buf[i] << SHADOW_UPSCALE_SHIFT) / sw;
|
||||||
}
|
}
|
||||||
|
|
||||||
shadow_blur_corner(size, sw, sh_buf);
|
shadow_blur_corner(size, sw, sh_buf);
|
||||||
@@ -1113,7 +1113,7 @@ LV_ATTRIBUTE_FAST_MEM static void shadow_blur_corner(lv_coord_t size, lv_coord_t
|
|||||||
sh_ups_buf[0] = sh_ups_buf[0] / sw;
|
sh_ups_buf[0] = sh_ups_buf[0] / sw;
|
||||||
for(i = 1; i < (uint32_t)size * size; i++) {
|
for(i = 1; i < (uint32_t)size * size; i++) {
|
||||||
if(sh_ups_buf[i] == sh_ups_buf[i - 1]) sh_ups_buf[i] = sh_ups_buf[i - 1];
|
if(sh_ups_buf[i] == sh_ups_buf[i - 1]) sh_ups_buf[i] = sh_ups_buf[i - 1];
|
||||||
else sh_ups_buf[i] = sh_ups_buf[i] / sw;
|
else sh_ups_buf[i] = sh_ups_buf[i] / sw;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(x = 0; x < size; x++) {
|
for(x = 0; x < size; x++) {
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ typedef uint8_t lv_img_cf_t;
|
|||||||
#if LV_BIG_ENDIAN_SYSTEM
|
#if LV_BIG_ENDIAN_SYSTEM
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
||||||
uint32_t h : 11; /*Height of the image map*/
|
uint32_t h : 11; /*Height of the image map*/
|
||||||
uint32_t w : 11; /*Width of the image map*/
|
uint32_t w : 11; /*Width of the image map*/
|
||||||
uint32_t reserved : 2; /*Reserved to be used later*/
|
uint32_t reserved : 2; /*Reserved to be used later*/
|
||||||
uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a
|
uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a
|
||||||
@@ -129,7 +129,7 @@ typedef struct {
|
|||||||
uint32_t reserved : 2; /*Reserved to be used later*/
|
uint32_t reserved : 2; /*Reserved to be used later*/
|
||||||
|
|
||||||
uint32_t w : 11; /*Width of the image map*/
|
uint32_t w : 11; /*Width of the image map*/
|
||||||
uint32_t h : 11; /*Height of the image map*/
|
uint32_t h : 11; /*Height of the image map*/
|
||||||
} lv_img_header_t;
|
} lv_img_header_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
* Return with the bitmap of a font.
|
* Return with the bitmap of a font.
|
||||||
* @param font_p pointer to a font
|
* @param font_p pointer to a font
|
||||||
* @param letter an UNICODE character code
|
* @param letter an UNICODE character code
|
||||||
* @return pointer to the bitmap of the letter
|
* @return pointer to the bitmap of the letter
|
||||||
*/
|
*/
|
||||||
const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter)
|
const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ typedef uint8_t lv_font_subpx_t;
|
|||||||
|
|
||||||
/** Describe the properties of a font*/
|
/** Describe the properties of a font*/
|
||||||
typedef struct _lv_font_struct {
|
typedef struct _lv_font_struct {
|
||||||
/** Get a glyph's descriptor from a font*/
|
/** Get a glyph's descriptor from a font*/
|
||||||
bool (*get_glyph_dsc)(const struct _lv_font_struct *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next);
|
bool (*get_glyph_dsc)(const struct _lv_font_struct *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next);
|
||||||
|
|
||||||
/** Get a glyph's bitmap from a font*/
|
/** Get a glyph's bitmap from a font*/
|
||||||
@@ -67,7 +67,7 @@ typedef struct _lv_font_struct {
|
|||||||
uint8_t subpx : 2; /**< An element of `lv_font_subpx_t`*/
|
uint8_t subpx : 2; /**< An element of `lv_font_subpx_t`*/
|
||||||
|
|
||||||
int8_t underline_position; /**< Distance between the top of the underline and base line (< 0 means below the base line)*/
|
int8_t underline_position; /**< Distance between the top of the underline and base line (< 0 means below the base line)*/
|
||||||
int8_t underline_thickness; /**< Thickness of the underline*/
|
int8_t underline_thickness; /**< Thickness of the underline*/
|
||||||
|
|
||||||
void * dsc; /**< Store implementation specific or run_time data or caching here*/
|
void * dsc; /**< Store implementation specific or run_time data or caching here*/
|
||||||
#if LV_USE_USER_DATA
|
#if LV_USE_USER_DATA
|
||||||
@@ -84,7 +84,7 @@ typedef struct _lv_font_struct {
|
|||||||
* Return with the bitmap of a font.
|
* Return with the bitmap of a font.
|
||||||
* @param font_p pointer to a font
|
* @param font_p pointer to a font
|
||||||
* @param letter an UNICODE character code
|
* @param letter an UNICODE character code
|
||||||
* @return pointer to the bitmap of the letter
|
* @return pointer to the bitmap of the letter
|
||||||
*/
|
*/
|
||||||
const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter);
|
const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter);
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
/*To get a kern value of two code points:
|
/*To get a kern value of two code points:
|
||||||
1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t
|
1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t
|
||||||
2 for(i = 0; i < pair_cnt * 2; i+2)
|
2. for(i = 0; i < pair_cnt * 2; i+2)
|
||||||
if(gylph_ids[i] == glyph_id_left &&
|
if(gylph_ids[i] == glyph_id_left &&
|
||||||
gylph_ids[i+1] == glyph_id_right)
|
gylph_ids[i+1] == glyph_id_right)
|
||||||
return values[i / 2];
|
return values[i / 2];
|
||||||
@@ -130,7 +130,7 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
/*To get a kern value of two code points:
|
/*To get a kern value of two code points:
|
||||||
1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t
|
1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t
|
||||||
2 Get the class of the left and right glyphs as `left_class` and `right_class`
|
2. Get the class of the left and right glyphs as `left_class` and `right_class`
|
||||||
left_class = left_class_mapping[glyph_id_left];
|
left_class = left_class_mapping[glyph_id_left];
|
||||||
right_class = right_class_mapping[glyph_id_right];
|
right_class = right_class_mapping[glyph_id_right];
|
||||||
3. value = class_pair_values[(left_class-1)*right_class_cnt + (right_class-1)]
|
3. value = class_pair_values[(left_class-1)*right_class_cnt + (right_class-1)]
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_
|
|||||||
*
|
*
|
||||||
* By default, image is copied directly, with optional opacity configured by \p opa.
|
* By default, image is copied directly, with optional opacity configured by \p opa.
|
||||||
* Color keying can be enabled by calling lv_gpu_nxp_pxp_enable_color_key() before calling this function.
|
* Color keying can be enabled by calling lv_gpu_nxp_pxp_enable_color_key() before calling this function.
|
||||||
* Recoloring can be enabled by calling lv_gpu_nxp_pxp_enable_recolor() before calling this function.
|
* Recoloring can be enabled by calling lv_gpu_nxp_pxp_enable_recolor() before calling this function.
|
||||||
* Note that color keying and recoloring at the same time is not supported and black rectangle is rendered.
|
* Note that color keying and recoloring at the same time is not supported and black rectangle is rendered.
|
||||||
*
|
*
|
||||||
* @param[in/out] dest destination buffer
|
* @param[in/out] dest destination buffer
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_
|
|||||||
*
|
*
|
||||||
* By default, image is copied directly, with optional opacity configured by \p opa.
|
* By default, image is copied directly, with optional opacity configured by \p opa.
|
||||||
* Color keying can be enabled by calling lv_gpu_nxp_pxp_enable_color_key() before calling this function.
|
* Color keying can be enabled by calling lv_gpu_nxp_pxp_enable_color_key() before calling this function.
|
||||||
* Recoloring can be enabled by calling lv_gpu_nxp_pxp_enable_recolor() before calling this function.
|
* Recoloring can be enabled by calling lv_gpu_nxp_pxp_enable_recolor() before calling this function.
|
||||||
* Note that color keying and recoloring at the same time is not supported and black rectangle is rendered.
|
* Note that color keying and recoloring at the same time is not supported and black rectangle is rendered.
|
||||||
*
|
*
|
||||||
* @param[in/out] dest destination buffer
|
* @param[in/out] dest destination buffer
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ void lv_gpu_stm32_dma2d_init(void)
|
|||||||
/* Enable DMA2D clock */
|
/* Enable DMA2D clock */
|
||||||
#if defined(STM32F4) || defined(STM32F7)
|
#if defined(STM32F4) || defined(STM32F7)
|
||||||
RCC->AHB1ENR |= RCC_AHB1ENR_DMA2DEN;
|
RCC->AHB1ENR |= RCC_AHB1ENR_DMA2DEN;
|
||||||
#elif defined(STM32H7)
|
#elif defined(STM32H7)
|
||||||
RCC->AHB3ENR |= RCC_AHB3ENR_DMA2DEN;
|
RCC->AHB3ENR |= RCC_AHB3ENR_DMA2DEN;
|
||||||
#else
|
#else
|
||||||
# warning "LVGL can't enable the clock of DMA2D"
|
# warning "LVGL can't enable the clock of DMA2D"
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ typedef struct _disp_drv_t {
|
|||||||
uint32_t rotated : 1; /**< 1: turn the display by 90 degree. @warning Does not update coordinates for you!*/
|
uint32_t rotated : 1; /**< 1: turn the display by 90 degree. @warning Does not update coordinates for you!*/
|
||||||
|
|
||||||
#if LV_COLOR_SCREEN_TRANSP
|
#if LV_COLOR_SCREEN_TRANSP
|
||||||
/**Handle if the the screen doesn't have a solid (opa == LV_OPA_COVER) background.
|
/**Handle if the screen doesn't have a solid (opa == LV_OPA_COVER) background.
|
||||||
* Use only if required because it's slower.*/
|
* Use only if required because it's slower.*/
|
||||||
uint32_t screen_transp : 1;
|
uint32_t screen_transp : 1;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ bool _lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data)
|
|||||||
data->point.x = indev->proc.types.pointer.act_point.x;
|
data->point.x = indev->proc.types.pointer.act_point.x;
|
||||||
data->point.y = indev->proc.types.pointer.act_point.y;
|
data->point.y = indev->proc.types.pointer.act_point.y;
|
||||||
}
|
}
|
||||||
/*Similarly set at least the last key in case of the the user doesn't set it on release*/
|
/*Similarly set at least the last key in case of the user doesn't set it on release*/
|
||||||
else if(indev->driver.type == LV_INDEV_TYPE_KEYPAD) {
|
else if(indev->driver.type == LV_INDEV_TYPE_KEYPAD) {
|
||||||
data->key = indev->proc.types.keypad.last_key;
|
data->key = indev->proc.types.keypad.last_key;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ void lv_anim_init(lv_anim_t * a)
|
|||||||
void lv_anim_start(lv_anim_t * a)
|
void lv_anim_start(lv_anim_t * a)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("animation create started")
|
LV_LOG_TRACE("animation create started")
|
||||||
/* Do not let two animations for the same 'var' with the same 'fp'*/
|
/* Do not let two animations for the same 'var' with the same 'fp'*/
|
||||||
if(a->exec_cb != NULL) lv_anim_del(a->var, a->exec_cb); /*fp == NULL would delete all animations of var*/
|
if(a->exec_cb != NULL) lv_anim_del(a->var, a->exec_cb); /*fp == NULL would delete all animations of var*/
|
||||||
|
|
||||||
/*If the list is empty the anim task was suspended and it's last run measure is invalid*/
|
/*If the list is empty the anim task was suspended and it's last run measure is invalid*/
|
||||||
@@ -456,7 +456,7 @@ static void anim_task(lv_task_t * param)
|
|||||||
anim_list_changed = false;
|
anim_list_changed = false;
|
||||||
|
|
||||||
if(!a->has_run) {
|
if(!a->has_run) {
|
||||||
a->has_run = 1; /*The list readying might be reseted so need to know which anim has run already*/
|
a->has_run = 1; /*The list readying might be reset so need to know which anim has run already*/
|
||||||
|
|
||||||
/*The animation will run now for the first time. Call `start_cb`*/
|
/*The animation will run now for the first time. Call `start_cb`*/
|
||||||
int32_t new_act_time = a->act_time + elaps;
|
int32_t new_act_time = a->act_time + elaps;
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ lv_bidi_dir_t _lv_bidi_detect_base_dir(const char * txt)
|
|||||||
* @param len length of the line in character count
|
* @param len length of the line in character count
|
||||||
* @param base_dir base direction of the text: `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL`
|
* @param base_dir base direction of the text: `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL`
|
||||||
* @param visual_pos the visual character position which logical position should be get
|
* @param visual_pos the visual character position which logical position should be get
|
||||||
* @param is_rtl tell the the char at `visual_pos` is RTL or LTR context
|
* @param is_rtl tell the char at `visual_pos` is RTL or LTR context
|
||||||
* @return the logical character position
|
* @return the logical character position
|
||||||
*/
|
*/
|
||||||
uint16_t _lv_bidi_get_logical_pos(const char * str_in, char ** bidi_txt, uint32_t len, lv_bidi_dir_t base_dir,
|
uint16_t _lv_bidi_get_logical_pos(const char * str_in, char ** bidi_txt, uint32_t len, lv_bidi_dir_t base_dir,
|
||||||
@@ -168,7 +168,7 @@ uint16_t _lv_bidi_get_logical_pos(const char * str_in, char ** bidi_txt, uint32_
|
|||||||
* @param len length of the line in character count
|
* @param len length of the line in character count
|
||||||
* @param base_dir base direction of the text: `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL`
|
* @param base_dir base direction of the text: `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL`
|
||||||
* @param logical_pos the logical character position which visual position should be get
|
* @param logical_pos the logical character position which visual position should be get
|
||||||
* @param is_rtl tell the the char at `logical_pos` is RTL or LTR context
|
* @param is_rtl tell the char at `logical_pos` is RTL or LTR context
|
||||||
* @return the visual character position
|
* @return the visual character position
|
||||||
*/
|
*/
|
||||||
uint16_t _lv_bidi_get_visual_pos(const char * str_in, char ** bidi_txt, uint16_t len, lv_bidi_dir_t base_dir,
|
uint16_t _lv_bidi_get_visual_pos(const char * str_in, char ** bidi_txt, uint16_t len, lv_bidi_dir_t base_dir,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ extern "C" {
|
|||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
/* Special non printable strong characters.
|
/* Special non printable strong characters.
|
||||||
* They can be inserted to texts to affect the run's direction*/
|
* They can be inserted to texts to affect the run's direction*/
|
||||||
#define LV_BIDI_LRO "\xE2\x80\xAD" /*U+202D*/
|
#define LV_BIDI_LRO "\xE2\x80\xAD" /*U+202D*/
|
||||||
#define LV_BIDI_RLO "\xE2\x80\xAE" /*U+202E*/
|
#define LV_BIDI_RLO "\xE2\x80\xAE" /*U+202E*/
|
||||||
@@ -72,7 +72,7 @@ lv_bidi_dir_t _lv_bidi_detect_base_dir(const char * txt);
|
|||||||
* @param len length of the line in character count
|
* @param len length of the line in character count
|
||||||
* @param base_dir base direction of the text: `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL`
|
* @param base_dir base direction of the text: `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL`
|
||||||
* @param visual_pos the visual character position which logical position should be get
|
* @param visual_pos the visual character position which logical position should be get
|
||||||
* @param is_rtl tell the the char at `visual_pos` is RTL or LTR context
|
* @param is_rtl tell the char at `visual_pos` is RTL or LTR context
|
||||||
* @return the logical character position
|
* @return the logical character position
|
||||||
*/
|
*/
|
||||||
uint16_t _lv_bidi_get_logical_pos(const char * str_in, char ** bidi_txt, uint32_t len, lv_bidi_dir_t base_dir,
|
uint16_t _lv_bidi_get_logical_pos(const char * str_in, char ** bidi_txt, uint32_t len, lv_bidi_dir_t base_dir,
|
||||||
@@ -87,7 +87,7 @@ uint16_t _lv_bidi_get_logical_pos(const char * str_in, char ** bidi_txt, uint32_
|
|||||||
* @param len length of the line in character count
|
* @param len length of the line in character count
|
||||||
* @param base_dir base direction of the text: `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL`
|
* @param base_dir base direction of the text: `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL`
|
||||||
* @param logical_pos the logical character position which visual position should be get
|
* @param logical_pos the logical character position which visual position should be get
|
||||||
* @param is_rtl tell the the char at `logical_pos` is RTL or LTR context
|
* @param is_rtl tell the char at `logical_pos` is RTL or LTR context
|
||||||
* @return the visual character position
|
* @return the visual character position
|
||||||
*/
|
*/
|
||||||
uint16_t _lv_bidi_get_visual_pos(const char * str_in, char ** bidi_txt, uint16_t len, lv_bidi_dir_t base_dir,
|
uint16_t _lv_bidi_get_visual_pos(const char * str_in, char ** bidi_txt, uint16_t len, lv_bidi_dir_t base_dir,
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ enum {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*---------------------------------------
|
/*---------------------------------------
|
||||||
* Macros for all existing color depths
|
* Macros for all existing color depths
|
||||||
* to set/get values of the color channels
|
* to set/get values of the color channels
|
||||||
*------------------------------------------*/
|
*------------------------------------------*/
|
||||||
# define LV_COLOR_SET_R1(c, v) (c).ch.red = (uint8_t)((v) & 0x1)
|
# define LV_COLOR_SET_R1(c, v) (c).ch.red = (uint8_t)((v) & 0x1)
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
#ifndef LV_DEBUG_STR_MAX_LENGTH
|
#ifndef LV_DEBUG_STR_MAX_LENGTH
|
||||||
#define LV_DEBUG_STR_MAX_LENGTH (1024 * 8)
|
#define LV_DEBUG_STR_MAX_LENGTH (1024 * 8)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LV_DEBUG_STR_MAX_REPEAT
|
#ifndef LV_DEBUG_STR_MAX_REPEAT
|
||||||
#define LV_DEBUG_STR_MAX_REPEAT 8
|
#define LV_DEBUG_STR_MAX_REPEAT 8
|
||||||
#endif
|
#endif
|
||||||
/**********************
|
/**********************
|
||||||
* TYPEDEFS
|
* TYPEDEFS
|
||||||
|
|||||||
+2
-2
@@ -134,7 +134,7 @@ lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mo
|
|||||||
/**
|
/**
|
||||||
* Close an already opened file
|
* Close an already opened file
|
||||||
* @param file_p pointer to a lv_fs_file_t variable
|
* @param file_p pointer to a lv_fs_file_t variable
|
||||||
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
||||||
*/
|
*/
|
||||||
lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p)
|
lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p)
|
||||||
{
|
{
|
||||||
@@ -158,7 +158,7 @@ lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p)
|
|||||||
/**
|
/**
|
||||||
* Delete a file
|
* Delete a file
|
||||||
* @param path path of the file to delete
|
* @param path path of the file to delete
|
||||||
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
||||||
*/
|
*/
|
||||||
lv_fs_res_t lv_fs_remove(const char * path)
|
lv_fs_res_t lv_fs_remove(const char * path)
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -148,14 +148,14 @@ lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mo
|
|||||||
/**
|
/**
|
||||||
* Close an already opened file
|
* Close an already opened file
|
||||||
* @param file_p pointer to a lv_fs_file_t variable
|
* @param file_p pointer to a lv_fs_file_t variable
|
||||||
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
||||||
*/
|
*/
|
||||||
lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p);
|
lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a file
|
* Delete a file
|
||||||
* @param path path of the file to delete
|
* @param path path of the file to delete
|
||||||
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
||||||
*/
|
*/
|
||||||
lv_fs_res_t lv_fs_remove(const char * path);
|
lv_fs_res_t lv_fs_remove(const char * path);
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -150,7 +150,7 @@ void * _lv_ll_ins_tail(lv_ll_t * ll_p)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the node 'node_p' from 'll_p' linked list.
|
* Remove the node 'node_p' from 'll_p' linked list.
|
||||||
* It does not free the the memory of node.
|
* It does not free the memory of node.
|
||||||
* @param ll_p pointer to the linked list of 'node_p'
|
* @param ll_p pointer to the linked list of 'node_p'
|
||||||
* @param node_p pointer to node in 'll_p' linked list
|
* @param node_p pointer to node in 'll_p' linked list
|
||||||
*/
|
*/
|
||||||
@@ -167,7 +167,7 @@ void _lv_ll_remove(lv_ll_t * ll_p, void * node_p)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(_lv_ll_get_tail(ll_p) == node_p) {
|
else if(_lv_ll_get_tail(ll_p) == node_p) {
|
||||||
/*The new tail will be the node before 'n_act'*/
|
/*The new tail will be the node before 'n_act'*/
|
||||||
ll_p->tail = _lv_ll_get_prev(ll_p, node_p);
|
ll_p->tail = _lv_ll_get_prev(ll_p, node_p);
|
||||||
if(ll_p->tail == NULL) {
|
if(ll_p->tail == NULL) {
|
||||||
ll_p->head = NULL;
|
ll_p->head = NULL;
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ void * _lv_ll_ins_tail(lv_ll_t * ll_p);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the node 'node_p' from 'll_p' linked list.
|
* Remove the node 'node_p' from 'll_p' linked list.
|
||||||
* It does not free the the memory of node.
|
* It does not free the memory of node.
|
||||||
* @param ll_p pointer to the linked list of 'node_p'
|
* @param ll_p pointer to the linked list of 'node_p'
|
||||||
* @param node_p pointer to node in 'll_p' linked list
|
* @param node_p pointer to node in 'll_p' linked list
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ void _lv_log_add(lv_log_level_t level, const char * file, int line, const char *
|
|||||||
|
|
||||||
#else /*LV_USE_LOG*/
|
#else /*LV_USE_LOG*/
|
||||||
|
|
||||||
/*Do nothing if `LV_USE_LOG 0`*/
|
/*Do nothing if `LV_USE_LOG 0`*/
|
||||||
#define _lv_log_add(level, file, line, ...)
|
#define _lv_log_add(level, file, line, ...)
|
||||||
#define LV_LOG_TRACE(...)
|
#define LV_LOG_TRACE(...)
|
||||||
#define LV_LOG_INFO(...)
|
#define LV_LOG_INFO(...)
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ typedef struct {
|
|||||||
#endif /* LV_ENABLE_GC */
|
#endif /* LV_ENABLE_GC */
|
||||||
|
|
||||||
#ifdef LV_ARCH_64
|
#ifdef LV_ARCH_64
|
||||||
#define ALIGN_MASK 0x7
|
#define ALIGN_MASK 0x7
|
||||||
#else
|
#else
|
||||||
#define ALIGN_MASK 0x3
|
#define ALIGN_MASK 0x3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MEM_BUF_SMALL_SIZE 16
|
#define MEM_BUF_SMALL_SIZE 16
|
||||||
|
|||||||
@@ -68,13 +68,13 @@
|
|||||||
// define the default floating point precision
|
// define the default floating point precision
|
||||||
// default: 6 digits
|
// default: 6 digits
|
||||||
#ifndef PRINTF_DEFAULT_FLOAT_PRECISION
|
#ifndef PRINTF_DEFAULT_FLOAT_PRECISION
|
||||||
#define PRINTF_DEFAULT_FLOAT_PRECISION 6U
|
#define PRINTF_DEFAULT_FLOAT_PRECISION 6U
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// define the largest float suitable to print with %f
|
// define the largest float suitable to print with %f
|
||||||
// default: 1e9
|
// default: 1e9
|
||||||
#ifndef PRINTF_MAX_FLOAT
|
#ifndef PRINTF_MAX_FLOAT
|
||||||
#define PRINTF_MAX_FLOAT 1e9
|
#define PRINTF_MAX_FLOAT 1e9
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// support for the long long types (%llu or %p)
|
// support for the long long types (%llu or %p)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ void _lv_task_core_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call it periodically to handle lv_tasks.
|
* Call it periodically to handle lv_tasks.
|
||||||
* @return the time after which it must be called again
|
* @return the time after which it must be called again
|
||||||
*/
|
*/
|
||||||
LV_ATTRIBUTE_TASK_HANDLER uint32_t lv_task_handler(void)
|
LV_ATTRIBUTE_TASK_HANDLER uint32_t lv_task_handler(void)
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ void _lv_task_core_init(void);
|
|||||||
//! @cond Doxygen_Suppress
|
//! @cond Doxygen_Suppress
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call it periodically to handle lv_tasks.
|
* Call it periodically to handle lv_tasks.
|
||||||
* @return time till it needs to be run next (in ms)
|
* @return time till it needs to be run next (in ms)
|
||||||
*/
|
*/
|
||||||
LV_ATTRIBUTE_TASK_HANDLER uint32_t lv_task_handler(void);
|
LV_ATTRIBUTE_TASK_HANDLER uint32_t lv_task_handler(void);
|
||||||
@@ -154,7 +154,7 @@ void lv_task_set_repeat_count(lv_task_t * task, int32_t repeat_count);
|
|||||||
void lv_task_reset(lv_task_t * task);
|
void lv_task_reset(lv_task_t * task);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable or disable the whole lv_task handling
|
* Enable or disable the whole lv_task handling
|
||||||
* @param en: true: lv_task handling is running, false: lv_task handling is suspended
|
* @param en: true: lv_task handling is running, false: lv_task handling is suspended
|
||||||
*/
|
*/
|
||||||
void lv_task_enable(bool en);
|
void lv_task_enable(bool en);
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void _lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t
|
|||||||
size_res->y += line_space;
|
size_res->y += line_space;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Calculate the the longest line*/
|
/*Calculate the longest line*/
|
||||||
lv_coord_t act_line_length = _lv_txt_get_width(&text[line_start], new_line_start - line_start, font, letter_space,
|
lv_coord_t act_line_length = _lv_txt_get_width(&text[line_start], new_line_start - line_start, font, letter_space,
|
||||||
flag);
|
flag);
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ static uint32_t lv_txt_get_next_word(const char * txt, const lv_font_t * font,
|
|||||||
/*Check for new line chars and breakchars*/
|
/*Check for new line chars and breakchars*/
|
||||||
if(letter == '\n' || letter == '\r' || is_break_char(letter)) {
|
if(letter == '\n' || letter == '\r' || is_break_char(letter)) {
|
||||||
/* Update the output width on the first character if it fits.
|
/* Update the output width on the first character if it fits.
|
||||||
* Must do this here incase first letter is a break character. */
|
* Must do this here in case first letter is a break character. */
|
||||||
if(i == 0 && break_index == NO_BREAK_FOUND && word_w_ptr != NULL) *word_w_ptr = cur_w;
|
if(i == 0 && break_index == NO_BREAK_FOUND && word_w_ptr != NULL) *word_w_ptr = cur_w;
|
||||||
word_len--;
|
word_len--;
|
||||||
break;
|
break;
|
||||||
@@ -581,7 +581,7 @@ static uint32_t lv_txt_unicode_to_utf8(uint32_t letter_uni)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a wide character, e.g. 'Á' little endian to be UTF-8 compatible
|
* Convert a wide character, e.g. 'Á' little endian to be UTF-8 compatible
|
||||||
* @param c a wide character or a Little endian number
|
* @param c a wide character or a Little endian number
|
||||||
* @return `c` in big endian
|
* @return `c` in big endian
|
||||||
*/
|
*/
|
||||||
static uint32_t lv_txt_utf8_conv_wc(uint32_t c)
|
static uint32_t lv_txt_utf8_conv_wc(uint32_t c)
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ uint32_t _lv_txt_ap_calc_bytes_cnt(const char * txt)
|
|||||||
chars_cnt++;
|
chars_cnt++;
|
||||||
else if(ch_enc < 0x0800)
|
else if(ch_enc < 0x0800)
|
||||||
chars_cnt += 2;
|
chars_cnt += 2;
|
||||||
else if(ch_enc < 0x010000)
|
else if(ch_enc < 0x010000)
|
||||||
chars_cnt += 3;
|
chars_cnt += 3;
|
||||||
else
|
else
|
||||||
chars_cnt += 4;
|
chars_cnt += 4;
|
||||||
@@ -210,7 +210,7 @@ static uint32_t lv_ap_get_char_index(uint16_t c)
|
|||||||
if(c == (ap_chars_map[i].char_offset + LV_AP_ALPHABET_BASE_CODE))
|
if(c == (ap_chars_map[i].char_offset + LV_AP_ALPHABET_BASE_CODE))
|
||||||
return i;
|
return i;
|
||||||
else if(c == ap_chars_map[i].char_end_form //is it an End form
|
else if(c == ap_chars_map[i].char_end_form //is it an End form
|
||||||
|| c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_begining_form_offset) //is it a Begining form
|
|| c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_begining_form_offset) //is it a Beginning form
|
||||||
|| c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_middle_form_offset) //is it a middle form
|
|| c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_middle_form_offset) //is it a middle form
|
||||||
|| c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_isolated_form_offset)) { //is it an isolated form
|
|| c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_isolated_form_offset)) { //is it an isolated form
|
||||||
return i;
|
return i;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user