struct Inner {
server: XContext,
atoms: Atoms,
clipboard: Selection,
primary: Selection,
secondary: Selection,
handover_state: Mutex<ManagerHandoverState>,
handover_cv: Condvar,
serve_stopped: AtomicBool,
}
Fields§
§server: XContext
The context for the thread which serves clipboard read requests coming to us.
atoms: Atoms
§clipboard: Selection
§primary: Selection
§secondary: Selection
§handover_state: Mutex<ManagerHandoverState>
§handover_cv: Condvar
§serve_stopped: AtomicBool
Implementations§
source§impl Inner
impl Inner
fn new() -> Result<Self, Error>
fn write( &self, data: Vec<ClipboardData>, selection: LinuxClipboardKind, wait: bool, ) -> Result<(), Error>
sourcefn read(
&self,
formats: &[Atom],
selection: LinuxClipboardKind,
) -> Result<ClipboardData, Error>
fn read( &self, formats: &[Atom], selection: LinuxClipboardKind, ) -> Result<ClipboardData, Error>
formats
must be a slice of atoms, where each atom represents a target format.
The first format from formats
, which the clipboard owner supports will be the
format of the return value.
fn read_single( &self, reader: &XContext, selection: LinuxClipboardKind, target_format: Atom, ) -> Result<Vec<u8>, Error>
fn atom_of(&self, selection: LinuxClipboardKind) -> Atom
fn selection_of(&self, selection: LinuxClipboardKind) -> &Selection
fn kind_of(&self, atom: Atom) -> Option<LinuxClipboardKind>
fn is_owner(&self, selection: LinuxClipboardKind) -> Result<bool, Error>
fn atom_name(&self, atom: Atom) -> Result<String, Error>
fn atom_name_dbg(&self, atom: Atom) -> &'static str
fn handle_read_selection_notify( &self, reader: &XContext, target_format: u32, using_incr: &mut bool, incr_data: &mut Vec<u8>, event: SelectionNotifyEvent, ) -> Result<ReadSelNotifyResult, Error>
sourcefn handle_read_property_notify(
&self,
reader: &XContext,
target_format: u32,
using_incr: bool,
incr_data: &mut Vec<u8>,
timeout_end: &mut Instant,
event: PropertyNotifyEvent,
) -> Result<bool, Error>
fn handle_read_property_notify( &self, reader: &XContext, target_format: u32, using_incr: bool, incr_data: &mut Vec<u8>, timeout_end: &mut Instant, event: PropertyNotifyEvent, ) -> Result<bool, Error>
Returns Ok(true) when the incr_data is ready
fn handle_selection_request( &self, event: SelectionRequestEvent, ) -> Result<(), Error>
fn ask_clipboard_manager_to_request_our_data(&self) -> Result<(), Error>
Auto Trait Implementations§
impl !Freeze for Inner
impl !RefUnwindSafe for Inner
impl Send for Inner
impl Sync for Inner
impl Unpin for Inner
impl UnwindSafe for Inner
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more