Struct wayland_cursor::Cursor
source · pub struct Cursor { /* private fields */ }
Expand description
A cursor from a theme. Can contain several images if animated.
Implementations§
source§impl Cursor
impl Cursor
sourcepub fn frame_and_duration(&self, millis: u32) -> FrameAndDuration
pub fn frame_and_duration(&self, millis: u32) -> FrameAndDuration
Given a time, calculate which frame to show, and how much time remains until the next frame.
Time will wrap, so if for instance the cursor has an animation during 100ms, then calling this function with 5ms and 105ms as input gives the same output.
sourcepub fn image_count(&self) -> usize
pub fn image_count(&self) -> usize
Total number of images forming this cursor animation
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl !UnwindSafe for Cursor
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more