Name: rust-clipboard
Owner: Servo
Description: X11 Clipboard interfacing library in Rust
Created: 2015-04-23 15:12:11.0
Updated: 2018-01-22 18:45:56.0
Pushed: 2016-03-22 12:46:21.0
Homepage: null
Size: 55
Language: Rust
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
rust-clipboard is a cross-platform library for getting and setting the contents of the OS-level clipboard. It has been tested on Windows, Mac OSX, and GNU/Linux. It is used in Mozilla Servo.
xample() {
let mut ctx = ClipboardContext::new().unwrap();
println!("{}", ctx.get_contents());
ctx.set_contents(&"some string");
ew() -> Result<ClipboardContext, Box<Error>>
et_contents(&ClipboardContext) -> Result<String, Box<Error>>
et_contents(&mut ClipboardContext, String) -> Result<(), Box<Error>>
ClipboardContext
is an opaque struct that is defined in different ways based on the OS via conditional compilation.
Since the x11 backend contains code derived from xclip (which is GPLv2), rust-clipboard must currently be treated as GPLv2.
I plan to rewrite x11-clipboard.rs
by strictly referencing the ICCCM standard, and relicense to Apache2.
All the other code in rust-clipboard
may be treated as Apache2.