[−][src]Enum smithay_client_toolkit::pointer::AutoThemer
Wrapper to gracefully handle a missing libwayland-cursor
This wrapper has the same API as ThemeManager
, but will
gracefully handle the case of a missing libwayland-cursor
by doing nothing.
It is a convenience wrapper to handle systems where
libwayland-client.so
is available but not libwayland-cursor.so
.
Variants
Themed(ThemeManager)
The theme could be loaded
libwayland-cursor.so
is not available
Implementations
impl AutoThemer
[src]
pub fn init(
name: Option<&str>,
compositor: WlCompositor,
shm: &WlShm
) -> AutoThemer
[src]
name: Option<&str>,
compositor: WlCompositor,
shm: &WlShm
) -> AutoThemer
Load a system pointer theme
Will use the default theme of the system if name is None
.
Falls back to UnThemed
if libwayland-cursor
is not available.
pub fn theme_pointer(&self, pointer: WlPointer) -> AutoPointer
[src]
Wrap a pointer to theme it
pub fn theme_pointer_with_impl<Impl, UD>(
&self,
seat: &WlSeat,
implementation: Impl,
user_data: UD
) -> AutoPointer where
Impl: FnMut(Event, AutoPointer) + 'static,
UD: 'static,
[src]
&self,
seat: &WlSeat,
implementation: Impl,
user_data: UD
) -> AutoPointer where
Impl: FnMut(Event, AutoPointer) + 'static,
UD: 'static,
Initialize a new pointer as a ThemedPointer with an adapter implementation
You need to provide an implementation as if implementing a wl_pointer
, but
it will receive as meta
argument an AutoPointer
wrapping your pointer,
rather than a WlPointer
.
Auto Trait Implementations
impl !RefUnwindSafe for AutoThemer
impl Send for AutoThemer
impl Sync for AutoThemer
impl Unpin for AutoThemer
impl !UnwindSafe for AutoThemer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,