diff options
author | Thiep Ha <thiepha@gmail.com> | 2017-11-09 10:08:26 +0900 |
---|---|---|
committer | Thiep Ha <thiepha@gmail.com> | 2017-12-08 11:17:23 +0900 |
commit | 7a2ad205ac86ea09046452b520b9f88967d3636f (patch) | |
tree | f7abc905ff8d404d9fa8065399d87dc351ee8403 | |
parent | 5671fee679c83b467e92060a1ba3fb155d095c4e (diff) | |
download | efl-7a2ad205ac86ea09046452b520b9f88967d3636f.tar.gz |
combine dnd_drag and dnd_drop into dnd interface for simple use of event (pos)
-rw-r--r-- | src/Makefile_Efl.am | 5 | ||||
-rw-r--r-- | src/Makefile_Elementary.am | 5 | ||||
-rw-r--r-- | src/bin/elementary/test_efl_dnd.c | 28 | ||||
-rw-r--r-- | src/lib/efl/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/lib/efl/Efl.h | 5 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_dnd.eo | 80 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_interfaces_main.c | 5 | ||||
-rw-r--r-- | src/lib/elementary/Elementary.h | 5 | ||||
-rw-r--r-- | src/lib/elementary/efl_dnd.c | 25 | ||||
-rw-r--r-- | src/lib/elementary/efl_dnd_private.h | 12 | ||||
-rw-r--r-- | src/lib/elementary/efl_selection_manager.c | 22 | ||||
-rw-r--r-- | src/lib/elementary/efl_selection_manager.eo | 2 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_dnd.eo | 16 | ||||
-rw-r--r-- | src/lib/elementary/elm_widget.eo | 2 |
14 files changed, 158 insertions, 57 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index e2ee36a9fa..e9f63cdaa1 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -81,10 +81,11 @@ efl_eolian_files = \ lib/efl/interfaces/efl_gfx_text_class.eo \ lib/efl/interfaces/efl_gfx_size_class.eo \ lib/efl/interfaces/efl_selection.eo \ - lib/efl/interfaces/efl_dnd_drag.eo \ - lib/efl/interfaces/efl_dnd_drop.eo \ + lib/efl/interfaces/efl_dnd.eo \ $(efl_eolian_legacy_files) \ $(NULL) +#lib/efl/interfaces/efl_dnd_drag.eo +#lib/efl/interfaces/efl_dnd_drop.eo efl_eolian_type_files = \ lib/efl/interfaces/efl_gfx_types.eot \ diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 03c1ae3d19..095dcba34a 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -88,10 +88,11 @@ elm_public_eolian_files = \ lib/elementary/efl_config_global.eo \ lib/elementary/elm_code_widget.eo \ lib/elementary/efl_cnp.eo \ - lib/elementary/efl_ui_dnd_drag.eo \ - lib/elementary/efl_ui_dnd_drop.eo \ + lib/elementary/efl_ui_dnd.eo \ lib/elementary/efl_selection_manager.eo \ $(NULL) +#lib/elementary/efl_ui_dnd_drag.eo +#lib/elementary/efl_ui_dnd_drop.eo # More public files -- FIXME elm_public_eolian_files += \ diff --git a/src/bin/elementary/test_efl_dnd.c b/src/bin/elementary/test_efl_dnd.c index 56f6a60ac8..3ff687b4f2 100644 --- a/src/bin/elementary/test_efl_dnd.c +++ b/src/bin/elementary/test_efl_dnd.c @@ -130,7 +130,7 @@ _drag_icon_cb(void *data, Eo *win, int *xoff, int *yoff) static void _dnd_drag_pos_cb(void *data, const Efl_Event *ev) { - printf("%s:: In\n", __func__); + ERR("In"); Efl_Dnd_Drag_Pos *pos = (Efl_Dnd_Drag_Pos *)ev->info; printf("%s:: pos: %d %d, action: %d\n", __func__, pos->x, pos->y, pos->action); } @@ -138,7 +138,7 @@ _dnd_drag_pos_cb(void *data, const Efl_Event *ev) static void _dnd_drag_accept_cb(void *data, const Efl_Event *ev) { - printf("%s:: In\n", __func__); + ERR("In"); Eina_Bool *accept = (Eina_Bool *)ev->info; printf("%s:: accept: %d\n", __func__, *accept); } @@ -146,7 +146,7 @@ _dnd_drag_accept_cb(void *data, const Efl_Event *ev) static void _dnd_drag_done_cb(void *data, const Efl_Event *ev) { - printf("%s:: In\n", __func__); + ERR("In"); } @@ -154,25 +154,25 @@ _dnd_drag_done_cb(void *data, const Efl_Event *ev) static void _dnd_drop_enter_cb(void *data, const Efl_Event *ev) { - printf("%s:: In\n", __func__); + ERR("In"); } static void _dnd_drop_leave_cb(void *data, const Efl_Event *ev) { - printf("%s:: In\n", __func__); + ERR("In"); } static void _dnd_drop_pos_cb(void *data, const Efl_Event *ev) { - printf("%s:: In\n", __func__); + ERR("In"); } static void _dnd_drop_drop_cb(void *data, const Efl_Event *ev) { - printf("%s:: In\n", __func__); + ERR("In"); } static void @@ -180,9 +180,9 @@ _en_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event) { printf("dnd start\n"); Evas_Object *en = data; - efl_event_callback_add(en, EFL_DND_DRAG_EVENT_DRAG_POS, _dnd_drag_pos_cb, en); - efl_event_callback_add(en, EFL_DND_DRAG_EVENT_DRAG_ACCEPT, _dnd_drag_accept_cb, en); - efl_event_callback_add(en, EFL_DND_DRAG_EVENT_DRAG_DONE, _dnd_drag_done_cb, en); + efl_event_callback_add(en, EFL_DND_EVENT_DRAG_POS, _dnd_drag_pos_cb, en); + efl_event_callback_add(en, EFL_DND_EVENT_DRAG_ACCEPT, _dnd_drag_accept_cb, en); + efl_event_callback_add(en, EFL_DND_EVENT_DRAG_DONE, _dnd_drag_done_cb, en); efl_dnd_drag_start(en, EFL_SELECTION_FORMAT_TEXT, "dnd Text", 9, EFL_SELECTION_ACTION_COPY, en, _drag_icon_cb, NULL); } @@ -226,10 +226,10 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) bt = efl_add(EFL_UI_BUTTON_CLASS, win); efl_text_set(bt, "test sel/drop"); efl_gfx_visible_set(bt, EINA_TRUE); - efl_event_callback_add(bt, EFL_DND_DROP_EVENT_DRAG_ENTER, _dnd_drop_enter_cb, bt); - efl_event_callback_add(bt, EFL_DND_DROP_EVENT_DRAG_LEAVE, _dnd_drop_leave_cb, bt); - efl_event_callback_add(bt, EFL_DND_DROP_EVENT_DRAG_POS, _dnd_drop_pos_cb, bt); - efl_event_callback_add(bt, EFL_DND_DROP_EVENT_DRAG_DROP, _dnd_drop_drop_cb, bt); + efl_event_callback_add(bt, EFL_DND_EVENT_DRAG_ENTER, _dnd_drop_enter_cb, bt); + efl_event_callback_add(bt, EFL_DND_EVENT_DRAG_LEAVE, _dnd_drop_leave_cb, bt); + efl_event_callback_add(bt, EFL_DND_EVENT_DRAG_POS, _dnd_drop_pos_cb, bt); + efl_event_callback_add(bt, EFL_DND_EVENT_DRAG_DROP, _dnd_drop_drop_cb, bt); efl_dnd_drop_target_add(bt, EFL_SELECTION_FORMAT_TEXT); elm_box_pack_end(bx, bt); diff --git a/src/lib/efl/CMakeLists.txt b/src/lib/efl/CMakeLists.txt index 16f399be75..91649ba401 100644 --- a/src/lib/efl/CMakeLists.txt +++ b/src/lib/efl/CMakeLists.txt @@ -63,8 +63,7 @@ set(PUBLIC_EO_FILES interfaces/efl_selection_types.eot interfaces/efl_dnd_types.eot interfaces/efl_selection.eo - interfaces/efl_dnd_drag.eo - interfaces/efl_dnd_drop.eo + interfaces/efl_dnd.eo ) set(PUBLIC_HEADERS diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 121329e561..556e417602 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -175,8 +175,9 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; #include "interfaces/efl_selection_types.eot.h" #include "interfaces/efl_dnd_types.eot.h" #include "interfaces/efl_selection.eo.h" -#include "interfaces/efl_dnd_drag.eo.h" -#include "interfaces/efl_dnd_drop.eo.h" +//#include "interfaces/efl_dnd_drag.eo.h" +//#include "interfaces/efl_dnd_drop.eo.h" +#include "interfaces/efl_dnd.eo.h" #else diff --git a/src/lib/efl/interfaces/efl_dnd.eo b/src/lib/efl/interfaces/efl_dnd.eo new file mode 100644 index 0000000000..3cff23a589 --- /dev/null +++ b/src/lib/efl/interfaces/efl_dnd.eo @@ -0,0 +1,80 @@ +import efl_selection_types; +import efl_dnd_types; + +interface Efl.Dnd (Efl.Selection) { + //eo_prefix: efl_dnd; + methods { + drag_start { + [[This starts a drag and drop process at the drag side. + During dragging, there are three events emitted as belows: + - EFL_DND_EVENT_DRAG_POS + - EFL_DND_EVENT_DRAG_ACCEPT + - EFL_DND_EVENT_DRAG_DONE + ]] + params { + @in format: Efl.Selection.Format; [[The data format]] + @in buf: const(void_ptr); + @in len: int; [[The data's length.]] + @in action: Efl.Selection.Action; [[Action when data is transferred]] + @in icon_func: Efl.Dnd.Drag_Icon_Create; [[Function pointer to create icon]] + } + } + drag_action_set { + [[This sets the action for the drag]] + params { + @in action: Efl.Selection.Action; [[Drag action]] + } + } + drag_cancel { + [[This cancels the on-going drag]] + } + drag_item_container_add { + [[This registers a drag for items in a container. Many items can be + dragged at a time. During dragging, there are three events emitted: + EFL_DND_EVENT_DRAG_POS, EFL_DND_EVENT_DRAG_ACCEPT, EFL_DND_EVENT_DRAG_DONE.]] + params { + @in time_to_drag: double; [[Time since mouse down happens to drag starts]] + @in anim_durataion: double; [[animation duration]] + @in data_func: Efl.Dnd.Drag_Data_Get; [[Data and its format]] + @in item_func: Efl.Dnd.Drag_Item_Get; [[Item to determine drag start]] + @in icon_func: Efl.Dnd.Drag_Icon_Create; [[Icon used during drag]] + @in icon_list_func: Efl.Dnd.Drag_Icon_List_Create; [[Icons used for animations]] + } + } + drag_item_container_del { + [[Remove drag function of items in the container object.]] + params { + } + } + drop_target_add { + [[There are four events emitted: EFL_DND_EVENT_DRAG_ENTER, EFL_DND_EVENT_DRAG_LEAVE, + EFL_DND_EVENT_DRAG_POS, EFL_DND_EVENT_DRAG_DROP.]] + params { + @in format: Efl.Selection.Format; [[Accepted data format]] + } + } + drop_target_del { + params { + @in format: Efl.Selection.Format; [[Accepted data format]] + } + } + drop_item_container_add { + params { + @in format: Efl.Selection.Format; [[Accepted data formats]] + @in item_func: Efl.Dnd.Drop_Item_Get; [[Get item at specific position]] + } + } + drop_item_container_del { + } + } + implements { + } + events { + drag,accept; [[accept drag data]] + drag,done; [[drag is done (mouse up)]] + drag,enter; [[called when the drag object enters this object]] + drag,leave; [[called when the drag object leaves this object]] + drag,pos; [[called when the drag object changes drag position]] + drag,drop; [[called when the drag object dropped on this object]] + } +} diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 0f3aeaaa95..daf2a6a0f2 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -75,8 +75,9 @@ #include "interfaces/efl_ui_zoom.eo.c" #include "interfaces/efl_selection.eo.c" -#include "interfaces/efl_dnd_drag.eo.c" -#include "interfaces/efl_dnd_drop.eo.c" +//#include "interfaces/efl_dnd_drag.eo.c" +//#include "interfaces/efl_dnd_drop.eo.c" +#include "interfaces/efl_dnd.eo.c" EAPI void __efl_internal_init(void) diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h index cfcf69a90c..60c64f2b96 100644 --- a/src/lib/elementary/Elementary.h +++ b/src/lib/elementary/Elementary.h @@ -313,8 +313,9 @@ EAPI extern Elm_Version *elm_version; # include <efl_ui_spin_button.eo.h> # include <efl_ui_image_factory.eo.h> # include <efl_cnp.eo.h> -# include <efl_ui_dnd_drag.eo.h> -# include <efl_ui_dnd_drop.eo.h> +//# include <efl_ui_dnd_drag.eo.h> +//# include <efl_ui_dnd_drop.eo.h> +# include <efl_ui_dnd.eo.h> # include <efl_selection_manager.eo.h> #endif diff --git a/src/lib/elementary/efl_dnd.c b/src/lib/elementary/efl_dnd.c index 5fc9154244..271d1f8e1d 100644 --- a/src/lib/elementary/efl_dnd.c +++ b/src/lib/elementary/efl_dnd.c @@ -13,8 +13,8 @@ #include "efl_dnd_private.h" -#define MY_CLASS_DRAG EFL_UI_DND_DRAG_MIXIN -#define MY_CLASS_DROP EFL_UI_DND_DROP_MIXIN +//#define MY_CLASS_DRAG EFL_UI_DND_DRAG_MIXIN +//#define MY_CLASS_DROP EFL_UI_DND_DROP_MIXIN //FIXME: Efl_Selection_Format should be changed to Efl_Data_Format @@ -36,7 +36,7 @@ _selection_manager_get(Eo *obj) } EOLIAN static void -_efl_ui_dnd_drag_efl_dnd_drag_start(Eo *obj, Efl_Ui_Dnd_Drag_Data *pd, Efl_Selection_Format format, const void *buf, int len, Efl_Selection_Action action, void *icon_func_data, Efl_Dnd_Drag_Icon_Create icon_func, Eina_Free_Cb icon_func_free_cb) +_efl_ui_dnd_efl_dnd_drag_start(Eo *obj, Efl_Ui_Dnd_Data *pd, Efl_Selection_Format format, const void *buf, int len, Efl_Selection_Action action, void *icon_func_data, Efl_Dnd_Drag_Icon_Create icon_func, Eina_Free_Cb icon_func_free_cb) { ERR("In"); pd->icon_create = icon_func; @@ -49,20 +49,20 @@ _efl_ui_dnd_drag_efl_dnd_drag_start(Eo *obj, Efl_Ui_Dnd_Drag_Data *pd, Efl_Selec } EOLIAN static void -_efl_ui_dnd_drag_efl_dnd_drag_cancel(Eo *obj, Efl_Ui_Dnd_Drag_Data *pd) +_efl_ui_dnd_efl_dnd_drag_cancel(Eo *obj, Efl_Ui_Dnd_Data *pd) { ERR("In"); } EOLIAN static void -_efl_ui_dnd_drag_efl_dnd_drag_action_set(Eo *obj, Efl_Ui_Dnd_Drag_Data *pd , Efl_Selection_Action action) +_efl_ui_dnd_efl_dnd_drag_action_set(Eo *obj, Efl_Ui_Dnd_Data *pd , Efl_Selection_Action action) { ERR("In"); pd->action = action; } EOLIAN static void -_efl_ui_dnd_drag_efl_dnd_drag_item_container_add(Eo *obj, Efl_Ui_Dnd_Drag_Data *pd, double time_to_drag, double anim_time, +_efl_ui_dnd_efl_dnd_drag_item_container_add(Eo *obj, Efl_Ui_Dnd_Data *pd, double time_to_drag, double anim_time, void *data_func_data, Efl_Dnd_Drag_Data_Get data_func, Eina_Free_Cb data_func_free_cb, void *item_func_data, Efl_Dnd_Drag_Item_Get item_func, Eina_Free_Cb item_func_free_cb, void *icon_func_data, Efl_Dnd_Drag_Icon_Create icon_func, Eina_Free_Cb icon_func_free_cb, @@ -72,13 +72,13 @@ _efl_ui_dnd_drag_efl_dnd_drag_item_container_add(Eo *obj, Efl_Ui_Dnd_Drag_Data * } static void -_efl_ui_dnd_drag_efl_dnd_drag_item_container_del(Eo *obj, Efl_Ui_Dnd_Drag_Data *pd) +_efl_ui_dnd_efl_dnd_drag_item_container_del(Eo *obj, Efl_Ui_Dnd_Data *pd) { ERR("In"); } EOLIAN static void -_efl_ui_dnd_drop_efl_dnd_drop_target_add(Eo *obj, Efl_Ui_Dnd_Drop_Data *pd, Efl_Selection_Format format) +_efl_ui_dnd_efl_dnd_drop_target_add(Eo *obj, Efl_Ui_Dnd_Data *pd, Efl_Selection_Format format) { ERR("In"); pd->format = format; @@ -88,24 +88,23 @@ _efl_ui_dnd_drop_efl_dnd_drop_target_add(Eo *obj, Efl_Ui_Dnd_Drop_Data *pd, Efl_ } EOLIAN static void -_efl_ui_dnd_drop_efl_dnd_drop_target_del(Eo *obj, Efl_Ui_Dnd_Drop_Data *pd, Efl_Selection_Format format) +_efl_ui_dnd_efl_dnd_drop_target_del(Eo *obj, Efl_Ui_Dnd_Data *pd, Efl_Selection_Format format) { ERR("In"); pd->format = format; } EOLIAN static void -_efl_ui_dnd_drop_efl_dnd_drop_item_container_add(Eo *obj, Efl_Ui_Dnd_Drop_Data *pd, Efl_Selection_Format format, void *item_func_data, Efl_Dnd_Drop_Item_Get item_func, Eina_Free_Cb item_func_free_cb) +_efl_ui_dnd_efl_dnd_drop_item_container_add(Eo *obj, Efl_Ui_Dnd_Data *pd, Efl_Selection_Format format, void *item_func_data, Efl_Dnd_Drop_Item_Get item_func, Eina_Free_Cb item_func_free_cb) { ERR("In"); } EOLIAN static void -_efl_ui_dnd_drop_efl_dnd_drop_item_container_del(Eo *obj, Efl_Ui_Dnd_Drop_Data *pd) +_efl_ui_dnd_efl_dnd_drop_item_container_del(Eo *obj, Efl_Ui_Dnd_Data *pd) { ERR("In"); } -#include "efl_ui_dnd_drag.eo.c" -#include "efl_ui_dnd_drop.eo.c" +#include "efl_ui_dnd.eo.c" diff --git a/src/lib/elementary/efl_dnd_private.h b/src/lib/elementary/efl_dnd_private.h index 418bd3e055..ac6e09ef9b 100644 --- a/src/lib/elementary/efl_dnd_private.h +++ b/src/lib/elementary/efl_dnd_private.h @@ -12,10 +12,11 @@ #include <Elementary.h> #include "elm_priv.h" -typedef struct _Efl_Ui_Dnd_Drag_Data Efl_Ui_Dnd_Drag_Data; -typedef struct _Efl_Ui_Dnd_Drop_Data Efl_Ui_Dnd_Drop_Data; +//typedef struct _Efl_Ui_Dnd_Drag_Data Efl_Ui_Dnd_Drag_Data; +//typedef struct _Efl_Ui_Dnd_Drop_Data Efl_Ui_Dnd_Drop_Data; +typedef struct _Efl_Ui_Dnd_Data Efl_Ui_Dnd_Data; -struct _Efl_Ui_Dnd_Drag_Data +struct _Efl_Ui_Dnd_Data { int type; Ecore_Event_Handler *notify_handler; @@ -27,12 +28,13 @@ struct _Efl_Ui_Dnd_Drag_Data Eina_Free_Cb icon_create_free_cb; // Efl_Selection_Action action; + Efl_Selection_Format format; }; -struct _Efl_Ui_Dnd_Drop_Data +/*struct _Efl_Ui_Dnd_Drop_Data { Efl_Promise *promise; Efl_Selection_Format format; -}; +};*/ #endif diff --git a/src/lib/elementary/efl_selection_manager.c b/src/lib/elementary/efl_selection_manager.c index f22a68ae9e..528b0555d0 100644 --- a/src/lib/elementary/efl_selection_manager.c +++ b/src/lib/elementary/efl_selection_manager.c @@ -489,7 +489,7 @@ _efl_sel_manager_x11_selection_notify(void *udata, int type EINA_UNUSED, void *e EINA_INLIST_FOREACH_SAFE(dropable->format_list, itr, df) if (df->format & dropable->last.format) { - efl_event_callback_call(dropable->obj, EFL_DND_DROP_EVENT_DRAG_DROP, &ddata); + efl_event_callback_call(dropable->obj, EFL_DND_EVENT_DRAG_DROP, &ddata); } } } @@ -1061,7 +1061,7 @@ _x11_drag_mouse_up(void *data, int etype EINA_UNUSED, void *event) } } if (!have_drops) ecore_x_dnd_aware_set(xwin, EINA_FALSE); - efl_event_callback_call(pd->drag_obj, EFL_DND_DRAG_EVENT_DRAG_DONE, NULL); + efl_event_callback_call(pd->drag_obj, EFL_DND_EVENT_DRAG_DONE, NULL); if (pd->drag_win) { if (pd->drag_obj) @@ -1120,7 +1120,7 @@ _x11_drag_move(void *data, Ecore_X_Xdnd_Position *pos) dp.y = pos->position.y; dp.action = pd->drag_action; //dp.format = ;// - efl_event_callback_call(pd->drag_obj, EFL_DND_DRAG_EVENT_DRAG_POS, &dp); + efl_event_callback_call(pd->drag_obj, EFL_DND_EVENT_DRAG_POS, &dp); } static void @@ -1158,7 +1158,7 @@ _x11_dnd_status(void *data, int etype EINA_UNUSED, void *ev) { sel_debug("Won't accept accept\n"); } - efl_event_callback_call(pd->drag_obj, EFL_DND_DRAG_EVENT_DRAG_ACCEPT, &pd->accept); + efl_event_callback_call(pd->drag_obj, EFL_DND_EVENT_DRAG_ACCEPT, &pd->accept); return EINA_TRUE; } @@ -1492,7 +1492,7 @@ _x11_dnd_dropable_handle(Efl_Selection_Manager_Data *pd, Dropable *dropable, Eva { if (df->format & dropable->last.format) { - efl_event_callback_call(dropable->obj, EFL_DND_DROP_EVENT_DRAG_POS, &pos_data); + efl_event_callback_call(dropable->obj, EFL_DND_EVENT_DRAG_POS, &pos_data); } } /*EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs) @@ -1513,12 +1513,12 @@ _x11_dnd_dropable_handle(Efl_Selection_Manager_Data *pd, Dropable *dropable, Eva EINA_INLIST_FOREACH_SAFE(dropable->format_list, itr, df) { if (df->format &dropable->last.format) - efl_event_callback_call(dropable->obj, EFL_DND_DROP_EVENT_DRAG_ENTER, NULL); + efl_event_callback_call(dropable->obj, EFL_DND_EVENT_DRAG_ENTER, NULL); } EINA_INLIST_FOREACH_SAFE(last_dropable->format_list, itr, df) { if (df->format & last_dropable->last.format) - efl_event_callback_call(last_dropable->obj, EFL_DND_DROP_EVENT_DRAG_LEAVE, NULL); + efl_event_callback_call(last_dropable->obj, EFL_DND_EVENT_DRAG_LEAVE, NULL); } /*EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs) if ((cbs->types & dropable->last.format) && cbs->entercb) @@ -1537,7 +1537,7 @@ _x11_dnd_dropable_handle(Efl_Selection_Manager_Data *pd, Dropable *dropable, Eva EINA_INLIST_FOREACH_SAFE(last_dropable->format_list, itr, df) { if (df->format & last_dropable->last.format) - efl_event_callback_call(last_dropable->obj, EFL_DND_DROP_EVENT_DRAG_LEAVE, NULL); + efl_event_callback_call(last_dropable->obj, EFL_DND_EVENT_DRAG_LEAVE, NULL); } /*EINA_INLIST_FOREACH_SAFE(last_dropable->cbs_list, itr, cbs) if ((cbs->types & last_dropable->last.format) && cbs->leavecb) @@ -1565,8 +1565,8 @@ _x11_dnd_dropable_handle(Efl_Selection_Manager_Data *pd, Dropable *dropable, Eva { if (df->format & dropable->last.format) { - efl_event_callback_call(dropable->obj, EFL_DND_DROP_EVENT_DRAG_ENTER, NULL); - efl_event_callback_call(dropable->obj, EFL_DND_DROP_EVENT_DRAG_POS, &pos_data); + efl_event_callback_call(dropable->obj, EFL_DND_EVENT_DRAG_ENTER, NULL); + efl_event_callback_call(dropable->obj, EFL_DND_EVENT_DRAG_POS, &pos_data); } } /*EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs) @@ -1974,7 +1974,7 @@ found: ddata.data = (char *)pd->savedtypes->imgfile; ddata.len = strlen(ddata.data); if (df->format & dropable->last.format) - efl_event_callback_call(dropable->obj, EFL_DND_DROP_EVENT_DRAG_DROP, &ddata); + efl_event_callback_call(dropable->obj, EFL_DND_EVENT_DRAG_DROP, &ddata); } else { diff --git a/src/lib/elementary/efl_selection_manager.eo b/src/lib/elementary/efl_selection_manager.eo index 216548ef0b..d9bd3ac3f5 100644 --- a/src/lib/elementary/efl_selection_manager.eo +++ b/src/lib/elementary/efl_selection_manager.eo @@ -1,4 +1,4 @@ -class Efl.Selection.Manager (Efl.Object, Efl.Selection, Efl.Dnd.Drag, Efl.Dnd.Drop) { +class Efl.Selection.Manager (Efl.Object, Efl.Selection, Efl.Dnd) { methods { selection_set { params { diff --git a/src/lib/elementary/efl_ui_dnd.eo b/src/lib/elementary/efl_ui_dnd.eo new file mode 100644 index 0000000000..8158922a2e --- /dev/null +++ b/src/lib/elementary/efl_ui_dnd.eo @@ -0,0 +1,16 @@ +import efl_selection_types; +import efl_dnd_types; + +mixin Efl.Ui.Dnd (Efl.Dnd) { + implements { + Efl.Dnd.drag_start; + Efl.Dnd.drag_cancel; + Efl.Dnd.drag_action_set; + Efl.Dnd.drag_item_container_add; + Efl.Dnd.drag_item_container_del; + Efl.Dnd.drop_target_add; + Efl.Dnd.drop_target_del; + Efl.Dnd.drop_item_container_add; + Efl.Dnd.drop_item_container_del; + } +} diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo index 1d00941333..121f3025b1 100644 --- a/src/lib/elementary/elm_widget.eo +++ b/src/lib/elementary/elm_widget.eo @@ -21,7 +21,7 @@ struct Elm.Widget.Focus_State { abstract Elm.Widget (Efl.Canvas.Group, Efl.Access, Efl.Access.Component, Efl.Ui.Focus.User, Efl.Part, Efl.Ui.Focus.Object, Efl.Ui.Base, Efl.Ui.Cursor, - Efl.Ui.Translatable, Efl.Cnp, Efl.Ui.Dnd.Drag, Efl.Ui.Dnd.Drop) + Efl.Ui.Translatable, Efl.Cnp, Efl.Ui.Dnd) { [[Elementary widget abstract class]] legacy_prefix: elm_widget; |