Commit Graph

7 Commits

Author SHA1 Message Date
Benjamin Otte
fe7c283aea clipboard: Add infrastructure to store clipboards
Clipboard managers will be so happy once the backends actually implement
it!
2017-12-03 05:46:48 +01:00
Benjamin Otte
8e132ef0c4 clipboard: Allow claiming the clipboard to fail
Also make clipboard_claim() a vfunc so backends can override it.

Because the whole operation a vfunc, backends have the option of adding
code before the actual claim is done and potentially even fail or do
something after the successful claim.
2017-12-03 05:46:47 +01:00
Benjamin Otte
12ca641ff5 clipboard: Implement local fallback clipboard transfers
This requires implementing a "pipe" so we can have 2 streams running:
  contentprovider => serializer => outputstream
  inputstream => deserializer => reader
And the pipe shoves the data from the outputstream into the inputstream.
2017-12-03 05:46:47 +01:00
Benjamin Otte
41f70e18af clipboard: Refactor gdk_clipboard_read() to be async
This allows us not just to pass any mime type to the read function, but
it also makes it possible to pass multiple mime types and the clipboard
can then try them in order until it finds a supported one.

This is so far not implemented though.
2017-12-03 05:46:26 +01:00
Benjamin Otte
c91a38b013 clipboard: Implement gdk_clipboard_read() 2017-12-03 05:43:24 +01:00
Benjamin Otte
a5ab9a9671 clipboard: Add gdk_clipboard_claim_remote()
This allows the remote clipboard to take over. The X11 clipboard already
does that.
2017-12-03 05:43:24 +01:00
Matthias Clasen
e94b9b9a62 gdk: A GdkClipboard API draft
This commit adds a GdkClipboard object which is intended to
replace GtkClipboard, eventually.
2017-12-03 05:43:24 +01:00