mirror of
https://github.com/1Password/arboard.git
synced 2025-12-23 06:01:09 +00:00
19 lines
416 B
Rust
19 lines
416 B
Rust
extern crate arboard;
|
|
|
|
use arboard::{ClipboardContext, ClipboardProvider, ImageData};
|
|
|
|
fn main() {
|
|
let mut ctx = ClipboardContext::new().unwrap();
|
|
|
|
let img_data = ImageData {
|
|
width: 2,
|
|
height: 2,
|
|
bytes: [
|
|
255, 100, 100, 255, 100, 255, 100, 100, 100, 100, 255, 100, 0, 0, 0, 255,
|
|
]
|
|
.as_ref()
|
|
.into(),
|
|
};
|
|
|
|
ctx.set_image(img_data).unwrap();
|
|
}
|