expose touch events in canvas widget

This commit is contained in:
Artur Sapek 2022-04-12 21:10:28 -06:00 committed by Héctor Ramón Jiménez
parent 5f758d847f
commit 388b3c3b33
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 7 additions and 0 deletions

View file

@ -173,6 +173,9 @@ where
iced_native::Event::Mouse(mouse_event) => {
Some(Event::Mouse(mouse_event))
}
iced_native::Event::Touch(touch_event) => {
Some(Event::Touch(touch_event))
}
iced_native::Event::Keyboard(keyboard_event) => {
Some(Event::Keyboard(keyboard_event))
}

View file

@ -1,6 +1,7 @@
//! Handle events of a canvas.
use iced_native::keyboard;
use iced_native::mouse;
use iced_native::touch;
pub use iced_native::event::Status;
@ -12,6 +13,9 @@ pub enum Event {
/// A mouse event.
Mouse(mouse::Event),
/// A touch event.
Touch(touch::Event),
/// A keyboard event.
Keyboard(keyboard::Event),
}