summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs62
1 files changed, 49 insertions, 13 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d492db02..3578ea82 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -30,7 +30,7 @@
//! [windowing shell]: https://github.com/hecrj/iced/tree/master/winit
//! [`dodrio`]: https://github.com/fitzgen/dodrio
//! [web runtime]: https://github.com/hecrj/iced/tree/master/web
-//! [examples]: https://github.com/hecrj/iced/tree/master/examples
+//! [examples]: https://github.com/hecrj/iced/tree/0.2/examples
//! [repository]: https://github.com/hecrj/iced
//!
//! # Overview
@@ -166,43 +166,79 @@
//! 1. Draw the resulting user interface.
//!
//! # Usage
-//! Take a look at the [`Application`] trait, which streamlines all the process
-//! described above for you!
+//! The [`Application`] and [`Sandbox`] traits should get you started quickly,
+//! streamlining all the process described above!
//!
//! [Elm]: https://elm-lang.org/
//! [The Elm Architecture]: https://guide.elm-lang.org/architecture/
-//! [examples]: https://github.com/hecrj/iced/tree/master/examples
-//! [`Application`]: trait.Application.html
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![deny(unused_results)]
#![forbid(unsafe_code)]
#![forbid(rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg))]
mod application;
mod element;
+mod error;
+mod result;
mod sandbox;
pub mod executor;
+pub mod keyboard;
+pub mod mouse;
pub mod settings;
pub mod widget;
pub mod window;
+#[cfg(all(
+ any(feature = "tokio", feature = "tokio_old", feature = "async-std"),
+ not(target_arch = "wasm32")
+))]
+#[cfg_attr(
+ docsrs,
+ doc(cfg(any(
+ feature = "tokio",
+ feature = "tokio_old",
+ feature = "async-std"
+ )))
+)]
+pub mod time;
+
+#[cfg(all(
+ not(target_arch = "wasm32"),
+ not(feature = "glow"),
+ feature = "wgpu"
+))]
+use iced_winit as runtime;
+
+#[cfg(all(not(target_arch = "wasm32"), feature = "glow"))]
+use iced_glutin as runtime;
+
+#[cfg(all(
+ not(target_arch = "wasm32"),
+ not(feature = "glow"),
+ feature = "wgpu"
+))]
+use iced_wgpu as renderer;
+
+#[cfg(all(not(target_arch = "wasm32"), feature = "glow"))]
+use iced_glow as renderer;
+
+#[cfg(target_arch = "wasm32")]
+use iced_web as runtime;
+
#[doc(no_inline)]
pub use widget::*;
pub use application::Application;
pub use element::Element;
+pub use error::Error;
pub use executor::Executor;
+pub use result::Result;
pub use sandbox::Sandbox;
pub use settings::Settings;
-#[cfg(not(target_arch = "wasm32"))]
-use iced_winit as common;
-
-#[cfg(target_arch = "wasm32")]
-use iced_web as common;
-
-pub use common::{
+pub use runtime::{
futures, Align, Background, Color, Command, Font, HorizontalAlignment,
- Length, Point, Size, Space, Subscription, Vector, VerticalAlignment,
+ Length, Point, Rectangle, Size, Subscription, Vector, VerticalAlignment,
};