From: Carsten Haitzler Date: Fri, 18 Dec 2009 02:30:01 +0000 (+0000) Subject: add more bounce controls X-Git-Tag: v1.0.0~4928 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6373ed56ac75b4bb1f0284e5a1c4b9d446a220b4;p=platform%2Fupstream%2Felementary.git add more bounce controls SVN revision: 44533 --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 0ef12cf39..1f8068766 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -591,6 +591,7 @@ extern "C" { } Elm_Text_Format; EAPI Evas_Object *elm_notepad_add(Evas_Object *parent); EAPI void elm_notepad_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format); + EAPI void elm_notepad_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce); /* smart callbacks called: */ @@ -614,6 +615,7 @@ extern "C" { EAPI void elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent); EAPI void elm_anchorview_hover_style_set(Evas_Object *obj, const char *style); EAPI void elm_anchorview_hover_end(Evas_Object *obj); + EAPI void elm_anchorview_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce); /* smart callbacks called: * "anchor,clicked" - achor called was clicked | event_info = Elm_Entry_Anchorview_Info */ @@ -758,7 +760,8 @@ extern "C" { EAPI void elm_list_item_label_set(Elm_List_Item *item, const char *text); EAPI Elm_List_Item *elm_list_item_prev(const Elm_List_Item *it); EAPI Elm_List_Item *elm_list_item_next(const Elm_List_Item *it); - + EAPI void elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce); + /* smart callbacks called: * "clicked" - when the user double-clicked an item * "selected" - when the user selected an item diff --git a/src/lib/elc_anchorview.c b/src/lib/elc_anchorview.c index d0596ee24..bc45d168e 100644 --- a/src/lib/elc_anchorview.c +++ b/src/lib/elc_anchorview.c @@ -249,3 +249,22 @@ elm_anchorview_hover_end(Evas_Object *obj) wd->hover = NULL; wd->pop = NULL; } + +/** + * Set bounce mode + * + * This will enable or disable the scroller bounce mode for the anchorview. See + * elm_scroller_bounce_set() for details + * + * @param obj The anchorview anchorview + * @param h_bounce Allow bounce horizontally + * @param v_bounce Allow bounce vertically + * + * @ingroup Anchorview + */ +EAPI void +elm_anchorview_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) +{ + Widget_Data *wd = elm_widget_data_get(obj); + elm_scroller_bounce_set(wd->scroller, h_bounce, v_bounce); +} diff --git a/src/lib/elc_notepad.c b/src/lib/elc_notepad.c index d30563882..6d945f4e5 100644 --- a/src/lib/elc_notepad.c +++ b/src/lib/elc_notepad.c @@ -326,3 +326,22 @@ elm_notepad_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format) wd->format = format; _load(obj); } + +/** + * Set bounce mode + * + * This will enable or disable the scroller bounce mode for the notepad. See + * elm_scroller_bounce_set() for details + * + * @param obj The notepad object + * @param h_bounce Allow bounce horizontally + * @param v_bounce Allow bounce vertically + * + * @ingroup Notepad + */ +EAPI void +elm_notepad_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) +{ + Widget_Data *wd = elm_widget_data_get(obj); + elm_scroller_bounce_set(wd->scr, h_bounce, v_bounce); +} diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index ed888f06f..9fd6976a5 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -2679,7 +2679,7 @@ elm_genlist_compress_mode_set(Evas_Object *obj, Eina_Bool compress) /** * Set bounce mode * - * This will enable or disable the scroller bounce mode for the gnelist. See + * This will enable or disable the scroller bounce mode for the genlist. See * elm_scroller_bounce_set() for details * * @param obj The genlist object diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index ad13c10bb..00c9c5938 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -933,7 +933,7 @@ elm_list_item_del(Elm_List_Item *it) * @param it The item to set the callback on * @param func The function called * - * @ingroup Hoversel + * @ingroup List */ EAPI void elm_list_item_del_cb_set(Elm_List_Item *it, void (*func)(void *data, Evas_Object *obj, void *event_info)) @@ -1054,3 +1054,22 @@ elm_list_item_next(const Elm_List_Item *it) else return NULL; } + +/** + * Set bounce mode + * + * This will enable or disable the scroller bounce mode for the list. See + * elm_scroller_bounce_set() for details + * + * @param obj The list object + * @param h_bounce Allow bounce horizontally + * @param v_bounce Allow bounce vertically + * + * @ingroup List + */ +EAPI void +elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) +{ + Widget_Data *wd = elm_widget_data_get(obj); + elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce); +}