Hello. All.
I added elm_genlist_realized_items_update api.
elm_genlist_item_update api already exists.
But If the application want to change all realized items using this api,
application always have to check genlist all realized items and call
elm_genlist_item_update api.
This routine is being used at many functions of application.
So I made elm_genlist_realized_items_update api.
This helps application to update easily all realized items at a time.
Please review about this.
Thanks.
Index: src/lib/Elementary.h.in
===================================================================
--- src/lib/Elementary.h.in (revision 58342)
+++ src/lib/Elementary.h.in (working copy)
@@ -1845,6 +1845,7 @@ extern "C" {
EAPI const char *elm_genlist_item_cursor_style_get(const
Elm_Genlist_Item *item) EINA_ARG_NONNULL(1);
EAPI void
elm_genlist_item_cursor_engine_only_set(Elm_Genlist_Item *item, Eina_Bool
engine_only) EINA_ARG_NONNULL(1);
EAPI Eina_Bool elm_genlist_item_cursor_engine_only_get(const
Elm_Genlist_Item *item) EINA_ARG_NONNULL(1);
+ EAPI void elm_genlist_realized_items_update(const Evas_Object
*obj) EINA_ARG_NONNULL(1);
/* smart callbacks called:
* "drag,start,up" - This is called when the item in the list has been
dragged
* (not scrolled) up.
Index: src/lib/elm_genlist.c
===================================================================
--- src/lib/elm_genlist.c (revision 58342)
+++ src/lib/elm_genlist.c (working copy)
@@ -4902,3 +4902,28 @@ elm_genlist_scroller_policy_get(const Evas_Object
if (policy_v) *policy_v = (Elm_Scroller_Policy)s_policy_v;
}
+/**
+ * Update the contents of all realized items
+ *
+ * This updates all realized items by calling all the item class functions
again
+ * to get the icons, labels and states. Use this when the original
+ * item data has changed and the changes are desired to be reflected.
+ *
+ * @param it The item
+ *
+ * @ingroup Genlist
+ */
+EAPI void
+elm_genlist_realized_items_update(const Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+
+ Eina_List *list, *l;
+ Elm_Genlist_Item *it;
+
+ list = elm_genlist_realized_items_get(obj);
+ EINA_LIST_FOREACH(list, l, it)
+ elm_genlist_item_update(it);
+}
+
+
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel