Page MenuHomePhabricator

EO: Dnd (Drag & Drop)
Closed, ResolvedPublic


See T5301

The EO API for drag and drop needs to be defined.

jpeg created this task.May 25 2017, 3:43 AM
jpeg mentioned this in T5528: Copy & Paste EO API.

Maybe this should be mentioned here T5502

jpeg added a comment.May 25 2017, 3:57 AM

Ooops looks like I've duplicated the ticket for cnp :)

jpeg assigned this task to thiepha.May 25 2017, 11:15 PM
jpeg added a subscriber: cedric.May 30 2017, 7:06 AM

The name Efl.Ui.Draggable is not clear that this is for drag and drop, as opposed to drag as a slider. See also T5526.
I would say Efl.Ui.Draggable should be called Efl.Ui.Dnd (there be dragons...) and T5526 can use Efl.Ui.Drag.

Note that Efl.Ui.Draggable currently has only drag_target and nothing else but events. I believe dnd also requires at least an API to specify which object can be dragged :)

I agree with you, dragon are better than draggable.

As for which object to drag, shouldn't that be like enable a property on every widget ? Or maybe on some of it, like label and image ?

jpeg added a subscriber: DaveMDS.May 30 2017, 7:10 PM

I think many widgets could be draggable. For now this is limited to:

  • Image
  • Photo (legacy)
  • Thumb (legacy)

What's missing here are:

  • Image.Zoomable (photocam... although in this case the question is how do we drag vs. pan)
  • Label (dnd a string of text)
  • Multibutton entry (ex. dnd an email address)
  • Genlist items (dnd files...)
  • and probably many others

I don't know DnD well enough to know if those are realistic, but I wouldn't rush in applying draggable to all widgets.

I agree that we should change Efl.Ui.Draggable name. Efl.Ui.Dnd seems better name since it includes both draggable and droppable sides which are two operations of dnd.
One object can be drag or drop or both of them. We need APIs to specify which object can be dragged, dropped.
I don't think we need to enable dnd by default for all widgets, some of them could be enough (like entry, image, photo...). The remained ones could be handled by application.

Another design decision to keep in mind here. We need multi finger support (possibility to drag multiple object at the same time) per seat capability to be prepared for the long term.

cedric raised the priority of this task from TODO to High.Jul 10 2017, 2:18 PM
jpeg added a comment.Oct 10 2017, 2:42 AM

@thiepha what's the progress status on CnP & DnD?

jpeg renamed this task from Dnd (Drag & Drop) to EO: Dnd (Drag & Drop).Nov 13 2017, 2:39 AM
jpeg added a comment.Dec 11 2017, 6:06 PM

I saw some progress on the CnP & DnD interfaces, but API-wise this needs a little extra work (in fact, making it simpler).
Genlist-style item DnD remains an open issue, as the list is not yet merged in master.

jpeg closed this task as Resolved.Jan 18 2018, 1:55 AM

commit 07e7bbd4b5cc17bbf8c1e48e500396e66f98120e
Author: Thiep Ha <>
Date: Tue Jan 16 16:33:30 2018 +0900

selection_dnd: fix warnings in clang

Fix warnings about type convert and vars init in clang and remove comments.

commit 35339504b0db553083abeccd0bf5c1dcd05b4acc
Author: Thiep Ha <>
Date: Tue Jan 9 16:37:27 2018 +0900

dnd: add efl_ui_dnd_container

efl_ui_dnd_container is the interface of dnd for container objects.

commit e6ab4b41ed8487bf93c5a174a7b06317c2b7e824
Author: Thiep Ha <>
Date: Tue Jan 9 16:22:49 2018 +0900

dnd: add efl_ui_dnd

Efl_Ui_Dnd is the interface for drag and drop of elm_cnp.