Enum screen_13::prelude::CursorGrabMode
source · [−]pub enum CursorGrabMode {
None,
Confined,
Locked,
}Expand description
The behavior of cursor grabbing.
Use this enum with Window::set_cursor_grab to grab the cursor.
Variants
None
No grabbing of the cursor is performed.
Confined
The cursor is confined to the window area.
There’s no guarantee that the cursor will be hidden. You should hide it by yourself if you want to do so.
Platform-specific
- macOS: Not implemented. Always returns
ExternalError::NotSupportedfor now. - iOS / Android / Web: Always returns an
ExternalError::NotSupported.
Locked
The cursor is locked inside the window area to the certain position.
There’s no guarantee that the cursor will be hidden. You should hide it by yourself if you want to do so.
Platform-specific
- X11 / Windows: Not implemented. Always returns
ExternalError::NotSupportedfor now. - iOS / Android: Always returns an
ExternalError::NotSupported.
Trait Implementations
sourceimpl Clone for CursorGrabMode
impl Clone for CursorGrabMode
sourcefn clone(&self) -> CursorGrabMode
fn clone(&self) -> CursorGrabMode
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for CursorGrabMode
impl Debug for CursorGrabMode
sourceimpl Hash for CursorGrabMode
impl Hash for CursorGrabMode
sourceimpl PartialEq<CursorGrabMode> for CursorGrabMode
impl PartialEq<CursorGrabMode> for CursorGrabMode
sourcefn eq(&self, other: &CursorGrabMode) -> bool
fn eq(&self, other: &CursorGrabMode) -> bool
impl Copy for CursorGrabMode
impl Eq for CursorGrabMode
impl StructuralEq for CursorGrabMode
impl StructuralPartialEq for CursorGrabMode
Auto Trait Implementations
impl RefUnwindSafe for CursorGrabMode
impl Send for CursorGrabMode
impl Sync for CursorGrabMode
impl Unpin for CursorGrabMode
impl UnwindSafe for CursorGrabMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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