From: Seunggyun Kim <sgyun.kim@samsung.com>

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.



SVN revision: 58403
This commit is contained in:
Seunggyun Kim 2011-04-07 04:35:08 +00:00 committed by Carsten Haitzler
parent 13877292d4
commit e64bfe7cf1
2 changed files with 26 additions and 0 deletions

View File

@ -1844,6 +1844,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:
* "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.

View File

@ -4920,3 +4920,28 @@ elm_genlist_scroller_policy_get(const Evas_Object *obj,
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);
}