From 2d12090dd66d63b5e676bde941e53dc0ab089a96 Mon Sep 17 00:00:00 2001 From: Hyoyoung Chang Date: Wed, 11 Jan 2012 15:09:40 +0900 Subject: [PATCH] [genlist] add elm_genlist_mode_item_style_{set/get} Change-Id: I02cfd2d51614060e07e445a7b0a984f2db4a30cb --- src/lib/elm_genlist.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index ec21dbc..6722b68 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -5288,6 +5288,29 @@ elm_genlist_item_mode_set(Elm_Genlist_Item *it, } EAPI const char * +elm_genlist_mode_item_style_get(const Evas_Object *obj) +{ + ELM_CHECK_WIDTYPE(obj, widtype) NULL; + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return NULL; + return wd->mode_item->itc->mode_item_style; +} + +EAPI void +elm_genlist_mode_item_style_set(Evas_Object *obj, const char *style) +{ + ELM_CHECK_WIDTYPE(obj, widtype); + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return; + if ((style == wd->mode_item->itc->mode_item_style) || + (style && wd->mode_item->itc->mode_item_style && + (!strcmp(style, wd->mode_item->itc->mode_item_style)))) + return; + eina_stringshare_replace(&wd->mode_item->itc->mode_item_style, style); + elm_genlist_realized_items_update(obj); +} + +EAPI const char * elm_genlist_mode_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; -- 2.7.4