Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Clipboard Support  (Read 27728 times)

0 Members and 1 Guest are viewing this topic.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Clipboard Support
« Reply #15 on: September 02, 2017, 04:31:49 pm »
It has been merged into master a few weeks ago. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Clipboard Support
« Reply #16 on: September 02, 2017, 04:51:05 pm »
I couldn't find any discussion about this directly so I had a look at the code:
sf::Clipboard allows transfer of text strings only.

It's understandable but I found it odd that I couldn't find any discussion on why that is.

What happens when the system clipboard contains something else? Does it discard it or treat it as some form of string?

Is there a reason it can't use raw memory blocks, for example?
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Clipboard Support
« Reply #17 on: September 02, 2017, 05:15:02 pm »
There has been discussions around this somewhere, you may want to check the linked threads in the first post.

Afaik the clipboard doesn't work with "raw memory blocks".
The goal was to just provide a first implementation for text and delay the handling of different mime types to a later point.
IIRC if you copy none-text data, you simply can't "insert" it in SFML.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Clipboard Support
« Reply #18 on: September 03, 2017, 02:13:58 pm »
I did look around the multiple pull-requests too and couldn't easily see it being discussed. It was probably either discussed alongside other issues (hiding) or maybe discussed in IRC?

Of course, this doesn't matter and I did say that it was understandable that it was string only. As you say, it's only the first step ;D

IIRC if you copy none-text data, you simply can't "insert" it in SFML.
I was hoping that this was the case. I don't know much about how system clipboards work so don't know if they have any information about its format; I'm guessing they do somewhat.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*