summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
Diffstat (limited to 'native')
-rw-r--r--native/Cargo.toml1
-rw-r--r--native/src/lib.rs8
-rw-r--r--native/src/subscription.rs6
3 files changed, 12 insertions, 3 deletions
diff --git a/native/Cargo.toml b/native/Cargo.toml
index 7007855a..a31b6627 100644
--- a/native/Cargo.toml
+++ b/native/Cargo.toml
@@ -12,3 +12,4 @@ iced_core = { version = "0.1.0", path = "../core", features = ["command", "subsc
twox-hash = "1.5"
raw-window-handle = "0.3"
unicode-segmentation = "1.6"
+futures = "0.3"
diff --git a/native/src/lib.rs b/native/src/lib.rs
index 9afb3bc9..af937a2f 100644
--- a/native/src/lib.rs
+++ b/native/src/lib.rs
@@ -34,7 +34,7 @@
//! [`Windowed`]: renderer/trait.Windowed.html
//! [`UserInterface`]: struct.UserInterface.html
//! [renderer]: renderer/index.html
-#![deny(missing_docs)]
+//#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![deny(unused_results)]
#![deny(unsafe_code)]
@@ -42,6 +42,7 @@
pub mod input;
pub mod layout;
pub mod renderer;
+pub mod subscription;
pub mod widget;
mod element;
@@ -52,8 +53,8 @@ mod size;
mod user_interface;
pub use iced_core::{
- subscription, Align, Background, Color, Command, Font, HorizontalAlignment,
- Length, Point, Rectangle, Subscription, Vector, VerticalAlignment,
+ Align, Background, Color, Command, Font, HorizontalAlignment, Length,
+ Point, Rectangle, Vector, VerticalAlignment,
};
pub use element::Element;
@@ -63,5 +64,6 @@ pub use layout::Layout;
pub use mouse_cursor::MouseCursor;
pub use renderer::Renderer;
pub use size::Size;
+pub use subscription::Subscription;
pub use user_interface::{Cache, UserInterface};
pub use widget::*;
diff --git a/native/src/subscription.rs b/native/src/subscription.rs
new file mode 100644
index 00000000..5fa026a2
--- /dev/null
+++ b/native/src/subscription.rs
@@ -0,0 +1,6 @@
+use crate::Event;
+
+pub type Subscription<T> = iced_core::Subscription<Input, T>;
+pub type Input = futures::channel::mpsc::Receiver<Event>;
+
+pub use iced_core::subscription::Connection;