add some more logs
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/*********************
|
/*********************
|
||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
#include "lv_flex.h"
|
#include "../lv_layouts.h"
|
||||||
|
|
||||||
#if LV_USE_FLEX
|
#if LV_USE_FLEX
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@ static void flex_update(lv_obj_t * cont, lv_obj_t * item)
|
|||||||
if(cont->spec_attr == NULL) return;
|
if(cont->spec_attr == NULL) return;
|
||||||
const lv_flex_t * f = (const lv_flex_t *)cont->spec_attr->layout_dsc;
|
const lv_flex_t * f = (const lv_flex_t *)cont->spec_attr->layout_dsc;
|
||||||
|
|
||||||
LV_LOG_INFO("Flex update on 0x%p triggered by 0x%p", cont, item);
|
LV_LOG_INFO("update 0x%p container, triggered by 0x%p", cont, item);
|
||||||
|
|
||||||
bool rtl = lv_obj_get_base_dir(cont) == LV_BIDI_DIR_RTL ? true : false;
|
bool rtl = lv_obj_get_base_dir(cont) == LV_BIDI_DIR_RTL ? true : false;
|
||||||
bool row = f->dir == LV_FLEX_FLOW_ROW ? true : false;
|
bool row = f->dir == LV_FLEX_FLOW_ROW ? true : false;
|
||||||
@@ -245,7 +245,7 @@ static void flex_update(lv_obj_t * cont, lv_obj_t * item)
|
|||||||
lv_obj_set_size(cont, cont->w_set, cont->h_set);
|
lv_obj_set_size(cont, cont->w_set, cont->h_set);
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_LAYOUT("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
/*********************
|
/*********************
|
||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
#include "lv_grid.h"
|
#include "../lv_layouts.h"
|
||||||
|
|
||||||
#if LV_USE_GRID
|
#if LV_USE_GRID
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
@@ -122,12 +123,12 @@ static void grid_update(lv_obj_t * cont, lv_obj_t * item)
|
|||||||
if(cont->spec_attr == NULL) return;
|
if(cont->spec_attr == NULL) return;
|
||||||
if(cont->spec_attr->layout_dsc == NULL) return;
|
if(cont->spec_attr->layout_dsc == NULL) return;
|
||||||
|
|
||||||
LV_LOG_INFO("Grid update on 0x%p. Triggered by 0x%p", cont, item);
|
LV_LOG_INFO("update 0x%p container, triggered by 0x%p", cont, item);
|
||||||
|
|
||||||
if(item) item_refr(item);
|
if(item) item_refr(item);
|
||||||
else full_refresh(cont);
|
else full_refresh(cont);
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_LAYOUT("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ extern "C" {
|
|||||||
#include "flex/lv_flex.h"
|
#include "flex/lv_flex.h"
|
||||||
#include "grid/lv_grid.h"
|
#include "grid/lv_grid.h"
|
||||||
|
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
@@ -32,6 +31,11 @@ extern "C" {
|
|||||||
/**********************
|
/**********************
|
||||||
* MACROS
|
* MACROS
|
||||||
**********************/
|
**********************/
|
||||||
|
#if LV_LOG_TRACE_LAYOUT
|
||||||
|
# define LV_TRACE_LAYOUT(...) LV_LOG_TRACE( __VA_ARGS__)
|
||||||
|
#else
|
||||||
|
# define LV_TRACE_LAYOUT(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
|||||||
@@ -479,8 +479,8 @@ static void style_init(void)
|
|||||||
lv_style_set_border_width(&styles->list_btn, LV_DPX(1));
|
lv_style_set_border_width(&styles->list_btn, LV_DPX(1));
|
||||||
lv_style_set_border_color(&styles->list_btn, color_primary_muted);
|
lv_style_set_border_color(&styles->list_btn, color_primary_muted);
|
||||||
lv_style_set_border_side(&styles->list_btn, LV_BORDER_SIDE_BOTTOM);
|
lv_style_set_border_side(&styles->list_btn, LV_BORDER_SIDE_BOTTOM);
|
||||||
lv_style_set_pad_all(&styles->list_btn, PAD_DEF);
|
lv_style_set_pad_all(&styles->list_btn, PAD_SMALL);
|
||||||
lv_style_set_pad_column(&styles->list_btn, PAD_DEF);
|
lv_style_set_pad_column(&styles->list_btn, PAD_SMALL);
|
||||||
|
|
||||||
style_init_reset(&styles->list_item_grow);
|
style_init_reset(&styles->list_item_grow);
|
||||||
lv_style_set_transform_width(&styles->list_item_grow, PAD_DEF);
|
lv_style_set_transform_width(&styles->list_item_grow, PAD_DEF);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_letter(const lv_point_t * pos_p, const
|
|||||||
LV_ATTRIBUTE_FAST_MEM static void draw_letter_normal(lv_coord_t pos_x, lv_coord_t pos_y, lv_font_glyph_dsc_t * g,
|
LV_ATTRIBUTE_FAST_MEM static void draw_letter_normal(lv_coord_t pos_x, lv_coord_t pos_y, lv_font_glyph_dsc_t * g,
|
||||||
const lv_area_t * clip_area,
|
const lv_area_t * clip_area,
|
||||||
const uint8_t * map_p, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode);
|
const uint8_t * map_p, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode);
|
||||||
#if LV_DRAW_COMPLEX
|
#if LV_DRAW_COMPLEX && LV_USE_FONT_SUBPX
|
||||||
static void draw_letter_subpx(lv_coord_t pos_x, lv_coord_t pos_y, lv_font_glyph_dsc_t * g, const lv_area_t * clip_area,
|
static void draw_letter_subpx(lv_coord_t pos_x, lv_coord_t pos_y, lv_font_glyph_dsc_t * g, const lv_area_t * clip_area,
|
||||||
const uint8_t * map_p, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode);
|
const uint8_t * map_p, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode);
|
||||||
#endif
|
#endif
|
||||||
@@ -442,7 +442,7 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_letter(const lv_point_t * pos_p, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(font_p->subpx) {
|
if(font_p->subpx) {
|
||||||
#if LV_DRAW_COMPLEX
|
#if LV_DRAW_COMPLEX && LV_USE_FONT_SUBPX
|
||||||
draw_letter_subpx(pos_x, pos_y, &g, clip_area, map_p, color, opa, blend_mode);
|
draw_letter_subpx(pos_x, pos_y, &g, clip_area, map_p, color, opa, blend_mode);
|
||||||
#else
|
#else
|
||||||
LV_LOG_WARN("Can't draw sub-pixel rendered letter because LV_USE_FONT_SUBPX == 0 in lv_conf.h");
|
LV_LOG_WARN("Can't draw sub-pixel rendered letter because LV_USE_FONT_SUBPX == 0 in lv_conf.h");
|
||||||
@@ -611,7 +611,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_letter_normal(lv_coord_t pos_x, lv_coord_
|
|||||||
lv_mem_buf_release(mask_buf);
|
lv_mem_buf_release(mask_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LV_DRAW_COMPLEX
|
#if LV_DRAW_COMPLEX && LV_USE_FONT_SUBPX
|
||||||
static void draw_letter_subpx(lv_coord_t pos_x, lv_coord_t pos_y, lv_font_glyph_dsc_t * g, const lv_area_t * clip_area,
|
static void draw_letter_subpx(lv_coord_t pos_x, lv_coord_t pos_y, lv_font_glyph_dsc_t * g, const lv_area_t * clip_area,
|
||||||
const uint8_t * map_p, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode)
|
const uint8_t * map_p, lv_color_t color, lv_opa_t opa, lv_blend_mode_t blend_mode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ void lv_img_buf_free(lv_img_dsc_t * dsc)
|
|||||||
{
|
{
|
||||||
if(dsc != NULL) {
|
if(dsc != NULL) {
|
||||||
if(dsc->data != NULL)
|
if(dsc->data != NULL)
|
||||||
lv_mem_free(dsc->data);
|
lv_mem_free((void*)dsc->data);
|
||||||
|
|
||||||
lv_mem_free(dsc);
|
lv_mem_free(dsc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, lv_co
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(dsc->src_type == LV_IMG_SRC_FILE)
|
if(dsc->src_type == LV_IMG_SRC_FILE)
|
||||||
lv_mem_free(dsc->src);
|
lv_mem_free((void*)dsc->src);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -187,7 +187,7 @@ void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc)
|
|||||||
if(dsc->decoder->close_cb) dsc->decoder->close_cb(dsc->decoder, dsc);
|
if(dsc->decoder->close_cb) dsc->decoder->close_cb(dsc->decoder, dsc);
|
||||||
|
|
||||||
if(dsc->src_type == LV_IMG_SRC_FILE) {
|
if(dsc->src_type == LV_IMG_SRC_FILE) {
|
||||||
lv_mem_free(dsc->src);
|
lv_mem_free((void*)dsc->src);
|
||||||
dsc->src = NULL;
|
dsc->src = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,12 @@ const lv_anim_path_t lv_anim_path_def = {.cb = lv_anim_path_linear};
|
|||||||
/**********************
|
/**********************
|
||||||
* MACROS
|
* MACROS
|
||||||
**********************/
|
**********************/
|
||||||
|
#if LV_LOG_TRACE_ANIM
|
||||||
|
# define TRACE_ANIM(...) LV_LOG_TRACE( __VA_ARGS__)
|
||||||
|
#else
|
||||||
|
# define TRACE_ANIM(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* GLOBAL FUNCTIONS
|
* GLOBAL FUNCTIONS
|
||||||
@@ -85,7 +91,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("begin");
|
TRACE_ANIM("begin");
|
||||||
/* 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*/
|
||||||
|
|
||||||
@@ -113,7 +119,7 @@ void lv_anim_start(lv_anim_t * a)
|
|||||||
* It's important if it happens in a ready callback. (see `anim_task`)*/
|
* It's important if it happens in a ready callback. (see `anim_task`)*/
|
||||||
anim_mark_list_change();
|
anim_mark_list_change();
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
TRACE_ANIM("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -483,7 +483,7 @@ lv_arc_type_t lv_arc_get_type(const lv_obj_t * obj)
|
|||||||
|
|
||||||
static void lv_arc_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_arc_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_arc_t * arc = (lv_arc_t *)obj;
|
lv_arc_t * arc = (lv_arc_t *)obj;
|
||||||
|
|
||||||
@@ -527,6 +527,7 @@ static void lv_arc_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
arc->last_angle = copy_arc->last_angle;
|
arc->last_angle = copy_arc->last_angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static lv_draw_res_t lv_arc_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
static lv_draw_res_t lv_arc_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ lv_bar_type_t lv_bar_get_type(lv_obj_t * obj)
|
|||||||
|
|
||||||
static void lv_bar_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_bar_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_bar_t * bar = (lv_bar_t *)obj;
|
lv_bar_t * bar = (lv_bar_t *)obj;
|
||||||
bar->min_value = 0;
|
bar->min_value = 0;
|
||||||
@@ -229,7 +229,7 @@ static void lv_bar_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
|
|
||||||
lv_bar_set_value(obj, bar->cur_value, LV_ANIM_OFF);
|
lv_bar_set_value(obj, bar->cur_value, LV_ANIM_OFF);
|
||||||
}
|
}
|
||||||
LV_LOG_TRACE("finshed");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lv_bar_destructor(lv_obj_t * obj)
|
static void lv_bar_destructor(lv_obj_t * obj)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ lv_obj_t * lv_btn_create(lv_obj_t * parent, const lv_obj_t * copy)
|
|||||||
|
|
||||||
static void lv_btn_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_btn_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
if(copy == NULL) {
|
if(copy == NULL) {
|
||||||
lv_obj_set_size(obj, LV_DPI_DEF, LV_DPI_DEF / 3);
|
lv_obj_set_size(obj, LV_DPI_DEF, LV_DPI_DEF / 3);
|
||||||
@@ -61,7 +61,7 @@ static void lv_btn_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
|
lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -895,7 +895,7 @@ void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_
|
|||||||
static void lv_canvas_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_canvas_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_UNUSED(copy);
|
LV_UNUSED(copy);
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_canvas_t * canvas = (lv_canvas_t *) obj;
|
lv_canvas_t * canvas = (lv_canvas_t *) obj;
|
||||||
|
|
||||||
@@ -909,7 +909,7 @@ static void lv_canvas_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
|
|
||||||
lv_img_set_src(obj, &canvas->dsc);
|
lv_img_set_src(obj, &canvas->dsc);
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_set_px_cb(lv_disp_drv_t * disp_drv, lv_img_cf_t cf)
|
static void set_set_px_cb(lv_disp_drv_t * disp_drv, lv_img_cf_t cf)
|
||||||
|
|||||||
@@ -496,7 +496,7 @@ int32_t lv_chart_get_pressed_point(const lv_obj_t * obj)
|
|||||||
|
|
||||||
static void lv_chart_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_chart_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_chart_t * chart = (lv_chart_t *) obj;
|
lv_chart_t * chart = (lv_chart_t *) obj;
|
||||||
|
|
||||||
@@ -530,7 +530,7 @@ static void lv_chart_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
lv_memcpy_small(chart->ymin, chart_copy->ymin, sizeof(chart->ymin));
|
lv_memcpy_small(chart->ymin, chart_copy->ymin, sizeof(chart->ymin));
|
||||||
lv_memcpy_small(chart->ymax, chart_copy->ymax, sizeof(chart->ymax));
|
lv_memcpy_small(chart->ymax, chart_copy->ymax, sizeof(chart->ymax));
|
||||||
}
|
}
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lv_chart_destructor(lv_obj_t * obj)
|
static void lv_chart_destructor(lv_obj_t * obj)
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ const char * lv_checkbox_get_text(const lv_obj_t * obj)
|
|||||||
|
|
||||||
static void lv_checkbox_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_checkbox_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_checkbox_t * cb = (lv_checkbox_t *) obj;
|
lv_checkbox_t * cb = (lv_checkbox_t *) obj;
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ static void lv_checkbox_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
// const lv_checkbox_t * copy_ext = (const lv_checkbox_t *)copy;
|
// const lv_checkbox_t * copy_ext = (const lv_checkbox_t *)copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lv_checkbox_destructor(lv_obj_t * obj)
|
static void lv_checkbox_destructor(lv_obj_t * obj)
|
||||||
|
|||||||
@@ -534,7 +534,7 @@ static lv_obj_t * lv_dropdown_list_create(lv_obj_t * parent, const lv_obj_t * co
|
|||||||
|
|
||||||
static void lv_dropdown_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_dropdown_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_dropdown_t * dropdown = (lv_dropdown_t *) obj;
|
lv_dropdown_t * dropdown = (lv_dropdown_t *) obj;
|
||||||
|
|
||||||
@@ -574,7 +574,7 @@ static void lv_dropdown_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
// dropdown->dir = copy_dropdown->dir;
|
// dropdown->dir = copy_dropdown->dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lv_dropdown_destructor(lv_obj_t * obj)
|
static void lv_dropdown_destructor(lv_obj_t * obj)
|
||||||
@@ -766,13 +766,13 @@ static lv_draw_res_t lv_dropdown_list_draw(lv_obj_t * list_obj, const lv_area_t
|
|||||||
|
|
||||||
static void lv_dropdown_list_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_dropdown_list_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
LV_UNUSED(copy);
|
LV_UNUSED(copy);
|
||||||
lv_obj_clear_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
|
lv_obj_clear_flag(obj, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
|
||||||
lv_label_create(obj, NULL);
|
lv_label_create(obj, NULL);
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lv_dropdown_list_destructor(lv_obj_t * list_obj)
|
static void lv_dropdown_list_destructor(lv_obj_t * list_obj)
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ void lv_img_set_src(lv_obj_t * obj, const void * src)
|
|||||||
if(src_type == LV_IMG_SRC_UNKNOWN) {
|
if(src_type == LV_IMG_SRC_UNKNOWN) {
|
||||||
LV_LOG_WARN("lv_img_set_src: unknown image type");
|
LV_LOG_WARN("lv_img_set_src: unknown image type");
|
||||||
if(img->src_type == LV_IMG_SRC_SYMBOL || img->src_type == LV_IMG_SRC_FILE) {
|
if(img->src_type == LV_IMG_SRC_SYMBOL || img->src_type == LV_IMG_SRC_FILE) {
|
||||||
lv_mem_free(img->src);
|
lv_mem_free((void*)img->src);
|
||||||
}
|
}
|
||||||
img->src = NULL;
|
img->src = NULL;
|
||||||
img->src_type = LV_IMG_SRC_UNKNOWN;
|
img->src_type = LV_IMG_SRC_UNKNOWN;
|
||||||
@@ -106,7 +106,7 @@ void lv_img_set_src(lv_obj_t * obj, const void * src)
|
|||||||
if(src_type == LV_IMG_SRC_VARIABLE) {
|
if(src_type == LV_IMG_SRC_VARIABLE) {
|
||||||
/*If memory was allocated because of the previous `src_type` then free it*/
|
/*If memory was allocated because of the previous `src_type` then free it*/
|
||||||
if(img->src_type == LV_IMG_SRC_FILE || img->src_type == LV_IMG_SRC_SYMBOL) {
|
if(img->src_type == LV_IMG_SRC_FILE || img->src_type == LV_IMG_SRC_SYMBOL) {
|
||||||
lv_mem_free(img->src);
|
lv_mem_free((void*)img->src);
|
||||||
}
|
}
|
||||||
img->src = src;
|
img->src = src;
|
||||||
}
|
}
|
||||||
@@ -126,7 +126,7 @@ void lv_img_set_src(lv_obj_t * obj, const void * src)
|
|||||||
strcpy(new_str, src);
|
strcpy(new_str, src);
|
||||||
img->src = new_str;
|
img->src = new_str;
|
||||||
|
|
||||||
if(old_src) lv_mem_free(old_src);
|
if(old_src) lv_mem_free((void*)old_src);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,7 +361,7 @@ bool lv_img_get_antialias(lv_obj_t * obj)
|
|||||||
|
|
||||||
static void lv_img_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_img_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_img_t * img = (lv_img_t *)obj;
|
lv_img_t * img = (lv_img_t *)obj;
|
||||||
|
|
||||||
@@ -397,14 +397,14 @@ static void lv_img_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
lv_img_set_src(obj, copy_img->src);
|
lv_img_set_src(obj, copy_img->src);
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lv_img_destructor(lv_obj_t * obj)
|
static void lv_img_destructor(lv_obj_t * obj)
|
||||||
{
|
{
|
||||||
lv_img_t * img = (lv_img_t *)obj;
|
lv_img_t * img = (lv_img_t *)obj;
|
||||||
if(img->src_type == LV_IMG_SRC_FILE || img->src_type == LV_IMG_SRC_SYMBOL) {
|
if(img->src_type == LV_IMG_SRC_FILE || img->src_type == LV_IMG_SRC_SYMBOL) {
|
||||||
lv_mem_free(img->src);
|
lv_mem_free((void*)img->src);
|
||||||
img->src = NULL;
|
img->src = NULL;
|
||||||
img->src_type = LV_IMG_SRC_UNKNOWN;
|
img->src_type = LV_IMG_SRC_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -695,7 +695,7 @@ void lv_label_cut_text(lv_obj_t * obj, uint32_t pos, uint32_t cnt)
|
|||||||
|
|
||||||
static void lv_label_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_label_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_label_t * label = (lv_label_t *)obj;
|
lv_label_t * label = (lv_label_t *)obj;
|
||||||
|
|
||||||
@@ -726,7 +726,7 @@ static void lv_label_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
lv_label_set_text(obj, "Text");
|
lv_label_set_text(obj, "Text");
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lv_label_destructor(lv_obj_t * obj)
|
static void lv_label_destructor(lv_obj_t * obj)
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ bool lv_line_get_y_invert(const lv_obj_t * obj)
|
|||||||
|
|
||||||
static void lv_line_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_line_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_line_t * line = (lv_line_t *) obj;
|
lv_line_t * line = (lv_line_t *) obj;
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ static void lv_line_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static lv_draw_res_t lv_line_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
static lv_draw_res_t lv_line_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ void lv_meter_set_indicator_end_value(lv_obj_t * obj, lv_meter_indicator_t * ind
|
|||||||
|
|
||||||
static void lv_meter_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_meter_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_meter_t * meter = (lv_meter_t *) obj;
|
lv_meter_t * meter = (lv_meter_t *) obj;
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ static void lv_meter_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
// meter->cur_value = copy_meter->cur_value;
|
// meter->cur_value = copy_meter->cur_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lv_meter_destructor(lv_obj_t * obj)
|
static void lv_meter_destructor(lv_obj_t * obj)
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ lv_obj_t * lv_switch_create(lv_obj_t * parent, const lv_obj_t * copy)
|
|||||||
|
|
||||||
static void lv_switch_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_switch_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
if(copy == NULL) {
|
if(copy == NULL) {
|
||||||
lv_obj_clear_flag(obj, LV_OBJ_FLAG_SCROLLABLE);
|
lv_obj_clear_flag(obj, LV_OBJ_FLAG_SCROLLABLE);
|
||||||
@@ -83,7 +83,7 @@ static void lv_switch_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
lv_obj_set_size(obj, LV_DPX(60), LV_DPX(35));
|
lv_obj_set_size(obj, LV_DPX(60), LV_DPX(35));
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static lv_draw_res_t lv_switch_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
static lv_draw_res_t lv_switch_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ void lv_table_get_selected_cell(lv_obj_t * obj, uint16_t * row, uint16_t * col)
|
|||||||
|
|
||||||
static void lv_table_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_table_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_table_t * table = (lv_table_t *) obj;
|
lv_table_t * table = (lv_table_t *) obj;
|
||||||
|
|
||||||
@@ -415,7 +415,7 @@ static void lv_table_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
lv_table_set_col_cnt(obj, copy_table->col_cnt);
|
lv_table_set_col_cnt(obj, copy_table->col_cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lv_table_destructor(lv_obj_t * obj)
|
static void lv_table_destructor(lv_obj_t * obj)
|
||||||
|
|||||||
@@ -946,7 +946,7 @@ void lv_textarea_cursor_up(lv_obj_t * obj)
|
|||||||
|
|
||||||
static void lv_textarea_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
static void lv_textarea_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
||||||
{
|
{
|
||||||
LV_LOG_TRACE("begin");
|
LV_TRACE_OBJ_CREATE("begin");
|
||||||
|
|
||||||
lv_textarea_t * ta = (lv_textarea_t *) obj;
|
lv_textarea_t * ta = (lv_textarea_t *) obj;
|
||||||
|
|
||||||
@@ -1005,7 +1005,7 @@ static void lv_textarea_constructor(lv_obj_t * obj, const lv_obj_t * copy)
|
|||||||
|
|
||||||
start_cursor_blink(obj);
|
start_cursor_blink(obj);
|
||||||
|
|
||||||
LV_LOG_TRACE("finished");
|
LV_TRACE_OBJ_CREATE("finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lv_textarea_destructor(lv_obj_t * obj)
|
static void lv_textarea_destructor(lv_obj_t * obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user