Merge branch 'master' into dev/system-information
This commit is contained in:
commit
27fdc70756
90 changed files with 1363 additions and 334 deletions
|
|
@ -1,11 +1,11 @@
|
|||
[package]
|
||||
name = "iced_graphics"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||
edition = "2021"
|
||||
description = "A bunch of backend-agnostic types that can be leveraged to build a renderer for Iced"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/hecrj/iced"
|
||||
repository = "https://github.com/iced-rs/iced"
|
||||
documentation = "https://docs.rs/iced_graphics"
|
||||
keywords = ["gui", "ui", "graphics", "interface", "widgets"]
|
||||
categories = ["gui"]
|
||||
|
|
@ -29,15 +29,15 @@ version = "1.4"
|
|||
features = ["derive"]
|
||||
|
||||
[dependencies.iced_native]
|
||||
version = "0.4"
|
||||
version = "0.5"
|
||||
path = "../native"
|
||||
|
||||
[dependencies.iced_style]
|
||||
version = "0.3"
|
||||
version = "0.4"
|
||||
path = "../style"
|
||||
|
||||
[dependencies.iced_pure]
|
||||
version = "0.1"
|
||||
version = "0.2"
|
||||
path = "../pure"
|
||||
optional = true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
//! A bunch of backend-agnostic types that can be leveraged to build a renderer
|
||||
//! for [`iced`].
|
||||
//!
|
||||
//! 
|
||||
//! 
|
||||
//!
|
||||
//! [`iced`]: https://github.com/hecrj/iced
|
||||
//! [`iced`]: https://github.com/iced-rs/iced
|
||||
#![doc(
|
||||
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
|
||||
)]
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@ use std::marker::PhantomData;
|
|||
/// - [`solar_system`], an animated solar system drawn using the [`Canvas`] widget
|
||||
/// and showcasing how to compose different transforms.
|
||||
///
|
||||
/// [examples]: https://github.com/hecrj/iced/tree/master/examples
|
||||
/// [`clock`]: https://github.com/hecrj/iced/tree/master/examples/clock
|
||||
/// [`game_of_life`]: https://github.com/hecrj/iced/tree/master/examples/game_of_life
|
||||
/// [`solar_system`]: https://github.com/hecrj/iced/tree/master/examples/solar_system
|
||||
/// [examples]: https://github.com/iced-rs/iced/tree/0.4/examples
|
||||
/// [`clock`]: https://github.com/iced-rs/iced/tree/0.4/examples/clock
|
||||
/// [`game_of_life`]: https://github.com/iced-rs/iced/tree/0.4/examples/game_of_life
|
||||
/// [`solar_system`]: https://github.com/iced-rs/iced/tree/0.4/examples/solar_system
|
||||
///
|
||||
/// ## Drawing a simple circle
|
||||
/// If you want to get a quick overview, here's how we can draw a simple circle:
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ use crate::Rectangle;
|
|||
///
|
||||
/// [`Canvas`]: crate::widget::Canvas
|
||||
pub trait Program<Message> {
|
||||
/// The internal [`State`] mutated by the [`Program`].
|
||||
/// The internal state mutated by the [`Program`].
|
||||
type State: Default + 'static;
|
||||
|
||||
/// Updates the state of the [`Program`].
|
||||
/// Updates the [`State`](Self::State) of the [`Program`].
|
||||
///
|
||||
/// When a [`Program`] is used in a [`Canvas`], the runtime will call this
|
||||
/// method for each [`Event`].
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ pub trait Compositor: Sized {
|
|||
|
||||
/// Presents the [`Renderer`] primitives to the next frame of the given [`Surface`].
|
||||
///
|
||||
/// [`SwapChain`]: Self::SwapChain
|
||||
/// [`Renderer`]: Self::Renderer
|
||||
/// [`Surface`]: Self::Surface
|
||||
fn present<T: AsRef<str>>(
|
||||
&mut self,
|
||||
renderer: &mut Self::Renderer,
|
||||
|
|
@ -56,7 +57,7 @@ pub trait Compositor: Sized {
|
|||
) -> Result<(), SurfaceError>;
|
||||
}
|
||||
|
||||
/// Result of an unsuccessful call to [`Compositor::draw`].
|
||||
/// Result of an unsuccessful call to [`Compositor::present`].
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Error)]
|
||||
pub enum SurfaceError {
|
||||
/// A timeout was encountered while trying to acquire the next frame.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue