Create iced_futures and wire everything up
This commit is contained in:
parent
d50ff9b5d9
commit
b5b17ed4d8
23 changed files with 196 additions and 195 deletions
|
|
@ -15,12 +15,19 @@ categories = ["web-programming"]
|
|||
maintenance = { status = "actively-developed" }
|
||||
|
||||
[dependencies]
|
||||
iced_core = { version = "0.1.0", path = "../core", features = ["command", "subscription"] }
|
||||
dodrio = "0.1.0"
|
||||
wasm-bindgen = "0.2.51"
|
||||
wasm-bindgen-futures = "0.4"
|
||||
futures = "0.3"
|
||||
|
||||
[dependencies.iced_core]
|
||||
version = "0.1.0"
|
||||
path = "../core"
|
||||
|
||||
[dependencies.iced_futures]
|
||||
version = "0.1.0-alpha"
|
||||
path = "../futures"
|
||||
|
||||
[dependencies.web-sys]
|
||||
version = "0.3.27"
|
||||
features = [
|
||||
|
|
|
|||
|
|
@ -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<Message> {
|
||||
title: String,
|
||||
ui: Rc<RefCell<Box<dyn Application<Message = Message>>>>,
|
||||
|
|
@ -167,7 +167,7 @@ impl<Message> Clone for Instance<Message> {
|
|||
|
||||
impl<Message> Instance<Message>
|
||||
where
|
||||
Message: 'static
|
||||
Message: 'static,
|
||||
{
|
||||
fn new(ui: impl Application<Message = Message> + 'static) -> Self {
|
||||
Self {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ use crate::Hasher;
|
|||
///
|
||||
/// [`Command`]: ../struct.Command.html
|
||||
/// [`Subscription`]: struct.Subscription.html
|
||||
pub type Subscription<T> = iced_core::Subscription<Hasher, (), T>;
|
||||
pub type Subscription<T> = iced_futures::Subscription<Hasher, (), T>;
|
||||
|
||||
pub use iced_core::subscription::Recipe;
|
||||
pub use iced_futures::subscription::Recipe;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue