Struct smithay_client_toolkit::seat::pointer::ThemeManager
source · [−]pub struct ThemeManager { /* private fields */ }
Expand description
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 neither Send
nor Sync
Implementations
sourceimpl ThemeManager
impl ThemeManager
sourcepub fn init(
theme: ThemeSpec<'_>,
compositor: Attached<WlCompositor>,
shm: Attached<WlShm>
) -> ThemeManager
pub fn init(
theme: ThemeSpec<'_>,
compositor: Attached<WlCompositor>,
shm: Attached<WlShm>
) -> ThemeManager
Load a system pointer theme
Will use the default theme of the system if name is None
.
sourcepub fn theme_pointer(&self, pointer: WlPointer) -> ThemedPointer
pub fn theme_pointer(&self, pointer: WlPointer) -> ThemedPointer
Wrap a pointer to theme it
sourcepub fn theme_pointer_with_impl<F>(
&self,
seat: &Attached<WlSeat>,
callback: F
) -> ThemedPointer where
F: FnMut(Event, ThemedPointer, DispatchData<'_>) + 'static,
pub fn theme_pointer_with_impl<F>(
&self,
seat: &Attached<WlSeat>,
callback: F
) -> ThemedPointer where
F: FnMut(Event, ThemedPointer, DispatchData<'_>) + '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 WlPointer
.
Trait Implementations
sourceimpl Clone for ThemeManager
impl Clone for ThemeManager
sourcefn clone(&self) -> ThemeManager
fn clone(&self) -> ThemeManager
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ThemeManager
impl !Send for ThemeManager
impl !Sync for ThemeManager
impl Unpin for ThemeManager
impl !UnwindSafe for ThemeManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more