[][src]Enum smithay_client_toolkit::pointer::AutoPointer

pub enum AutoPointer {
    Themed(ThemedPointer),
    UnThemed(Proxy<WlPointer>),
}

A pointer wrapper to gracefully handle a missing libwayland-cursor

It has the same API as ThemedPointer, but falls back to doing nothing in its Unthemed variant.

Variants

Themed(ThemedPointer)

The ThemedPointer

UnThemed(Proxy<WlPointer>)

The regular pointer if theme capability is not available

Methods

impl AutoPointer[src]

pub fn set_cursor(&self, name: &str, serial: Option<u32>) -> Result<(), ()>[src]

Change the cursor to the given cursor name

Possible names depend on the theme. Does nothing and returns Err(()) if given name is not available.

Does nothing an returns Ok(()) if no theme is loaded (if wayland-cursor is not available).

If this is done as an answer to an input event, you need to provide the associated serial otherwise the server may ignore the request.

Trait Implementations

impl Clone for AutoPointer[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Deref for AutoPointer[src]

type Target = Proxy<WlPointer>

The resulting type after dereferencing.

Auto Trait Implementations

impl Send for AutoPointer

impl Sync for AutoPointer

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for 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.

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

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

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