Elm.Layout: Implement content_remove

This commit is contained in:
Jean-Philippe Andre 2016-04-25 19:53:51 +09:00
parent f7f1862489
commit 62caefdf0e
2 changed files with 18 additions and 0 deletions

View File

@ -1121,6 +1121,23 @@ _elm_layout_efl_container_content_unset(Eo *obj, Elm_Layout_Smart_Data *sd, cons
return NULL;
}
EOLIAN static Eina_Bool
_elm_layout_efl_container_content_remove(Eo *obj, Elm_Layout_Smart_Data *sd EINA_UNUSED,
Efl_Gfx_Base *content)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
if (!elm_widget_sub_object_del(obj, content))
{
ERR("could not remove sub object %p from %p", content, obj);
return EINA_FALSE;
}
edje_object_part_unswallow(wd->resize_obj, content);
_eo_unparent_helper(content, obj);
return content;
}
/* legacy only - eo is iterator */
EAPI Eina_List *
elm_layout_content_swallow_list_get(const Evas_Object *obj)

View File

@ -494,6 +494,7 @@ class Elm.Layout (Elm.Widget, Efl.Container, Efl.File)
Efl.Container.content_unset;
Efl.Container.content_part_name.get;
Efl.Container.content_count;
Efl.Container.content_remove;
Efl.Container.content_iterate;
}
events {