summaryrefslogtreecommitdiffstats
path: root/winit/src/application.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-05 04:15:10 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-05 04:15:10 +0100
commitf4cf488e0b083b5d7b7612c650917233163ee9cb (patch)
tree66b7ebdbf6896f472c927d0f0d9fc02bdc5c5f83 /winit/src/application.rs
parent5fed065dc3aa3d2f9ff8d229cbffe003a89ba033 (diff)
downloadiced-f4cf488e0b083b5d7b7612c650917233163ee9cb.tar.gz
iced-f4cf488e0b083b5d7b7612c650917233163ee9cb.tar.bz2
iced-f4cf488e0b083b5d7b7612c650917233163ee9cb.zip
Remove generic `Hasher` and `Event` from `subscription::Recipe`
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r--winit/src/application.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs
index c8162c9b..c95dbf62 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -14,12 +14,12 @@ use crate::core::widget::operation;
use crate::core::window;
use crate::core::{Event, Size};
use crate::futures::futures;
-use crate::futures::Executor;
+use crate::futures::{Executor, Runtime, Subscription};
use crate::graphics::compositor::{self, Compositor};
use crate::native::clipboard;
use crate::native::program::Program;
use crate::native::user_interface::{self, UserInterface};
-use crate::native::{Command, Debug, Runtime, Subscription};
+use crate::native::{Command, Debug};
use crate::style::application::{Appearance, StyleSheet};
use crate::{Clipboard, Error, Proxy, Settings};
@@ -316,7 +316,7 @@ async fn run_instance<A, E, C>(
&window,
|| compositor.fetch_information(),
);
- runtime.track(application.subscription());
+ runtime.track(application.subscription().into_recipes());
let mut user_interface = ManuallyDrop::new(build_user_interface(
&application,
@@ -360,8 +360,10 @@ async fn run_instance<A, E, C>(
debug.event_processing_finished();
- for event in events.drain(..).zip(statuses.into_iter()) {
- runtime.broadcast(event);
+ for (event, status) in
+ events.drain(..).zip(statuses.into_iter())
+ {
+ runtime.broadcast(event, status);
}
if !messages.is_empty()
@@ -442,7 +444,7 @@ async fn run_instance<A, E, C>(
}
window.request_redraw();
- runtime.broadcast((redraw_event, core::event::Status::Ignored));
+ runtime.broadcast(redraw_event, core::event::Status::Ignored);
let _ = control_sender.start_send(match interface_state {
user_interface::State::Updated {
@@ -685,7 +687,7 @@ pub fn update<A: Application, E: Executor>(
}
let subscription = application.subscription();
- runtime.track(subscription);
+ runtime.track(subscription.into_recipes());
}
/// Runs the actions of a [`Command`].