Struct rich_sdl2_rust::window::cursor::Cursor
source · pub struct Cursor<'window> { /* private fields */ }
Expand description
A system cursor controller.
Implementations§
source§impl<'window> Cursor<'window>
impl<'window> Cursor<'window>
sourcepub fn system(_: &'window Window<'_>, kind: SystemCursorKind) -> Result<Self>
pub fn system(_: &'window Window<'_>, kind: SystemCursorKind) -> Result<Self>
sourcepub fn colored(
_: &'window Window<'_>,
surface: &impl Surface,
hot_spot: Point
) -> Result<Self>
pub fn colored( _: &'window Window<'_>, surface: &impl Surface, hot_spot: Point ) -> Result<Self>
Constructs a colored cursor from surface and hot spot point.
§Errors
Returns Err
if coloring a cursor is unsupported.
sourcepub fn customized(
_: &'window Window<'_>,
data: &[u8],
mask: &[u8],
hot_spot: Point
) -> Result<Self>
pub fn customized( _: &'window Window<'_>, data: &[u8], mask: &[u8], hot_spot: Point ) -> Result<Self>
Constructs a completely customized color from data, mask and hot spot point.
§Errors
Returns Err
if failed to create a custom cursor.
Trait Implementations§
Auto Trait Implementations§
impl<'window> RefUnwindSafe for Cursor<'window>
impl<'window> !Send for Cursor<'window>
impl<'window> !Sync for Cursor<'window>
impl<'window> Unpin for Cursor<'window>
impl<'window> UnwindSafe for Cursor<'window>
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