Merge branch 'dev-6.0' into ram_optim
This commit is contained in:
@@ -42,11 +42,15 @@ extern "C" {
|
||||
#error "LittlevGL: LV_ANTIALIAS can be only 0 or 1"
|
||||
#endif
|
||||
|
||||
#define LV_MAX_ANCESTOR_NUM 8
|
||||
|
||||
#define LV_ANIM_IN 0x00 /*Animation to show an object. 'OR' it with lv_anim_builtin_t*/
|
||||
#define LV_ANIM_OUT 0x80 /*Animation to hide an object. 'OR' it with lv_anim_builtin_t*/
|
||||
#define LV_ANIM_DIR_MASK 0x80 /*ANIM_IN/ANIM_OUT mask*/
|
||||
|
||||
#define LV_MAX_ANCESTOR_NUM 8
|
||||
#define LV_EXT_CLICK_AREA_OFF 0
|
||||
#define LV_EXT_CLICK_AREA_TINY 1
|
||||
#define LV_EXT_CLICK_AREA_FULL 2
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@@ -106,7 +110,7 @@ enum {
|
||||
LV_SIGNAL_CORD_CHG,
|
||||
LV_SIGNAL_PARENT_SIZE_CHG,
|
||||
LV_SIGNAL_STYLE_CHG,
|
||||
LV_SIGNAL_REFR_EXT_SIZE,
|
||||
LV_SIGNAL_REFR_EXT_DRAW_PAD,
|
||||
LV_SIGNAL_GET_TYPE,
|
||||
|
||||
_LV_SIGNAL_FEEDBACK_SECTION_START,
|
||||
@@ -156,7 +160,7 @@ enum {
|
||||
};
|
||||
typedef uint8_t lv_align_t;
|
||||
|
||||
#if LV_OBJ_REALIGN
|
||||
#if LV_USE_OBJ_REALIGN
|
||||
typedef struct
|
||||
{
|
||||
const struct _lv_obj_t * base;
|
||||
@@ -194,6 +198,16 @@ typedef struct _lv_obj_t
|
||||
#if LV_USE_GROUP != 0
|
||||
void * group_p; /*Pointer to the group of the object*/
|
||||
#endif
|
||||
|
||||
#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
|
||||
uint8_t ext_click_pad_hor;
|
||||
uint8_t ext_click_pad_ver;
|
||||
#endif
|
||||
|
||||
#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
|
||||
lv_area_t ext_click_pad;
|
||||
#endif
|
||||
|
||||
/*Attributes and states*/
|
||||
uint8_t click : 1; /*1: Can be pressed by an input device*/
|
||||
uint8_t drag : 1; /*1: Enable the dragging*/
|
||||
@@ -208,8 +222,8 @@ typedef struct _lv_obj_t
|
||||
`lv_protect_t`*/
|
||||
lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/
|
||||
|
||||
lv_coord_t ext_size; /*EXTtend the size of the object in every direction. E.g. for shadow drawing*/
|
||||
#if LV_OBJ_REALIGN
|
||||
lv_coord_t ext_draw_pad; /*EXTtend the size in every direction for drawing. */
|
||||
|
||||
lv_reailgn_t realign;
|
||||
#endif
|
||||
|
||||
@@ -397,6 +411,28 @@ void lv_obj_realign(lv_obj_t * obj);
|
||||
*/
|
||||
void lv_obj_set_auto_realign(lv_obj_t * obj, bool en);
|
||||
|
||||
#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
|
||||
/**
|
||||
* Set the size of an extended clickable area
|
||||
* @param obj pointer to an object
|
||||
* @param w extended width to both sides
|
||||
* @param h extended height to both sides
|
||||
*/
|
||||
void lv_obj_set_ext_click_area(lv_obj_t * obj, uint8_t w, uint8_t h);
|
||||
#endif
|
||||
|
||||
#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
|
||||
/**
|
||||
* Set the size of an extended clickable area
|
||||
* @param obj pointer to an object
|
||||
* @param left extended clickable are on the left [px]
|
||||
* @param right extended clickable are on the right [px]
|
||||
* @param top extended clickable are on the top [px]
|
||||
* @param bottom extended clickable are on the bottom [px]
|
||||
*/
|
||||
void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t left, lv_coord_t right, lv_coord_t top, lv_coord_t bottom);
|
||||
#endif
|
||||
|
||||
/*---------------------
|
||||
* Appearance set
|
||||
*--------------------*/
|
||||
@@ -572,7 +608,7 @@ void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size);
|
||||
* Send a 'LV_SIGNAL_REFR_EXT_SIZE' signal to the object
|
||||
* @param obj pointer to an object
|
||||
*/
|
||||
void lv_obj_refresh_ext_size(lv_obj_t * obj);
|
||||
void lv_obj_refresh_ext_draw_pad(lv_obj_t * obj);
|
||||
|
||||
#if LV_USE_ANIMATION
|
||||
/**
|
||||
@@ -694,13 +730,6 @@ lv_coord_t lv_obj_get_width_fit(lv_obj_t * obj);
|
||||
*/
|
||||
lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj);
|
||||
|
||||
/**
|
||||
* Get the extended size attribute of an object
|
||||
* @param obj pointer to an object
|
||||
* @return the extended size attribute
|
||||
*/
|
||||
lv_coord_t lv_obj_get_ext_size(const lv_obj_t * obj);
|
||||
|
||||
/**
|
||||
* Get the automatic realign property of the object.
|
||||
* @param obj pointer to an object
|
||||
@@ -708,6 +737,40 @@ lv_coord_t lv_obj_get_ext_size(const lv_obj_t * obj);
|
||||
*/
|
||||
bool lv_obj_get_auto_realign(lv_obj_t * obj);
|
||||
|
||||
|
||||
#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
|
||||
/**
|
||||
* Get the horizontal padding of extended clickable area
|
||||
* @param obj pointer to an object
|
||||
* @return the horizontal padding
|
||||
*/
|
||||
uint8_t lv_obj_get_ext_click_pad_hor(const lv_obj_t * obj);
|
||||
|
||||
/**
|
||||
* Get the vertical padding of extended clickable area
|
||||
* @param obj pointer to an object
|
||||
* @return the vertical padding
|
||||
*/
|
||||
uint8_t lv_obj_get_ext_click_pad_ver(const lv_obj_t * obj);
|
||||
|
||||
#endif
|
||||
|
||||
#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
|
||||
/**
|
||||
* Get the horizontal padding of extended clickable area
|
||||
* @param obj pointer to an object
|
||||
* @return the horizontal padding
|
||||
*/
|
||||
const lv_area_t * lv_obj_get_ext_click_pad(const lv_obj_t * obj);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Get the extended size attribute of an object
|
||||
* @param obj pointer to an object
|
||||
* @return the extended size attribute
|
||||
*/
|
||||
lv_coord_t lv_obj_get_ext_draw_pad(const lv_obj_t * obj);
|
||||
|
||||
/*-----------------
|
||||
* Appearance get
|
||||
*---------------*/
|
||||
|
||||
Reference in New Issue
Block a user