diff options
Diffstat (limited to 'winit/src/conversion.rs')
-rw-r--r-- | winit/src/conversion.rs | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index dcae7074..b2398e62 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -1,7 +1,7 @@ -//! Convert [`winit`] types into [`iced_native`] types, and viceversa. +//! Convert [`winit`] types into [`iced_runtime`] types, and viceversa. //! //! [`winit`]: https://github.com/rust-windowing/winit -//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.9/native +//! [`iced_runtime`]: https://github.com/iced-rs/iced/tree/0.10/runtime use crate::core::keyboard; use crate::core::mouse; use crate::core::touch; @@ -229,10 +229,9 @@ pub fn mode(mode: Option<winit::window::Fullscreen>) -> window::Mode { } } -/// Converts a `MouseCursor` from [`iced_native`] to a [`winit`] cursor icon. +/// Converts a [`mouse::Interaction`] to a [`winit`] cursor icon. /// /// [`winit`]: https://github.com/rust-windowing/winit -/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.9/native pub fn mouse_interaction( interaction: mouse::Interaction, ) -> winit::window::CursorIcon { @@ -254,10 +253,10 @@ pub fn mouse_interaction( } } -/// Converts a `MouseButton` from [`winit`] to an [`iced_native`] mouse button. +/// Converts a `MouseButton` from [`winit`] to an [`iced`] mouse button. /// /// [`winit`]: https://github.com/rust-windowing/winit -/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.9/native +/// [`iced`]: https://github.com/iced-rs/iced/tree/0.10 pub fn mouse_button(mouse_button: winit::event::MouseButton) -> mouse::Button { match mouse_button { winit::event::MouseButton::Left => mouse::Button::Left, @@ -267,11 +266,11 @@ pub fn mouse_button(mouse_button: winit::event::MouseButton) -> mouse::Button { } } -/// Converts some `ModifiersState` from [`winit`] to an [`iced_native`] -/// modifiers state. +/// Converts some `ModifiersState` from [`winit`] to an [`iced`] modifiers +/// state. /// /// [`winit`]: https://github.com/rust-windowing/winit -/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.9/native +/// [`iced`]: https://github.com/iced-rs/iced/tree/0.10 pub fn modifiers( modifiers: winit::event::ModifiersState, ) -> keyboard::Modifiers { @@ -295,10 +294,10 @@ pub fn cursor_position( Point::new(logical_position.x, logical_position.y) } -/// Converts a `Touch` from [`winit`] to an [`iced_native`] touch event. +/// Converts a `Touch` from [`winit`] to an [`iced`] touch event. /// /// [`winit`]: https://github.com/rust-windowing/winit -/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.9/native +/// [`iced`]: https://github.com/iced-rs/iced/tree/0.10 pub fn touch_event( touch: winit::event::Touch, scale_factor: f64, @@ -326,10 +325,10 @@ pub fn touch_event( } } -/// Converts a `VirtualKeyCode` from [`winit`] to an [`iced_native`] key code. +/// Converts a `VirtualKeyCode` from [`winit`] to an [`iced`] key code. /// /// [`winit`]: https://github.com/rust-windowing/winit -/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.9/native +/// [`iced`]: https://github.com/iced-rs/iced/tree/0.10 pub fn key_code( virtual_keycode: winit::event::VirtualKeyCode, ) -> keyboard::KeyCode { |