From d8b9e03481301228ffeda4c6e48a021cb66f896c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 30 Apr 2020 04:54:49 +0200 Subject: Remove `ButtonState` --- winit/src/conversion.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'winit/src') diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index 3d34497f..8b98e254 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -5,7 +5,7 @@ use crate::{ input::{ keyboard::{self, KeyCode, ModifiersState}, - mouse, ButtonState, + mouse, }, window, Event, Mode, MouseCursor, }; @@ -157,17 +157,6 @@ pub fn mouse_button(mouse_button: winit::event::MouseButton) -> mouse::Button { } } -/// Converts an `ElementState` from [`winit`] to an [`iced_native`] button state. -/// -/// [`winit`]: https://github.com/rust-windowing/winit -/// [`iced_native`]: https://github.com/hecrj/iced/tree/master/native -pub fn button_state(element_state: winit::event::ElementState) -> ButtonState { - match element_state { - winit::event::ElementState::Pressed => ButtonState::Pressed, - winit::event::ElementState::Released => ButtonState::Released, - } -} - /// Converts some `ModifiersState` from [`winit`] to an [`iced_native`] /// modifiers state. /// -- cgit