Struct smithay_clipboard::Clipboard
source · [−]pub struct Clipboard { /* private fields */ }
Expand description
Access to a Wayland clipboard.
Implementations
sourceimpl Clipboard
impl Clipboard
sourcepub unsafe fn new(display: *mut c_void) -> Self
pub unsafe fn new(display: *mut c_void) -> Self
Creates new clipboard which will be running on its own thread with its own event queue to handle clipboard requests.
Safety
display
must be a valid *mut wl_display
pointer, and it must remain
valid for as long as Clipboard
object is alive.
sourcepub fn load(&self) -> Result<String>
pub fn load(&self) -> Result<String>
Load clipboard data.
Loads content from a clipboard on a last observed seat.
sourcepub fn store<T: Into<String>>(&self, text: T)
pub fn store<T: Into<String>>(&self, text: T)
Store to a clipboard.
Stores to a clipboard on a last observed seat.
sourcepub fn load_primary(&self) -> Result<String>
pub fn load_primary(&self) -> Result<String>
Load primary clipboard data.
Loads content from a primary clipboard on a last observed seat.
sourcepub fn store_primary<T: Into<String>>(&self, text: T)
pub fn store_primary<T: Into<String>>(&self, text: T)
Store to a primary clipboard.
Stores to a primary clipboard on a last observed seat.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Clipboard
impl Send for Clipboard
impl !Sync for Clipboard
impl Unpin for Clipboard
impl !UnwindSafe for Clipboard
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more