forked from enlightenment/efl
+genlist_item_subitems_count()
group apis are currently pretty lacking. there should probably be functions for iterating over subitems in addition to this one
This commit is contained in:
parent
db23689614
commit
a3ff700982
|
@ -6127,6 +6127,15 @@ elm_genlist_item_parent_get(const Elm_Object_Item *it)
|
||||||
return (Elm_Object_Item *)((Elm_Gen_Item *)it)->parent;
|
return (Elm_Object_Item *)((Elm_Gen_Item *)it)->parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI unsigned int
|
||||||
|
elm_genlist_item_subitems_count(const Elm_Object_Item *it)
|
||||||
|
{
|
||||||
|
Elm_Gen_Item *item = (Elm_Gen_Item *)it;
|
||||||
|
ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, 0);
|
||||||
|
|
||||||
|
return eina_list_count(item->item->items);
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_genlist_item_subitems_clear(Elm_Object_Item *item)
|
elm_genlist_item_subitems_clear(Elm_Object_Item *item)
|
||||||
{
|
{
|
||||||
|
|
|
@ -558,6 +558,18 @@ EAPI Eina_Bool elm_genlist_item_cursor_engine_only_get(const
|
||||||
*/
|
*/
|
||||||
EAPI Elm_Object_Item *elm_genlist_item_parent_get(const Elm_Object_Item *it);
|
EAPI Elm_Object_Item *elm_genlist_item_parent_get(const Elm_Object_Item *it);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of subitems of a given item
|
||||||
|
*
|
||||||
|
* @param it The item
|
||||||
|
* @return The number of subitems, 0 on error
|
||||||
|
*
|
||||||
|
* This returns the number of subitems that an item possesses.
|
||||||
|
*
|
||||||
|
* @since 1.9
|
||||||
|
* @ingroup Genlist
|
||||||
|
*/
|
||||||
|
EAPI unsigned int elm_genlist_item_subitems_count(const Elm_Object_Item *it);
|
||||||
/**
|
/**
|
||||||
* Remove all sub-items (children) of the given item
|
* Remove all sub-items (children) of the given item
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue