mirror of
https://github.com/jwinterm/grim.git
synced 2026-10-20 23:28:31 +02:00
desktop: add arboard dependency to manage clipboard
This commit is contained in:
@@ -22,9 +22,13 @@ impl PlatformCallbacks for Desktop {
|
||||
|
||||
fn hide_keyboard(&self) {}
|
||||
|
||||
fn copy_string_to_buffer(&self, data: String) {}
|
||||
fn copy_string_to_buffer(&self, data: String) {
|
||||
let mut clipboard = arboard::Clipboard::new().unwrap();
|
||||
clipboard.set_text(data).unwrap();
|
||||
}
|
||||
|
||||
fn get_string_from_buffer(&self) -> String {
|
||||
"".to_string()
|
||||
let mut clipboard = arboard::Clipboard::new().unwrap();
|
||||
clipboard.get_text().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user