expose touch events in canvas widget
This commit is contained in:
parent
5f758d847f
commit
388b3c3b33
2 changed files with 7 additions and 0 deletions
|
|
@ -173,6 +173,9 @@ where
|
||||||
iced_native::Event::Mouse(mouse_event) => {
|
iced_native::Event::Mouse(mouse_event) => {
|
||||||
Some(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) => {
|
iced_native::Event::Keyboard(keyboard_event) => {
|
||||||
Some(Event::Keyboard(keyboard_event))
|
Some(Event::Keyboard(keyboard_event))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
//! Handle events of a canvas.
|
//! Handle events of a canvas.
|
||||||
use iced_native::keyboard;
|
use iced_native::keyboard;
|
||||||
use iced_native::mouse;
|
use iced_native::mouse;
|
||||||
|
use iced_native::touch;
|
||||||
|
|
||||||
pub use iced_native::event::Status;
|
pub use iced_native::event::Status;
|
||||||
|
|
||||||
|
|
@ -12,6 +13,9 @@ pub enum Event {
|
||||||
/// A mouse event.
|
/// A mouse event.
|
||||||
Mouse(mouse::Event),
|
Mouse(mouse::Event),
|
||||||
|
|
||||||
|
/// A touch event.
|
||||||
|
Touch(touch::Event),
|
||||||
|
|
||||||
/// A keyboard event.
|
/// A keyboard event.
|
||||||
Keyboard(keyboard::Event),
|
Keyboard(keyboard::Event),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue