Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update smithay-clipboard to 0.7.0 #96

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
11d7dee
feat: accessibility with some widget impls
wash2 May 2, 2023
983d811
feat: sctk shell
wash2 May 8, 2023
e0bb3a4
chore: default line height, text size, and shaping for cosmic
mmstick May 30, 2023
eb213d1
runtime: Handle widget operations in `program::State` helper (#46)
Drakulix Jun 13, 2023
dece309
fix: reset button state if the cursor leaves
wash2 Jul 10, 2023
b93eb54
Introduce internal `overlay::Nested` for `UserInterface`
tarkah Feb 18, 2023
0524a7d
Use layout with children for nesting
tarkah Feb 19, 2023
796788a
Use nested for lazy widgets
tarkah Feb 20, 2023
4c337e2
Provide access to font from each crate
tarkah Jun 23, 2023
e6713b2
Added offscreen rendering support for wgpu & tiny-skia exposed with t…
bungoboingo Mar 25, 2023
ff5b734
Move `Screenshot` inside `window` module
hecrj Jun 27, 2023
01a21fe
fix: quad rendering including border only inside of the bounds
wash2 May 10, 2023
90b5e77
Make vertical scroll properties optional
May 27, 2023
f327160
feat(winit): client-side resize drag support
mmstick Aug 18, 2023
350753b
feat(winit): client-side resize drag support
mmstick Aug 18, 2023
541c4d8
feat(renderer): define default icon color
mmstick Aug 30, 2023
58f18bf
feat(sctk): support icon color appearance
mmstick Aug 30, 2023
05aed76
fix(button): inherit icon color if set to none
mmstick Aug 31, 2023
60eb11c
fix(widget): container inherited wrong icon color from renderer
mmstick Sep 7, 2023
a88d61f
feat(mouse-area): added on_drag method
mmstick Sep 12, 2023
41bc380
feat: gradient backgground for the slider rail
wash2 Sep 26, 2023
90a6674
fix: slider gradient angle
wash2 Sep 29, 2023
05d33dc
feat: allow setting the width and height of a rule
wash2 Sep 29, 2023
0feea42
refactor: restore default style of slider
wash2 Sep 29, 2023
0e8cda8
cleanup: clippy fixes and formatting
wash2 Sep 26, 2023
2f9cec1
feat: Add side mouse button events
edfloreshz Oct 22, 2023
c0f8169
feat: add border radius to image rendering
mmstick Nov 3, 2023
6e9aed1
fix(wgpu): handle border_radius property with image raster
mmstick Nov 3, 2023
928929e
iced_core: feature for serde serialization of KeyCode
jackpot51 Nov 3, 2023
5deed0f
Hack to remove image blur
jackpot51 Nov 13, 2023
ddd0f27
chore: update softbuffer
wash2 Nov 15, 2023
839ff2e
Update mod.rs
wiiznokes Nov 17, 2023
3336a21
refactor
danieleades Nov 19, 2023
50b9019
chore: cleanup iced_widget
wash2 Nov 28, 2023
c1212db
cleanup git workflows
wash2 Nov 28, 2023
81dd37d
cleanup: clippy
wash2 Nov 28, 2023
196cb69
fix: editor and sctk_todos examples
wash2 Nov 28, 2023
9319641
reexport limits
wash2 Nov 28, 2023
63f6abd
fix: fill in todos
wash2 Nov 29, 2023
34d1cef
refactor: udpate gradient angles for slider
wash2 Nov 30, 2023
86f885a
fix: tooltip children and diff
wash2 Nov 30, 2023
85956e7
fix: add back the window id to the frames subscription
wash2 Nov 30, 2023
72302c1
fix: CI tests
wash2 Nov 30, 2023
a281c8f
chore: remove artifacts job
wash2 Nov 30, 2023
151e247
fix: ambiguous palette import
wash2 Nov 30, 2023
fe02b52
fix: dnd widget layout
wash2 Dec 1, 2023
c075b2f
chore: use advanced text shaping for pick list
wash2 Dec 4, 2023
baa9ce9
fix: clip mask checks
wash2 Dec 4, 2023
8bc47f5
fix: set web-sys to =0.3.64
wash2 Dec 4, 2023
ed5c70b
fix: translate the wayland event position for content inside a scroll…
wash2 Dec 4, 2023
4521d6e
fix(example): sctk_drag id
wash2 Dec 6, 2023
56b6d65
cleanup: formatting and clippy
wash2 Dec 7, 2023
8195c7f
chore: fix sctk multi-window dependency
wash2 Dec 11, 2023
55759e5
dnd_listener: Fix behavior when there are multiple listeners (#87)
ids1024 Dec 11, 2023
51723e8
fix: broadcast surface events
wash2 Dec 13, 2023
7a26007
Introduce `RawText` to `Primitive` in `iced_graphics`
hecrj Dec 5, 2023
324b762
Update to cosmic-text refactor
jackpot51 Dec 19, 2023
81de422
Fixes for last commit
jackpot51 Dec 19, 2023
611ce16
Add function to fill a Raw
jackpot51 Dec 19, 2023
b33248a
Fix docs error
jackpot51 Jan 12, 2024
845acb5
dep: update `glyphon` to `0.4`
mmstick Jan 16, 2024
64ed230
Use main branch of cosmic-text
jackpot51 Jan 17, 2024
6115280
Patch glyphon to use latest cosmic-text
jackpot51 Jan 17, 2024
08126ce
chore: update smithay-clipboard to 0.7.0
mmstick Jan 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,3 @@ jobs:
run: cargo update
- name: Audit vulnerabilities
run: cargo audit

artifacts:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
- name: Install cargo-outdated
run: cargo install cargo-outdated
- uses: actions/checkout@master
- name: Delete `web-sys` dependency from `integration` example
run: sed -i '$d' examples/integration/Cargo.toml
- name: Find outdated dependencies
run: cargo outdated --workspace --exit-code 1
2 changes: 1 addition & 1 deletion .github/workflows/document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Generate documentation
run: |
RUSTDOCFLAGS="--cfg docsrs" \
cargo doc --no-deps --all-features \
cargo doc --no-deps --features "winit" \
-p iced_core \
-p iced_highlighter \
-p iced_style \
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@ name: Lint
on: [push, pull_request]
jobs:
all:
runs-on: macOS-latest
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
with:
components: clippy

- uses: actions/checkout@master
- name: Install dependencies
run: |
export DEBIAN_FRONTED=noninteractive
sudo apt-get -qq update
sudo apt-get install -y libxkbcommon-dev libwayland-dev
- name: Check lints
run: cargo lint
run: |
cargo clippy --no-default-features --features "winit" --all-targets
cargo clippy --no-default-features --features "wayland wgpu svg canvas qr_code lazy debug tokio palette web-colors a11y"
36 changes: 33 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,38 @@ jobs:
run: |
export DEBIAN_FRONTED=noninteractive
sudo apt-get -qq update
sudo apt-get install -y libxkbcommon-dev libgtk-3-dev
sudo apt-get install -y libxkbcommon-dev libwayland-dev
- name: Run tests
run: |
cargo test --verbose --workspace
cargo test --verbose --workspace --all-features
cargo test --verbose --features "winit wgpu svg canvas qr_code lazy debug tokio palette web-colors a11y"
cargo test -p iced_accessibility
cargo test -p iced_core
cargo test -p iced_futures
cargo test -p iced_graphics
cargo test -p iced_renderer
cargo test -p iced_runtime
cargo test -p iced_tiny_skia
cargo test -p iced_widget
cargo test -p iced_wgpu
- name: test wayland
if: matrix.os == 'ubuntu-latest'
run: |
cargo test --verbose --features "wayland wgpu svg canvas qr_code lazy debug tokio palette web-colors a11y"
cargo test -p iced_sctk

web:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
targets: wasm32-unknown-unknown
- uses: actions/checkout@master
- name: Run checks
run: cargo check --package iced --target wasm32-unknown-unknown --no-default-features --features "winit"
- name: Check compilation of `tour` example
run: cargo build --package tour --target wasm32-unknown-unknown
- name: Check compilation of `todos` example
run: cargo build --package todos --target wasm32-unknown-unknown
- name: Check compilation of `integration` example
run: cargo build --package integration --target wasm32-unknown-unknown
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Many thanks to...
- @akshayr-mecha
- @dtzxporter

Many thanks to...
- @edfloreshz
- @jackpot51
- @wash2

## [0.10.0] - 2023-07-28
### Added
- Text shaping, font fallback, and `iced_wgpu` overhaul. [#1697](https://github.com/iced-rs/iced/pull/1697)
Expand Down
64 changes: 39 additions & 25 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ all-features = true
maintenance = { status = "actively-developed" }

[features]
default = ["wgpu"]
# Enable the `wgpu` GPU-accelerated renderer backend
wgpu = ["iced_renderer/wgpu", "iced_widget/wgpu"]
# Enables the `Image` widget
Expand All @@ -32,7 +31,7 @@ qr_code = ["iced_widget/qr_code"]
# Enables lazy widgets
lazy = ["iced_widget/lazy"]
# Enables a debug view in native platforms (press F12)
debug = ["iced_winit/debug"]
debug = ["iced_winit?/debug", "iced_sctk?/debug"]
# Enables `tokio` as the `executor::Default` on native platforms
tokio = ["iced_futures/tokio"]
# Enables `async-std` as the `executor::Default` on native platforms
Expand All @@ -41,18 +40,22 @@ async-std = ["iced_futures/async-std"]
smol = ["iced_futures/smol"]
# Enables advanced color conversion via `palette`
palette = ["iced_core/palette"]
# Enables querying system information
system = ["iced_winit/system"]
# Enables broken "sRGB linear" blending to reproduce color management of the Web
web-colors = ["iced_renderer/web-colors"]
# Enables the WebGL backend, replacing WebGPU
webgl = ["iced_renderer/webgl"]
# Enables the syntax `highlighter` module
highlighter = ["iced_highlighter"]
# Enables experimental multi-window support.
multi-window = ["iced_winit/multi-window"]
multi-window = ["iced_winit?/multi-window"]
# Enables the advanced module
advanced = []
# Enables the `accesskit` accessibility library
a11y = ["iced_accessibility", "iced_core/a11y", "iced_widget/a11y", "iced_winit?/a11y", "iced_sctk?/a11y"]
# Enables the winit shell. Conflicts with `wayland` and `glutin`.
winit = ["iced_winit", "iced_accessibility?/accesskit_winit"]
# Enables the sctk shell. COnflicts with `winit` and `glutin`.
wayland = ["iced_sctk", "iced_widget/wayland", "iced_accessibility?/accesskit_unix", "iced_core/wayland"]

[dependencies]
iced_core.workspace = true
Expand All @@ -61,41 +64,46 @@ iced_renderer.workspace = true
iced_widget.workspace = true
iced_winit.features = ["application"]
iced_winit.workspace = true

iced_winit.optional = true
iced_sctk.workspace = true
iced_sctk.optional = true
iced_highlighter.workspace = true
iced_highlighter.optional = true

iced_accessibility.workspace = true
iced_accessibility.optional = true
thiserror.workspace = true

image.workspace = true
image.optional = true

[profile.release-opt]
inherits = "release"
codegen-units = 1
debug = false
lto = true
incremental = false
opt-level = 3
overflow-checks = false
strip = "debuginfo"

[workspace]
members = [
"core",
"futures",
"graphics",
"highlighter",
"renderer",
"runtime",
"renderer",
"style",
"tiny_skia",
"wgpu",
"widget",
"winit",
"examples/*",
"accessibility",
"sctk"
]

[profile.release-opt]
inherits = "release"
codegen-units = 1
debug = false
lto = true
incremental = false
opt-level = 3
overflow-checks = false
strip = "debuginfo"

[workspace.package]
version = "0.12.0"
authors = ["Héctor Ramón Jiménez <[email protected]>"]
Expand All @@ -118,15 +126,17 @@ iced_style = { version = "0.12", path = "style" }
iced_tiny_skia = { version = "0.12", path = "tiny_skia" }
iced_wgpu = { version = "0.12", path = "wgpu" }
iced_widget = { version = "0.12", path = "widget" }
iced_winit = { version = "0.12", path = "winit" }
iced_winit = { version = "0.12", path = "winit", features = ["application"] }
iced_sctk = { version = "0.1", path = "sctk" }
iced_accessibility = { version = "0.1", path = "accessibility" }

async-std = "1.0"
bitflags = "1.0"
bytemuck = { version = "1.0", features = ["derive"] }
cosmic-text = "0.10"
cosmic-text = { git = "https://github.com/pop-os/cosmic-text.git" }
futures = "0.3"
glam = "0.24"
glyphon = { git = "https://github.com/grovesNL/glyphon.git", rev = "2caa9fc5e5923c1d827d177c3619cab7e9885b85" }
glyphon = { git = "https://github.com/jackpot51/glyphon.git" }
guillotiere = "0.6"
half = "2.2"
image = "0.24"
Expand All @@ -142,10 +152,11 @@ ouroboros = "0.17"
palette = "0.7"
qrcode = { version = "0.12", default-features = false }
raw-window-handle = "0.5"
resvg = "0.36"
resvg = "0.37"
rustc-hash = "1.0"
sctk = { package = "smithay-client-toolkit", git = "https://github.com/smithay/client-toolkit", rev = "2e9bf9f" }
smol = "1.0"
softbuffer = "0.2"
softbuffer = { git = "https://github.com/pop-os/softbuffer", tag = "v0.3-cosmic" }
syntect = "5.1"
sysinfo = "0.28"
thiserror = "1.0"
Expand All @@ -156,8 +167,11 @@ xxhash-rust = { version = "0.8", features = ["xxh3"] }
unicode-segmentation = "1.0"
wasm-bindgen-futures = "0.4"
wasm-timer = "0.2"
web-sys = "0.3"
wayland-protocols = { version = "0.31.0", features = [ "staging"]}
web-sys = "=0.3.64"
wgpu = "0.18"
winapi = "0.3"
window_clipboard = "0.3"
winit = { git = "https://github.com/iced-rs/winit.git", rev = "c52db2045d0a2f1b8d9923870de1d4ab1994146e", default-features = false }
[workspace.dependencies.winit]
git = "https://github.com/pop-os/winit.git"
branch = "master"
19 changes: 19 additions & 0 deletions accessibility/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "iced_accessibility"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
# TODO Ashley re-export more platform adapters

[dependencies]
accesskit = { git = "https://github.com/wash2/accesskit.git", tag = "winit-0.28", version = "0.11.0" }
accesskit_unix = { git = "https://github.com/wash2/accesskit.git", tag = "winit-0.28", version = "0.4.0", optional = true }
accesskit_windows = { git = "https://github.com/wash2/accesskit.git", tag = "winit-0.28", version = "0.14.0", optional = true}
accesskit_macos = { git = "https://github.com/wash2/accesskit.git", tag = "winit-0.28", version = "0.7.0", optional = true}
accesskit_winit = { git = "https://github.com/wash2/accesskit.git", tag = "winit-0.28", version = "0.13.0", optional = true}
# accesskit = { path = "../../fork/accesskit/common/", version = "0.11.0" }
# accesskit_unix = { path = "../../fork/accesskit/platforms/unix/", version = "0.4.0", optional = true }
# accesskit_windows = { path = "../../fork/accesskit/platforms/windows/", version = "0.14.0", optional = true}
# accesskit_macos = { path = "../../fork/accesskit/platforms/macos/", version = "0.7.0", optional = true}
# accesskit_winit = { path = "../../fork/accesskit/platforms/winit/", version = "0.13.0", optional = true}
80 changes: 80 additions & 0 deletions accessibility/src/a11y_tree.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
use crate::{A11yId, A11yNode, IdEq};

#[derive(Debug, Clone, Default)]
/// Accessible tree of nodes
pub struct A11yTree {
/// The root of the current widget, children of the parent widget or the Window if there is no parent widget
root: Vec<A11yNode>,
/// The children of a widget and its children
children: Vec<A11yNode>,
}

impl A11yTree {
/// Create a new A11yTree
/// XXX if you use this method, you will need to manually add the children of the root nodes
pub fn new(root: Vec<A11yNode>, children: Vec<A11yNode>) -> Self {
Self { root, children }
}

pub fn leaf<T: Into<A11yId>>(node: accesskit::NodeBuilder, id: T) -> Self {
Self {
root: vec![A11yNode::new(node, id)],
children: vec![],
}
}

/// Helper for creating an A11y tree with a single root node and some children
pub fn node_with_child_tree(mut root: A11yNode, child_tree: Self) -> Self {
root.add_children(
child_tree.root.iter().map(|n| n.id()).cloned().collect(),
);
Self {
root: vec![root],
children: child_tree
.children
.into_iter()
.chain(child_tree.root)
.collect(),
}
}

/// Joins multiple trees into a single tree
pub fn join<T: Iterator<Item = Self>>(trees: T) -> Self {
trees.fold(Self::default(), |mut acc, A11yTree { root, children }| {
acc.root.extend(root);
acc.children.extend(children);
acc
})
}

pub fn root(&self) -> &Vec<A11yNode> {
&self.root
}

pub fn children(&self) -> &Vec<A11yNode> {
&self.children
}

pub fn root_mut(&mut self) -> &mut Vec<A11yNode> {
&mut self.root
}

pub fn children_mut(&mut self) -> &mut Vec<A11yNode> {
&mut self.children
}

pub fn contains(&self, id: &A11yId) -> bool {
self.root.iter().any(|n| IdEq::eq(n.id(), id))
|| self.children.iter().any(|n| IdEq::eq(n.id(), id))
}
}

impl From<A11yTree> for Vec<(accesskit::NodeId, accesskit::Node)> {
fn from(tree: A11yTree) -> Vec<(accesskit::NodeId, accesskit::Node)> {
tree.root
.into_iter()
.map(|node| node.into())
.chain(tree.children.into_iter().map(|node| node.into()))
.collect()
}
}
Loading
Loading