2019-11-22 19:36:57 +01:00
|
|
|
//! A renderer-agnostic native GUI runtime.
|
2019-09-20 19:15:31 +02:00
|
|
|
//!
|
2019-11-22 19:36:57 +01:00
|
|
|
//! 
|
2019-09-20 19:15:31 +02:00
|
|
|
//!
|
2019-11-22 19:36:57 +01:00
|
|
|
//! `iced_native` takes [`iced_core`] and builds a native runtime on top of it,
|
|
|
|
|
//! featuring:
|
2019-09-20 19:15:31 +02:00
|
|
|
//!
|
2019-11-22 19:36:57 +01:00
|
|
|
//! - A custom layout engine, greatly inspired by [`druid`]
|
|
|
|
|
//! - Event handling for all the built-in widgets
|
|
|
|
|
//! - A renderer-agnostic API
|
2019-09-20 19:15:31 +02:00
|
|
|
//!
|
2019-11-22 19:36:57 +01:00
|
|
|
//! To achieve this, it introduces a bunch of reusable interfaces:
|
2019-09-20 19:15:31 +02:00
|
|
|
//!
|
2019-11-22 19:36:57 +01:00
|
|
|
//! - A [`Widget`] trait, which is used to implement new widgets: from layout
|
|
|
|
|
//! requirements to event and drawing logic.
|
|
|
|
|
//! - A bunch of `Renderer` traits, meant to keep the crate renderer-agnostic.
|
|
|
|
|
//! - A [`Windowed`] trait, leveraging [`raw-window-handle`], which can be
|
|
|
|
|
//! implemented by graphical renderers that target _windows_. Window-based
|
|
|
|
|
//! shells (like [`iced_winit`]) can use this trait to stay renderer-agnostic.
|
2019-09-20 19:15:31 +02:00
|
|
|
//!
|
2019-11-22 19:36:57 +01:00
|
|
|
//! # Usage
|
2019-09-20 19:15:31 +02:00
|
|
|
//! Check out the [`UserInterface`] type to learn how to wire everything up!
|
|
|
|
|
//!
|
2019-11-22 19:36:57 +01:00
|
|
|
//! [`iced_core`]: https://github.com/hecrj/iced/tree/master/core
|
|
|
|
|
//! [`iced_winit`]: https://github.com/hecrj/iced/tree/master/winit
|
|
|
|
|
//! [`druid`]: https://github.com/xi-editor/druid
|
|
|
|
|
//! [`raw-window-handle`]: https://github.com/rust-windowing/raw-window-handle
|
|
|
|
|
//! [`Widget`]: widget/trait.Widget.html
|
|
|
|
|
//! [`Windowed`]: renderer/trait.Windowed.html
|
2019-09-20 19:15:31 +02:00
|
|
|
//! [`UserInterface`]: struct.UserInterface.html
|
2019-11-22 19:36:57 +01:00
|
|
|
#![deny(missing_docs)]
|
2019-11-21 13:47:20 +01:00
|
|
|
//#![deny(missing_debug_implementations)]
|
2019-09-20 19:15:31 +02:00
|
|
|
#![deny(unused_results)]
|
|
|
|
|
#![deny(unsafe_code)]
|
|
|
|
|
#![deny(rust_2018_idioms)]
|
|
|
|
|
pub mod input;
|
2019-11-10 01:55:32 +01:00
|
|
|
pub mod layout;
|
2019-09-20 19:15:31 +02:00
|
|
|
pub mod renderer;
|
|
|
|
|
pub mod widget;
|
|
|
|
|
|
|
|
|
|
mod element;
|
|
|
|
|
mod event;
|
|
|
|
|
mod hasher;
|
2019-10-09 05:36:49 +02:00
|
|
|
mod mouse_cursor;
|
2019-11-10 06:05:20 +01:00
|
|
|
mod size;
|
2019-09-20 19:15:31 +02:00
|
|
|
mod user_interface;
|
|
|
|
|
|
2019-10-08 03:13:41 +02:00
|
|
|
pub use iced_core::{
|
2019-11-21 13:47:20 +01:00
|
|
|
Align, Background, Color, Command, Font, HorizontalAlignment, Length,
|
|
|
|
|
Point, Rectangle, Vector, VerticalAlignment,
|
2019-10-08 03:13:41 +02:00
|
|
|
};
|
2019-09-20 19:15:31 +02:00
|
|
|
|
|
|
|
|
pub use element::Element;
|
|
|
|
|
pub use event::Event;
|
|
|
|
|
pub use hasher::Hasher;
|
|
|
|
|
pub use layout::Layout;
|
2019-10-09 05:36:49 +02:00
|
|
|
pub use mouse_cursor::MouseCursor;
|
2019-10-05 03:56:18 +02:00
|
|
|
pub use renderer::Renderer;
|
2019-11-10 06:05:20 +01:00
|
|
|
pub use size::Size;
|
2019-09-20 19:15:31 +02:00
|
|
|
pub use user_interface::{Cache, UserInterface};
|
|
|
|
|
pub use widget::*;
|