For reference, Aster (Mischa-Alff) was working on clipboard support. His repository is here.
I am indeed working on clipboard support. The link is
here, rather. Win32 support is already implemented. Linux is a bit more complicated and I'd like to do it right instead of having some hacked together code. (By "a bit", I mean "Oh God my eyes are bleeding why did I ever commit to doing this?!")
We could handle all the Linux cut buffers/clipboard/selections etc, but honestly, it's not worth it. I'm settling on using X11 selections (or whatever they're called, it's late) because they work pretty much everywhere, and that's what everyone else uses.
I'd be a bit more enthusiastic about Linux support, but my ArchLinux drive died (after ten years of service), and I'm waiting for a new SSD to get delivered to move back to using Arch again. For what I've looked at so far, it might be worth having a clipboard event that's only handled internally, but I'll have to see how I should work with that.
The API is:
- sf::String sf::Window::getClipboard();
- void sf::Window::setClipboard(const sf::String&);
There's an example in
examples/clipboard in case you want to test it out.
Also, on handling multiple MIME types, zsbzsb suggested we overload the function in
sf::RenderWindow for image support. I'm still hesitant about this. If you want to use multiple MIME types in the clipboard, chances are what SFML will provide isn't enough, and you'll end up extending it yourself anyways.
Cheers.