summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-09-07 03:10:57 +0200
committerLibravatar GitHub <noreply@github.com>2023-09-07 03:10:57 +0200
commitc8fed143eb14d790da0592c5e24c741f6fda101e (patch)
treecf7f002d1ac7e2a8c036f1d420238d69ab45407b /src/lib.rs
parenta56b25b9096d47ada3c4349f5b91110dfaa92bf6 (diff)
parentd21f0698b505d699c44e9414f902dbeca9474e39 (diff)
downloadiced-c8fed143eb14d790da0592c5e24c741f6fda101e.tar.gz
iced-c8fed143eb14d790da0592c5e24c741f6fda101e.tar.bz2
iced-c8fed143eb14d790da0592c5e24c741f6fda101e.zip
Merge pull request #2073 from iced-rs/event-helpers
Add `keyboard` subscriptions and rename `subscription::events` to `event::listen`
Diffstat (limited to '')
-rw-r--r--src/lib.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 36f48ba2..840802cc 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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,
};
}