Merge branch 'dev-5.2' into img_decoder
This commit is contained in:
@@ -431,11 +431,22 @@ void lv_scr_load(lv_obj_t * scr)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a new parent for an object. Its relative position will be the same.
|
* Set a new parent for an object. Its relative position will be the same.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object. Can't be a screen.
|
||||||
* @param parent pointer to the new parent object
|
* @param parent pointer to the new parent object. (Can't be NULL)
|
||||||
*/
|
*/
|
||||||
void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent)
|
void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent)
|
||||||
{
|
{
|
||||||
|
if(obj->par == NULL) {
|
||||||
|
LV_LOG_WARN("Can't set the parent of a screen");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(parent == NULL) {
|
||||||
|
LV_LOG_WARN("Can't set parent == NULL to an object");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
lv_obj_invalidate(obj);
|
lv_obj_invalidate(obj);
|
||||||
|
|
||||||
lv_point_t old_pos;
|
lv_point_t old_pos;
|
||||||
|
|||||||
@@ -263,8 +263,8 @@ void lv_scr_load(lv_obj_t * scr);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a new parent for an object. Its relative position will be the same.
|
* Set a new parent for an object. Its relative position will be the same.
|
||||||
* @param obj pointer to an object
|
* @param obj pointer to an object. Can't be a screen.
|
||||||
* @param parent pointer to the new parent object
|
* @param parent pointer to the new parent object. (Can't be NULL)
|
||||||
*/
|
*/
|
||||||
void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent);
|
void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent);
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ typedef struct {
|
|||||||
uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/
|
uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/
|
||||||
uint32_t btn; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/
|
uint32_t btn; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/
|
||||||
};
|
};
|
||||||
lv_indev_state_t state; /*LV_INDEV_EVENT_REL or LV_INDEV_EVENT_PR*/
|
lv_indev_state_t state; /*LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/
|
||||||
void *user_data; /*'lv_indev_drv_t.priv' for this driver*/
|
void *user_data; /*'lv_indev_drv_t.priv' for this driver*/
|
||||||
} lv_indev_data_t;
|
} lv_indev_data_t;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user