1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

rename lv_top/sys_layer() to lv_layer_top/sys()

This commit is contained in:
Gabor Kiss-Vamosi 2017-10-11 09:11:29 +02:00
parent af2b6f8034
commit a7a6812a19
4 changed files with 13 additions and 11 deletions

View File

@ -121,7 +121,7 @@ void lv_indev_enable(lv_hal_indev_type_t type, bool enable)
void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj)
{
indev->cursor = cur_obj;
lv_obj_set_parent(indev->cursor, lv_sys_layer());
lv_obj_set_parent(indev->cursor, lv_layer_sys());
lv_obj_set_pos(indev->cursor, indev->state.act_point.x, indev->state.act_point.y);
}
@ -262,11 +262,13 @@ static void indev_proc_press(lv_indev_state_t * state)
/*If there is no last object then search*/
if(state->act_obj == NULL) {
pr_obj = indev_search_obj(state, lv_scr_act());
pr_obj = indev_search_obj(state, lv_layer_top());
if(pr_obj == NULL) pr_obj = indev_search_obj(state, lv_scr_act());
}
/*If there is last object but it is not dragged also search*/
else if(state->drag_in_prog == 0) {/*Now act_obj != NULL*/
pr_obj = indev_search_obj(state, lv_scr_act());
pr_obj = indev_search_obj(state, lv_layer_top());
if(pr_obj == NULL) pr_obj = indev_search_obj(state, lv_scr_act());
}
/*If a dragable object was the last then keep it*/
else {

View File

@ -365,8 +365,8 @@ void lv_obj_inv(lv_obj_t * obj)
/*Invalidate the object only if it belongs to the 'act_scr'*/
lv_obj_t * obj_scr = lv_obj_get_scr(obj);
if(obj_scr == lv_scr_act() ||
obj_scr == lv_top_layer() ||
obj_scr == lv_sys_layer()) {
obj_scr == lv_layer_top() ||
obj_scr == lv_layer_sys()) {
/*Truncate recursively to the parents*/
area_t area_trunc;
lv_obj_t * par = lv_obj_get_parent(obj);
@ -1115,7 +1115,7 @@ lv_obj_t * lv_scr_act(void)
* Return with the top layer. (Same on every screen and it is above the normal screen layer)
* @return pointer to the top layer object (transparent screen sized lv_obj)
*/
lv_obj_t * lv_top_layer(void)
lv_obj_t * lv_layer_top(void)
{
return top_layer;
}
@ -1125,7 +1125,7 @@ lv_obj_t * lv_top_layer(void)
* It is used for example by the cursor
* @return pointer to the system layer object (transparent screen sized lv_obj)
*/
lv_obj_t * lv_sys_layer(void)
lv_obj_t * lv_layer_sys(void)
{
return sys_layer;
}

View File

@ -491,14 +491,14 @@ void lv_obj_anim(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint16_t
* Return with the actual screen
* @return pointer to to the actual screen object
*/
lv_obj_t * lv_scr_act(void);lv_obj_t * lv_top_layer(void);
lv_obj_t * lv_scr_act(void);lv_obj_t * lv_layer_top(void);
/**
* Return with the system layer. (Same on every screen and it is above the all other layers)
* It is used for example by the cursor
* @return pointer to the system layer object (transparent screen sized lv_obj)
*/
lv_obj_t * lv_sys_layer(void);
lv_obj_t * lv_layer_sys(void);
/**
* Return with the screen of an object

View File

@ -316,8 +316,8 @@ static void lv_refr_area_part_vdb(const area_t * area_p)
lv_refr_make(top_p, &start_mask);
/*Also refresh top and sys layer unconditionally*/
lv_refr_make(lv_top_layer(), &start_mask);
lv_refr_make(lv_sys_layer(), &start_mask);
lv_refr_make(lv_layer_top(), &start_mask);
lv_refr_make(lv_layer_sys(), &start_mask);
/*Flush the content of the VDB*/