summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs48
1 files changed, 37 insertions, 11 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 2c08268b..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/0.1/examples
+//! [examples]: https://github.com/hecrj/iced/tree/0.2/examples
//! [repository]: https://github.com/hecrj/iced
//!
//! # Overview
@@ -171,8 +171,6 @@
//!
//! [Elm]: https://elm-lang.org/
//! [The Elm Architecture]: https://guide.elm-lang.org/architecture/
-//! [`Application`]: trait.Application.html
-//! [`Sandbox`]: trait.Sandbox.html
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![deny(unused_results)]
@@ -181,6 +179,8 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
mod application;
mod element;
+mod error;
+mod result;
mod sandbox;
pub mod executor;
@@ -191,27 +191,53 @@ pub mod widget;
pub mod window;
#[cfg(all(
- any(feature = "tokio", feature = "async-std"),
+ any(feature = "tokio", feature = "tokio_old", feature = "async-std"),
not(target_arch = "wasm32")
))]
-#[cfg_attr(docsrs, doc(cfg(any(feature = "tokio", feature = "async-std"))))]
+#[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 runtime;
-
-#[cfg(target_arch = "wasm32")]
-use iced_web as runtime;
-
pub use runtime::{
futures, Align, Background, Color, Command, Font, HorizontalAlignment,
Length, Point, Rectangle, Size, Subscription, Vector, VerticalAlignment,