Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary clipboard #46

Open
anna-is-cute opened this issue Nov 19, 2017 · 4 comments
Open

Binary clipboard #46

anna-is-cute opened this issue Nov 19, 2017 · 4 comments

Comments

@anna-is-cute
Copy link

Being able to read the clipboard as a vector or slice of u8s would be extremely useful to anyone who needs to work with the clipboard not just with strings.

I know this is feasible in Windows, and I think it can be done in macOS (from what I read of the current implementation), but I don't know about in X11.

@aweinstock314
Copy link
Owner

I agree that this would be a useful feature. I'm willing to accept a PR that adds support for the platforms that you're willing to implement it for, and I'll add support for the rest of the platforms (it should be feasible under X11 too).

@NomadMaker
Copy link

Has there been any progress on this?

I am willing to work on an X11 version. I am sure that it can be done because I have written a Java application which copies images from the system clipboard from a different graphics application under Linux. I think that is a proof of concept, at least.

Multiple things can be in the clipboard at the same time, which might require changes to your elegant clipboard.

@rickycodes
Copy link
Contributor

I am also looking for this functionality... Got a panic when calling Result::unwrap() on ctx.get_contents() when trying to read image data:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: StringError("pasteboard#readObjectsForClasses:options: returned empty")', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

@leiserfg
Copy link

Check this
https://github.com/SpiralP/rust-clip-sys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants