2018-01-08 23:22:49 -08:00
|
|
|
import efl_ui_dnd_types;
|
|
|
|
|
2019-02-14 08:37:02 -08:00
|
|
|
mixin @beta Efl.Ui.Dnd {
|
2018-01-08 23:22:49 -08:00
|
|
|
data: null;
|
|
|
|
methods {
|
|
|
|
drag_start {
|
|
|
|
[[Start a drag and drop process at the drag side.
|
|
|
|
During dragging, there are three events emitted as belows:
|
|
|
|
- EFL_UI_DND_EVENT_DRAG_POS
|
|
|
|
- EFL_UI_DND_EVENT_DRAG_ACCEPT
|
|
|
|
- EFL_UI_DND_EVENT_DRAG_DONE
|
|
|
|
]]
|
|
|
|
params {
|
2018-12-21 13:46:06 -08:00
|
|
|
@in format: Efl.Ui.Selection_Format; [[The data format]]
|
2018-01-08 23:22:49 -08:00
|
|
|
@in data: Eina.Slice; [[The drag data]]
|
2018-12-21 13:46:06 -08:00
|
|
|
@in action: Efl.Ui.Selection_Action; [[Action when data is transferred]]
|
2018-01-08 23:22:49 -08:00
|
|
|
@in icon_func: Efl.Dnd.Drag_Icon_Create; [[Function pointer to create icon]]
|
|
|
|
@in seat: uint; [[Specified seat for multiple seats case.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
drag_action_set {
|
|
|
|
[[Set the action for the drag]]
|
|
|
|
params {
|
2018-12-21 13:46:06 -08:00
|
|
|
@in action: Efl.Ui.Selection_Action; [[Drag action]]
|
2018-01-08 23:22:49 -08:00
|
|
|
@in seat: uint; [[Specified seat for multiple seats case.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
drag_cancel {
|
|
|
|
[[Cancel the on-going drag]]
|
|
|
|
params {
|
|
|
|
@in seat: uint; [[Specified seat for multiple seats case.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
drop_target_add {
|
2018-08-31 01:45:31 -07:00
|
|
|
[[Make the current object as drop target.
|
2018-01-08 23:22:49 -08:00
|
|
|
There are four events emitted:
|
|
|
|
- EFL_UI_DND_EVENT_DRAG_ENTER
|
|
|
|
- EFL_UI_DND_EVENT_DRAG_LEAVE
|
|
|
|
- EFL_UI_DND_EVENT_DRAG_POS
|
|
|
|
- EFL_UI_DND_EVENT_DRAG_DROP.]]
|
|
|
|
params {
|
2018-12-21 13:46:06 -08:00
|
|
|
@in format: Efl.Ui.Selection_Format; [[Accepted data format]]
|
2018-01-08 23:22:49 -08:00
|
|
|
@in seat: uint; [[Specified seat for multiple seats case.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
drop_target_del {
|
|
|
|
[[Delete the dropable status from object]]
|
|
|
|
params {
|
2018-12-21 13:46:06 -08:00
|
|
|
@in format: Efl.Ui.Selection_Format; [[Accepted data format]]
|
2018-01-08 23:22:49 -08:00
|
|
|
@in seat: uint; [[Specified seat for multiple seats case.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
events {
|
efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).
In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).
Test Plan: make with c# bindings works, make check and make examples work too.
Reviewers: cedric, q66, lauromoura
Subscribers: zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6169
2018-05-11 08:20:40 -07:00
|
|
|
/* FIXME: This is not very future-proof. Better return a struct. */
|
|
|
|
drag,accept: ptr(bool); [[accept drag data]]
|
|
|
|
drag,done: void; [[drag is done (mouse up)]]
|
|
|
|
drag,enter: void; [[called when the drag object enters this object]]
|
|
|
|
drag,leave: void; [[called when the drag object leaves this object]]
|
|
|
|
drag,pos: Efl.Dnd.Drag_Pos; [[called when the drag object changes drag position]]
|
2018-12-21 13:46:06 -08:00
|
|
|
drag,drop: Efl.Ui.Selection_Data; [[called when the drag object dropped on this object]]
|
2018-01-08 23:22:49 -08:00
|
|
|
}
|
|
|
|
}
|