From b5b17ed4d800c03beb3ad535d1069a7784e8dc1d Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 19 Jan 2020 10:17:08 +0100 Subject: Create `iced_futures` and wire everything up --- web/src/lib.rs | 6 +++--- web/src/subscription.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'web/src') diff --git a/web/src/lib.rs b/web/src/lib.rs index 7ea22e85..b183c390 100644 --- a/web/src/lib.rs +++ b/web/src/lib.rs @@ -72,9 +72,10 @@ pub use dodrio; pub use element::Element; pub use hasher::Hasher; pub use iced_core::{ - Align, Background, Color, Command, Font, HorizontalAlignment, Length, + Align, Background, Color, Font, HorizontalAlignment, Length, VerticalAlignment, }; +pub use iced_futures::Command; pub use style::Style; pub use subscription::Subscription; pub use widget::*; @@ -148,7 +149,6 @@ pub trait Application { } } - struct Instance { title: String, ui: Rc>>>, @@ -167,7 +167,7 @@ impl Clone for Instance { impl Instance where - Message: 'static + Message: 'static, { fn new(ui: impl Application + 'static) -> Self { Self { diff --git a/web/src/subscription.rs b/web/src/subscription.rs index 4638c8ab..6b8415c0 100644 --- a/web/src/subscription.rs +++ b/web/src/subscription.rs @@ -14,6 +14,6 @@ use crate::Hasher; /// /// [`Command`]: ../struct.Command.html /// [`Subscription`]: struct.Subscription.html -pub type Subscription = iced_core::Subscription; +pub type Subscription = iced_futures::Subscription; -pub use iced_core::subscription::Recipe; +pub use iced_futures::subscription::Recipe; -- cgit From 90690702e1e4abab804ec91e8ff4183824bec436 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 20 Jan 2020 04:47:36 +0100 Subject: Add `Application::Executor` associated type --- web/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/src') diff --git a/web/src/lib.rs b/web/src/lib.rs index b183c390..c44b99b5 100644 --- a/web/src/lib.rs +++ b/web/src/lib.rs @@ -75,7 +75,7 @@ pub use iced_core::{ Align, Background, Color, Font, HorizontalAlignment, Length, VerticalAlignment, }; -pub use iced_futures::Command; +pub use iced_futures::{futures, Command}; pub use style::Style; pub use subscription::Subscription; pub use widget::*; -- cgit From 04086a90c9e933ebfb42de378054e1115b33529d Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 20 Jan 2020 05:43:09 +0100 Subject: Implement `WasmBindgen` executor and reorganize --- web/src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'web/src') diff --git a/web/src/lib.rs b/web/src/lib.rs index c44b99b5..b1bb80e3 100644 --- a/web/src/lib.rs +++ b/web/src/lib.rs @@ -72,14 +72,19 @@ pub use dodrio; pub use element::Element; pub use hasher::Hasher; pub use iced_core::{ - Align, Background, Color, Font, HorizontalAlignment, Length, + Align, Background, Color, Font, HorizontalAlignment, Length, Vector, VerticalAlignment, }; -pub use iced_futures::{futures, Command}; +pub use iced_futures::{executor, futures, Command}; pub use style::Style; pub use subscription::Subscription; + +#[doc(no_inline)] pub use widget::*; +#[doc(no_inline)] +pub use executor::Executor; + /// An interactive web application. /// /// This trait is the main entrypoint of Iced. Once implemented, you can run -- cgit