[−][src]Struct smithay_client_toolkit::pointer::ThemeManager
Wrapper managing a system theme for pointer images
You can use it to initialize new pointers in order to theme them.
Is is also clone-able in case you need to handle several pointer theming from different places.
Note that it is however not Send
nor Sync
Methods
impl ThemeManager
[src]
pub fn init(
name: Option<&str>,
compositor: Proxy<WlCompositor>,
shm: &Proxy<WlShm>
) -> Result<ThemeManager, ()>
[src]
name: Option<&str>,
compositor: Proxy<WlCompositor>,
shm: &Proxy<WlShm>
) -> Result<ThemeManager, ()>
Load a system pointer theme
Will use the default theme of the system if name is None
.
Fails if libwayland-cursor
is not available.
pub fn theme_pointer(&self, pointer: Proxy<WlPointer>) -> ThemedPointer
[src]
Wrap a pointer to theme it
pub fn theme_pointer_with_impl<Impl, UD>(
&self,
seat: &Proxy<WlSeat>,
implementation: Impl,
user_data: UD
) -> ThemedPointer where
Impl: FnMut(Event, ThemedPointer) + Send + 'static,
UD: Send + Sync + 'static,
[src]
&self,
seat: &Proxy<WlSeat>,
implementation: Impl,
user_data: UD
) -> ThemedPointer where
Impl: FnMut(Event, ThemedPointer) + Send + 'static,
UD: Send + Sync + '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 a ThemedPointer
wrapping your pointer,
rather than a Proxy<WlPointer>
.
pub unsafe fn theme_pointer_with_nonsend_impl<Impl, UD>(
&self,
pointer: NewProxy<WlPointer>,
implementation: Impl,
user_data: UD,
token: &QueueToken
) -> ThemedPointer where
Impl: FnMut(Event, ThemedPointer) + 'static,
UD: Send + Sync + 'static,
[src]
&self,
pointer: NewProxy<WlPointer>,
implementation: Impl,
user_data: UD,
token: &QueueToken
) -> ThemedPointer where
Impl: FnMut(Event, ThemedPointer) + 'static,
UD: Send + Sync + 'static,
Initialize a new pointer as a ThemedPointer with an adapter implementation
Like theme_pointer_with_impl
but allows you to have a non-Send
implementation.
Unsafe for the same reasons as NewProxy::implement_nonsend
.
Auto Trait Implementations
impl Unpin for ThemeManager
impl Sync for ThemeManager
impl Send for ThemeManager
impl !UnwindSafe for ThemeManager
impl !RefUnwindSafe for ThemeManager
Blanket Implementations
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,