From: Hyoyoung Chang Date: Tue, 6 Dec 2011 07:55:58 +0000 (+0900) Subject: [genlist] add item_no_select_mode API X-Git-Tag: REL_F_I9500_20111209_1~7^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4dca039b1a3045e4a8932a5fb7e4f714329aa75;p=framework%2Fuifw%2Felementary.git [genlist] add item_no_select_mode API Change-Id: I26930124152df1b4098eca82ee18ad1d7ccfc221 --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index e63f5b7..f2ceea3 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -19932,6 +19932,9 @@ extern "C" { EAPI void elm_genlist_pinch_zoom_mode_set(Evas_Object *obj, Eina_Bool emode) EINA_ARG_NONNULL(1); EAPI Eina_Bool elm_genlist_pinch_zoom_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + EAPI void elm_genlist_item_no_select_mode_set(Elm_Genlist_Item *it, Eina_Bool no_select) EINA_ARG_NONNULL(1); + EAPI Eina_Bool elm_genlist_item_no_select_mode_get(const Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); + /** * @} */ diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 6e5a3c6..e9ec8fe 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -176,6 +176,8 @@ struct _Elm_Genlist_Item Eina_Bool move_effect_enabled : 1; Eina_Bool defer_unrealize : 1; Eina_Bool can_focus : 1; + Eina_Bool no_select : 1; + // TODO: refactoring Eina_Bool effect_done : 1; @@ -744,7 +746,7 @@ static void _item_highlight(Elm_Genlist_Item *it) { const char *selectraise; - if ((it->wd->no_select) || (it->delete_me) || (it->highlighted) || + if ((it->wd->no_select) || (it->no_select) || (it->delete_me) || (it->highlighted) || (it->disabled) || (it->display_only) || (it->mode_view)) return; edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm"); @@ -893,7 +895,8 @@ _item_select(Elm_Genlist_Item *it) Evas_Object *obj; Evas_Object *parent = WIDGET(it); - if ((it->wd->no_select) || (it->delete_me) || (it->mode_view)) return; + if ((it->wd->no_select) || (it->no_select) || + (it->delete_me) || (it->mode_view)) return; if (it->selected) { if (it->wd->always_select) goto call; @@ -5966,3 +5969,18 @@ elm_genlist_item_rename_mode_get(Elm_Genlist_Item *item) ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item, EINA_FALSE); return item->renamed; } + +EAPI void +elm_genlist_item_no_select_mode_set(Elm_Genlist_Item *it, + Eina_Bool no_select) +{ + ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it); + it->no_select = no_select; +} + +EAPI Eina_Bool +elm_genlist_item_no_select_mode_get(const Elm_Genlist_Item *it) +{ + ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, EINA_FALSE); + return it->no_select; +}