struct Inner {
server: XContext,
atoms: Atoms,
clipboard: Selection,
primary: Selection,
secondary: Selection,
handover_state: Mutex<ManagerHandoverState>,
handover_cv: Condvar,
serve_stopped: AtomicBool,
}Fields§
§server: XContextThe 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: AtomicBoolImplementations§
Source§impl Inner
impl Inner
fn new() -> Result<Self, Error>
Sourcefn clear(&self, selection: LinuxClipboardKind) -> Result<(), Error>
fn clear(&self, selection: LinuxClipboardKind) -> Result<(), Error>
Performs a “clear” operation on the clipboard, which is implemented by
relinquishing the selection to revert its owner to None. This gracefully
and comformly informs the X server and any clipboard managers that the
data was no longer valid and won’t be offered from our window anymore.
See ask_clipboard_manager_to_request_our_data for more details on why
this is important and specification references.
fn write( &self, data: Vec<ClipboardData>, clipboard_selection: LinuxClipboardKind, wait: WaitConfig, ) -> 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 UnsafeUnpin 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