Merge remote-tracking branch 'origin/master' into feat/multi-window-support
This commit is contained in:
commit
9565b477ca
38 changed files with 162 additions and 109 deletions
53
CHANGELOG.md
53
CHANGELOG.md
|
|
@ -6,6 +6,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.8.0] - 2023-02-18
|
||||||
|
### Added
|
||||||
|
- Generic pixel units. [#1711](https://github.com/iced-rs/iced/pull/1711)
|
||||||
|
- `custom` method to `widget::Operation` trait. [#1649](https://github.com/iced-rs/iced/pull/1649)
|
||||||
|
- `Group` overlay. [#1655](https://github.com/iced-rs/iced/pull/1655)
|
||||||
|
- Standalone `draw` helper for `image`. [#1682](https://github.com/iced-rs/iced/pull/1682)
|
||||||
|
- Dynamic `pick_list::Handle`. [#1675](https://github.com/iced-rs/iced/pull/1675)
|
||||||
|
- `Id` support for `Container`. [#1695](https://github.com/iced-rs/iced/pull/1695)
|
||||||
|
- Custom `Checkbox` icon support. [#1707](https://github.com/iced-rs/iced/pull/1707)
|
||||||
|
- `window` action to change always on top setting. [#1587](https://github.com/iced-rs/iced/pull/1587)
|
||||||
|
- `window` action to fetch its unique identifier. [#1589](https://github.com/iced-rs/iced/pull/1589)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Annotated `Command` and `Subscription` with `#[must_use]`. [#1676](https://github.com/iced-rs/iced/pull/1676)
|
||||||
|
- Replaced `Fn` with `FnOnce` in `canvas::Cache::draw`. [#1694](https://github.com/iced-rs/iced/pull/1694)
|
||||||
|
- Used `[default]` on enum in `game_of_life` example. [#1660](https://github.com/iced-rs/iced/pull/1660)
|
||||||
|
- Made `QRCode` hide when data is empty in `qr_code` example. [#1665](https://github.com/iced-rs/iced/pull/1665)
|
||||||
|
- Replaced `Cow` with `Bytes` in `image` to accept any kind of data that implements `AsRef<[u8]>`. [#1551](https://github.com/iced-rs/iced/pull/1551)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Blank window on application startup. [#1698](https://github.com/iced-rs/iced/pull/1698)
|
||||||
|
- Off-by-one pixel error on `pick_list` width. [#1679](https://github.com/iced-rs/iced/pull/1679)
|
||||||
|
- Missing `text_input` implementation in `operation::Map`. [#1678](https://github.com/iced-rs/iced/pull/1678)
|
||||||
|
- Widget-driven animations for `Component`. [#1685](https://github.com/iced-rs/iced/pull/1685)
|
||||||
|
- Layout translation in `overlay::Group`. [#1686](https://github.com/iced-rs/iced/pull/1686)
|
||||||
|
- Missing `is_over` implementation for overlays of `iced_lazy` widgets. [#1699](https://github.com/iced-rs/iced/pull/1699)
|
||||||
|
- Panic when overlay event processing removes overlay. [#1700](https://github.com/iced-rs/iced/pull/1700)
|
||||||
|
- Panic when using operations with components in certain cases. [#1701](https://github.com/iced-rs/iced/pull/1701)
|
||||||
|
- `TextInput` width when using padding. [#1706](https://github.com/iced-rs/iced/pull/1706)
|
||||||
|
- `iced_glow` crash on some hardware. [#1703](https://github.com/iced-rs/iced/pull/1703)
|
||||||
|
- Height of `overlay::Menu`. [#1714](https://github.com/iced-rs/iced/pull/1714)
|
||||||
|
- Size of images in `README`. [#1659](https://github.com/iced-rs/iced/pull/1659)
|
||||||
|
- New `clippy` lints. [#1681](https://github.com/iced-rs/iced/pull/1681)
|
||||||
|
|
||||||
|
Many thanks to...
|
||||||
|
|
||||||
|
- @13r0ck
|
||||||
|
- @bungoboingo
|
||||||
|
- @casperstorm
|
||||||
|
- @frey
|
||||||
|
- @greatest-ape
|
||||||
|
- @ids1024
|
||||||
|
- @Jedsek
|
||||||
|
- @nicksenger
|
||||||
|
- @Night-Hunter-NF
|
||||||
|
- @sdroege
|
||||||
|
- @Sn-Kinos
|
||||||
|
- @sushigiri
|
||||||
|
- @tarkah
|
||||||
|
|
||||||
## [0.7.0] - 2023-01-14
|
## [0.7.0] - 2023-01-14
|
||||||
### Added
|
### Added
|
||||||
- Widget-driven animations. [#1647](https://github.com/iced-rs/iced/pull/1647)
|
- Widget-driven animations. [#1647](https://github.com/iced-rs/iced/pull/1647)
|
||||||
|
|
@ -364,7 +414,8 @@ Many thanks to...
|
||||||
### Added
|
### Added
|
||||||
- First release! :tada:
|
- First release! :tada:
|
||||||
|
|
||||||
[Unreleased]: https://github.com/iced-rs/iced/compare/0.7.0...HEAD
|
[Unreleased]: https://github.com/iced-rs/iced/compare/0.8.0...HEAD
|
||||||
|
[0.8.0]: https://github.com/iced-rs/iced/compare/0.7.0...0.8.0
|
||||||
[0.7.0]: https://github.com/iced-rs/iced/compare/0.6.0...0.7.0
|
[0.7.0]: https://github.com/iced-rs/iced/compare/0.6.0...0.7.0
|
||||||
[0.6.0]: https://github.com/iced-rs/iced/compare/0.5.0...0.6.0
|
[0.6.0]: https://github.com/iced-rs/iced/compare/0.5.0...0.6.0
|
||||||
[0.5.0]: https://github.com/iced-rs/iced/compare/0.4.2...0.5.0
|
[0.5.0]: https://github.com/iced-rs/iced/compare/0.4.2...0.5.0
|
||||||
|
|
|
||||||
20
Cargo.toml
20
Cargo.toml
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "iced"
|
name = "iced"
|
||||||
version = "0.7.0"
|
version = "0.8.0"
|
||||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "A cross-platform GUI library inspired by Elm"
|
description = "A cross-platform GUI library inspired by Elm"
|
||||||
|
|
@ -68,13 +68,13 @@ members = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
iced_core = { version = "0.7", path = "core" }
|
iced_core = { version = "0.8", path = "core" }
|
||||||
iced_futures = { version = "0.5", path = "futures" }
|
iced_futures = { version = "0.6", path = "futures" }
|
||||||
iced_native = { version = "0.8", path = "native" }
|
iced_native = { version = "0.9", path = "native" }
|
||||||
iced_graphics = { version = "0.6", path = "graphics" }
|
iced_graphics = { version = "0.7", path = "graphics" }
|
||||||
iced_winit = { version = "0.7", path = "winit", features = ["application"] }
|
iced_winit = { version = "0.8", path = "winit", features = ["application"] }
|
||||||
iced_glutin = { version = "0.6", path = "glutin", optional = true }
|
iced_glutin = { version = "0.7", path = "glutin", optional = true }
|
||||||
iced_glow = { version = "0.6", path = "glow", optional = true }
|
iced_glow = { version = "0.7", path = "glow", optional = true }
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
|
|
||||||
[dependencies.image_rs]
|
[dependencies.image_rs]
|
||||||
|
|
@ -83,10 +83,10 @@ package = "image"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
iced_wgpu = { version = "0.8", path = "wgpu", optional = true }
|
iced_wgpu = { version = "0.9", path = "wgpu", optional = true }
|
||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||||
iced_wgpu = { version = "0.8", path = "wgpu", features = ["webgl"], optional = true }
|
iced_wgpu = { version = "0.9", path = "wgpu", features = ["webgl"], optional = true }
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ __Iced is currently experimental software.__ [Take a look at the roadmap],
|
||||||
Add `iced` as a dependency in your `Cargo.toml`:
|
Add `iced` as a dependency in your `Cargo.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
iced = "0.7"
|
iced = "0.8"
|
||||||
```
|
```
|
||||||
|
|
||||||
If your project is using a Rust edition older than 2021, then you will need to
|
If your project is using a Rust edition older than 2021, then you will need to
|
||||||
|
|
@ -215,7 +215,7 @@ cargo run --features iced/glow --package game_of_life
|
||||||
and then use it in your project with
|
and then use it in your project with
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
iced = { version = "0.7", default-features = false, features = ["glow"] }
|
iced = { version = "0.8", default-features = false, features = ["glow"] }
|
||||||
```
|
```
|
||||||
|
|
||||||
__NOTE:__ Chances are you have hardware that supports at least OpenGL 2.1 or OpenGL ES 2.0,
|
__NOTE:__ Chances are you have hardware that supports at least OpenGL 2.1 or OpenGL ES 2.0,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "iced_core"
|
name = "iced_core"
|
||||||
version = "0.7.0"
|
version = "0.8.0"
|
||||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "The essential concepts of Iced"
|
description = "The essential concepts of Iced"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ This crate is meant to be a starting point for an Iced runtime.
|
||||||
Add `iced_core` as a dependency in your `Cargo.toml`:
|
Add `iced_core` as a dependency in your `Cargo.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
iced_core = "0.7"
|
iced_core = "0.8"
|
||||||
```
|
```
|
||||||
|
|
||||||
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
//! 
|
//! 
|
||||||
//!
|
//!
|
||||||
//! [Iced]: https://github.com/iced-rs/iced
|
//! [Iced]: https://github.com/iced-rs/iced
|
||||||
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
|
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
|
||||||
//! [`iced_web`]: https://github.com/iced-rs/iced_web
|
//! [`iced_web`]: https://github.com/iced-rs/iced_web
|
||||||
#![doc(
|
#![doc(
|
||||||
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
|
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "iced_futures"
|
name = "iced_futures"
|
||||||
version = "0.5.1"
|
version = "0.6.0"
|
||||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Commands, subscriptions, and runtimes for Iced"
|
description = "Commands, subscriptions, and runtimes for Iced"
|
||||||
|
|
|
||||||
|
|
@ -126,9 +126,9 @@ impl<I, O, H> std::fmt::Debug for Subscription<I, O, H> {
|
||||||
/// - [`stopwatch`], a watch with start/stop and reset buttons showcasing how
|
/// - [`stopwatch`], a watch with start/stop and reset buttons showcasing how
|
||||||
/// to listen to time.
|
/// to listen to time.
|
||||||
///
|
///
|
||||||
/// [examples]: https://github.com/iced-rs/iced/tree/0.7/examples
|
/// [examples]: https://github.com/iced-rs/iced/tree/0.8/examples
|
||||||
/// [`download_progress`]: https://github.com/iced-rs/iced/tree/0.7/examples/download_progress
|
/// [`download_progress`]: https://github.com/iced-rs/iced/tree/0.8/examples/download_progress
|
||||||
/// [`stopwatch`]: https://github.com/iced-rs/iced/tree/0.7/examples/stopwatch
|
/// [`stopwatch`]: https://github.com/iced-rs/iced/tree/0.8/examples/stopwatch
|
||||||
pub trait Recipe<Hasher: std::hash::Hasher, Event> {
|
pub trait Recipe<Hasher: std::hash::Hasher, Event> {
|
||||||
/// The events that will be produced by a [`Subscription`] with this
|
/// The events that will be produced by a [`Subscription`] with this
|
||||||
/// [`Recipe`].
|
/// [`Recipe`].
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "iced_glow"
|
name = "iced_glow"
|
||||||
version = "0.6.0"
|
version = "0.7.0"
|
||||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "A glow renderer for iced"
|
description = "A glow renderer for iced"
|
||||||
|
|
@ -34,11 +34,11 @@ bytemuck = "1.4"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
||||||
[dependencies.iced_native]
|
[dependencies.iced_native]
|
||||||
version = "0.8"
|
version = "0.9"
|
||||||
path = "../native"
|
path = "../native"
|
||||||
|
|
||||||
[dependencies.iced_graphics]
|
[dependencies.iced_graphics]
|
||||||
version = "0.6"
|
version = "0.7"
|
||||||
path = "../graphics"
|
path = "../graphics"
|
||||||
features = ["font-fallback", "font-icons", "opengl"]
|
features = ["font-fallback", "font-icons", "opengl"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ Currently, `iced_glow` supports the following primitives:
|
||||||
Add `iced_glow` as a dependency in your `Cargo.toml`:
|
Add `iced_glow` as a dependency in your `Cargo.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
iced_glow = "0.6"
|
iced_glow = "0.7"
|
||||||
```
|
```
|
||||||
|
|
||||||
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
//! 
|
//! 
|
||||||
//!
|
//!
|
||||||
//! [`glow`]: https://github.com/grovesNL/glow
|
//! [`glow`]: https://github.com/grovesNL/glow
|
||||||
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
|
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
|
||||||
#![doc(
|
#![doc(
|
||||||
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
|
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
|
||||||
)]
|
)]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "iced_glutin"
|
name = "iced_glutin"
|
||||||
version = "0.6.0"
|
version = "0.7.0"
|
||||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "A glutin runtime for Iced"
|
description = "A glutin runtime for Iced"
|
||||||
|
|
@ -26,16 +26,16 @@ log = "0.4"
|
||||||
version = "0.30"
|
version = "0.30"
|
||||||
|
|
||||||
[dependencies.iced_native]
|
[dependencies.iced_native]
|
||||||
version = "0.8"
|
version = "0.9"
|
||||||
path = "../native"
|
path = "../native"
|
||||||
|
|
||||||
[dependencies.iced_winit]
|
[dependencies.iced_winit]
|
||||||
version = "0.7"
|
version = "0.8"
|
||||||
path = "../winit"
|
path = "../winit"
|
||||||
features = ["application"]
|
features = ["application"]
|
||||||
|
|
||||||
[dependencies.iced_graphics]
|
[dependencies.iced_graphics]
|
||||||
version = "0.6"
|
version = "0.7"
|
||||||
path = "../graphics"
|
path = "../graphics"
|
||||||
features = ["opengl"]
|
features = ["opengl"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ It exposes a renderer-agnostic `Application` trait that can be implemented and t
|
||||||
Add `iced_glutin` as a dependency in your `Cargo.toml`:
|
Add `iced_glutin` as a dependency in your `Cargo.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
iced_glutin = "0.6"
|
iced_glutin = "0.7"
|
||||||
```
|
```
|
||||||
|
|
||||||
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "iced_graphics"
|
name = "iced_graphics"
|
||||||
version = "0.6.0"
|
version = "0.7.0"
|
||||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "A bunch of backend-agnostic types that can be leveraged to build a renderer for Iced"
|
description = "A bunch of backend-agnostic types that can be leveraged to build a renderer for Iced"
|
||||||
|
|
@ -44,11 +44,11 @@ version = "1.4"
|
||||||
features = ["derive"]
|
features = ["derive"]
|
||||||
|
|
||||||
[dependencies.iced_native]
|
[dependencies.iced_native]
|
||||||
version = "0.8"
|
version = "0.9"
|
||||||
path = "../native"
|
path = "../native"
|
||||||
|
|
||||||
[dependencies.iced_style]
|
[dependencies.iced_style]
|
||||||
version = "0.6"
|
version = "0.7"
|
||||||
path = "../style"
|
path = "../style"
|
||||||
|
|
||||||
[dependencies.lyon]
|
[dependencies.lyon]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "iced_lazy"
|
name = "iced_lazy"
|
||||||
version = "0.4.0"
|
version = "0.5.0"
|
||||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Lazy widgets for Iced"
|
description = "Lazy widgets for Iced"
|
||||||
|
|
@ -14,5 +14,5 @@ categories = ["gui"]
|
||||||
ouroboros = "0.13"
|
ouroboros = "0.13"
|
||||||
|
|
||||||
[dependencies.iced_native]
|
[dependencies.iced_native]
|
||||||
version = "0.8"
|
version = "0.9"
|
||||||
path = "../native"
|
path = "../native"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "iced_native"
|
name = "iced_native"
|
||||||
version = "0.8.0"
|
version = "0.9.1"
|
||||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "A renderer-agnostic library for native GUIs"
|
description = "A renderer-agnostic library for native GUIs"
|
||||||
|
|
@ -16,14 +16,14 @@ unicode-segmentation = "1.6"
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
|
|
||||||
[dependencies.iced_core]
|
[dependencies.iced_core]
|
||||||
version = "0.7"
|
version = "0.8"
|
||||||
path = "../core"
|
path = "../core"
|
||||||
|
|
||||||
[dependencies.iced_futures]
|
[dependencies.iced_futures]
|
||||||
version = "0.5"
|
version = "0.6"
|
||||||
path = "../futures"
|
path = "../futures"
|
||||||
features = ["thread-pool"]
|
features = ["thread-pool"]
|
||||||
|
|
||||||
[dependencies.iced_style]
|
[dependencies.iced_style]
|
||||||
version = "0.6.0"
|
version = "0.7"
|
||||||
path = "../style"
|
path = "../style"
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ To achieve this, it introduces a bunch of reusable interfaces:
|
||||||
Add `iced_native` as a dependency in your `Cargo.toml`:
|
Add `iced_native` as a dependency in your `Cargo.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
iced_native = "0.8"
|
iced_native = "0.9"
|
||||||
```
|
```
|
||||||
|
|
||||||
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ impl Handle {
|
||||||
pub fn from_pixels(
|
pub fn from_pixels(
|
||||||
width: u32,
|
width: u32,
|
||||||
height: u32,
|
height: u32,
|
||||||
pixels: impl AsRef<[u8]> + Clone + Send + Sync + 'static,
|
pixels: impl AsRef<[u8]> + Send + Sync + 'static,
|
||||||
) -> Handle {
|
) -> Handle {
|
||||||
Self::from_data(Data::Rgba {
|
Self::from_data(Data::Rgba {
|
||||||
width,
|
width,
|
||||||
|
|
@ -44,7 +44,7 @@ impl Handle {
|
||||||
/// This is useful if you already have your image loaded in-memory, maybe
|
/// This is useful if you already have your image loaded in-memory, maybe
|
||||||
/// because you downloaded or generated it procedurally.
|
/// because you downloaded or generated it procedurally.
|
||||||
pub fn from_memory(
|
pub fn from_memory(
|
||||||
bytes: impl AsRef<[u8]> + Clone + Send + Sync + 'static,
|
bytes: impl AsRef<[u8]> + Send + Sync + 'static,
|
||||||
) -> Handle {
|
) -> Handle {
|
||||||
Self::from_data(Data::Bytes(Bytes::new(bytes)))
|
Self::from_data(Data::Bytes(Bytes::new(bytes)))
|
||||||
}
|
}
|
||||||
|
|
@ -93,7 +93,7 @@ pub struct Bytes(Arc<dyn AsRef<[u8]> + Send + Sync + 'static>);
|
||||||
|
|
||||||
impl Bytes {
|
impl Bytes {
|
||||||
/// Creates new [`Bytes`] around `data`.
|
/// Creates new [`Bytes`] around `data`.
|
||||||
pub fn new(data: impl AsRef<[u8]> + Clone + Send + Sync + 'static) -> Self {
|
pub fn new(data: impl AsRef<[u8]> + Send + Sync + 'static) -> Self {
|
||||||
Self(Arc::new(data))
|
Self(Arc::new(data))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@
|
||||||
//! - Build a new renderer, see the [renderer] module.
|
//! - Build a new renderer, see the [renderer] module.
|
||||||
//! - Build a custom widget, start at the [`Widget`] trait.
|
//! - Build a custom widget, start at the [`Widget`] trait.
|
||||||
//!
|
//!
|
||||||
//! [`iced_core`]: https://github.com/iced-rs/iced/tree/0.7/core
|
//! [`iced_core`]: https://github.com/iced-rs/iced/tree/0.8/core
|
||||||
//! [`iced_winit`]: https://github.com/iced-rs/iced/tree/0.7/winit
|
//! [`iced_winit`]: https://github.com/iced-rs/iced/tree/0.8/winit
|
||||||
//! [`druid`]: https://github.com/xi-editor/druid
|
//! [`druid`]: https://github.com/xi-editor/druid
|
||||||
//! [`raw-window-handle`]: https://github.com/rust-windowing/raw-window-handle
|
//! [`raw-window-handle`]: https://github.com/rust-windowing/raw-window-handle
|
||||||
//! [renderer]: crate::renderer
|
//! [renderer]: crate::renderer
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,8 @@ where
|
||||||
let size = {
|
let size = {
|
||||||
let intrinsic = Size::new(
|
let intrinsic = Size::new(
|
||||||
0.0,
|
0.0,
|
||||||
text_size + self.padding.vertical() * self.options.len() as f32,
|
(text_size + self.padding.vertical())
|
||||||
|
* self.options.len() as f32,
|
||||||
);
|
);
|
||||||
|
|
||||||
limits.resolve(intrinsic)
|
limits.resolve(intrinsic)
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ where
|
||||||
/// Check out the [`websocket`] example, which showcases this pattern to maintain a WebSocket
|
/// Check out the [`websocket`] example, which showcases this pattern to maintain a WebSocket
|
||||||
/// connection open.
|
/// connection open.
|
||||||
///
|
///
|
||||||
/// [`websocket`]: https://github.com/iced-rs/iced/tree/0.7/examples/websocket
|
/// [`websocket`]: https://github.com/iced-rs/iced/tree/0.8/examples/websocket
|
||||||
pub fn unfold<I, T, Fut, Message>(
|
pub fn unfold<I, T, Fut, Message>(
|
||||||
id: I,
|
id: I,
|
||||||
initial: T,
|
initial: T,
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ use crate::{
|
||||||
/// The [`integration_opengl`] & [`integration_wgpu`] examples use a
|
/// The [`integration_opengl`] & [`integration_wgpu`] examples use a
|
||||||
/// [`UserInterface`] to integrate Iced in an existing graphical application.
|
/// [`UserInterface`] to integrate Iced in an existing graphical application.
|
||||||
///
|
///
|
||||||
/// [`integration_opengl`]: https://github.com/iced-rs/iced/tree/0.7/examples/integration_opengl
|
/// [`integration_opengl`]: https://github.com/iced-rs/iced/tree/0.8/examples/integration_opengl
|
||||||
/// [`integration_wgpu`]: https://github.com/iced-rs/iced/tree/0.7/examples/integration_wgpu
|
/// [`integration_wgpu`]: https://github.com/iced-rs/iced/tree/0.8/examples/integration_wgpu
|
||||||
#[allow(missing_debug_implementations)]
|
#[allow(missing_debug_implementations)]
|
||||||
pub struct UserInterface<'a, Message, Renderer> {
|
pub struct UserInterface<'a, Message, Renderer> {
|
||||||
root: Element<'a, Message, Renderer>,
|
root: Element<'a, Message, Renderer>,
|
||||||
|
|
@ -440,12 +440,13 @@ where
|
||||||
overlay.layout(renderer, self.bounds, Vector::ZERO)
|
overlay.layout(renderer, self.bounds, Vector::ZERO)
|
||||||
});
|
});
|
||||||
|
|
||||||
let new_cursor_position =
|
let new_cursor_position = if overlay
|
||||||
if overlay_layout.bounds().contains(cursor_position) {
|
.is_over(Layout::new(&overlay_layout), cursor_position)
|
||||||
Point::new(-1.0, -1.0)
|
{
|
||||||
} else {
|
Point::new(-1.0, -1.0)
|
||||||
cursor_position
|
} else {
|
||||||
};
|
cursor_position
|
||||||
|
};
|
||||||
|
|
||||||
self.overlay = Some(overlay_layout);
|
self.overlay = Some(overlay_layout);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,12 +110,12 @@ use crate::{Clipboard, Layout, Length, Point, Rectangle, Shell};
|
||||||
/// - [`geometry`], a custom widget showcasing how to draw geometry with the
|
/// - [`geometry`], a custom widget showcasing how to draw geometry with the
|
||||||
/// `Mesh2D` primitive in [`iced_wgpu`].
|
/// `Mesh2D` primitive in [`iced_wgpu`].
|
||||||
///
|
///
|
||||||
/// [examples]: https://github.com/iced-rs/iced/tree/0.7/examples
|
/// [examples]: https://github.com/iced-rs/iced/tree/0.8/examples
|
||||||
/// [`bezier_tool`]: https://github.com/iced-rs/iced/tree/0.7/examples/bezier_tool
|
/// [`bezier_tool`]: https://github.com/iced-rs/iced/tree/0.8/examples/bezier_tool
|
||||||
/// [`custom_widget`]: https://github.com/iced-rs/iced/tree/0.7/examples/custom_widget
|
/// [`custom_widget`]: https://github.com/iced-rs/iced/tree/0.8/examples/custom_widget
|
||||||
/// [`geometry`]: https://github.com/iced-rs/iced/tree/0.7/examples/geometry
|
/// [`geometry`]: https://github.com/iced-rs/iced/tree/0.8/examples/geometry
|
||||||
/// [`lyon`]: https://github.com/nical/lyon
|
/// [`lyon`]: https://github.com/nical/lyon
|
||||||
/// [`iced_wgpu`]: https://github.com/iced-rs/iced/tree/0.7/wgpu
|
/// [`iced_wgpu`]: https://github.com/iced-rs/iced/tree/0.8/wgpu
|
||||||
pub trait Widget<Message, Renderer>
|
pub trait Widget<Message, Renderer>
|
||||||
where
|
where
|
||||||
Renderer: crate::Renderer,
|
Renderer: crate::Renderer,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
//! The [`pane_grid` example] showcases how to use a [`PaneGrid`] with resizing,
|
//! The [`pane_grid` example] showcases how to use a [`PaneGrid`] with resizing,
|
||||||
//! drag and drop, and hotkey support.
|
//! drag and drop, and hotkey support.
|
||||||
//!
|
//!
|
||||||
//! [`pane_grid` example]: https://github.com/iced-rs/iced/tree/0.7/examples/pane_grid
|
//! [`pane_grid` example]: https://github.com/iced-rs/iced/tree/0.8/examples/pane_grid
|
||||||
mod axis;
|
mod axis;
|
||||||
mod configuration;
|
mod configuration;
|
||||||
mod content;
|
mod content;
|
||||||
|
|
|
||||||
|
|
@ -421,8 +421,8 @@ pub fn draw<T, R>(
|
||||||
let handle_offset = if range_start >= range_end {
|
let handle_offset = if range_start >= range_end {
|
||||||
0.0
|
0.0
|
||||||
} else {
|
} else {
|
||||||
bounds.width * (value - range_start) / (range_end - range_start)
|
(bounds.width - handle_width) * (value - range_start)
|
||||||
- handle_width / 2.0
|
/ (range_end - range_start)
|
||||||
};
|
};
|
||||||
|
|
||||||
renderer.fill_quad(
|
renderer.fill_quad(
|
||||||
|
|
|
||||||
|
|
@ -416,8 +416,8 @@ pub fn draw<T, R>(
|
||||||
let handle_offset = if range_start >= range_end {
|
let handle_offset = if range_start >= range_end {
|
||||||
0.0
|
0.0
|
||||||
} else {
|
} else {
|
||||||
bounds.height * (value - range_end) / (range_start - range_end)
|
(bounds.height - handle_width) * (value - range_end)
|
||||||
- handle_width / 2.0
|
/ (range_start - range_end)
|
||||||
};
|
};
|
||||||
|
|
||||||
renderer.fill_quad(
|
renderer.fill_quad(
|
||||||
|
|
|
||||||
|
|
@ -39,15 +39,15 @@ pub use iced_native::application::{Appearance, StyleSheet};
|
||||||
/// to listen to time.
|
/// to listen to time.
|
||||||
/// - [`todos`], a todos tracker inspired by [TodoMVC].
|
/// - [`todos`], a todos tracker inspired by [TodoMVC].
|
||||||
///
|
///
|
||||||
/// [The repository has a bunch of examples]: https://github.com/iced-rs/iced/tree/0.7/examples
|
/// [The repository has a bunch of examples]: https://github.com/iced-rs/iced/tree/0.8/examples
|
||||||
/// [`clock`]: https://github.com/iced-rs/iced/tree/0.7/examples/clock
|
/// [`clock`]: https://github.com/iced-rs/iced/tree/0.8/examples/clock
|
||||||
/// [`download_progress`]: https://github.com/iced-rs/iced/tree/0.7/examples/download_progress
|
/// [`download_progress`]: https://github.com/iced-rs/iced/tree/0.8/examples/download_progress
|
||||||
/// [`events`]: https://github.com/iced-rs/iced/tree/0.7/examples/events
|
/// [`events`]: https://github.com/iced-rs/iced/tree/0.8/examples/events
|
||||||
/// [`game_of_life`]: https://github.com/iced-rs/iced/tree/0.7/examples/game_of_life
|
/// [`game_of_life`]: https://github.com/iced-rs/iced/tree/0.8/examples/game_of_life
|
||||||
/// [`pokedex`]: https://github.com/iced-rs/iced/tree/0.7/examples/pokedex
|
/// [`pokedex`]: https://github.com/iced-rs/iced/tree/0.8/examples/pokedex
|
||||||
/// [`solar_system`]: https://github.com/iced-rs/iced/tree/0.7/examples/solar_system
|
/// [`solar_system`]: https://github.com/iced-rs/iced/tree/0.8/examples/solar_system
|
||||||
/// [`stopwatch`]: https://github.com/iced-rs/iced/tree/0.7/examples/stopwatch
|
/// [`stopwatch`]: https://github.com/iced-rs/iced/tree/0.8/examples/stopwatch
|
||||||
/// [`todos`]: https://github.com/iced-rs/iced/tree/0.7/examples/todos
|
/// [`todos`]: https://github.com/iced-rs/iced/tree/0.8/examples/todos
|
||||||
/// [`Sandbox`]: crate::Sandbox
|
/// [`Sandbox`]: crate::Sandbox
|
||||||
/// [`Canvas`]: crate::widget::Canvas
|
/// [`Canvas`]: crate::widget::Canvas
|
||||||
/// [PokéAPI]: https://pokeapi.co/
|
/// [PokéAPI]: https://pokeapi.co/
|
||||||
|
|
|
||||||
|
|
@ -24,13 +24,13 @@
|
||||||
//! [scrollables]: https://gfycat.com/perkybaggybaboon-rust-gui
|
//! [scrollables]: https://gfycat.com/perkybaggybaboon-rust-gui
|
||||||
//! [Debug overlay with performance metrics]: https://gfycat.com/incredibledarlingbee
|
//! [Debug overlay with performance metrics]: https://gfycat.com/incredibledarlingbee
|
||||||
//! [Modular ecosystem]: https://github.com/iced-rs/iced/blob/master/ECOSYSTEM.md
|
//! [Modular ecosystem]: https://github.com/iced-rs/iced/blob/master/ECOSYSTEM.md
|
||||||
//! [renderer-agnostic native runtime]: https://github.com/iced-rs/iced/tree/0.7/native
|
//! [renderer-agnostic native runtime]: https://github.com/iced-rs/iced/tree/0.8/native
|
||||||
//! [`wgpu`]: https://github.com/gfx-rs/wgpu-rs
|
//! [`wgpu`]: https://github.com/gfx-rs/wgpu-rs
|
||||||
//! [built-in renderer]: https://github.com/iced-rs/iced/tree/0.7/wgpu
|
//! [built-in renderer]: https://github.com/iced-rs/iced/tree/0.8/wgpu
|
||||||
//! [windowing shell]: https://github.com/iced-rs/iced/tree/0.7/winit
|
//! [windowing shell]: https://github.com/iced-rs/iced/tree/0.8/winit
|
||||||
//! [`dodrio`]: https://github.com/fitzgen/dodrio
|
//! [`dodrio`]: https://github.com/fitzgen/dodrio
|
||||||
//! [web runtime]: https://github.com/iced-rs/iced_web
|
//! [web runtime]: https://github.com/iced-rs/iced_web
|
||||||
//! [examples]: https://github.com/iced-rs/iced/tree/0.7/examples
|
//! [examples]: https://github.com/iced-rs/iced/tree/0.8/examples
|
||||||
//! [repository]: https://github.com/iced-rs/iced
|
//! [repository]: https://github.com/iced-rs/iced
|
||||||
//!
|
//!
|
||||||
//! # Overview
|
//! # Overview
|
||||||
|
|
|
||||||
|
|
@ -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
|
/// - [`tour`], a simple UI tour that can run both on native platforms and the
|
||||||
/// web!
|
/// web!
|
||||||
///
|
///
|
||||||
/// [The repository has a bunch of examples]: https://github.com/iced-rs/iced/tree/0.7/examples
|
/// [The repository has a bunch of examples]: https://github.com/iced-rs/iced/tree/0.8/examples
|
||||||
/// [`bezier_tool`]: https://github.com/iced-rs/iced/tree/0.7/examples/bezier_tool
|
/// [`bezier_tool`]: https://github.com/iced-rs/iced/tree/0.8/examples/bezier_tool
|
||||||
/// [`counter`]: https://github.com/iced-rs/iced/tree/0.7/examples/counter
|
/// [`counter`]: https://github.com/iced-rs/iced/tree/0.8/examples/counter
|
||||||
/// [`custom_widget`]: https://github.com/iced-rs/iced/tree/0.7/examples/custom_widget
|
/// [`custom_widget`]: https://github.com/iced-rs/iced/tree/0.8/examples/custom_widget
|
||||||
/// [`geometry`]: https://github.com/iced-rs/iced/tree/0.7/examples/geometry
|
/// [`geometry`]: https://github.com/iced-rs/iced/tree/0.8/examples/geometry
|
||||||
/// [`pane_grid`]: https://github.com/iced-rs/iced/tree/0.7/examples/pane_grid
|
/// [`pane_grid`]: https://github.com/iced-rs/iced/tree/0.8/examples/pane_grid
|
||||||
/// [`progress_bar`]: https://github.com/iced-rs/iced/tree/0.7/examples/progress_bar
|
/// [`progress_bar`]: https://github.com/iced-rs/iced/tree/0.8/examples/progress_bar
|
||||||
/// [`styling`]: https://github.com/iced-rs/iced/tree/0.7/examples/styling
|
/// [`styling`]: https://github.com/iced-rs/iced/tree/0.8/examples/styling
|
||||||
/// [`svg`]: https://github.com/iced-rs/iced/tree/0.7/examples/svg
|
/// [`svg`]: https://github.com/iced-rs/iced/tree/0.8/examples/svg
|
||||||
/// [`tour`]: https://github.com/iced-rs/iced/tree/0.7/examples/tour
|
/// [`tour`]: https://github.com/iced-rs/iced/tree/0.8/examples/tour
|
||||||
/// [`Canvas widget`]: crate::widget::Canvas
|
/// [`Canvas widget`]: crate::widget::Canvas
|
||||||
/// [the overview]: index.html#overview
|
/// [the overview]: index.html#overview
|
||||||
/// [`iced_wgpu`]: https://github.com/iced-rs/iced/tree/0.7/wgpu
|
/// [`iced_wgpu`]: https://github.com/iced-rs/iced/tree/0.8/wgpu
|
||||||
/// [`Svg` widget]: crate::widget::Svg
|
/// [`Svg` widget]: crate::widget::Svg
|
||||||
/// [Ghostscript Tiger]: https://commons.wikimedia.org/wiki/File:Ghostscript_Tiger.svg
|
/// [Ghostscript Tiger]: https://commons.wikimedia.org/wiki/File:Ghostscript_Tiger.svg
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ pub mod pane_grid {
|
||||||
//! The [`pane_grid` example] showcases how to use a [`PaneGrid`] with resizing,
|
//! The [`pane_grid` example] showcases how to use a [`PaneGrid`] with resizing,
|
||||||
//! drag and drop, and hotkey support.
|
//! drag and drop, and hotkey support.
|
||||||
//!
|
//!
|
||||||
//! [`pane_grid` example]: https://github.com/iced-rs/iced/tree/0.7/examples/pane_grid
|
//! [`pane_grid` example]: https://github.com/iced-rs/iced/tree/0.8/examples/pane_grid
|
||||||
pub use iced_native::widget::pane_grid::{
|
pub use iced_native::widget::pane_grid::{
|
||||||
Axis, Configuration, Direction, DragEvent, Line, Node, Pane,
|
Axis, Configuration, Direction, DragEvent, Line, Node, Pane,
|
||||||
ResizeEvent, Split, State, StyleSheet,
|
ResizeEvent, Split, State, StyleSheet,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "iced_style"
|
name = "iced_style"
|
||||||
version = "0.6.0"
|
version = "0.7.0"
|
||||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "The default set of styles of Iced"
|
description = "The default set of styles of Iced"
|
||||||
|
|
@ -11,7 +11,7 @@ keywords = ["gui", "ui", "graphics", "interface", "widgets"]
|
||||||
categories = ["gui"]
|
categories = ["gui"]
|
||||||
|
|
||||||
[dependencies.iced_core]
|
[dependencies.iced_core]
|
||||||
version = "0.7"
|
version = "0.8"
|
||||||
path = "../core"
|
path = "../core"
|
||||||
features = ["palette"]
|
features = ["palette"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "iced_wgpu"
|
name = "iced_wgpu"
|
||||||
version = "0.8.0"
|
version = "0.9.0"
|
||||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "A wgpu renderer for Iced"
|
description = "A wgpu renderer for Iced"
|
||||||
|
|
@ -42,11 +42,11 @@ version = "1.9"
|
||||||
features = ["derive"]
|
features = ["derive"]
|
||||||
|
|
||||||
[dependencies.iced_native]
|
[dependencies.iced_native]
|
||||||
version = "0.8"
|
version = "0.9"
|
||||||
path = "../native"
|
path = "../native"
|
||||||
|
|
||||||
[dependencies.iced_graphics]
|
[dependencies.iced_graphics]
|
||||||
version = "0.6"
|
version = "0.7"
|
||||||
path = "../graphics"
|
path = "../graphics"
|
||||||
features = ["font-fallback", "font-icons"]
|
features = ["font-fallback", "font-icons"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ Currently, `iced_wgpu` supports the following primitives:
|
||||||
Add `iced_wgpu` as a dependency in your `Cargo.toml`:
|
Add `iced_wgpu` as a dependency in your `Cargo.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
iced_wgpu = "0.8"
|
iced_wgpu = "0.9"
|
||||||
```
|
```
|
||||||
|
|
||||||
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
//! - Meshes of triangles, useful to draw geometry freely.
|
//! - Meshes of triangles, useful to draw geometry freely.
|
||||||
//!
|
//!
|
||||||
//! [Iced]: https://github.com/iced-rs/iced
|
//! [Iced]: https://github.com/iced-rs/iced
|
||||||
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
|
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
|
||||||
//! [`wgpu`]: https://github.com/gfx-rs/wgpu-rs
|
//! [`wgpu`]: https://github.com/gfx-rs/wgpu-rs
|
||||||
//! [WebGPU API]: https://gpuweb.github.io/gpuweb/
|
//! [WebGPU API]: https://gpuweb.github.io/gpuweb/
|
||||||
//! [`wgpu_glyph`]: https://github.com/hecrj/wgpu_glyph
|
//! [`wgpu_glyph`]: https://github.com/hecrj/wgpu_glyph
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "iced_winit"
|
name = "iced_winit"
|
||||||
version = "0.7.0"
|
version = "0.8.0"
|
||||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "A winit runtime for Iced"
|
description = "A winit runtime for Iced"
|
||||||
|
|
@ -29,15 +29,15 @@ git = "https://github.com/iced-rs/winit.git"
|
||||||
rev = "940457522e9fb9f5dac228b0ecfafe0138b4048c"
|
rev = "940457522e9fb9f5dac228b0ecfafe0138b4048c"
|
||||||
|
|
||||||
[dependencies.iced_native]
|
[dependencies.iced_native]
|
||||||
version = "0.8"
|
version = "0.9"
|
||||||
path = "../native"
|
path = "../native"
|
||||||
|
|
||||||
[dependencies.iced_graphics]
|
[dependencies.iced_graphics]
|
||||||
version = "0.6"
|
version = "0.7"
|
||||||
path = "../graphics"
|
path = "../graphics"
|
||||||
|
|
||||||
[dependencies.iced_futures]
|
[dependencies.iced_futures]
|
||||||
version = "0.5"
|
version = "0.6"
|
||||||
path = "../futures"
|
path = "../futures"
|
||||||
|
|
||||||
[dependencies.tracing]
|
[dependencies.tracing]
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ It exposes a renderer-agnostic `Application` trait that can be implemented and t
|
||||||
Add `iced_winit` as a dependency in your `Cargo.toml`:
|
Add `iced_winit` as a dependency in your `Cargo.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
iced_winit = "0.7"
|
iced_winit = "0.8"
|
||||||
```
|
```
|
||||||
|
|
||||||
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
__Iced moves fast and the `master` branch can contain breaking changes!__ If
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
//! Convert [`winit`] types into [`iced_native`] types, and viceversa.
|
//! Convert [`winit`] types into [`iced_native`] types, and viceversa.
|
||||||
//!
|
//!
|
||||||
//! [`winit`]: https://github.com/rust-windowing/winit
|
//! [`winit`]: https://github.com/rust-windowing/winit
|
||||||
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
|
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
|
||||||
use crate::keyboard;
|
use crate::keyboard;
|
||||||
use crate::mouse;
|
use crate::mouse;
|
||||||
use crate::touch;
|
use crate::touch;
|
||||||
|
|
@ -228,7 +228,7 @@ pub fn mode(mode: Option<winit::window::Fullscreen>) -> window::Mode {
|
||||||
/// Converts a `MouseCursor` from [`iced_native`] to a [`winit`] cursor icon.
|
/// Converts a `MouseCursor` from [`iced_native`] to a [`winit`] cursor icon.
|
||||||
///
|
///
|
||||||
/// [`winit`]: https://github.com/rust-windowing/winit
|
/// [`winit`]: https://github.com/rust-windowing/winit
|
||||||
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
|
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
|
||||||
pub fn mouse_interaction(
|
pub fn mouse_interaction(
|
||||||
interaction: mouse::Interaction,
|
interaction: mouse::Interaction,
|
||||||
) -> winit::window::CursorIcon {
|
) -> winit::window::CursorIcon {
|
||||||
|
|
@ -252,7 +252,7 @@ pub fn mouse_interaction(
|
||||||
/// Converts a `MouseButton` from [`winit`] to an [`iced_native`] mouse button.
|
/// Converts a `MouseButton` from [`winit`] to an [`iced_native`] mouse button.
|
||||||
///
|
///
|
||||||
/// [`winit`]: https://github.com/rust-windowing/winit
|
/// [`winit`]: https://github.com/rust-windowing/winit
|
||||||
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
|
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
|
||||||
pub fn mouse_button(mouse_button: winit::event::MouseButton) -> mouse::Button {
|
pub fn mouse_button(mouse_button: winit::event::MouseButton) -> mouse::Button {
|
||||||
match mouse_button {
|
match mouse_button {
|
||||||
winit::event::MouseButton::Left => mouse::Button::Left,
|
winit::event::MouseButton::Left => mouse::Button::Left,
|
||||||
|
|
@ -268,7 +268,7 @@ pub fn mouse_button(mouse_button: winit::event::MouseButton) -> mouse::Button {
|
||||||
/// modifiers state.
|
/// modifiers state.
|
||||||
///
|
///
|
||||||
/// [`winit`]: https://github.com/rust-windowing/winit
|
/// [`winit`]: https://github.com/rust-windowing/winit
|
||||||
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
|
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
|
||||||
pub fn modifiers(
|
pub fn modifiers(
|
||||||
modifiers: winit::event::ModifiersState,
|
modifiers: winit::event::ModifiersState,
|
||||||
) -> keyboard::Modifiers {
|
) -> keyboard::Modifiers {
|
||||||
|
|
@ -295,7 +295,7 @@ pub fn cursor_position(
|
||||||
/// Converts a `Touch` from [`winit`] to an [`iced_native`] touch event.
|
/// Converts a `Touch` from [`winit`] to an [`iced_native`] touch event.
|
||||||
///
|
///
|
||||||
/// [`winit`]: https://github.com/rust-windowing/winit
|
/// [`winit`]: https://github.com/rust-windowing/winit
|
||||||
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
|
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
|
||||||
pub fn touch_event(
|
pub fn touch_event(
|
||||||
touch: winit::event::Touch,
|
touch: winit::event::Touch,
|
||||||
scale_factor: f64,
|
scale_factor: f64,
|
||||||
|
|
@ -326,7 +326,7 @@ pub fn touch_event(
|
||||||
/// Converts a `VirtualKeyCode` from [`winit`] to an [`iced_native`] key code.
|
/// Converts a `VirtualKeyCode` from [`winit`] to an [`iced_native`] key code.
|
||||||
///
|
///
|
||||||
/// [`winit`]: https://github.com/rust-windowing/winit
|
/// [`winit`]: https://github.com/rust-windowing/winit
|
||||||
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
|
/// [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
|
||||||
pub fn key_code(
|
pub fn key_code(
|
||||||
virtual_keycode: winit::event::VirtualKeyCode,
|
virtual_keycode: winit::event::VirtualKeyCode,
|
||||||
) -> keyboard::KeyCode {
|
) -> keyboard::KeyCode {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
//! Additionally, a [`conversion`] module is available for users that decide to
|
//! Additionally, a [`conversion`] module is available for users that decide to
|
||||||
//! implement a custom event loop.
|
//! implement a custom event loop.
|
||||||
//!
|
//!
|
||||||
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native
|
//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native
|
||||||
//! [`winit`]: https://github.com/rust-windowing/winit
|
//! [`winit`]: https://github.com/rust-windowing/winit
|
||||||
//! [`conversion`]: crate::conversion
|
//! [`conversion`]: crate::conversion
|
||||||
#![doc(
|
#![doc(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue