pub mod common;
mod platform;
pub use common::{ClipboardContent, ClipboardHandler, ContentFormat, Result, RustImageData};
pub use image::imageops::FilterType;
pub use platform::{ClipboardContext, ClipboardWatcherContext, WatcherShutdown};
pub trait Clipboard: Send {
fn available_formats(&self) -> Result<Vec<String>>;
fn has(&self, format: ContentFormat) -> bool;
fn clear(&self) -> Result<()>;
fn get_buffer(&self, format: &str) -> Result<Vec<u8>>;
fn get_text(&self) -> Result<String>;
fn get_rich_text(&self) -> Result<String>;
fn get_html(&self) -> Result<String>;
fn get_image(&self) -> Result<RustImageData>;
fn get_files(&self) -> Result<Vec<String>>;
fn get(&self, formats: &[ContentFormat]) -> Result<Vec<ClipboardContent>>;
fn set_buffer(&self, format: &str, buffer: Vec<u8>) -> Result<()>;
fn set_text(&self, text: String) -> Result<()>;
fn set_rich_text(&self, text: String) -> Result<()>;
fn set_html(&self, html: String) -> Result<()>;
fn set_image(&self, image: RustImageData) -> Result<()>;
fn set_files(&self, files: Vec<String>) -> Result<()>;
fn set(&self, contents: Vec<ClipboardContent>) -> Result<()>;
}
pub trait ClipboardWatcher<T: ClipboardHandler>: Send {
fn add_handler(&mut self, handler: T) -> &mut Self;
fn start_watch(&mut self);
fn get_shutdown_channel(&self) -> WatcherShutdown;
}
impl WatcherShutdown {
pub fn stop(self) {
drop(self);
}
}