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

Support glow with sctk using updated version of iced_glutin #30

Draft
wants to merge 58 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
379f9d7
feat: Implement client-side window cursor resize support
mmstick Nov 16, 2022
3d5d2f4
feat(native): Add MouseListener widget
mmstick Dec 12, 2022
c2b9694
feat(style): Add Container::custom_fn method
mmstick Dec 12, 2022
7b835f1
feat: sctk integration with iced
wash2 Dec 14, 2022
c9b891c
fix: button conversion
wash2 Dec 15, 2022
4c92b82
Revert "Allow &mut self in overlay"
mmstick Dec 19, 2022
fc12676
feat: various improvements to window commands and event handling
wash2 Dec 19, 2022
29ab760
Merge pull request #8 from pop-os/feat/sctk-window-handling
wash2 Dec 19, 2022
dd6929d
feat: Add softbuffer renderer backend
jackpot51 Dec 8, 2022
81ff2dd
iced_softbuffer: Improvements for solid mesh
jackpot51 Dec 19, 2022
7926784
fix: windows should not be removed from the window list until after t…
wash2 Dec 19, 2022
f7cc704
update: update sctk, glutin, & wayland-*
wash2 Dec 20, 2022
53a84da
Use swbuf instead of softbuffer
jackpot51 Dec 20, 2022
19d28ba
fix(native): Panic in downcast of tree state in mouse_listener
mmstick Dec 20, 2022
5f1ce36
fix(native): mouse listener layout
wash2 Dec 20, 2022
4993673
Update swbuf
jackpot51 Dec 20, 2022
e378c13
feat: sent output events
wash2 Dec 21, 2022
2d47c7a
refactor: OutputInfo in output events
wash2 Dec 22, 2022
1d7fcb7
Merge pull request #13 from pop-os/feat/output_events
wash2 Dec 22, 2022
fec3193
feat: Quad border radius support for buttons
mmstick Dec 23, 2022
f11670f
sctk: Improvements for handling outputs (#14)
ids1024 Dec 23, 2022
babe9e1
fix: use softbuffer instead of swbuf, which is now archived
wash2 Dec 23, 2022
ed48d14
cleanup: add rev
wash2 Dec 23, 2022
1afda2b
feat: auto-size popups
wash2 Dec 26, 2022
59c96d7
fix: make initial surface current
wash2 Dec 27, 2022
bed36f6
fix: applet feature
wash2 Dec 27, 2022
a838258
fix: initialize state & diff to create actual element for Lazy widgets
wash2 Dec 27, 2022
dd72d66
feat: resize auto-resized surfaces if layout bounds change after crea…
wash2 Dec 28, 2022
39dca51
fix: don't skip render after sending message for resize
wash2 Dec 28, 2022
a1e5adc
Update wayland-rs, sctk, glutin
ids1024 Dec 29, 2022
81dae1f
update sctk
wash2 Jan 3, 2023
cf731af
features: Don't always build sctk (#17)
Drakulix Jan 3, 2023
2e52613
features: Explicit backend/renderer combinations
Drakulix Jan 3, 2023
c1096f9
features: Use iced_native types without a runtime (#19)
Drakulix Jan 4, 2023
b5d8058
swbuf: Make backend constructor visible (#20)
Drakulix Jan 4, 2023
9984f44
fix: create popups with grab when a grab is requested
wash2 Jan 5, 2023
8658bb3
Add focus operation and style for button
13r0ck Jan 5, 2023
c4fba7e
fix: reposition popup when resizing
wash2 Jan 6, 2023
be09b34
Go back to using softbuffer
jackpot51 Jan 6, 2023
fb31dfb
Use released version of softbuffer
jackpot51 Jan 6, 2023
c9ee042
softbuffer: export draw_primitives
Drakulix Jan 6, 2023
4019d1b
HiDPI support for softbuffer
jackpot51 Jan 6, 2023
205fa6d
Fix softbuffer text wrapping when scaled
jackpot51 Jan 6, 2023
f351914
fix typo
wash2 Jan 12, 2023
47e52f1
iced: Use iced_native for keyboard types (#25)
Drakulix Jan 16, 2023
f1310e4
Dynamic renderer
jackpot51 Dec 20, 2022
e315581
feat: sctk dyrend
wash2 Jan 18, 2023
eafe224
refactor: default dyrend to just softbuffer
wash2 Jan 18, 2023
70aaa7f
fix: use softbuffer fork supporting Argb8888
wash2 Jan 18, 2023
334d5e9
cleanup: fixes visual corruption sometimes present in auto-sized surf…
wash2 Jan 20, 2023
a6605c2
update softbuffer with buffer resize fix
wash2 Jan 23, 2023
c4ea30d
fix: better sync resizes
wash2 Jan 23, 2023
3ea288a
fix: remove extra erroneous wl_surface commit
wash2 Jan 23, 2023
67ae785
sctk: Send output events to application even with no surface configured
ids1024 Feb 7, 2023
6e99cd2
glutin: Rewrite using Glutin 0.30 to provide Compositor
ids1024 Feb 2, 2023
bedaf84
Use new version of `iced_glutin` to support glow + sctk
ids1024 Feb 2, 2023
2366556
dyrend: Support glow renderer
ids1024 Feb 2, 2023
06edded
sctk: Send output events even if no surface exists
ids1024 Feb 8, 2023
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
40 changes: 31 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,27 @@ keywords = ["gui", "ui", "graphics", "interface", "widgets"]
categories = ["gui"]

[features]
default = ["wgpu"]
default = ["dyrend", "winit"]
# Enables the `Image` widget
image = ["iced_wgpu?/image", "iced_glow?/image", "image_rs"]
image = ["iced_wgpu?/image", "iced_glow?/image", "iced_softbuffer?/image", "iced_dyrend?/image", "image_rs"]
# Enables the `Svg` widget
svg = ["iced_wgpu?/svg", "iced_glow?/svg"]
svg = ["iced_wgpu?/svg", "iced_glow?/svg", "iced_softbuffer?/svg", "iced_dyrend?/svg"]
# Enables the `Canvas` widget
canvas = ["iced_graphics/canvas"]
# Enables the `QRCode` widget
qr_code = ["iced_graphics/qr_code"]
# Enables the `iced_wgpu` renderer
# Enables the `iced_dyrend` renderer
dyrend = ["iced_dyrend"]
# Enables the `iced_wgpu` renderer. Conflicts with `iced_glow` and `iced_softbuffer`
wgpu = ["iced_wgpu"]
# Enables the `iced_softbuffer` renderer. Conflicts with `iced_wgpu` and `iced_glow`
softbuffer = ["iced_softbuffer"]
# Enables the `iced_glow` renderer. Conflicts with `iced_wgpu` and `iced_softbuffer`
glow = ["iced_glow", "iced_glutin"]
# Enables using system fonts
default_system_font = ["iced_wgpu?/default_system_font", "iced_glow?/default_system_font"]
# Enables the `iced_glow` renderer. Overrides `iced_wgpu`
glow = ["iced_glow", "iced_glutin"]
# Enables a debug view in native platforms (press F12)
debug = ["iced_winit/debug"]
debug = ["iced_winit?/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 @@ -38,34 +42,48 @@ smol = ["iced_futures/smol"]
# Enables advanced color conversion via `palette`
palette = ["iced_core/palette"]
# Enables querying system information
system = ["iced_winit/system"]
system = ["iced_winit?/system"]
# Enables the glutin shell. Conflicts with `sctk` and `winit`.
# Forces the `glow` renderer, further conflicting with `wgpu` and `softbuffer`.
glutin = ["iced_glutin", "iced_glow"]
# Enables the wayland shell. Conflicts with `winit` and `glutin`.
# Incompatible with the `softbuffer` and `wgpu` renderer.
wayland = ["iced_sctk"]
# Enables the winit shell. Conflicts with `wayland` and `glutin`.
winit = ["iced_winit"]

[badges]
maintenance = { status = "actively-developed" }

[workspace]
members = [
"core",
"dyrend",
"futures",
"graphics",
"glow",
"glutin",
"lazy",
"native",
"softbuffer",
"style",
"wgpu",
"winit",
"sctk",
"examples/*",
]

[dependencies]
iced_core = { version = "0.6", path = "core" }
iced_dyrend = { version = "0.1", path = "dyrend", optional = true }
iced_futures = { version = "0.5", path = "futures" }
iced_native = { version = "0.7", path = "native" }
iced_graphics = { version = "0.5", path = "graphics" }
iced_winit = { version = "0.6", path = "winit", features = ["application"] }
iced_winit = { version = "0.6", path = "winit", features = ["application"], optional = true }
iced_glutin = { version = "0.5", path = "glutin", optional = true }
iced_glow = { version = "0.5", path = "glow", optional = true }
iced_sctk = { path = "./sctk", optional = true }
iced_softbuffer = { version = "0.1", path = "softbuffer", optional = true }
thiserror = "1.0"

[dependencies.image_rs]
Expand All @@ -92,3 +110,7 @@ incremental = false
opt-level = 3
overflow-checks = false
strip = "debuginfo"

[patch."https://github.com/iced-rs/winit.git".winit]
git = "https://github.com/pop-os/winit.git"
branch = "iced"
2 changes: 2 additions & 0 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ mod font;
mod length;
mod padding;
mod point;
mod radius;
mod rectangle;
mod size;
mod vector;
Expand All @@ -48,6 +49,7 @@ pub use font::Font;
pub use length::Length;
pub use padding::Padding;
pub use point::Point;
pub use radius::BorderRadius;
pub use rectangle::Rectangle;
pub use size::Size;
pub use vector::Vector;
22 changes: 22 additions & 0 deletions core/src/radius.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/// The border radi for the corners of a graphics primitive in the order:
/// top-left, top-right, bottom-right, bottom-left.
#[derive(Debug, Clone, Copy, PartialEq, Default)]
pub struct BorderRadius([f32; 4]);

impl From<f32> for BorderRadius {
fn from(w: f32) -> Self {
Self([w; 4])
}
}

impl From<[f32; 4]> for BorderRadius {
fn from(radi: [f32; 4]) -> Self {
Self(radi)
}
}

impl From<BorderRadius> for [f32; 4] {
fn from(radi: BorderRadius) -> Self {
radi.0
}
}
52 changes: 52 additions & 0 deletions dyrend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[package]
name = "iced_dyrend"
version = "0.1.0"
authors = ["Jeremy Soller <[email protected]>"]
edition = "2021"
description = "A dynamicly chosen renderer for Iced"
license = "MIT AND OFL-1.1"
repository = "https://github.com/iced-rs/iced"

[dependencies]
log = "0.4"
raw-window-handle = "0.5"

[dependencies.iced_native]
path = "../native"

[dependencies.iced_graphics]
path = "../graphics"
features = ["font-fallback", "font-icons"]

[dependencies.iced_glow]
path = "../glow"
default-features = false
optional = true

[dependencies.iced_glutin]
path = "../glutin"
default-features = false
optional = true


[dependencies.iced_softbuffer]
path = "../softbuffer"
default-features = false
optional = true

[dependencies.iced_wgpu]
path = "../wgpu"
default-features = false
optional = true

[features]
default = ["softbuffer"]
image = ["iced_graphics/image", "iced_glow?/image", "iced_softbuffer?/image", "iced_wgpu?/image"]
svg = ["iced_graphics/svg", "iced_glow?/svg", "iced_softbuffer?/svg", "iced_wgpu?/svg"]
glow = ["iced_glow", "iced_glutin"]
softbuffer = ["iced_softbuffer"]
wgpu = ["iced_wgpu"]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
all-features = true
3 changes: 3 additions & 0 deletions dyrend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `iced_softbuffer`

Software rendering for Iced
13 changes: 13 additions & 0 deletions dyrend/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//! A [`softbuffer`] renderer for [`iced_native`].
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
#![cfg_attr(docsrs, feature(doc_cfg))]

mod renderer;
pub use self::renderer::Renderer;

pub mod settings;
pub use self::settings::Settings;

pub mod window;
Loading