forked from enlightenment/efl
elm gengrid: Added "scroll,edge,top/bottom/left/right" smart callbacks.
SVN revision: 63625
This commit is contained in:
parent
4b45d09d00
commit
52da836d78
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
};
|
||||
|
@ -1855,6 +1863,38 @@ _scr_drag_stop(void *data,
|
|||
evas_object_smart_callback_call(data, SIG_SCROLL_DRAG_STOP, NULL);
|
||||
}
|
||||
|
||||
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__,
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue