summaryrefslogtreecommitdiffstats
path: root/runtime/src/window
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--runtime/src/window.rs7
-rw-r--r--runtime/src/window/screenshot.rs2
2 files changed, 5 insertions, 4 deletions
diff --git a/runtime/src/window.rs b/runtime/src/window.rs
index 4737dcdd..375ce889 100644
--- a/runtime/src/window.rs
+++ b/runtime/src/window.rs
@@ -11,7 +11,8 @@ use crate::command::{self, Command};
use crate::core::time::Instant;
use crate::core::window::{self, 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.
///
@@ -22,8 +23,8 @@ 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 {
- iced_core::Event::Window(_, Event::RedrawRequested(at)) => Some(at),
+ event::listen_raw(|event, _status| match event {
+ crate::core::Event::Window(_, Event::RedrawRequested(at)) => Some(at),
_ => None,
})
}
diff --git a/runtime/src/window/screenshot.rs b/runtime/src/window/screenshot.rs
index c84286b6..21e04718 100644
--- a/runtime/src/window/screenshot.rs
+++ b/runtime/src/window/screenshot.rs
@@ -6,7 +6,7 @@ use std::sync::Arc;
/// Data of a screenshot, captured with `window::screenshot()`.
///
-/// The `bytes` of this screenshot will always be ordered as `RGBA` in the sRGB color space.
+/// The `bytes` of this screenshot will always be ordered as `RGBA` in the `sRGB` color space.
#[derive(Clone)]
pub struct Screenshot {
/// The bytes of the [`Screenshot`].