Drag and drop support,


Hi, I see there is support for receiving dropped files (receiving an SDL_DropEvent )

… but is there a cross-platform abstraction within an SDL application to initiate a drag ‘source’* (to other applications, such that they will receive drop-events when the user releases the mouse on them)

e.g. imagine you wanted to make some sort of 3d file browser, supporting both dropping files and being a source to drag to others.

I imagine the details of drag-and-drop varies between platforms, but they all seem to handle drag-and-drop of filenames and text; what I imagine is calling something like SDL_dragAndDrop_SendText(const char* text), SDL_dragAndDrop_SendFilename(const char* filename), which would initiate whatever focus grabbing etc was required; I guess this would be called when the application receives an event for the mouse leaving the sdl window during a drag, or it could equally be called when the user begins a drag (if the application wants to support an exactly symmetrical ‘drag-drop’ paradigm to itself)

I guess this would map to XDND on the linux platform, I’ve no idea how it works natively elsewhere

if there isn’t something like this in SDL already, could such a thing be developed outside but in a way which is easy to absorb via PR