pub struct CursorTheme {
pub name: String,
pub size: u32,
/* private fields */
}Expand description
Active Cursor Theme holding loaded native and fallback cursor shapes.
Fields§
§name: String§size: u32Implementations§
Source§impl CursorTheme
impl CursorTheme
Sourcepub fn load_active() -> Self
pub fn load_active() -> Self
Detects the host window manager cursor theme (e.g. Yaru) and loads standard sizes.
Sourcepub fn get(&self, icon: CursorIcon) -> &CursorBitmap
pub fn get(&self, icon: CursorIcon) -> &CursorBitmap
Returns the cursor bitmap for a specific icon style.
Sourcepub fn render_cairo(
&self,
cr: &Context,
icon: CursorIcon,
x: f32,
y: f32,
opacity: f32,
is_down: bool,
)
pub fn render_cairo( &self, cr: &Context, icon: CursorIcon, x: f32, y: f32, opacity: f32, is_down: bool, )
Renders the cursor into a Cairo graphics context with opacity and press indicator.
Sourcepub fn render_software(
&self,
buffer: &mut [u32],
buf_width: usize,
buf_height: usize,
icon: CursorIcon,
x: f32,
y: f32,
opacity: f32,
is_down: bool,
)
pub fn render_software( &self, buffer: &mut [u32], buf_width: usize, buf_height: usize, icon: CursorIcon, x: f32, y: f32, opacity: f32, is_down: bool, )
Renders the cursor into a software BGRA32 pixel buffer with alpha blending.
Trait Implementations§
Source§impl Clone for CursorTheme
impl Clone for CursorTheme
Source§impl Debug for CursorTheme
impl Debug for CursorTheme
Auto Trait Implementations§
impl Forget for CursorTheme
impl Freeze for CursorTheme
impl Move for CursorTheme
impl RefUnwindSafe for CursorTheme
impl Send for CursorTheme
impl Sync for CursorTheme
impl Unpin for CursorTheme
impl UnsafeUnpin for CursorTheme
impl UnwindSafe for CursorTheme
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