elementary/genlist - elm_genlist_item_contents_orphan -> elm_genlist_item_all_content...
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 6 Mar 2012 01:29:42 +0000 (01:29 +0000)
committerhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 6 Mar 2012 01:29:42 +0000 (01:29 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68758 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_deprecated.h
src/lib/elm_genlist.c
src/lib/elm_genlist.h

index 1f4c88c..3932e54 100644 (file)
@@ -1720,6 +1720,20 @@ EINA_DEPRECATED EAPI const Evas_Object            *elm_genlist_item_object_get(c
  */
 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
index 5006cd7..14d7fdc 100644 (file)
@@ -4953,9 +4953,15 @@ elm_genlist_item_icons_orphan(Elm_Object_Item *it)
    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;
@@ -4964,6 +4970,8 @@ elm_genlist_item_contents_orphan(Elm_Object_Item *it)
         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);
      }
 }
 
index eb91319..654d328 100644 (file)
@@ -1753,9 +1753,10 @@ EAPI void                          elm_genlist_item_display_only_set(Elm_Object_
 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
@@ -1764,8 +1765,7 @@ EAPI Eina_Bool                     elm_genlist_item_display_only_get(const Elm_O
  *
  * @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