mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
Adding dependency check to oject types
This commit is contained in:
parent
5e0fffda16
commit
3d399ad842
@ -51,6 +51,7 @@ static void (*map_fp)(const area_t * cords_p, const area_t * mask_p, const color
|
||||
#endif
|
||||
|
||||
|
||||
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
|
||||
static lv_rects_t lv_img_no_pic_rects = {
|
||||
.objs.color = COLOR_BLACK, .gcolor = COLOR_BLACK,
|
||||
.bcolor = COLOR_RED, .bwidth = 2 * LV_DOWNSCALE, .bopa = 100,
|
||||
@ -62,6 +63,7 @@ static lv_labels_t lv_img_no_pic_labels = {
|
||||
.letter_space = 1 * LV_DOWNSCALE, .line_space = 1 * LV_DOWNSCALE,
|
||||
.mid = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -157,6 +159,7 @@ void lv_draw_label(const area_t * cords_p,const area_t * mask_p,
|
||||
}
|
||||
|
||||
|
||||
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
|
||||
/**
|
||||
* Draw an image
|
||||
* @param cords_p the coordinates of the image
|
||||
@ -241,7 +244,7 @@ void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Draw a line
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include "../lv_objx/lv_img.h"
|
||||
#include "../lv_objx/lv_label.h"
|
||||
|
||||
#include "misc_conf.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
@ -32,8 +34,11 @@ void lv_draw_label(const area_t * cords_p,const area_t * mask_p,
|
||||
const lv_labels_t * labels_p, opa_t opa, const char * txt);
|
||||
void lv_draw_line(const point_t * p1, const point_t * p2, const area_t * mask_p,
|
||||
const lv_lines_t * lines_p, opa_t opa);
|
||||
|
||||
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
|
||||
void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
|
||||
const lv_imgs_t * imgs_p, opa_t opa, const char * fn);
|
||||
#endif
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
@ -136,7 +136,7 @@ void lv_rmap(const area_t * cords_p, const area_t * mask_p,
|
||||
map_p += map_width;
|
||||
}
|
||||
}else {
|
||||
color_t transp_color = LV_IMG_COLOR_TRANSP;
|
||||
color_t transp_color = LV_COLOR_TRANSP;
|
||||
cord_t row;
|
||||
for(row = 0; row < area_get_height(&masked_a); row++) {
|
||||
cord_t col;
|
||||
|
@ -228,7 +228,7 @@ void lv_vmap(const area_t * cords_p, const area_t * mask_p,
|
||||
cord_t row;
|
||||
cord_t col;
|
||||
cord_t row_cnt = 0;
|
||||
color_t transp_color = LV_IMG_COLOR_TRANSP;
|
||||
color_t transp_color = LV_COLOR_TRANSP;
|
||||
color_t color_tmp;
|
||||
cord_t map_i;
|
||||
map_p -= map_width; /*Compensate the first row % LV_DOWNSCALE*/
|
||||
@ -278,7 +278,7 @@ void lv_vmap(const area_t * cords_p, const area_t * mask_p,
|
||||
} else { /*transp == true: Check all pixels */
|
||||
cord_t row;
|
||||
cord_t col;
|
||||
color_t transp_color = LV_IMG_COLOR_TRANSP;
|
||||
color_t transp_color = LV_COLOR_TRANSP;
|
||||
|
||||
if(recolor_opa == OPA_TRANSP)/*No recolor*/
|
||||
{
|
||||
|
@ -12,6 +12,11 @@
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_BTN != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if USE_LV_RECT == 0
|
||||
#error "lv_btn: lv_rect is required. Enable it in lv_conf.h (USE_LV_RECT 1) "
|
||||
#endif
|
||||
|
||||
#include "lv_rect.h"
|
||||
#include "../lv_obj/lv_dispi.h"
|
||||
|
||||
|
@ -13,6 +13,15 @@
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_BTNM != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if USE_LV_RECT == 0
|
||||
#error "lv_btnm: lv_rect is required. Enable it in lv_conf.h (USE_LV_RECT 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_BTN == 0
|
||||
#error "lv_btnm: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) "
|
||||
#endif
|
||||
|
||||
#include "../lv_obj/lv_obj.h"
|
||||
#include "lv_rect.h"
|
||||
#include "lv_label.h"
|
||||
|
@ -11,6 +11,14 @@
|
||||
*********************/
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_CB != 0
|
||||
/*Testing of dependencies*/
|
||||
#if USE_LV_BTN == 0
|
||||
#error "lv_cb: lv_rect is required. Enable it in lv_conf.h (USE_LV_BTN 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_LABEL == 0
|
||||
#error "lv_cb: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) "
|
||||
#endif
|
||||
|
||||
#include "../lv_obj/lv_obj.h"
|
||||
#include "lv_btn.h"
|
||||
|
@ -12,6 +12,15 @@
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_CHART != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if USE_LV_RECT == 0
|
||||
#error "lv_chart: lv_rect is required. Enable it in lv_conf.h (USE_LV_RECT 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_LINE == 0
|
||||
#error "lv_chart: lv_line is required. Enable it in lv_conf.h (USE_LV_LINE 1) "
|
||||
#endif
|
||||
|
||||
#include "../lv_obj/lv_obj.h"
|
||||
#include "lv_rect.h"
|
||||
#include "lv_line.h"
|
||||
|
@ -7,7 +7,8 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_IMG != 0
|
||||
#include "misc_conf.h"
|
||||
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
|
||||
|
||||
#include "lv_img.h"
|
||||
#include "../lv_draw/lv_draw.h"
|
||||
|
@ -10,7 +10,8 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_IMG != 0
|
||||
#include "misc_conf.h"
|
||||
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
|
||||
|
||||
#include "../lv_obj/lv_obj.h"
|
||||
#include "misc/fs/fsint.h"
|
||||
|
@ -12,6 +12,11 @@
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_LED != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if USE_LV_RECT == 0
|
||||
#error "lv_led: lv_rect is required. Enable it in lv_conf.h (USE_LV_RECT 1) "
|
||||
#endif
|
||||
|
||||
#include "../lv_obj/lv_obj.h"
|
||||
|
||||
/*********************
|
||||
|
@ -12,6 +12,19 @@
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_LIST != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if USE_LV_BTN == 0
|
||||
#error "lv_list: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_LABEL == 0
|
||||
#error "lv_list: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_IMG == 0
|
||||
#error "lv_list: lv_img is required. Enable it in lv_conf.h (USE_LV_IMG 1) "
|
||||
#endif
|
||||
|
||||
#include "../lv_obj/lv_obj.h"
|
||||
#include "lv_page.h"
|
||||
#include "lv_btn.h"
|
||||
|
@ -12,6 +12,20 @@
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_MBOX != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if USE_LV_RECT == 0
|
||||
#error "lv_mbox: lv_rect is required. Enable it in lv_conf.h (USE_LV_RECT 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_BTN == 0
|
||||
#error "lv_mbox: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_LABEL == 0
|
||||
#error "lv_mbox: lv_rlabel is required. Enable it in lv_conf.h (USE_LV_LABEL 1) "
|
||||
#endif
|
||||
|
||||
|
||||
#include "../lv_obj/lv_obj.h"
|
||||
#include "lv_rect.h"
|
||||
#include "lv_btn.h"
|
||||
|
@ -12,6 +12,11 @@
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_PAGE != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if USE_LV_RECT == 0
|
||||
#error "lv_page: lv_rect is required. Enable it in lv_conf.h (USE_LV_RECT 1) "
|
||||
#endif
|
||||
|
||||
#include "../lv_obj/lv_obj.h"
|
||||
#include "lv_rect.h"
|
||||
|
||||
|
@ -12,6 +12,15 @@
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_PB != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if USE_LV_RECT == 0
|
||||
#error "lv_pb: lv_rect is required. Enable it in lv_conf.h (USE_LV_RECT 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_LABEL == 0
|
||||
#error "lv_pb: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) "
|
||||
#endif
|
||||
|
||||
#include "../lv_obj/lv_obj.h"
|
||||
#include "lv_rect.h"
|
||||
#include "lv_label.h"
|
||||
|
@ -12,6 +12,15 @@
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_TA != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if USE_LV_PAGE == 0
|
||||
#error "lv_ta: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_LABEL == 0
|
||||
#error "lv_ta: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) "
|
||||
#endif
|
||||
|
||||
#include "../lv_obj/lv_obj.h"
|
||||
#include "lv_page.h"
|
||||
#include "lv_label.h"
|
||||
|
@ -12,6 +12,31 @@
|
||||
#include "lv_conf.h"
|
||||
#if USE_LV_WIN != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if USE_LV_RECT == 0
|
||||
#error "lv_win: lv_rect is required. Enable it in lv_conf.h (USE_LV_RECT 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_BTN == 0
|
||||
#error "lv_win: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_LABEL == 0
|
||||
#error "lv_win: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_IMG == 0
|
||||
#error "lv_win: lv_img is required. Enable it in lv_conf.h (USE_LV_IMG 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_PAGE == 0
|
||||
#error "lv_win: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) "
|
||||
#endif
|
||||
|
||||
#if USE_LV_PAGE == 0
|
||||
#error "lv_win: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) "
|
||||
#endif
|
||||
|
||||
#include "../lv_obj/lv_obj.h"
|
||||
#include "lv_rect.h"
|
||||
#include "lv_btn.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user