*/
EINA_DEPRECATED EAPI Elm_Genlist_Item_Type elm_genlist_item_flags_get(const Elm_Object_Item *it);
+/**
+ * Tells genlist to "orphan" contents fetched by the item class
+ *
+ * @param it The item
+ *
+ * This instructs genlist to release references to contents in the item,
+ * meaning that they will no longer be managed by genlist and are
+ * floating "orphans" that can be re-used elsewhere if the user wants
+ * to.
+ *
+ * @deprecated Use elm_genlist_item_all_contents_unset() instead
+ * @ingroup Genlist
+ */
+EAPI void elm_genlist_item_contents_orphan(Elm_Object_Item *it);
#define ELM_IMAGE_ROTATE_90_CW 1
#define ELM_IMAGE_ROTATE_180_CW 2
elm_genlist_item_contents_orphan(it);
}
-EAPI void
+EINA_DEPRECATED EAPI void
elm_genlist_item_contents_orphan(Elm_Object_Item *it)
{
+ elm_genlist_item_all_contents_unset(it, NULL);
+}
+
+EAPI void
+elm_genlist_item_all_contents_unset(Elm_Object_Item *it, Eina_List **l)
+{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Evas_Object *content;
elm_widget_sub_object_del(WIDGET(it), content);
evas_object_smart_member_del(content);
evas_object_hide(content);
+ if (l)
+ *l = eina_list_append(*l, content);
}
}
EAPI Eina_Bool elm_genlist_item_display_only_get(const Elm_Object_Item *it);
/**
- * Tells genlist to "orphan" contents fetched by the item class
+ * Unset all contents fetched by the item class
*
* @param it The item
+ * @param l The contents list to return
*
* This instructs genlist to release references to contents in the item,
* meaning that they will no longer be managed by genlist and are
*
* @ingroup Genlist
*/
-//XXX: Eina_List *elm_genlist_item_all_contents_unset() ??
-EAPI void elm_genlist_item_contents_orphan(Elm_Object_Item *it);
+EAPI void elm_genlist_item_all_contents_unset(Elm_Object_Item *it, Eina_List **l);
/**
* Promote an item to the top of the list