From: seoz Date: Tue, 27 Sep 2011 15:04:57 +0000 (+0000) Subject: elm gengrid: Added "scroll,edge,top/bottom/left/right" smart callbacks. X-Git-Tag: REL_F_I9500_20120323_1~17^2~1751 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a90c0d52d2ee4f32004006cf25cf72b408a8d55f;p=framework%2Fuifw%2Felementary.git elm gengrid: Added "scroll,edge,top/bottom/left/right" smart callbacks. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@63625 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index e75fbef..48d15fe 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -7902,6 +7902,14 @@ extern "C" { * started. * - @c "scroll,drag,stop" - called when dragging the content has * stopped. + * - @c "scroll,edge,top" - This is called when the gengrid is scrolled until + * the top edge. + * - @c "scroll,edge,bottom" - This is called when the gengrid is scrolled + * until the bottom edge. + * - @c "scroll,edge,left" - This is called when the gengrid is scrolled + * until the left edge. + * - @c "scroll,edge,right" - This is called when the gengrid is scrolled + * until the right edge. * * List of gengrid examples: * @li @ref gengrid_example diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index af75ee4..a2d9e8f 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -152,6 +152,10 @@ static const char SIG_SCROLL_ANIM_START[] = "scroll,anim,start"; static const char SIG_SCROLL_ANIM_STOP[] = "scroll,anim,stop"; static const char SIG_SCROLL_DRAG_START[] = "scroll,drag,start"; static const char SIG_SCROLL_DRAG_STOP[] = "scroll,drag,stop"; +static const char SIG_SCROLL_EDGE_TOP[] = "scroll,edge,top"; +static const char SIG_SCROLL_EDGE_BOTTOM[] = "scroll,edge,bottom"; +static const char SIG_SCROLL_EDGE_LEFT[] = "scroll,edge,left"; +static const char SIG_SCROLL_EDGE_RIGHT[] = "scroll,edge,right"; static const char SIG_MOVED[] = "moved"; static const Evas_Smart_Cb_Description _signals[] = { @@ -174,6 +178,10 @@ static const Evas_Smart_Cb_Description _signals[] = { {SIG_SCROLL_ANIM_STOP, ""}, {SIG_SCROLL_DRAG_START, ""}, {SIG_SCROLL_DRAG_STOP, ""}, + {SIG_SCROLL_EDGE_TOP, ""}, + {SIG_SCROLL_EDGE_BOTTOM, ""}, + {SIG_SCROLL_EDGE_LEFT, ""}, + {SIG_SCROLL_EDGE_RIGHT, ""}, {SIG_MOVED, ""}, {NULL, NULL} }; @@ -1856,6 +1864,38 @@ _scr_drag_stop(void *data, } static void +_scr_edge_left(void *data, + Evas_Object *scr __UNUSED__, + void *event_info __UNUSED__) +{ + evas_object_smart_callback_call(data, SIG_SCROLL_EDGE_LEFT, NULL); +} + +static void +_scr_edge_right(void *data, + Evas_Object *scr __UNUSED__, + void *event_info __UNUSED__) +{ + evas_object_smart_callback_call(data, SIG_SCROLL_EDGE_RIGHT, NULL); +} + +static void +_scr_edge_top(void *data, + Evas_Object *scr __UNUSED__, + void *event_info __UNUSED__) +{ + evas_object_smart_callback_call(data, SIG_SCROLL_EDGE_TOP, NULL); +} + +static void +_scr_edge_bottom(void *data, + Evas_Object *scr __UNUSED__, + void *event_info __UNUSED__) +{ + evas_object_smart_callback_call(data, SIG_SCROLL_EDGE_BOTTOM, NULL); +} + +static void _scr_scroll(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) @@ -1914,6 +1954,11 @@ elm_gengrid_add(Evas_Object *parent) evas_object_smart_callback_add(wd->scr, "animate,stop", _scr_anim_stop, obj); evas_object_smart_callback_add(wd->scr, "drag,start", _scr_drag_start, obj); evas_object_smart_callback_add(wd->scr, "drag,stop", _scr_drag_stop, obj); + evas_object_smart_callback_add(wd->scr, "edge,left", _scr_edge_left, obj); + evas_object_smart_callback_add(wd->scr, "edge,right", _scr_edge_right, obj); + evas_object_smart_callback_add(wd->scr, "edge,top", _scr_edge_top, obj); + evas_object_smart_callback_add(wd->scr, "edge,bottom", _scr_edge_bottom, + obj); evas_object_smart_callback_add(wd->scr, "scroll", _scr_scroll, obj); elm_smart_scroller_bounce_allow_set(wd->scr, bounce, bounce);