summaryrefslogtreecommitdiffstats
path: root/runtime/src
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 /runtime/src
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 'runtime/src')
-rw-r--r--runtime/src/window.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/src/window.rs b/runtime/src/window.rs
index 5219fbfd..41816967 100644
--- a/runtime/src/window.rs
+++ b/runtime/src/window.rs
@@ -10,7 +10,8 @@ use crate::command::{self, Command};
use crate::core::time::Instant;
use crate::core::window::{Event, Icon, Level, Mode, UserAttention};
use crate::core::Size;
-use crate::futures::subscription::{self, Subscription};
+use crate::futures::event;
+use crate::futures::Subscription;
/// Subscribes to the frames of the window of the running application.
///
@@ -21,7 +22,7 @@ use crate::futures::subscription::{self, Subscription};
/// In any case, this [`Subscription`] is useful to smoothly draw application-driven
/// animations without missing any frames.
pub fn frames() -> Subscription<Instant> {
- subscription::raw_events(|event, _status| match event {
+ event::listen_raw(|event, _status| match event {
iced_core::Event::Window(Event::RedrawRequested(at)) => Some(at),
_ => None,
})