Closed martincapello closed 5 months ago
clang-tidy review says "All clean, LGTM! :+1:"
clang-tidy review says "All clean, LGTM! :+1:"
I've pushed other commit in the branch for the allevents example. I think we'll need a new kind of event, because DropFiles occurs when we release the mouse button, but for this we'll need some kind of feedback in the whole drag operation.
Great. Yeah, we will need a new event for that. DragFiles?
It can be "DragFiles", although we'll need to detect the "DragFilesEnter" and "DragFilesLeave" events too (to remove the feedback if the user does't drop or press Esc key).
Not sure if we should create more generic DnD (drag-and-drop) events at this moment (e.g. DragEnter / DragLeave / Drag / Drop) probably just leave this as specific (for files only now) as possible and leave more generic events for a future refactor.
I've been investigating a bit, and it actually makes sense to go generic right now....because the DnD protocols used in each OS are generic as well. Because if I understood well, the drop files event is a sort of simplified DnD case on windows that we emulated in linux and macos using just some parts of their generic protocols, right? Then, to get feedback about the dragging we will need to implement the IDropTarget interface on Windows. In macOs we will have to add support for draggingUpdated:, draggingExited: and draggingEnded:. And in linux, we will have to take a closer look to XDnD protocol to support the dragging feedback.
That seems the best decision. I can merge this right now (as this PR adds the position of the DropFiles event correctly), and do the whole DnD work in a specific dnd branch for that. I could take some part of the implementation if you wish.
Makes sense. Merge this as is and I will continue working in a different branch. First I would like to start drafting some implementation for macOS to agree with you about the api that should be exposed to laf clients and some implementation details.
Implements pending work needed for https://github.com/aseprite/aseprite/issues/131