[][src]Struct smithay_clipboard::ThreadedClipboard

pub struct ThreadedClipboard { /* fields omitted */ }
[]

Object representing the Wayland clipboard

Implementations

impl ThreadedClipboard[src][]

pub fn new(display: &Display) -> Self[src][]

Creates a new wayland clipboard object

Spawns a new thread to dispatch messages to the wayland server every 50ms to ensure the server can read stored data

pub unsafe fn new_from_external(display_ptr: *mut wl_display) -> Self[src][]

Creates a new wayland clipboard object from a mutable wl_display ptr

Spawns a new thread to dispatch messages to the wayland server every 50ms to ensure the server can read stored data

pub fn load(&mut self, seat_name: Option<String>) -> Result<String>[src][]

Returns text from the wayland clipboard

If provided with a seat name that seat must be in focus to work. Otherwise if no seat name is provided the name of the seat to last generate a key or pointer event is used

pub fn store<T>(&mut self, seat_name: Option<String>, text: T) where
    T: Into<String>, 
[src][]

Stores text in the wayland clipboard

If provided with a seat name that seat must be in focus to work. Otherwise if no seat name is provided the name of the seat to last generate a key or pointer event is used

pub fn load_primary(&mut self, seat_name: Option<String>) -> Result<String>[src][]

Returns text from the primary selection of the wayland clipboard

If provided with a seat name that seat must be in focus to work. Otherwise if no seat name is provided the name of the seat to last generate a key or pointer event is used

pub fn store_primary(&mut self, seat_name: Option<String>, text: String)[src][]

Stores text in the primary selection of the wayland clipboard

If provided with a seat name that seat must be in focus to work. Otherwise if no seat name is provided the name of the seat to last generate a key or pointer event is used

Trait Implementations

impl Drop for ThreadedClipboard[src][+]

Auto Trait Implementations

impl !RefUnwindSafe for ThreadedClipboard

impl Send for ThreadedClipboard

impl !Sync for ThreadedClipboard

impl Unpin for ThreadedClipboard

impl !UnwindSafe for ThreadedClipboard

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src][+]

impl<T> Borrow<T> for T where
    T: ?Sized
[src][+]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src][+]

impl<T> From<T> for T[src][+]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src][+]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src][+]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src][+]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.