arch(conf, api) refactor lv_conf and some API (#3501)

Kconfig and MicroPython config is not updated yet.


* start to refactor lv_conf.h

* further mem refactoring

* create lv_mem_builtin.c/h

* update lv_conf_internal.h

* add lv_strlen and lv_strncpy

* rename LV_DRAW_COMPLEX to LV_USE_DRAW_MASK

* update lv_conf_template

* minor fix
This commit is contained in:
Gabor Kiss-Vamosi
2022-07-19 13:31:42 +02:00
committed by GitHub
parent c03d817192
commit 5369d7d473
148 changed files with 1889 additions and 2035 deletions

View File

@@ -1,5 +1,5 @@
#include "../../lv_examples.h"
#if LV_USE_CHART && LV_DRAW_COMPLEX && LV_BUILD_EXAMPLES
#if LV_USE_CHART && LV_USE_DRAW_MASKS && LV_BUILD_EXAMPLES
static lv_obj_t * chart1;
static lv_chart_series_t * ser1;

View File

@@ -1,5 +1,5 @@
#include "../../lv_examples.h"
#if LV_USE_CHART && LV_DRAW_COMPLEX && LV_BUILD_EXAMPLES
#if LV_USE_CHART && LV_USE_DRAW_MASKS && LV_BUILD_EXAMPLES
/* A struct is used to keep track of the series list because later we need to draw to the series in the reverse order to which they were initialised. */
typedef struct {

View File

@@ -1,5 +1,5 @@
#include "../../lv_examples.h"
#if LV_USE_CHART && LV_DRAW_COMPLEX && LV_BUILD_EXAMPLES
#if LV_USE_CHART && LV_USE_DRAW_MASKS && LV_BUILD_EXAMPLES
static void add_data(lv_timer_t * t)

View File

@@ -1,5 +1,5 @@
#include "../../lv_examples.h"
#if LV_USE_LABEL && LV_USE_CANVAS && LV_BUILD_EXAMPLES && LV_DRAW_COMPLEX
#if LV_USE_LABEL && LV_USE_CANVAS && LV_BUILD_EXAMPLES && LV_USE_DRAW_MASKS
#define MASK_WIDTH 100
#define MASK_HEIGHT 45

View File

@@ -1,5 +1,5 @@
#include "../../lv_examples.h"
#if LV_USE_ROLLER && LV_DRAW_COMPLEX && LV_BUILD_EXAMPLES
#if LV_USE_ROLLER && LV_USE_DRAW_MASKS && LV_BUILD_EXAMPLES
static void mask_event_cb(lv_event_t * e)
{
@@ -28,14 +28,14 @@ static void mask_event_cb(lv_event_t * e)
rect_area.y1 = roller_coords.y1;
rect_area.y2 = roller_coords.y1 + (lv_obj_get_height(obj) - font_h - line_space) / 2;
lv_draw_mask_fade_param_t * fade_mask_top = lv_mem_buf_get(sizeof(lv_draw_mask_fade_param_t));
lv_draw_mask_fade_param_t * fade_mask_top = lv_malloc(sizeof(lv_draw_mask_fade_param_t));
lv_draw_mask_fade_init(fade_mask_top, &rect_area, LV_OPA_TRANSP, rect_area.y1, LV_OPA_COVER, rect_area.y2);
mask_top_id = lv_draw_mask_add(fade_mask_top, NULL);
rect_area.y1 = rect_area.y2 + font_h + line_space - 1;
rect_area.y2 = roller_coords.y2;
lv_draw_mask_fade_param_t * fade_mask_bottom = lv_mem_buf_get(sizeof(lv_draw_mask_fade_param_t));
lv_draw_mask_fade_param_t * fade_mask_bottom = lv_malloc(sizeof(lv_draw_mask_fade_param_t));
lv_draw_mask_fade_init(fade_mask_bottom, &rect_area, LV_OPA_COVER, rect_area.y1, LV_OPA_TRANSP, rect_area.y2);
mask_bottom_id = lv_draw_mask_add(fade_mask_bottom, NULL);
@@ -45,8 +45,8 @@ static void mask_event_cb(lv_event_t * e)
lv_draw_mask_fade_param_t * fade_mask_bottom = lv_draw_mask_remove_id(mask_bottom_id);
lv_draw_mask_free_param(fade_mask_top);
lv_draw_mask_free_param(fade_mask_bottom);
lv_mem_buf_release(fade_mask_top);
lv_mem_buf_release(fade_mask_bottom);
lv_free(fade_mask_top);
lv_free(fade_mask_bottom);
mask_top_id = -1;
mask_bottom_id = -1;
}