Merge branch 'master' into feat/multi-window-support

This commit is contained in:
Héctor Ramón Jiménez 2023-11-29 22:28:31 +01:00
commit e09b4e24dd
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
331 changed files with 12085 additions and 3976 deletions

View file

@ -20,17 +20,17 @@
//! Check out the [repository] and the [examples] for more details!
//!
//! [Cross-platform support]: https://github.com/iced-rs/iced/blob/master/docs/images/todos_desktop.jpg?raw=true
//! [text inputs]: https://gfycat.com/alertcalmcrow-rust-gui
//! [scrollables]: https://gfycat.com/perkybaggybaboon-rust-gui
//! [Debug overlay with performance metrics]: https://gfycat.com/incredibledarlingbee
//! [text inputs]: https://iced.rs/examples/text_input.mp4
//! [scrollables]: https://iced.rs/examples/scrollable.mp4
//! [Debug overlay with performance metrics]: https://iced.rs/examples/debug.mp4
//! [Modular ecosystem]: https://github.com/iced-rs/iced/blob/master/ECOSYSTEM.md
//! [renderer-agnostic native runtime]: https://github.com/iced-rs/iced/tree/0.9/native
//! [renderer-agnostic native runtime]: https://github.com/iced-rs/iced/tree/0.10/runtime
//! [`wgpu`]: https://github.com/gfx-rs/wgpu-rs
//! [built-in renderer]: https://github.com/iced-rs/iced/tree/0.9/wgpu
//! [windowing shell]: https://github.com/iced-rs/iced/tree/0.9/winit
//! [built-in renderer]: https://github.com/iced-rs/iced/tree/0.10/wgpu
//! [windowing shell]: https://github.com/iced-rs/iced/tree/0.10/winit
//! [`dodrio`]: https://github.com/fitzgen/dodrio
//! [web runtime]: https://github.com/iced-rs/iced_web
//! [examples]: https://github.com/iced-rs/iced/tree/0.9/examples
//! [examples]: https://github.com/iced-rs/iced/tree/0.10/examples
//! [repository]: https://github.com/iced-rs/iced
//!
//! # Overview
@ -86,7 +86,7 @@
//! use iced::widget::{button, column, text, Column};
//!
//! impl Counter {
//! pub fn view(&mut self) -> Column<Message> {
//! pub fn view(&self) -> Column<Message> {
//! // We use a column: a simple vertical layout
//! column![
//! // The increment button. We tell it to produce an
@ -151,18 +151,13 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
#![forbid(rust_2018_idioms, unsafe_code)]
#![deny(
missing_debug_implementations,
missing_docs,
unused_results,
clippy::extra_unused_lifetimes,
clippy::from_over_into,
clippy::needless_borrow,
clippy::new_without_default,
clippy::useless_conversion
rustdoc::broken_intra_doc_links
)]
#![forbid(rust_2018_idioms, unsafe_code)]
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
use iced_widget::graphics;
use iced_widget::renderer;
@ -173,6 +168,9 @@ use iced_winit::runtime;
pub use iced_futures::futures;
#[cfg(feature = "highlighter")]
pub use iced_highlighter as highlighter;
mod error;
mod sandbox;
@ -190,13 +188,11 @@ pub mod multi_window;
pub use style::theme;
pub use crate::core::alignment;
pub use crate::core::event;
pub use crate::core::gradient;
pub use crate::core::{
color, Alignment, Background, Color, ContentFit, Degrees, Gradient, Length,
Padding, Pixels, Point, Radians, Rectangle, Size, Vector,
color, Alignment, Background, BorderRadius, Color, ContentFit, Degrees,
Gradient, Length, Padding, Pixels, Point, Radians, Rectangle, Size, Vector,
};
pub use crate::runtime::Command;
pub mod clipboard {
//! Access the clipboard.
@ -226,9 +222,16 @@ pub mod font {
pub use crate::runtime::font::*;
}
pub mod event {
//! Handle events of a user interface.
pub use crate::core::event::{Event, MacOS, PlatformSpecific, Status};
pub use iced_futures::event::{listen, listen_raw, listen_with};
}
pub mod keyboard {
//! Listen and react to keyboard events.
pub use crate::core::keyboard::{Event, KeyCode, Modifiers};
pub use iced_futures::keyboard::{on_key_press, on_key_release};
}
pub mod mouse {
@ -238,10 +241,15 @@ pub mod mouse {
};
}
pub mod command {
//! Run asynchronous actions.
pub use crate::runtime::command::{channel, Command};
}
pub mod subscription {
//! Listen to external events in your application.
pub use iced_futures::subscription::{
channel, events, events_with, run, run_with_id, unfold, Subscription,
channel, run, run_with_id, unfold, Subscription,
};
}
@ -255,11 +263,11 @@ pub mod system {
pub mod overlay {
//! Display interactive elements on top of other widgets.
/// A generic [`Overlay`].
/// A generic overlay.
///
/// This is an alias of an `iced_native` element with a default `Renderer`.
/// This is an alias of an [`overlay::Element`] with a default `Renderer`.
///
/// [`Overlay`]: iced_native::Overlay
/// [`overlay::Element`]: crate::core::overlay::Element
pub type Element<'a, Message, Renderer = crate::Renderer> =
crate::core::overlay::Element<'a, Message, Renderer>;
@ -271,6 +279,7 @@ pub mod touch {
pub use crate::core::touch::{Event, Finger};
}
#[allow(hidden_glob_reexports)]
pub mod widget {
//! Use the built-in widgets or create your own.
pub use iced_widget::*;
@ -285,6 +294,7 @@ pub mod widget {
}
pub use application::Application;
pub use command::Command;
pub use error::Error;
pub use event::Event;
pub use executor::Executor;