Add Keyboard
variant to canvas::Event
This commit is contained in:
parent
9ba4cfd23f
commit
00d66da0ce
@ -143,6 +143,7 @@ mod bezier {
|
|||||||
}
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
},
|
},
|
||||||
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,6 +413,7 @@ mod grid {
|
|||||||
},
|
},
|
||||||
_ => None,
|
_ => None,
|
||||||
},
|
},
|
||||||
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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::Keyboard(keyboard_event) => {
|
||||||
|
Some(Event::Keyboard(keyboard_event))
|
||||||
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use iced_native::keyboard;
|
||||||
use iced_native::mouse;
|
use iced_native::mouse;
|
||||||
|
|
||||||
/// A [`Canvas`] event.
|
/// A [`Canvas`] event.
|
||||||
@ -7,4 +8,7 @@ use iced_native::mouse;
|
|||||||
pub enum Event {
|
pub enum Event {
|
||||||
/// A mouse event.
|
/// A mouse event.
|
||||||
Mouse(mouse::Event),
|
Mouse(mouse::Event),
|
||||||
|
|
||||||
|
/// A keyboard event.
|
||||||
|
Keyboard(keyboard::Event),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user