Merge remote-tracking branch 'origin/master' into feat/multi-window-support

This commit is contained in:
Bingus 2023-02-20 10:04:36 -08:00
commit 9565b477ca
No known key found for this signature in database
GPG key ID: 5F84D2AA40A9F170
38 changed files with 162 additions and 109 deletions

View file

@ -1,7 +1,7 @@
//! Convert [`winit`] types into [`iced_native`] types, and viceversa.
//!
//! [`winit`]: https://github.com/rust-windowing/winit
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
use crate::keyboard;
use crate::mouse;
use crate::touch;
@ -228,7 +228,7 @@ pub fn mode(mode: Option<winit::window::Fullscreen>) -> window::Mode {
/// Converts a `MouseCursor` from [`iced_native`] to a [`winit`] cursor icon.
///
/// [`winit`]: https://github.com/rust-windowing/winit
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
pub fn mouse_interaction(
interaction: mouse::Interaction,
) -> winit::window::CursorIcon {
@ -252,7 +252,7 @@ pub fn mouse_interaction(
/// Converts a `MouseButton` from [`winit`] to an [`iced_native`] mouse button.
///
/// [`winit`]: https://github.com/rust-windowing/winit
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
pub fn mouse_button(mouse_button: winit::event::MouseButton) -> mouse::Button {
match mouse_button {
winit::event::MouseButton::Left => mouse::Button::Left,
@ -268,7 +268,7 @@ pub fn mouse_button(mouse_button: winit::event::MouseButton) -> mouse::Button {
/// modifiers state.
///
/// [`winit`]: https://github.com/rust-windowing/winit
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
pub fn modifiers(
modifiers: winit::event::ModifiersState,
) -> keyboard::Modifiers {
@ -295,7 +295,7 @@ pub fn cursor_position(
/// Converts a `Touch` from [`winit`] to an [`iced_native`] touch event.
///
/// [`winit`]: https://github.com/rust-windowing/winit
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
pub fn touch_event(
touch: winit::event::Touch,
scale_factor: f64,
@ -326,7 +326,7 @@ pub fn touch_event(
/// Converts a `VirtualKeyCode` from [`winit`] to an [`iced_native`] key code.
///
/// [`winit`]: https://github.com/rust-windowing/winit
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
pub fn key_code(
virtual_keycode: winit::event::VirtualKeyCode,
) -> keyboard::KeyCode {

View file

@ -11,7 +11,7 @@
//! Additionally, a [`conversion`] module is available for users that decide to
//! implement a custom event loop.
//!
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
//! [`winit`]: https://github.com/rust-windowing/winit
//! [`conversion`]: crate::conversion
#![doc(