Merge remote-tracking branch 'origin/master' into feat/multi-window-support

# Conflicts:
#	examples/events/src/main.rs
#	glutin/src/application.rs
#	native/src/window.rs
#	winit/src/window.rs
This commit is contained in:
Bingus 2023-01-18 15:01:17 -08:00
commit 70d487ba20
No known key found for this signature in database
GPG key ID: 5F84D2AA40A9F170
57 changed files with 815 additions and 446 deletions

View file

@ -39,15 +39,15 @@ pub use iced_native::application::{Appearance, StyleSheet};
/// to listen to time.
/// - [`todos`], a todos tracker inspired by [TodoMVC].
///
/// [The repository has a bunch of examples]: https://github.com/iced-rs/iced/tree/0.6/examples
/// [`clock`]: https://github.com/iced-rs/iced/tree/0.6/examples/clock
/// [`download_progress`]: https://github.com/iced-rs/iced/tree/0.6/examples/download_progress
/// [`events`]: https://github.com/iced-rs/iced/tree/0.6/examples/events
/// [`game_of_life`]: https://github.com/iced-rs/iced/tree/0.6/examples/game_of_life
/// [`pokedex`]: https://github.com/iced-rs/iced/tree/0.6/examples/pokedex
/// [`solar_system`]: https://github.com/iced-rs/iced/tree/0.6/examples/solar_system
/// [`stopwatch`]: https://github.com/iced-rs/iced/tree/0.6/examples/stopwatch
/// [`todos`]: https://github.com/iced-rs/iced/tree/0.6/examples/todos
/// [The repository has a bunch of examples]: https://github.com/iced-rs/iced/tree/0.7/examples
/// [`clock`]: https://github.com/iced-rs/iced/tree/0.7/examples/clock
/// [`download_progress`]: https://github.com/iced-rs/iced/tree/0.7/examples/download_progress
/// [`events`]: https://github.com/iced-rs/iced/tree/0.7/examples/events
/// [`game_of_life`]: https://github.com/iced-rs/iced/tree/0.7/examples/game_of_life
/// [`pokedex`]: https://github.com/iced-rs/iced/tree/0.7/examples/pokedex
/// [`solar_system`]: https://github.com/iced-rs/iced/tree/0.7/examples/solar_system
/// [`stopwatch`]: https://github.com/iced-rs/iced/tree/0.7/examples/stopwatch
/// [`todos`]: https://github.com/iced-rs/iced/tree/0.7/examples/todos
/// [`Sandbox`]: crate::Sandbox
/// [`Canvas`]: crate::widget::Canvas
/// [PokéAPI]: https://pokeapi.co/
@ -180,13 +180,6 @@ pub trait Application: Sized {
1.0
}
/// Returns whether the [`Application`] should be terminated.
///
/// By default, it returns `false`.
fn should_exit(&self) -> bool {
false
}
/// Runs the [`Application`].
///
/// On native platforms, this method will take control of the current thread

View file

@ -24,13 +24,13 @@
//! [scrollables]: https://gfycat.com/perkybaggybaboon-rust-gui
//! [Debug overlay with performance metrics]: https://gfycat.com/incredibledarlingbee
//! [Modular ecosystem]: https://github.com/iced-rs/iced/blob/master/ECOSYSTEM.md
//! [renderer-agnostic native runtime]: https://github.com/iced-rs/iced/tree/0.6/native
//! [renderer-agnostic native runtime]: https://github.com/iced-rs/iced/tree/0.7/native
//! [`wgpu`]: https://github.com/gfx-rs/wgpu-rs
//! [built-in renderer]: https://github.com/iced-rs/iced/tree/0.6/wgpu
//! [windowing shell]: https://github.com/iced-rs/iced/tree/0.6/winit
//! [built-in renderer]: https://github.com/iced-rs/iced/tree/0.7/wgpu
//! [windowing shell]: https://github.com/iced-rs/iced/tree/0.7/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.6/examples
//! [examples]: https://github.com/iced-rs/iced/tree/0.7/examples
//! [repository]: https://github.com/iced-rs/iced
//!
//! # Overview
@ -97,6 +97,7 @@
//! text(self.value).size(50),
//!
//! // The decrement button. We tell it to produce a
//! // `DecrementPressed` message when pressed
//! button("-").on_press(Message::DecrementPressed),
//! ]
//! }

View file

@ -34,19 +34,19 @@ use crate::{Application, Command, Element, Error, Settings, Subscription};
/// - [`tour`], a simple UI tour that can run both on native platforms and the
/// web!
///
/// [The repository has a bunch of examples]: https://github.com/iced-rs/iced/tree/0.6/examples
/// [`bezier_tool`]: https://github.com/iced-rs/iced/tree/0.6/examples/bezier_tool
/// [`counter`]: https://github.com/iced-rs/iced/tree/0.6/examples/counter
/// [`custom_widget`]: https://github.com/iced-rs/iced/tree/0.6/examples/custom_widget
/// [`geometry`]: https://github.com/iced-rs/iced/tree/0.6/examples/geometry
/// [`pane_grid`]: https://github.com/iced-rs/iced/tree/0.6/examples/pane_grid
/// [`progress_bar`]: https://github.com/iced-rs/iced/tree/0.6/examples/progress_bar
/// [`styling`]: https://github.com/iced-rs/iced/tree/0.6/examples/styling
/// [`svg`]: https://github.com/iced-rs/iced/tree/0.6/examples/svg
/// [`tour`]: https://github.com/iced-rs/iced/tree/0.6/examples/tour
/// [The repository has a bunch of examples]: https://github.com/iced-rs/iced/tree/0.7/examples
/// [`bezier_tool`]: https://github.com/iced-rs/iced/tree/0.7/examples/bezier_tool
/// [`counter`]: https://github.com/iced-rs/iced/tree/0.7/examples/counter
/// [`custom_widget`]: https://github.com/iced-rs/iced/tree/0.7/examples/custom_widget
/// [`geometry`]: https://github.com/iced-rs/iced/tree/0.7/examples/geometry
/// [`pane_grid`]: https://github.com/iced-rs/iced/tree/0.7/examples/pane_grid
/// [`progress_bar`]: https://github.com/iced-rs/iced/tree/0.7/examples/progress_bar
/// [`styling`]: https://github.com/iced-rs/iced/tree/0.7/examples/styling
/// [`svg`]: https://github.com/iced-rs/iced/tree/0.7/examples/svg
/// [`tour`]: https://github.com/iced-rs/iced/tree/0.7/examples/tour
/// [`Canvas widget`]: crate::widget::Canvas
/// [the overview]: index.html#overview
/// [`iced_wgpu`]: https://github.com/iced-rs/iced/tree/0.6/wgpu
/// [`iced_wgpu`]: https://github.com/iced-rs/iced/tree/0.7/wgpu
/// [`Svg` widget]: crate::widget::Svg
/// [Ghostscript Tiger]: https://commons.wikimedia.org/wiki/File:Ghostscript_Tiger.svg
///
@ -140,13 +140,6 @@ pub trait Sandbox {
1.0
}
/// Returns whether the [`Sandbox`] should be terminated.
///
/// By default, it returns `false`.
fn should_exit(&self) -> bool {
false
}
/// Runs the [`Sandbox`].
///
/// On native platforms, this method will take control of the current thread
@ -203,8 +196,4 @@ where
fn scale_factor(&self) -> f64 {
T::scale_factor(self)
}
fn should_exit(&self) -> bool {
T::should_exit(self)
}
}

View file

@ -56,7 +56,7 @@ pub mod pane_grid {
//! The [`pane_grid` example] showcases how to use a [`PaneGrid`] with resizing,
//! drag and drop, and hotkey support.
//!
//! [`pane_grid` example]: https://github.com/iced-rs/iced/tree/0.6/examples/pane_grid
//! [`pane_grid` example]: https://github.com/iced-rs/iced/tree/0.7/examples/pane_grid
pub use iced_native::widget::pane_grid::{
Axis, Configuration, Direction, DragEvent, Line, Node, Pane,
ResizeEvent, Split, State, StyleSheet,