mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 14:20:05 -04:00
Update documentation regarding set_cursor_position (#3521)
This commit is contained in:
@@ -1363,7 +1363,8 @@ impl Window {
|
|||||||
///
|
///
|
||||||
/// ## Platform-specific
|
/// ## Platform-specific
|
||||||
///
|
///
|
||||||
/// - **iOS / Android / Web / Wayland / Orbital:** Always returns an [`ExternalError::NotSupported`].
|
/// - **Wayland**: Cursor must be in [`CursorGrabMode::Locked`].
|
||||||
|
/// - **iOS / Android / Web / Orbital:** Always returns an [`ExternalError::NotSupported`].
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn set_cursor_position<P: Into<Position>>(&self, position: P) -> Result<(), ExternalError> {
|
pub fn set_cursor_position<P: Into<Position>>(&self, position: P) -> Result<(), ExternalError> {
|
||||||
let position = position.into();
|
let position = position.into();
|
||||||
@@ -1371,7 +1372,7 @@ impl Window {
|
|||||||
.maybe_wait_on_main(|w| w.set_cursor_position(position))
|
.maybe_wait_on_main(|w| w.set_cursor_position(position))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set grabbing [mode]([`CursorGrabMode`]) on the cursor preventing it from leaving the window.
|
/// Set grabbing [mode](CursorGrabMode) on the cursor preventing it from leaving the window.
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user