diff options
author | 2023-09-07 02:45:15 +0200 | |
---|---|---|
committer | 2023-09-07 02:45:15 +0200 | |
commit | 08a031cbe5913c249efa7fc82556d5d95f981c4c (patch) | |
tree | 8b8db2279c04393a8b8e39ed0a74b922c91c8dea /src | |
parent | a56b25b9096d47ada3c4349f5b91110dfaa92bf6 (diff) | |
download | iced-08a031cbe5913c249efa7fc82556d5d95f981c4c.tar.gz iced-08a031cbe5913c249efa7fc82556d5d95f981c4c.tar.bz2 iced-08a031cbe5913c249efa7fc82556d5d95f981c4c.zip |
Introduce `keyboard::on_key_press` and `on_key_release`
Also rename `subscription::events*` to `event::listen*`.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -187,7 +187,6 @@ pub mod advanced; pub use style::theme; pub use crate::core::alignment; -pub use crate::core::event; pub use crate::core::gradient; pub use crate::core::{ color, Alignment, Background, BorderRadius, Color, ContentFit, Degrees, @@ -223,9 +222,16 @@ pub mod font { pub use crate::runtime::font::*; } +pub mod event { + //! Handle events of a user interface. + pub use crate::core::event::{Event, MacOS, PlatformSpecific, Status}; + pub use iced_futures::event::{listen, listen_raw, listen_with}; +} + pub mod keyboard { //! Listen and react to keyboard events. pub use crate::core::keyboard::{Event, KeyCode, Modifiers}; + pub use iced_futures::keyboard::{on_key_press, on_key_release}; } pub mod mouse { @@ -238,7 +244,7 @@ pub mod mouse { pub mod subscription { //! Listen to external events in your application. pub use iced_futures::subscription::{ - channel, events, events_with, run, run_with_id, unfold, Subscription, + channel, run, run_with_id, unfold, Subscription, }; } |