diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c index 9683ec2a0b..f9a2436f00 100644 --- a/legacy/elementary/src/lib/elm_genlist.c +++ b/legacy/elementary/src/lib/elm_genlist.c @@ -6136,6 +6136,15 @@ elm_genlist_item_subitems_count(const Elm_Object_Item *it) return eina_list_count(item->item->items); } +EAPI const Eina_List * +elm_genlist_item_subitems_get(const Elm_Object_Item *it) +{ + Elm_Gen_Item *item = (Elm_Gen_Item *)it; + ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL); + + return item->item->items; +} + EAPI void elm_genlist_item_subitems_clear(Elm_Object_Item *item) { diff --git a/legacy/elementary/src/lib/elm_genlist_common.h b/legacy/elementary/src/lib/elm_genlist_common.h index 8ce45933d5..069a70b585 100644 --- a/legacy/elementary/src/lib/elm_genlist_common.h +++ b/legacy/elementary/src/lib/elm_genlist_common.h @@ -570,6 +570,19 @@ EAPI Elm_Object_Item *elm_genlist_item_parent_get(const Elm_Object_I * @ingroup Genlist */ EAPI unsigned int elm_genlist_item_subitems_count(const Elm_Object_Item *it); + +/** + * Get the list of subitems of a given item + * + * @param it The item + * @return The list of subitems, @c NULL on error + * + * This returns the list of subitems that an item possesses. It cannot be changed. + * + * @since 1.9 + * @ingroup Genlist + */ +EAPI const Eina_List *elm_genlist_item_subitems_get(const Elm_Object_Item *it); /** * Remove all sub-items (children) of the given item *