diff options
author | Daniel Zaoui <daniel.zaoui@samsung.com> | 2013-11-28 16:05:28 +0200 |
---|---|---|
committer | Daniel Zaoui <daniel.zaoui@samsung.com> | 2013-11-28 16:24:01 +0200 |
commit | 63a237939e200722fa054b5f818601860327fac9 (patch) | |
tree | f9eaa1f6768e3fd84b2045d9b6dafb1c7e7b5615 | |
parent | 7b13aa26890573a3e9f59b204a4f31cc79d1ea07 (diff) | |
download | elementary-63a237939e200722fa054b5f818601860327fac9.tar.gz |
Add callback when drag start in item containers
-rw-r--r-- | src/lib/elm_cnp.c | 1 | ||||
-rw-r--r-- | src/lib/elm_cnp.h | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index 5baeac4d9..8cc5e59c1 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -3950,6 +3950,7 @@ _cont_obj_drag_start(void *data) Item_Container_Drag_Info *st = data; st->tm = NULL; Elm_Drag_User_Info *info = &st->user_info; + if (info->dragstart) info->dragstart(info->startcbdata, st->obj); elm_widget_scroll_freeze_push(st->obj); evas_object_event_callback_del_full (st->obj, EVAS_CALLBACK_MOUSE_MOVE, _cont_obj_mouse_move, st); diff --git a/src/lib/elm_cnp.h b/src/lib/elm_cnp.h index efcb256e7..a24deb98e 100644 --- a/src/lib/elm_cnp.h +++ b/src/lib/elm_cnp.h @@ -188,6 +188,15 @@ typedef void (*Elm_Drag_Accept) (void *data, Evas_Object *obj, Eina_Bool doaccep typedef void (*Elm_Drag_Pos) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y, Elm_Xdnd_Action action); /** + * Callback called when a drag starts from an item container + * + * @param data Application specific data + * @param obj The object where the drag started + * @since 1.8 + */ +typedef void (*Elm_Drag_Start) (void *data, Evas_Object *obj); + +/** * @brief Set copy data for a widget. * * Set copy data and take ownership of selection. Format is used for specifying the selection type, @@ -424,6 +433,8 @@ struct _Elm_Drag_User_Info Elm_Xdnd_Action action; Elm_Drag_Icon_Create_Cb createicon; void *createdata; + Elm_Drag_Start dragstart; + void *startcbdata; Elm_Drag_Pos dragpos; void *dragdata; Elm_Drag_Accept acceptcb; |