2019-11-22 19:36:57 +01:00
|
|
|
//! A renderer-agnostic native GUI runtime.
|
2019-09-20 19:15:31 +02:00
|
|
|
//!
|
2021-12-23 09:34:37 +02: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
|
|
|
//!
|
2020-05-28 21:30:33 +02:00
|
|
|
//! To achieve this, it introduces a couple 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.
|
2019-09-20 19:15:31 +02:00
|
|
|
//!
|
2019-11-22 19:36:57 +01:00
|
|
|
//! # Usage
|
2019-11-22 22:21:37 +01:00
|
|
|
//! The strategy to use this crate depends on your particular use case. If you
|
|
|
|
|
//! want to:
|
2020-03-19 09:30:54 +01:00
|
|
|
//! - Implement a custom shell or integrate it in your own system, check out the
|
|
|
|
|
//! [`UserInterface`] type.
|
2019-11-22 22:21:37 +01:00
|
|
|
//! - Build a new renderer, see the [renderer] module.
|
|
|
|
|
//! - Build a custom widget, start at the [`Widget`] trait.
|
2019-09-20 19:15:31 +02:00
|
|
|
//!
|
2023-04-13 08:31:17 +02:00
|
|
|
//! [`iced_core`]: https://github.com/iced-rs/iced/tree/0.9/core
|
|
|
|
|
//! [`iced_winit`]: https://github.com/iced-rs/iced/tree/0.9/winit
|
2019-11-22 19:36:57 +01:00
|
|
|
//! [`druid`]: https://github.com/xi-editor/druid
|
|
|
|
|
//! [`raw-window-handle`]: https://github.com/rust-windowing/raw-window-handle
|
2020-11-25 07:11:27 +01:00
|
|
|
//! [renderer]: crate::renderer
|
2021-12-08 08:04:46 +01:00
|
|
|
#![doc(
|
2021-12-09 15:10:38 +07:00
|
|
|
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
|
2021-12-08 08:04:46 +01:00
|
|
|
)]
|
2022-07-09 18:03:59 +02:00
|
|
|
#![deny(
|
|
|
|
|
missing_debug_implementations,
|
2023-05-11 15:37:56 +02:00
|
|
|
missing_docs,
|
2022-07-09 18:03:59 +02:00
|
|
|
unused_results,
|
|
|
|
|
clippy::extra_unused_lifetimes,
|
|
|
|
|
clippy::from_over_into,
|
|
|
|
|
clippy::needless_borrow,
|
|
|
|
|
clippy::new_without_default,
|
|
|
|
|
clippy::useless_conversion
|
|
|
|
|
)]
|
|
|
|
|
#![forbid(unsafe_code, rust_2018_idioms)]
|
2023-05-11 17:28:51 +02:00
|
|
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
2021-03-10 01:59:02 +01:00
|
|
|
pub mod clipboard;
|
2021-09-01 19:21:49 +07:00
|
|
|
pub mod command;
|
2023-02-04 11:12:15 +01:00
|
|
|
pub mod font;
|
2020-04-30 05:04:45 +02:00
|
|
|
pub mod keyboard;
|
2020-05-21 04:27:31 +02:00
|
|
|
pub mod program;
|
2022-02-16 19:20:26 -03:00
|
|
|
pub mod system;
|
2022-01-11 13:47:43 +07:00
|
|
|
pub mod user_interface;
|
2020-01-10 01:28:45 +01:00
|
|
|
pub mod window;
|
2019-09-20 19:15:31 +02:00
|
|
|
|
2020-05-21 04:27:31 +02:00
|
|
|
// We disable debug capabilities on release builds unless the `debug` feature
|
|
|
|
|
// is explicitly enabled.
|
|
|
|
|
#[cfg(feature = "debug")]
|
|
|
|
|
#[path = "debug/basic.rs"]
|
|
|
|
|
mod debug;
|
|
|
|
|
#[cfg(not(feature = "debug"))]
|
|
|
|
|
#[path = "debug/null.rs"]
|
|
|
|
|
mod debug;
|
|
|
|
|
|
2023-03-04 05:37:11 +01:00
|
|
|
pub use iced_core as core;
|
|
|
|
|
pub use iced_futures as futures;
|
2020-01-20 04:47:36 +01:00
|
|
|
|
2021-09-01 19:21:49 +07:00
|
|
|
pub use command::Command;
|
2020-05-21 04:27:31 +02:00
|
|
|
pub use debug::Debug;
|
2023-02-04 11:12:15 +01:00
|
|
|
pub use font::Font;
|
2020-05-21 04:27:31 +02:00
|
|
|
pub use program::Program;
|
2022-01-11 13:47:43 +07:00
|
|
|
pub use user_interface::UserInterface;
|