You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.1 Reported for operating system, platform: All, All
Comments on the original bug report:
On 2015-04-16 09:34:16 +0000, wrote:
Created attachment 2126
Drag and Drop API extensions.
Currently SDL only supports dropping of files and clipboards of text.
Some GUI applications may want to drag and drop other types of data and even internal content such as widgets or tabs. They may also wish to deal with the file lists directly rather than receiving individual SDL_DropFile events. Furthermore some toolkits may want to accept/decline or animate the data based on the location of the drop event so would need window id and co-ordinates.
Mime types are the most extensible format for arbitrary data and can easily be converted from/to platform specific drag and drop data types.
Currently there are some toolkits which try to implement tab dragging by first spawning a window and then having the window follow the pointer. Adding in an extensible drag and drop api would allow applications to send tabs via an "application/x-appname-tab" mime type. For systems that do not support such a generic drag and drop types SDL could resort to emulating this by spawning a window and having it following the mouse. This means SDL does not have to expose certain mouse/window features that may not be supported on all platforms, including virtual desktop ids or global events.
I have implemented a preliminary API interface to allow drag and dropping any kind of data and then allowing the application to receive some events. Currently the accept/decline will works similar to the hit test callback and the initial drag, but this could be changed.
I would appreciate anyones opinions on the API and if there are any alternative implementations. I will look next to implementing the actual backend on different platforms.
On 2017-08-13 00:44:20 +0000, Sam Lantinga wrote:
Interesting proposal! I'm marking it for consideration for SDL 2.1.
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.1
Reported for operating system, platform: All, All
Comments on the original bug report:
On 2015-04-16 09:34:16 +0000, wrote:
On 2017-08-13 00:44:20 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: