This is just for files, the other data can have own event to not force users to do switch in a switch. I don't think anything in events right now requires such a construct. I actually noticed the text only clipboard we got when I took a look at this which is why I thought we might focus on the biggest catch first here too.
Honestly, even file names are kind of problematic-ish because on Windows they use a 16bit wchar and on Linux it's all normal chars in UTF8. I converted to an std::string because I assume we use that for filename, as we do in all the loadFromFile and openFromFile functions. Text drag and drop can be sf::String of course.
According to
http://anton.maurovic.com/posts/win32-api-approach-to-windows-drag-and-drop/ Windows supports non-file list drag and drop (and it clearly does as you can drag and drop text between textual elements of different windows/programs) but only via COM or a third party library that wraps that COM..?
According to
https://www.freedesktop.org/wiki/Specifications/XDND/ Linux (or more accurately anything using X) seems to support other kinds of data. No idea about Wayland but it probably does too and we don't have a Wayland backend anyway.
I've seen LCL (a Pascal GUI toolkit, quite portable and using one of other GUI toolkits as backend) only implement the file list drag and drop, Qt seems to implement it all and mesh it into one 'drop event'.
Toggling the drop acceptance of course possible too (for winapi at least, not sure with X and win COM).
I also have no idea for a good API.
I also hate to give Windows only stuff a slack but maybe drop files is a good cut off point to satisfy most users with least effort. No drag and drop at all will be much worse than a drag and drop that only handles file list and one that handles everything will be complicated, so this might do or at least do for now.
We are already cutting many corners and saying we are not that rich of a windowing toolkit, like not supporting transparent and non rectangular windows, the tray, client side decorations, etc. and just tell people to use the window handle then so we might as well do just file drop since it'll satisfy most users and the code for the (sadly..) most popular platform is SO simple.
I'm not sure if that COM code for rich drag and drop needs more than just a handle, but the win api file drop required handling a message in SFML code, I'll try see if it's possible to replace the message handler or not with just what SMFL exposes to user and the winapi, if yes then this might serve as a workaround for now.