Subject: [E-devel] [Patch] elm_genlist :
elm_genlist_realized_items_update api added
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.
git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@58403
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
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:
* "clicked,double" - This is called when a user has double-clicked an item. The
* event_info parameter is the genlist item that was double-clicked.
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);
+}
+
+