pub struct Clipboard(_, _);Implementations
sourceimpl Clipboard
impl Clipboard
pub fn clear(&self)
pub fn get_display(&self) -> Option<Display>
pub fn get_owner(&self) -> Option<Object>
pub fn get_selection(&self) -> Option<Atom>
pub fn request_contents<P: FnOnce(&Clipboard, &SelectionData) + 'static>(
&self,
target: &Atom,
callback: P
)
pub fn request_image<P: FnOnce(&Clipboard, &Pixbuf) + 'static>(
&self,
callback: P
)
pub fn request_rich_text<P: IsA<TextBuffer>, Q: FnOnce(&Clipboard, &Atom, Option<&str>, usize) + 'static>(
&self,
buffer: &P,
callback: Q
)
pub fn request_text<P: FnOnce(&Clipboard, Option<&str>) + 'static>(
&self,
callback: P
)
pub fn set_image(&self, pixbuf: &Pixbuf)
pub fn set_text(&self, text: &str)
pub fn store(&self)
pub fn wait_for_contents(&self, target: &Atom) -> Option<SelectionData>
pub fn wait_for_image(&self) -> Option<Pixbuf>
pub fn wait_for_rich_text<P: IsA<TextBuffer>>(
&self,
buffer: &P
) -> (Vec<u8>, Atom)
pub fn wait_for_targets(&self) -> Option<Vec<Atom>>
pub fn wait_for_text(&self) -> Option<GString>
pub fn wait_for_uris(&self) -> Vec<GString>
pub fn wait_is_image_available(&self) -> bool
pub fn wait_is_rich_text_available<P: IsA<TextBuffer>>(&self, buffer: &P) -> bool
pub fn wait_is_target_available(&self, target: &Atom) -> bool
pub fn wait_is_text_available(&self) -> bool
pub fn wait_is_uris_available(&self) -> bool
pub fn get(selection: &Atom) -> Clipboard
pub fn get_default(display: &Display) -> Option<Clipboard>
pub fn get_for_display(display: &Display, selection: &Atom) -> Clipboard
sourceimpl Clipboard
impl Clipboard
pub fn set_with_data<F: Fn(&Clipboard, &SelectionData, u32) + 'static>(
&self,
targets: &[TargetEntry],
f: F
) -> bool
Trait Implementations
sourceimpl Ord for Clipboard
impl Ord for Clipboard
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: ObjectType> PartialOrd<T> for Clipboard
impl<T: ObjectType> PartialOrd<T> for Clipboard
sourcefn partial_cmp(&self, other: &T) -> Option<Ordering>
fn partial_cmp(&self, other: &T) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresourceimpl StaticType for Clipboard
impl StaticType for Clipboard
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self.impl Eq for Clipboard
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
sourcefn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
Upcasts an object to a superclass or interface
T. Read moresourcefn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
Upcasts an object to a reference of its superclass or interface
T. Read moresourcefn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
Tries to downcast to a subclass or interface implementor
T. Read moresourcefn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
Tries to downcast to a reference of its subclass or interface implementor
T. Read moresourcefn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
Tries to cast to an object of type
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast and upcast will do many checks at compile-time already. Read moresourcefn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Tries to cast to reference to an object of type
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast and upcast will do many checks at compile-time already. Read moresourceunsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
Casts to
T unconditionally. Read moresourceunsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
Casts to
&T unconditionally. Read moresourceimpl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
sourcefn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
Returns
true if the object is an instance of (can be cast to) T.