Eliminate some warnings
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
**********************/
|
||||
static void lv_obj_pos_child_refr(lv_obj_t * obj, cord_t x_diff, cord_t y_diff);
|
||||
static void lv_style_refr_core(void * style_p, lv_obj_t * obj);
|
||||
static void lv_obj_del_child(lv_obj_t * obj);
|
||||
static bool lv_obj_design(lv_obj_t * obj, const area_t * mask_p, lv_design_mode_t mode);
|
||||
|
||||
/**********************
|
||||
@@ -95,6 +96,12 @@ void lv_init(void)
|
||||
/*Init the display input handling*/
|
||||
lv_dispi_init();
|
||||
#endif
|
||||
|
||||
/*Initialize the application level*/
|
||||
#if LV_APP_ENABLE != 0
|
||||
lv_app_init();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -290,7 +297,7 @@ void lv_obj_del(lv_obj_t * obj)
|
||||
i_next = ll_get_next(&(obj->child_ll), i);
|
||||
|
||||
/*Call the recursive del to the child too*/
|
||||
lv_obj_del(i);
|
||||
lv_obj_del_child(i);
|
||||
|
||||
/*Set i to the next node*/
|
||||
i = i_next;
|
||||
@@ -1481,4 +1488,43 @@ static void lv_style_refr_core(void * style_p, lv_obj_t * obj)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by 'lv_obj_del' to delete the children objects
|
||||
* @param obj pointer to an object (all of its children will be deleted)
|
||||
*/
|
||||
static void lv_obj_del_child(lv_obj_t * obj)
|
||||
{
|
||||
lv_obj_t * i;
|
||||
lv_obj_t * i_next;
|
||||
i = ll_get_head(&(obj->child_ll));
|
||||
while(i != NULL) {
|
||||
/*Get the next object before delete this*/
|
||||
i_next = ll_get_next(&(obj->child_ll), i);
|
||||
|
||||
/*Call the recursive del to the child too*/
|
||||
lv_obj_del_child(i);
|
||||
|
||||
/*Set i to the next node*/
|
||||
i = i_next;
|
||||
}
|
||||
|
||||
/*Remove the animations from this object*/
|
||||
anim_del(obj, NULL);
|
||||
|
||||
/*Remove the object from parent's children list*/
|
||||
lv_obj_t * par = lv_obj_get_parent(obj);
|
||||
|
||||
ll_rem(&(par->child_ll), obj);
|
||||
|
||||
/* All children deleted.
|
||||
* Now clean up the object specific data*/
|
||||
obj->signal_f(obj, LV_SIGNAL_CLEANUP, NULL);
|
||||
|
||||
/*Delete the base objects*/
|
||||
if(obj->ext != NULL) dm_free(obj->ext);
|
||||
if(obj->style_iso != 0) dm_free(obj->style_p);
|
||||
dm_free(obj); /*Free the object itself*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user