misc is completly removed

This commit is contained in:
Gabor Kiss-Vamosi
2017-11-26 11:38:28 +01:00
parent a8ceb6bcaf
commit c48a521882
152 changed files with 256 additions and 456 deletions

View File

@@ -55,14 +55,14 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor basic object*/
lv_obj_t * new_bar = lv_obj_create(par, copy);
dm_assert(new_bar);
lv_mem_assert(new_bar);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_bar);
if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_bar);
/*Allocate the object type specific extended data*/
lv_bar_ext_t * ext = lv_obj_allocate_ext_attr(new_bar, sizeof(lv_bar_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->min_value = 0;
ext->max_value = 100;
ext->cur_value = 0;

View File

@@ -55,12 +55,12 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_t * new_btn;
new_btn = lv_cont_create(par, copy);
dm_assert(new_btn);
lv_mem_assert(new_btn);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_btn);
/*Allocate the extended data*/
lv_btn_ext_t * ext = lv_obj_allocate_ext_attr(new_btn, sizeof(lv_btn_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->state = LV_BTN_STATE_REL;
ext->actions[LV_BTN_ACTION_PR] = NULL;

View File

@@ -66,12 +66,12 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor object*/
lv_obj_t * new_btnm = lv_obj_create(par, copy);
dm_assert(new_btnm);
lv_mem_assert(new_btnm);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_btnm);
/*Allocate the object type specific extended data*/
lv_btnm_ext_t * ext = lv_obj_allocate_ext_attr(new_btnm, sizeof(lv_btnm_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->btn_cnt = 0;
ext->btn_id_pr = LV_BTNM_PR_NONE;
ext->btn_id_tgl = LV_BTNM_PR_NONE;

View File

@@ -53,12 +53,12 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor basic object*/
lv_obj_t * new_cb = lv_btn_create(par, copy);
dm_assert(new_cb);
lv_mem_assert(new_cb);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_cb);
if(ancestor_bg_design == NULL) ancestor_bg_design = lv_obj_get_design_func(new_cb);
lv_cb_ext_t * ext = lv_obj_allocate_ext_attr(new_cb, sizeof(lv_cb_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->bullet = NULL;
ext->label = NULL;

View File

@@ -60,11 +60,11 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor basic object*/
lv_obj_t * new_chart = lv_obj_create(par, copy);
dm_assert(new_chart);
lv_mem_assert(new_chart);
/*Allocate the object type specific extended data*/
lv_chart_ext_t * ext = lv_obj_allocate_ext_attr(new_chart, sizeof(lv_chart_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
lv_ll_init(&ext->series_ll, sizeof(lv_chart_series_t));
ext->series.num = 0;
ext->ymin = LV_CHART_YMIN_DEF;

View File

@@ -65,12 +65,12 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create a basic object*/
lv_obj_t * new_cont = lv_obj_create(par, copy);
dm_assert(new_cont);
lv_mem_assert(new_cont);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_cont);
lv_obj_allocate_ext_attr(new_cont, sizeof(lv_cont_ext_t));
lv_cont_ext_t * ext = lv_obj_get_ext_attr(new_cont);
dm_assert(ext);
lv_mem_assert(ext);
ext->hor_fit = 0;
ext->ver_fit = 0;
ext->layout = LV_LAYOUT_OFF;

View File

@@ -61,14 +61,14 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor drop down list*/
lv_obj_t * new_ddlist = lv_page_create(par, copy);
dm_assert(new_ddlist);
lv_mem_assert(new_ddlist);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_ddlist);
if(ancestor_scrl_signal == NULL) ancestor_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_ddlist));
if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_ddlist);
/*Allocate the drop down list type specific extended data*/
lv_ddlist_ext_t * ext = lv_obj_allocate_ext_attr(new_ddlist, sizeof(lv_ddlist_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
/*Initialize the allocated 'ext' */
ext->label = NULL;

View File

@@ -13,7 +13,7 @@
#include "lv_gauge.h"
#include "../lv_draw/lv_draw.h"
#include "../lv_themes/lv_theme.h"
#include <lvgl/lv_misc/lv_txt.h>
#include "../lv_misc/lv_txt.h"
#include "../lv_misc/lv_trigo.h"
#include "../lv_misc/lv_math.h"
#include <stdio.h>
@@ -64,11 +64,11 @@ lv_obj_t * lv_gauge_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor gauge*/
lv_obj_t * new_gauge = lv_lmeter_create(par, copy);
dm_assert(new_gauge);
lv_mem_assert(new_gauge);
/*Allocate the gauge type specific extended data*/
lv_gauge_ext_t * ext = lv_obj_allocate_ext_attr(new_gauge, sizeof(lv_gauge_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
/*Initialize the allocated 'ext' */
ext->needle_count = 0;

View File

@@ -14,7 +14,6 @@ extern "C" {
* INCLUDES
*********************/
#include "lv_conf.h"
#include "misc_conf.h"
#if USE_LV_GAUGE != 0
/*Testing of dependencies*/
@@ -22,11 +21,6 @@ extern "C" {
#error "lv_gauge: lv_lmeter is required. Enable it in lv_conf.h (USE_LV_LMETER 1) "
#endif
#if USE_TRIGO == 0
#error "lv_gauge: trigo is required. Enable it in misc_conf.h (USE_TRIGO 1) "
#endif
#include "../lv_obj/lv_obj.h"
#include "lv_lmeter.h"
#include "lv_label.h"

View File

@@ -7,15 +7,14 @@
* INCLUDES
*********************/
#include "lv_conf.h"
#include "misc_conf.h"
#if USE_LV_IMG != 0 && USE_FSINT != 0
#if USE_LV_IMG != 0
#include "lv_img.h"
#include "../lv_draw/lv_draw.h"
#include "../lv_themes/lv_theme.h"
#include "../lv_misc/lv_fs.h"
#include "../lv_misc/lv_ufs.h"
#include <lvgl/lv_misc/lv_txt.h>
#include "../lv_misc/lv_txt.h"
/*********************
* DEFINES
@@ -57,12 +56,12 @@ lv_obj_t * lv_img_create(lv_obj_t * par, lv_obj_t * copy)
/*Create a basic object*/
new_img = lv_obj_create(par, copy);
dm_assert(new_img);
lv_mem_assert(new_img);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_img);
/*Extend the basic object to image object*/
lv_img_ext_t * ext = lv_obj_allocate_ext_attr(new_img, sizeof(lv_img_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->fn = NULL;
ext->w = lv_obj_get_width(new_img);
ext->h = lv_obj_get_height(new_img);
@@ -103,15 +102,11 @@ lv_obj_t * lv_img_create(lv_obj_t * par, lv_obj_t * copy)
*/
lv_fs_res_t lv_img_create_file(const char * fn, const color_int_t * data)
{
#if USE_UFS != 0
const lv_img_raw_header_t * raw_p = (lv_img_raw_header_t *) data;
lv_fs_res_t res;
res = lv_ufs_create_const(fn, data, raw_p->w * raw_p->h * sizeof(lv_color_t) + sizeof(lv_img_raw_header_t));
return res;
#else
return FS_RES_NOT_EX;
#endif
}
/*=====================

View File

@@ -14,20 +14,12 @@ extern "C" {
* INCLUDES
*********************/
#include "lv_conf.h"
#include "misc_conf.h"
#if USE_LV_IMG != 0 && USE_FSINT != 0
#if USE_LV_IMG != 0
#include "../lv_obj/lv_obj.h"
#include "../lv_misc/lv_fs.h"
#ifndef LV_IMG_ENABLE_SYMBOLS
#define LV_IMG_ENABLE_SYMBOLS 0
#endif
#if LV_IMG_ENABLE_SYMBOLS != 0
#include "lv_label.h"
#include "../lv_misc/lv_fonts/symbol_def.h"
#endif
#include "lv_label.h"
/*********************
* DEFINES

View File

@@ -78,12 +78,12 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor of keyboard*/
lv_obj_t * new_kb = lv_btnm_create(par, copy);
dm_assert(new_kb);
lv_mem_assert(new_kb);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_kb);
/*Allocate the keyboard type specific extended data*/
lv_kb_ext_t * ext = lv_obj_allocate_ext_attr(new_kb, sizeof(lv_kb_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
/*Initialize the allocated 'ext' */

View File

@@ -68,14 +68,14 @@ lv_obj_t * lv_label_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create a basic object*/
lv_obj_t * new_label = lv_obj_create(par, copy);
dm_assert(new_label);
lv_mem_assert(new_label);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_label);
/*Extend the basic object to a label object*/
lv_obj_allocate_ext_attr(new_label, sizeof(lv_label_ext_t));
lv_label_ext_t * ext = lv_obj_get_ext_attr(new_label);
dm_assert(ext);
lv_mem_assert(ext);
ext->text = NULL;
ext->static_txt = 0;
ext->recolor = 0;

View File

@@ -55,13 +55,13 @@ lv_obj_t * lv_led_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor basic object*/
lv_obj_t * new_led = lv_obj_create(par, copy);
dm_assert(new_led);
lv_mem_assert(new_led);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_led);
if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_led);
/*Allocate the object type specific extended data*/
lv_led_ext_t * ext = lv_obj_allocate_ext_attr(new_led, sizeof(lv_led_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->bright = LV_LED_BRIGHT_ON;
lv_obj_set_signal_func(new_led, lv_led_signal);

View File

@@ -53,12 +53,12 @@ lv_obj_t * lv_line_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create a basic object*/
lv_obj_t * new_line = lv_obj_create(par, copy);
dm_assert(new_line);
lv_mem_assert(new_line);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_line);
/*Extend the basic object to line object*/
lv_line_ext_t * ext = lv_obj_allocate_ext_attr(new_line, sizeof(lv_line_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->point_num = 0;
ext->point_array = NULL;
ext->auto_size = 1;

View File

@@ -60,11 +60,11 @@ lv_obj_t * lv_list_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor basic object*/
lv_obj_t * new_list = lv_page_create(par, copy);
dm_assert(new_list);
lv_mem_assert(new_list);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_list);
lv_list_ext_t * ext = lv_obj_allocate_ext_attr(new_list, sizeof(lv_list_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->style_img = NULL;
ext->styles_btn[LV_BTN_STATE_REL] = &lv_style_btn_rel;

View File

@@ -52,12 +52,12 @@ lv_obj_t * lv_lmeter_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor of line meter*/
lv_obj_t * new_lmeter = lv_obj_create(par, copy);
dm_assert(new_lmeter);
lv_mem_assert(new_lmeter);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_lmeter);
/*Allocate the line meter type specific extended data*/
lv_lmeter_ext_t * ext = lv_obj_allocate_ext_attr(new_lmeter, sizeof(lv_lmeter_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
/*Initialize the allocated 'ext' */
ext->min_value = 0;

View File

@@ -14,15 +14,8 @@ extern "C" {
* INCLUDES
*********************/
#include "lv_conf.h"
#include "misc_conf.h"
#if USE_LV_LMETER != 0
/*Testing of dependencies*/
#if USE_TRIGO == 0
#error "lv_lmeter: trigo is required. Enable it in misc_conf.h (USE_TRIGO 1) "
#endif
#include "../lv_obj/lv_obj.h"
/*********************

View File

@@ -55,12 +55,12 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor message box*/
lv_obj_t * new_mbox = lv_cont_create(par, copy);
dm_assert(new_mbox);
lv_mem_assert(new_mbox);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_mbox);
/*Allocate the message box type specific extended data*/
lv_mbox_ext_t * ext = lv_obj_allocate_ext_attr(new_mbox, sizeof(lv_mbox_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->text = NULL;
ext->btnm = NULL;
ext->anim_time = LV_MBOX_CLOSE_ANIM_TIME;

View File

@@ -59,13 +59,13 @@ lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor object*/
lv_obj_t * new_page = lv_cont_create(par, copy);
dm_assert(new_page);
lv_mem_assert(new_page);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_page);
if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_page);
/*Allocate the object type specific extended data*/
lv_page_ext_t * ext = lv_obj_allocate_ext_attr(new_page, sizeof(lv_page_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->scrl = NULL;
ext->pr_action = NULL;
ext->rel_action = NULL;

View File

@@ -55,13 +55,13 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor of roller*/
lv_obj_t * new_roller = lv_ddlist_create(par, copy);
dm_assert(new_roller);
lv_mem_assert(new_roller);
if(ancestor_scrl_signal == NULL) ancestor_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_roller));
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_roller);
/*Allocate the roller type specific extended data*/
lv_roller_ext_t * ext = lv_obj_allocate_ext_attr(new_roller, sizeof(lv_roller_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
/*The signal and design functions are not copied so set them here*/
lv_obj_set_signal_func(new_roller, lv_roller_signal);

View File

@@ -55,14 +55,14 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor slider*/
lv_obj_t * new_slider = lv_bar_create(par, copy);
dm_assert(new_slider);
lv_mem_assert(new_slider);
if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_slider);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_slider);
/*Allocate the slider type specific extended data*/
lv_slider_ext_t * ext = lv_obj_allocate_ext_attr(new_slider, sizeof(lv_slider_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
/*Initialize the allocated 'ext' */
ext->action = NULL;

View File

@@ -48,13 +48,13 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor of switch*/
lv_obj_t * new_sw = lv_slider_create(par, copy);
dm_assert(new_sw);
lv_mem_assert(new_sw);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_sw);
/*Allocate the switch type specific extended data*/
lv_sw_ext_t * ext = lv_obj_allocate_ext_attr(new_sw, sizeof(lv_sw_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
/*Initialize the allocated 'ext' */
ext->changed = 0;

View File

@@ -75,7 +75,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor object*/
lv_obj_t * new_ta = lv_page_create(par, copy);
dm_assert(new_ta);
lv_mem_assert(new_ta);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_ta);
if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_ta);
if(scrl_signal == NULL) scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_ta));
@@ -83,7 +83,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, lv_obj_t * copy)
/*Allocate the object type specific extended data*/
lv_ta_ext_t * ext = lv_obj_allocate_ext_attr(new_ta, sizeof(lv_ta_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->cursor.state = 0;
ext->pwd_mode = 0;
ext->pwd_tmp = NULL;
@@ -180,7 +180,7 @@ void lv_ta_add_char(lv_obj_t * ta, char c)
if(ext->pwd_mode != 0) {
ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + 2); /*+2: the new char + \0 */
dm_assert(ext->pwd_tmp);
lv_mem_assert(ext->pwd_tmp);
lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, letter_buf);
lv_anim_t a;
@@ -219,7 +219,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt)
lv_label_ins_text(ext->label, ext->cursor.pos, txt);
if(ext->pwd_mode != 0) {
ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + strlen(txt) + 1);
dm_assert(ext->pwd_tmp);
lv_mem_assert(ext->pwd_tmp);
lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, txt);
@@ -274,7 +274,7 @@ void lv_ta_del_char(lv_obj_t * ta)
lv_txt_cut(ext->pwd_tmp, ext->cursor.pos - 1, lv_txt_utf8_size(label_txt[byte_pos]));
#endif
ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + 1);
dm_assert(ext->pwd_tmp);
lv_mem_assert(ext->pwd_tmp);
}
/*Move the cursor to the place of the deleted character*/

View File

@@ -61,12 +61,12 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor of tab*/
lv_obj_t * new_tabview = lv_obj_create(par, copy);
dm_assert(new_tabview);
lv_mem_assert(new_tabview);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_tabview);
/*Allocate the tab type specific extended data*/
lv_tabview_ext_t * ext = lv_obj_allocate_ext_attr(new_tabview, sizeof(lv_tabview_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
/*Initialize the allocated 'ext' */
ext->drag_hor = 0;

View File

@@ -49,12 +49,12 @@ lv_obj_t * lv_win_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor object*/
lv_obj_t * new_win = lv_obj_create(par, copy);
dm_assert(new_win);
lv_mem_assert(new_win);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_win);
/*Allocate the object type specific extended data*/
lv_win_ext_t * ext = lv_obj_allocate_ext_attr(new_win, sizeof(lv_win_ext_t));
dm_assert(ext);
lv_mem_assert(ext);
ext->page = NULL;
ext->header = NULL;
ext->title = NULL;