Enum winit::window::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::NotSupported
for now. - iOS / Android / Web / Orbital: 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::NotSupported
for now. - iOS / Android / Orbital: Always returns an
ExternalError::NotSupported
.
Trait Implementations§
source§impl Clone for CursorGrabMode
impl Clone for CursorGrabMode
source§fn clone(&self) -> CursorGrabMode
fn clone(&self) -> CursorGrabMode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CursorGrabMode
impl Debug for CursorGrabMode
source§impl Hash for CursorGrabMode
impl Hash for CursorGrabMode
source§impl PartialEq<CursorGrabMode> for CursorGrabMode
impl PartialEq<CursorGrabMode> for CursorGrabMode
source§fn eq(&self, other: &CursorGrabMode) -> bool
fn eq(&self, other: &CursorGrabMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.