diff --git a/Cargo.lock b/Cargo.lock index 828323c8..b411ed33 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,9 +168,9 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "ash" -version = "0.37.2+1.3.238" +version = "0.37.3+1.3.251" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28bf19c1f0a470be5fbf7522a308a05df06610252c5bcf5143e1b23f629a9a03" +checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" dependencies = [ "libloading 0.7.4", ] @@ -181,6 +181,17 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79d6dc922a2792b006573f60b2648076355daeae5ce9cb59507e5908c9625d31" +[[package]] +name = "atomicwrites" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1163d9d7c51de51a2b79d6df5e8888d11e9df17c752ce4a285fb6ca1580734e" +dependencies = [ + "rustix", + "tempfile", + "windows-sys 0.48.0", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -208,6 +219,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + [[package]] name = "bincode" version = "1.3.3" @@ -307,7 +324,7 @@ checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -536,7 +553,9 @@ dependencies = [ "edid-rs", "egui", "glow 0.11.2", - "iced_softbuffer", + "iced_core 0.9.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "iced_renderer", + "iced_tiny_skia", "id_tree", "indexmap", "lazy_static", @@ -556,6 +575,7 @@ dependencies = [ "smithay", "smithay-egui", "thiserror", + "tiny-skia 0.9.1", "tracing", "tracing-journald", "tracing-subscriber", @@ -566,10 +586,33 @@ dependencies = [ "xkbcommon 0.4.1", ] +[[package]] +name = "cosmic-config" +version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" +dependencies = [ + "atomicwrites", + "cosmic-config-derive", + "dirs 5.0.1", + "iced_futures 0.6.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "notify", + "ron 0.8.0", + "serde", +] + +[[package]] +name = "cosmic-config-derive" +version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "cosmic-protocols" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-protocols?branch=main#7d80b59afc464a8ecdb8001333f18de554f299f4" +source = "git+https://github.com/pop-os/cosmic-protocols?branch=main#f0cfe0973376b31fba4a726a35633a8e39e9319e" dependencies = [ "bitflags 1.3.2", "wayland-backend", @@ -580,15 +623,15 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.7.0" -source = "git+https://github.com/pop-os/cosmic-text?rev=e788c175#e788c175ec31094b04dcacbc0537dba4433afcfc" +version = "0.8.0" +source = "git+https://github.com/hecrj/cosmic-text.git?rev=b85d6a4f2376f8a8a7dadc0f8bcb89d4db10a1c9#b85d6a4f2376f8a8a7dadc0f8bcb89d4db10a1c9" dependencies = [ - "fontdb 0.13.1", + "fontdb", "libm", "log", "ouroboros 0.15.6", "rangemap", - "rustybuzz 0.7.0", + "rustybuzz", "swash", "sys-locale", "unicode-bidi", @@ -600,9 +643,10 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-theme.git#ce3a63a10638195c7b5a47224c89a82c2fa9494d" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" dependencies = [ "anyhow", + "cosmic-config", "csscolorparser", "directories", "lazy_static", @@ -617,11 +661,11 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "269b94889f152389ed39fde8a69a6083ff4ca73993360d2850d5c281e3488c11" dependencies = [ - "iced 0.9.0", - "iced_core 0.9.0", - "iced_futures 0.6.0", - "iced_native 0.10.3", - "iced_style 0.8.0", + "iced 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_futures 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_native", + "iced_style 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -740,17 +784,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" -[[package]] -name = "d3d12" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827914e1f53b1e0e025ecd3d967a7836b7bcb54520f90e21ef8df7b4d88a2759" -dependencies = [ - "bitflags 1.3.2", - "libloading 0.7.4", - "winapi", -] - [[package]] name = "d3d12" version = "0.6.0" @@ -762,16 +795,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "darling" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" -dependencies = [ - "darling_core 0.10.2", - "darling_macro 0.10.2", -] - [[package]] name = "darling" version = "0.13.4" @@ -783,17 +806,13 @@ dependencies = [ ] [[package]] -name = "darling_core" -version = "0.10.2" +name = "darling" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.9.3", - "syn 1.0.109", + "darling_core 0.20.1", + "darling_macro 0.20.1", ] [[package]] @@ -806,19 +825,22 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", + "strsim", "syn 1.0.109", ] [[package]] -name = "darling_macro" -version = "0.10.2" +name = "darling_core" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" dependencies = [ - "darling_core 0.10.2", + "fnv", + "ident_case", + "proc-macro2", "quote", - "syn 1.0.109", + "strsim", + "syn 2.0.18", ] [[package]] @@ -833,12 +855,14 @@ dependencies = [ ] [[package]] -name = "data-url" -version = "0.1.1" +name = "darling_macro" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30bfce702bcfa94e906ef82421f2c0e61c076ad76030c16ee5d2e9a32fe193" +checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ - "matches", + "darling_core 0.20.1", + "quote", + "syn 2.0.18", ] [[package]] @@ -849,14 +873,14 @@ checksum = "8d7439c3735f405729d52c3fbbe4de140eaf938a1fe47d227c27f8254d4302a5" [[package]] name = "derive_setters" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1cf41b4580a37cca5ef2ada2cc43cf5d6be3983f4522e83010d67ab6925e84b" +checksum = "4e8ef033054e131169b8f0f9a7af8f5533a9436fadf3c500ed547f730f07090d" dependencies = [ - "darling 0.10.2", + "darling 0.20.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] @@ -876,7 +900,7 @@ version = "4.0.1" source = "git+https://github.com/edfloreshz/directories-rs#6a6d83d853a35ee3273034215c4defaf61286fe5" dependencies = [ "anyhow", - "dirs-sys", + "dirs-sys 0.3.7", ] [[package]] @@ -885,7 +909,16 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ - "dirs-sys", + "dirs-sys 0.3.7", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys 0.4.1", ] [[package]] @@ -899,6 +932,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + [[package]] name = "dispatch" version = "0.2.0" @@ -1025,7 +1070,7 @@ checksum = "8257332fb168a965b3dca81d6a344e053153773c889cabdba0b3b76f1629ae81" dependencies = [ "bytemuck", "egui", - "glow 0.12.1", + "glow 0.12.2", "memoffset 0.6.5", "tracing", "wasm-bindgen", @@ -1201,6 +1246,16 @@ dependencies = [ "str-buf", ] +[[package]] +name = "etagere" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6301151a318f367f392c31395beb1cfba5ccd9abc44d1db0db3a4b27b9601c89" +dependencies = [ + "euclid", + "svg_fmt", +] + [[package]] name = "euclid" version = "0.22.9" @@ -1254,6 +1309,18 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "filetime" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.2.16", + "windows-sys 0.48.0", +] + [[package]] name = "find-crate" version = "0.6.3" @@ -1308,14 +1375,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "fontdb" -version = "0.6.2" +name = "fontconfig-parser" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d66551cc28351f0bc6a73da86459ee7765caaad03ce284f2dc36472dbf539cd" +checksum = "4ab2e12762761366dcb876ab8b6e0cfa4797ddcd890575919f008b5ba655672a" dependencies = [ - "log", - "memmap2 0.3.1", - "ttf-parser 0.12.3", + "roxmltree 0.18.0", ] [[package]] @@ -1324,8 +1389,9 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "237ff9f0813bbfc9de836016472e0c9ae7802f174a51594607e5f4ff334cb2f5" dependencies = [ + "fontconfig-parser", "log", - "memmap2 0.5.10", + "memmap2", "slotmap", "ttf-parser 0.18.1", ] @@ -1357,7 +1423,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -1388,7 +1454,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00e61ac115df4632b592d36b71fda3c259f4c8061c70b7fa429bac145890e880" dependencies = [ - "dirs", + "dirs 4.0.0", "once_cell", "rust-ini", "thiserror", @@ -1417,6 +1483,15 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "fsevent-sys" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" +dependencies = [ + "libc", +] + [[package]] name = "futures" version = "0.3.28" @@ -1474,7 +1549,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -1620,9 +1695,9 @@ dependencies = [ [[package]] name = "glow" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e007a07a24de5ecae94160f141029e9a347282cfe25d1d58d85d845cf3130f1" +checksum = "807edf58b70c0b5b2181dd39fe1839dbdb3ba02645630dc5f753e23da307f762" dependencies = [ "js-sys", "slotmap", @@ -1630,18 +1705,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "glow_glyph" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4e62c64947b9a24fe20e2bba9ad819ecb506ef5c8df7ffc4737464c6df9510" -dependencies = [ - "bytemuck", - "glow 0.11.2", - "glyph_brush", - "log", -] - [[package]] name = "glyph_brush" version = "0.7.7" @@ -1680,6 +1743,17 @@ dependencies = [ "xi-unicode", ] +[[package]] +name = "glyphon" +version = "0.2.0" +source = "git+https://github.com/hecrj/glyphon.git?rev=f145067d292082abdd1f2b2481812d4a52c394ec#f145067d292082abdd1f2b2481812d4a52c394ec" +dependencies = [ + "cosmic-text", + "etagere", + "lru", + "wgpu 0.16.1", +] + [[package]] name = "gpu-alloc" version = "0.5.4" @@ -1720,7 +1794,7 @@ checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a" dependencies = [ "bitflags 1.3.2", "gpu-descriptor-types", - "hashbrown", + "hashbrown 0.12.3", ] [[package]] @@ -1760,6 +1834,15 @@ dependencies = [ "ahash 0.7.6", ] +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.3", +] + [[package]] name = "hassle-rs" version = "0.9.0" @@ -1771,7 +1854,22 @@ dependencies = [ "libc", "libloading 0.7.4", "thiserror", - "widestring", + "widestring 0.5.1", + "winapi", +] + +[[package]] +name = "hassle-rs" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0" +dependencies = [ + "bitflags 1.3.2", + "com-rs", + "libc", + "libloading 0.7.4", + "thiserror", + "widestring 1.0.2", "winapi", ] @@ -1816,46 +1914,32 @@ dependencies = [ [[package]] name = "iced" -version = "0.6.0" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efbddf356d01e9d41cd394a9d04d62bfd89650a30f12fda5839cabb8c4591c88" dependencies = [ - "iced_core 0.6.2", - "iced_dyrend", - "iced_futures 0.5.1", - "iced_glow", - "iced_graphics 0.5.0", - "iced_native 0.7.0", - "iced_softbuffer", - "iced_wgpu 0.7.0", - "image", + "iced_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_futures 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_graphics 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_native", + "iced_wgpu 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_winit", "thiserror", ] [[package]] name = "iced" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbddf356d01e9d41cd394a9d04d62bfd89650a30f12fda5839cabb8c4591c88" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" dependencies = [ - "iced_core 0.9.0", - "iced_futures 0.6.0", - "iced_graphics 0.8.0", - "iced_native 0.10.3", - "iced_wgpu 0.10.0", - "iced_winit", + "iced_core 0.9.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "iced_futures 0.6.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "iced_renderer", + "iced_widget", + "image", "thiserror", ] -[[package]] -name = "iced_core" -version = "0.6.2" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" -dependencies = [ - "bitflags 1.3.2", - "palette", - "wasm-timer", -] - [[package]] name = "iced_core" version = "0.9.0" @@ -1868,28 +1952,16 @@ dependencies = [ ] [[package]] -name = "iced_dyrend" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +name = "iced_core" +version = "0.9.0" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" dependencies = [ - "iced_glow", - "iced_graphics 0.5.0", - "iced_native 0.7.0", - "iced_softbuffer", - "iced_wgpu 0.7.0", + "bitflags 1.3.2", + "instant", "log", - "raw-window-handle 0.5.2", -] - -[[package]] -name = "iced_futures" -version = "0.5.1" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" -dependencies = [ - "futures", - "log", - "wasm-bindgen-futures", - "wasm-timer", + "palette", + "thiserror", + "twox-hash", ] [[package]] @@ -1906,38 +1978,15 @@ dependencies = [ ] [[package]] -name = "iced_glow" -version = "0.5.1" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +name = "iced_futures" +version = "0.6.0" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" dependencies = [ - "bytemuck", - "euclid", - "glow 0.11.2", - "glow_glyph", - "glyph_brush", - "iced_graphics 0.5.0", - "iced_native 0.7.0", + "futures", + "iced_core 0.9.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", "log", -] - -[[package]] -name = "iced_graphics" -version = "0.5.0" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" -dependencies = [ - "bitflags 1.3.2", - "bytemuck", - "glam", - "iced_native 0.7.0", - "iced_style 0.5.1", - "image", - "kamadak-exif", - "log", - "raw-window-handle 0.5.2", - "resvg 0.18.0", - "thiserror", - "tiny-skia 0.6.6", - "usvg 0.18.0", + "wasm-bindgen-futures", + "wasm-timer", ] [[package]] @@ -1949,33 +1998,28 @@ dependencies = [ "bitflags 1.3.2", "bytemuck", "glam", - "iced_native 0.10.3", - "iced_style 0.8.0", + "iced_native", + "iced_style 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "log", "raw-window-handle 0.5.2", "thiserror", ] [[package]] -name = "iced_lazy" -version = "0.3.0" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +name = "iced_graphics" +version = "0.8.0" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" dependencies = [ - "iced_native 0.7.0", - "ouroboros 0.13.0", -] - -[[package]] -name = "iced_native" -version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" -dependencies = [ - "iced_core 0.6.2", - "iced_futures 0.5.1", - "iced_style 0.5.1", - "num-traits", - "twox-hash", - "unicode-segmentation", + "bitflags 1.3.2", + "bytemuck", + "glam", + "iced_core 0.9.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "image", + "kamadak-exif", + "log", + "raw-window-handle 0.5.2", + "thiserror", + "tiny-skia 0.9.1", ] [[package]] @@ -1984,9 +2028,9 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d012eb06da490fe46a695b39721c20da9643f35cf2ecb9d30618fdeb96170616" dependencies = [ - "iced_core 0.9.0", - "iced_futures 0.6.0", - "iced_style 0.8.0", + "iced_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_futures 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_style 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits", "thiserror", "twox-hash", @@ -1994,28 +2038,25 @@ dependencies = [ ] [[package]] -name = "iced_softbuffer" +name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" dependencies = [ - "cosmic-text", - "iced_graphics 0.5.0", - "iced_native 0.7.0", - "lazy_static", - "log", - "raqote", + "iced_graphics 0.8.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "iced_tiny_skia", + "iced_wgpu 0.10.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", "raw-window-handle 0.5.2", - "softbuffer", + "thiserror", ] [[package]] -name = "iced_style" -version = "0.5.1" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +name = "iced_runtime" +version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" dependencies = [ - "iced_core 0.6.2", - "once_cell", - "palette", + "iced_core 0.9.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "iced_futures 0.6.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "thiserror", ] [[package]] @@ -2024,29 +2065,37 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e37333dc2991201140302cd0d4cea051bd37ca3671d5008ec85df86d232ff30" dependencies = [ - "iced_core 0.9.0", + "iced_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell", "palette", ] [[package]] -name = "iced_wgpu" -version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +name = "iced_style" +version = "0.8.0" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" +dependencies = [ + "iced_core 0.9.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "once_cell", + "palette", +] + +[[package]] +name = "iced_tiny_skia" +version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" dependencies = [ - "bitflags 1.3.2", "bytemuck", - "encase", - "futures", - "glam", - "glyph_brush", - "guillotiere", - "iced_graphics 0.5.0", - "iced_native 0.7.0", + "cosmic-text", + "iced_graphics 0.8.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "kurbo 0.9.5", "log", "raw-window-handle 0.5.2", - "wgpu 0.14.2", - "wgpu_glyph 0.18.0", + "resvg 0.32.0", + "rustc-hash", + "softbuffer", + "tiny-skia 0.9.1", + "twox-hash", ] [[package]] @@ -2062,12 +2111,48 @@ dependencies = [ "glam", "glyph_brush", "guillotiere", - "iced_graphics 0.8.0", - "iced_native 0.10.3", + "iced_graphics 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_native", "log", "raw-window-handle 0.5.2", "wgpu 0.15.1", - "wgpu_glyph 0.19.0", + "wgpu_glyph", +] + +[[package]] +name = "iced_wgpu" +version = "0.10.0" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" +dependencies = [ + "bitflags 1.3.2", + "bytemuck", + "encase", + "futures", + "glam", + "glyphon", + "guillotiere", + "iced_graphics 0.8.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "log", + "once_cell", + "raw-window-handle 0.5.2", + "resvg 0.32.0", + "rustc-hash", + "twox-hash", + "wgpu 0.16.1", +] + +[[package]] +name = "iced_widget" +version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" +dependencies = [ + "iced_renderer", + "iced_runtime", + "iced_style 0.8.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "num-traits", + "ouroboros 0.13.0", + "thiserror", + "unicode-segmentation", ] [[package]] @@ -2076,9 +2161,9 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a59ea3a85149a6a1f9e92b6c740ce90f04e5c7d848cfd05742336863fceb955" dependencies = [ - "iced_futures 0.6.0", - "iced_graphics 0.8.0", - "iced_native 0.10.3", + "iced_futures 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_graphics 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iced_native", "log", "thiserror", "web-sys", @@ -2090,7 +2175,7 @@ dependencies = [ [[package]] name = "id_tree" version = "1.8.0" -source = "git+https://github.com/Drakulix/id-tree.git?branch=feature/copy_clone#c9a2b8c325566d223cf06362c902636b0405e28c" +source = "git+https://github.com/Drakulix/id-tree.git?branch=feature/copy_clone#632a57d6d49160e18d7300fa7edae52281ec5482" dependencies = [ "snowflake", ] @@ -2112,7 +2197,7 @@ dependencies = [ "color_quant", "exr", "gif", - "jpeg-decoder 0.3.0", + "jpeg-decoder", "num-rational", "num-traits", "png", @@ -2126,6 +2211,12 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df19da1e92fbfec043ca97d622955381b1f3ee72a180ec999912df31b1ccd951" +[[package]] +name = "imagesize" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b72ad49b554c1728b1e83254a1b1565aea4161e28dabbfa171fc15fe62299caf" + [[package]] name = "indexmap" version = "1.9.3" @@ -2133,10 +2224,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "inotify" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +dependencies = [ + "bitflags 1.3.2", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + [[package]] name = "input" version = "0.8.2" @@ -2173,9 +2284,9 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi 0.3.1", "libc", @@ -2203,12 +2314,6 @@ dependencies = [ "libc", ] -[[package]] -name = "jpeg-decoder" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" - [[package]] name = "jpeg-decoder" version = "0.3.0" @@ -2254,12 +2359,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] -name = "kurbo" -version = "0.8.0" +name = "kqueue" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb348d766edbac91ba1eb83020d96f4f8867924d194393083c15a51f185e6a82" +checksum = "2c8fc60ba15bf51257aa9807a48a61013db043fcf3a78cb0d916e8e396dcad98" dependencies = [ - "arrayvec 0.5.2", + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587" +dependencies = [ + "bitflags 1.3.2", + "libc", +] + +[[package]] +name = "kurbo" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a53776d271cfb873b17c618af0298445c88afc52837f3e948fa3fafd131f449" +dependencies = [ + "arrayvec 0.7.2", +] + +[[package]] +name = "kurbo" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" +dependencies = [ + "arrayvec 0.7.2", ] [[package]] @@ -2283,19 +2417,20 @@ checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?rev=24709e9c3b#24709e9c3b56c49a0af168d1e37ebef85f112c8a" +source = "git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b#31f7e97d5bf4860be5afd406209eed733f736f04" dependencies = [ "apply", + "cosmic-config", "cosmic-theme", "derive_setters", "fraction", "freedesktop-icons", - "iced 0.6.0", - "iced_core 0.6.2", - "iced_lazy", - "iced_native 0.7.0", - "iced_softbuffer", - "iced_style 0.5.1", + "iced 0.9.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "iced_core 0.9.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "iced_runtime", + "iced_style 0.8.0 (git+https://github.com/pop-os/libcosmic?rev=31f7e97d5b)", + "iced_tiny_skia", + "iced_widget", "lazy_static", "palette", "slotmap", @@ -2399,12 +2534,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" [[package]] name = "log-panics" @@ -2417,14 +2549,12 @@ dependencies = [ ] [[package]] -name = "lyon_geom" -version = "0.17.7" +name = "lru" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d89ccbdafd83d259403e22061be27bccc3254bba65cdc5303250c4227c8c8e" +checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" dependencies = [ - "arrayvec 0.5.2", - "euclid", - "num-traits", + "hashbrown 0.13.2", ] [[package]] @@ -2445,27 +2575,12 @@ dependencies = [ "regex-automata", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "memmap2" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b6c2ebff6180198788f5db08d7ce3bc1d0b617176678831a7510825973e357" -dependencies = [ - "libc", -] - [[package]] name = "memmap2" version = "0.5.10" @@ -2543,14 +2658,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", "wasi", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -2561,9 +2676,9 @@ checksum = "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b" [[package]] name = "naga" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "262d2840e72dbe250e8cf2f522d080988dfca624c4112c096238a4845f591707" +checksum = "6c3d4269bcb7d50121097702fde1afb75f4ea8083aeb7a55688dcf289a853271" dependencies = [ "bit-set", "bitflags 1.3.2", @@ -2581,9 +2696,9 @@ dependencies = [ [[package]] name = "naga" -version = "0.11.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c3d4269bcb7d50121097702fde1afb75f4ea8083aeb7a55688dcf289a853271" +checksum = "80cd00bd6180a8790f1c020ed258a46b8d73dd5bd6af104a238c9d71f806938e" dependencies = [ "bit-set", "bitflags 1.3.2", @@ -2753,6 +2868,24 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "notify" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d9ba6c734de18ca27c8cef5cd7058aa4ac9f63596131e4c7e41e579319032a2" +dependencies = [ + "bitflags 1.3.2", + "crossbeam-channel", + "filetime", + "fsevent-sys", + "inotify", + "kqueue", + "libc", + "mio", + "walkdir", + "windows-sys 0.45.0", +] + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -2946,9 +3079,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orbclient" @@ -2975,7 +3114,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" dependencies = [ "dlv-list", - "hashbrown", + "hashbrown 0.12.3", ] [[package]] @@ -3161,12 +3300,6 @@ dependencies = [ "siphasher", ] -[[package]] -name = "pico-args" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" - [[package]] name = "pico-args" version = "0.5.0" @@ -3190,7 +3323,7 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -3266,9 +3399,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" dependencies = [ "unicode-ident", ] @@ -3343,9 +3476,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] @@ -3392,18 +3525,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b9283c6b06096b47afc7109834fdedab891175bb5241ee5d4f7d2546549f263" -[[package]] -name = "raqote" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5b6cb89f8be6a645e5834f3ad44a7960d12343d97b5b7fb07cb0365ae36aa2d" -dependencies = [ - "euclid", - "lyon_geom", - "sw-composite", - "typed-arena", -] - [[package]] name = "raw-window-handle" version = "0.3.4" @@ -3451,12 +3572,6 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "rctree" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae028b272a6e99d9f8260ceefa3caa09300a8d6c8d2b2001316474bc52122e9" - [[package]] name = "rctree" version = "0.5.0" @@ -3494,9 +3609,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1a59b5d8e97dee33696bf13c5ba8ab85341c002922fba050069326b9c498974" +checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390" dependencies = [ "aho-corasick", "memchr", @@ -3534,7 +3649,7 @@ dependencies = [ "float-cmp 0.8.0", "libloading 0.7.4", "once_cell", - "renderdoc-sys", + "renderdoc-sys 0.7.1", "winapi", "wio", ] @@ -3546,20 +3661,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" [[package]] -name = "resvg" -version = "0.18.0" +name = "renderdoc-sys" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608c6e8aa6fb2c13bc06e4184d7c7b2cc1b7c138f88a539da8be55c3c033d7f4" -dependencies = [ - "jpeg-decoder 0.1.22", - "log", - "pico-args 0.4.2", - "png", - "rgb", - "svgfilters", - "tiny-skia 0.6.6", - "usvg 0.18.0", -] +checksum = "216080ab382b992234dda86873c18d4c48358f5cfcb70fd693d7f6f2131b628b" [[package]] name = "resvg" @@ -3568,13 +3673,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c115863f2d3621999cf187e318bc92b16402dfeff6a48c74df700d77381394c1" dependencies = [ "log", - "pico-args 0.5.0", + "pico-args", "rgb", - "svgtypes", + "svgtypes 0.8.2", "tiny-skia 0.8.4", "usvg 0.28.0", ] +[[package]] +name = "resvg" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142e83d8ae8c8c639f304698a5567b229ba65caba867bf4387bbc0ae158827cf" +dependencies = [ + "gif", + "jpeg-decoder", + "log", + "pico-args", + "png", + "rgb", + "svgfilters", + "svgtypes 0.11.0", + "tiny-skia 0.9.1", + "usvg 0.32.0", +] + [[package]] name = "rgb" version = "0.8.36" @@ -3590,7 +3713,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" dependencies = [ - "base64", + "base64 0.13.1", "bitflags 1.3.2", "serde", ] @@ -3601,18 +3724,22 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "300a51053b1cb55c80b7a9fde4120726ddf25ca241a1cbb926626f62fb136bff" dependencies = [ - "base64", + "base64 0.13.1", "bitflags 1.3.2", "serde", ] [[package]] -name = "roxmltree" -version = "0.14.1" +name = "rosvgtree" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921904a62e410e37e215c40381b7117f830d9d89ba60ab5236170541dd25646b" +checksum = "ad747e7384940e7bf33b15ba433b7bad9f44c0c6d5287a67c2cb22cd1743d497" dependencies = [ - "xmlparser", + "log", + "roxmltree 0.18.0", + "simplecss", + "siphasher", + "svgtypes 0.11.0", ] [[package]] @@ -3624,6 +3751,15 @@ dependencies = [ "xmlparser", ] +[[package]] +name = "roxmltree" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f595a457b6b8c6cda66a48503e92ee8d19342f905948f29c383200ec9eb1d8" +dependencies = [ + "xmlparser", +] + [[package]] name = "rust-ini" version = "0.18.0" @@ -3660,22 +3796,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rustybuzz" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44561062e583c4873162861261f16fd1d85fe927c4904d71329a4fe43dc355ef" -dependencies = [ - "bitflags 1.3.2", - "bytemuck", - "smallvec", - "ttf-parser 0.12.3", - "unicode-bidi-mirroring", - "unicode-ccc", - "unicode-general-category 0.4.0", - "unicode-script", -] - [[package]] name = "rustybuzz" version = "0.7.0" @@ -3689,7 +3809,7 @@ dependencies = [ "ttf-parser 0.18.1", "unicode-bidi-mirroring", "unicode-ccc", - "unicode-general-category 0.6.0", + "unicode-general-category", "unicode-script", ] @@ -3719,6 +3839,15 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "scan_fmt" version = "0.2.6" @@ -3775,7 +3904,7 @@ checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -3899,7 +4028,7 @@ dependencies = [ "encoding", "gbm", "gl_generator", - "glow 0.12.1", + "glow 0.12.2", "indexmap", "input", "lazy_static", @@ -3939,7 +4068,7 @@ dependencies = [ "dlib", "lazy_static", "log", - "memmap2 0.5.10", + "memmap2", "nix 0.24.3", "pkg-config", "wayland-client 0.29.5", @@ -3982,7 +4111,7 @@ checksum = "27207bb65232eda1f588cf46db2fee75c0808d557f6b3cf19a75f5d6d7c94df1" [[package]] name = "softbuffer" version = "0.2.0" -source = "git+https://github.com/pop-os/softbuffer?rev=8dcb6438b#8dcb6438b6c1688a0015b477dfa76c6c0bee3318" +source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-2.0-old#ece901a9f60dc89ca740dc3bd11f3c909e801723" dependencies = [ "bytemuck", "cfg_aliases", @@ -3998,7 +4127,7 @@ dependencies = [ "thiserror", "wasm-bindgen", "wayland-backend", - "wayland-client 0.30.1", + "wayland-client 0.30.2", "wayland-sys 0.30.1", "web-sys", "windows-sys 0.42.0", @@ -4045,19 +4174,13 @@ checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" [[package]] name = "strict-num" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9df65f20698aeed245efdde3628a6b559ea1239bbb871af1b6e3b58c413b2bd1" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" dependencies = [ "float-cmp 0.9.0", ] -[[package]] -name = "strsim" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" - [[package]] name = "strsim" version = "0.10.0" @@ -4096,10 +4219,14 @@ dependencies = [ ] [[package]] -name = "sw-composite" -version = "0.7.16" +name = "svgtypes" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac8fb7895b4afa060ad731a32860db8755da3449a47e796d5ecf758db2671d4" +checksum = "ed4b0611e7f3277f68c0fa18e385d9e2d26923691379690039548f867cef02a7" +dependencies = [ + "kurbo 0.9.5", + "siphasher", +] [[package]] name = "swash" @@ -4124,9 +4251,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ "proc-macro2", "quote", @@ -4135,14 +4262,11 @@ dependencies = [ [[package]] name = "sys-locale" -version = "0.2.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a11bd9c338fdba09f7881ab41551932ad42e405f61d01e8406baea71c07aee" +checksum = "ea0b9eefabb91675082b41eb94c3ecd91af7656caee3fb4961a07c0ec8c7ca6f" dependencies = [ - "js-sys", "libc", - "wasm-bindgen", - "web-sys", "windows-sys 0.45.0", ] @@ -4185,7 +4309,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -4205,7 +4329,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471" dependencies = [ "flate2", - "jpeg-decoder 0.3.0", + "jpeg-decoder", "weezl", ] @@ -4236,20 +4360,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-skia" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d049bfef0eaa2521e75d9ffb5ce86ad54480932ae19b85f78bec6f52c4d30d78" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "bytemuck", - "cfg-if", - "png", - "safe_arch", -] - [[package]] name = "tiny-skia" version = "0.7.0" @@ -4279,6 +4389,21 @@ dependencies = [ "tiny-skia-path 0.8.4", ] +[[package]] +name = "tiny-skia" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2986c82f77818c7b9144c70818fdde98db15308e329ae2f7204d767808fd3c" +dependencies = [ + "arrayref", + "arrayvec 0.7.2", + "bytemuck", + "cfg-if", + "log", + "png", + "tiny-skia-path 0.9.0", +] + [[package]] name = "tiny-skia-path" version = "0.7.0" @@ -4301,10 +4426,21 @@ dependencies = [ ] [[package]] -name = "tokio" -version = "1.28.1" +name = "tiny-skia-path" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" +checksum = "f7acb0ccda1ac91084353a56d0b69b0e29c311fd809d2088b1ed2f9ae1841c47" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tokio" +version = "1.28.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" dependencies = [ "autocfg", "num_cpus", @@ -4358,7 +4494,7 @@ checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -4411,12 +4547,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "ttf-parser" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ae2f58a822f08abdaf668897e96a5656fe72f5a9ce66422423e8849384872e6" - [[package]] name = "ttf-parser" version = "0.18.1" @@ -4440,12 +4570,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "typed-arena" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" - [[package]] name = "typenum" version = "1.16.0" @@ -4481,12 +4605,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" -[[package]] -name = "unicode-general-category" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07547e3ee45e28326cc23faac56d44f58f16ab23e413db526debce3b0bfd2742" - [[package]] name = "unicode-general-category" version = "0.6.0" @@ -4495,9 +4613,9 @@ checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] name = "unicode-linebreak" @@ -4505,7 +4623,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5faade31a542b8b35855fff6e8def199853b2da8da256da52f52f1316ee3137" dependencies = [ - "hashbrown", + "hashbrown 0.12.3", "regex", ] @@ -4539,51 +4657,84 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "usvg" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4058e0bd091a56f905e6963e40776ce6880b271275f0b493bff951433e303071" -dependencies = [ - "base64", - "data-url 0.1.1", - "flate2", - "float-cmp 0.9.0", - "fontdb 0.6.2", - "kurbo", - "log", - "pico-args 0.4.2", - "rctree 0.4.0", - "roxmltree 0.14.1", - "rustybuzz 0.4.0", - "simplecss", - "siphasher", - "svgtypes", - "ttf-parser 0.12.3", - "unicode-bidi", - "unicode-script", - "unicode-vo", - "xmlwriter", -] - [[package]] name = "usvg" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b5b7c2b30845b3348c067ca3d09e20cc6e327c288f0ca4c48698712abf432e9" dependencies = [ - "base64", - "data-url 0.2.0", + "base64 0.13.1", + "data-url", "flate2", - "imagesize", - "kurbo", + "imagesize 0.10.1", + "kurbo 0.8.3", "log", - "rctree 0.5.0", + "rctree", "roxmltree 0.15.1", "simplecss", "siphasher", "strict-num", - "svgtypes", + "svgtypes 0.8.2", +] + +[[package]] +name = "usvg" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b44e14b7678bcc5947b397991432d0c4e02a103958a0ed5e1b9b961ddd08b21" +dependencies = [ + "base64 0.21.2", + "log", + "pico-args", + "usvg-parser", + "usvg-text-layout", + "usvg-tree", + "xmlwriter", +] + +[[package]] +name = "usvg-parser" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90c8251d965c2882a636ffcc054340b1f13a6bce68779cb5b2084d8ffc2535be" +dependencies = [ + "data-url", + "flate2", + "imagesize 0.11.0", + "kurbo 0.9.5", + "log", + "rosvgtree", + "strict-num", + "svgtypes 0.11.0", + "usvg-tree", +] + +[[package]] +name = "usvg-text-layout" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c4fed019d1af07bfe0f3bac13d120d7b51bc65b38cb24809cf4ed0b8b631138" +dependencies = [ + "fontdb", + "kurbo 0.9.5", + "log", + "rustybuzz", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "usvg-tree", +] + +[[package]] +name = "usvg-tree" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7371265c467cdae0ccc3655e2e3f310c695fb9f717c0d25187bf3b333f7b5159" +dependencies = [ + "kurbo 0.9.5", + "rctree", + "strict-num", + "svgtypes 0.11.0", ] [[package]] @@ -4619,6 +4770,16 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "walkdir" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -4646,7 +4807,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", "wasm-bindgen-shared", ] @@ -4680,7 +4841,7 @@ checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4739,9 +4900,9 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.30.1" +version = "0.30.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bde68449abab1a808e5227b6e295f4ae3680911eb7711b4a2cb90141edb780" +checksum = "489c9654770f674fc7e266b3c579f4053d7551df0ceb392f153adb1f9ed06ac8" dependencies = [ "bitflags 1.3.2", "nix 0.26.2", @@ -4856,9 +5017,9 @@ dependencies = [ [[package]] name = "wayland-server" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9062def387c1b1d80e366d8243c2b3bd6d9e4f343032a3e5da8d4aa03866cf89" +checksum = "9c43c28096fe1d49fff7d1079404fdd0f669cd1a5b00c615bdfe71bb1884d23a" dependencies = [ "bitflags 1.3.2", "downcast-rs", @@ -4909,28 +5070,6 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" -[[package]] -name = "wgpu" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81f643110d228fd62a60c5ed2ab56c4d5b3704520bd50561174ec4ec74932937" -dependencies = [ - "arrayvec 0.7.2", - "js-sys", - "log", - "naga 0.10.0", - "parking_lot 0.12.1", - "raw-window-handle 0.5.2", - "smallvec", - "static_assertions", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "wgpu-core 0.14.2", - "wgpu-hal 0.14.1", - "wgpu-types 0.14.1", -] - [[package]] name = "wgpu" version = "0.15.1" @@ -4956,27 +5095,27 @@ dependencies = [ ] [[package]] -name = "wgpu-core" -version = "0.14.2" +name = "wgpu" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6000d1284ef8eec6076fd5544a73125fd7eb9b635f18dceeb829d826f41724ca" +checksum = "3059ea4ddec41ca14f356833e2af65e7e38c0a8f91273867ed526fb9bafcca95" dependencies = [ "arrayvec 0.7.2", - "bit-vec", - "bitflags 1.3.2", - "cfg_aliases", - "codespan-reporting", - "fxhash", + "cfg-if", + "js-sys", "log", - "naga 0.10.0", + "naga 0.12.2", "parking_lot 0.12.1", "profiling", "raw-window-handle 0.5.2", "smallvec", - "thiserror", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", - "wgpu-hal 0.14.1", - "wgpu-types 0.14.1", + "wgpu-core 0.16.1", + "wgpu-hal 0.16.0", + "wgpu-types 0.16.0", ] [[package]] @@ -5003,42 +5142,26 @@ dependencies = [ ] [[package]] -name = "wgpu-hal" -version = "0.14.1" +name = "wgpu-core" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc320a61acb26be4f549c9b1b53405c10a223fbfea363ec39474c32c348d12f" +checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" dependencies = [ - "android_system_properties", "arrayvec 0.7.2", - "ash", - "bit-set", - "bitflags 1.3.2", - "block", - "core-graphics-types", - "d3d12 0.5.0", - "foreign-types 0.3.2", - "fxhash", - "glow 0.11.2", - "gpu-alloc", - "gpu-descriptor", - "js-sys", - "khronos-egl", - "libloading 0.7.4", + "bit-vec", + "bitflags 2.3.1", + "codespan-reporting", "log", - "metal", - "naga 0.10.0", - "objc", + "naga 0.12.2", "parking_lot 0.12.1", "profiling", - "range-alloc", "raw-window-handle 0.5.2", - "renderdoc-sys", + "rustc-hash", "smallvec", "thiserror", - "wasm-bindgen", "web-sys", - "wgpu-types 0.14.1", - "winapi", + "wgpu-hal 0.16.0", + "wgpu-types 0.16.0", ] [[package]] @@ -5054,14 +5177,14 @@ dependencies = [ "bitflags 1.3.2", "block", "core-graphics-types", - "d3d12 0.6.0", + "d3d12", "foreign-types 0.3.2", "fxhash", - "glow 0.12.1", + "glow 0.12.2", "gpu-alloc", "gpu-allocator", "gpu-descriptor", - "hassle-rs", + "hassle-rs 0.9.0", "js-sys", "khronos-egl", "libc", @@ -5074,7 +5197,7 @@ dependencies = [ "profiling", "range-alloc", "raw-window-handle 0.5.2", - "renderdoc-sys", + "renderdoc-sys 0.7.1", "smallvec", "thiserror", "wasm-bindgen", @@ -5084,12 +5207,45 @@ dependencies = [ ] [[package]] -name = "wgpu-types" -version = "0.14.1" +name = "wgpu-hal" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb6b28ef22cac17b9109b25b3bf8c9a103eeb293d7c5f78653979b09140375f6" +checksum = "41af2ea7d87bd41ad0a37146252d5f7c26490209f47f544b2ee3b3ff34c7732e" dependencies = [ - "bitflags 1.3.2", + "android_system_properties", + "arrayvec 0.7.2", + "ash", + "bit-set", + "bitflags 2.3.1", + "block", + "core-graphics-types", + "d3d12", + "foreign-types 0.3.2", + "glow 0.12.2", + "gpu-alloc", + "gpu-allocator", + "gpu-descriptor", + "hassle-rs 0.10.0", + "js-sys", + "khronos-egl", + "libc", + "libloading 0.8.0", + "log", + "metal", + "naga 0.12.2", + "objc", + "parking_lot 0.12.1", + "profiling", + "range-alloc", + "raw-window-handle 0.5.2", + "renderdoc-sys 1.0.0", + "rustc-hash", + "smallvec", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types 0.16.0", + "winapi", ] [[package]] @@ -5104,15 +5260,14 @@ dependencies = [ ] [[package]] -name = "wgpu_glyph" -version = "0.18.0" +name = "wgpu-types" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cafb82773e0f124a33674dab5de4dff73175aeb921949047ab014efb58fb446" +checksum = "5bd33a976130f03dcdcd39b3810c0c3fc05daf86f0aaf867db14bfb7c4a9a32b" dependencies = [ - "bytemuck", - "glyph_brush", - "log", - "wgpu 0.14.2", + "bitflags 2.3.1", + "js-sys", + "web-sys", ] [[package]] @@ -5133,6 +5288,12 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" +[[package]] +name = "widestring" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" + [[package]] name = "winapi" version = "0.3.9" @@ -5559,7 +5720,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbee136714379ab22da0280207fdb7f47e0bb940adea97731b65598b8c7a92e" dependencies = [ "libc", - "memmap2 0.5.10", + "memmap2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 05f1b269..02900343 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,8 +30,11 @@ libsystemd = { version = "0.5", optional = true } wayland-backend = "0.1.0" wayland-scanner = "0.30.0" cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", branch = "main", default-features = false, features = ["server"] } -libcosmic = { git = "https://github.com/pop-os/libcosmic", rev = "24709e9c3b", default-features = false, features = ["softbuffer"] } -iced_softbuffer = { git = "https://github.com/pop-os/libcosmic", rev = "24709e9c3b" } +libcosmic = { git = "https://github.com/pop-os/libcosmic", rev = "31f7e97d5b", default-features = false, features = ["tiny_skia"] } +iced_core = { git = "https://github.com/pop-os/libcosmic", rev = "31f7e97d5b" } +iced_renderer = { git = "https://github.com/pop-os/libcosmic", rev = "31f7e97d5b" } +iced_tiny_skia = { git = "https://github.com/pop-os/libcosmic", rev = "31f7e97d5b" } +tiny-skia = "0.9" ordered-float = "3.0" glow = "0.11.2" tracing-subscriber = { version = "0.3.16", features = ["env-filter", "tracing-log"] } diff --git a/src/shell/element/stack.rs b/src/shell/element/stack.rs index 5dd470b9..5e0bd728 100644 --- a/src/shell/element/stack.rs +++ b/src/shell/element/stack.rs @@ -60,6 +60,7 @@ pub struct CosmicStackInternal { pointer_entered: Option>, previous_pointer: Arc, last_location: Arc, Serial, u32)>>>, + mask: Arc>>, } impl CosmicStackInternal { @@ -110,6 +111,7 @@ impl CosmicStack { pointer_entered: None, previous_pointer: Arc::new(AtomicUsize::new(0)), last_location: Arc::new(Mutex::new(None)), + mask: Arc::new(Mutex::new(None)), }, (width, TAB_HEIGHT), handle, @@ -273,6 +275,50 @@ impl Program for CosmicStackInternal { fn view(&self) -> Element<'_, Self::Message> { cosmic::iced::widget::text("TODO").into() } + + fn clip_mask(&self, size: Size, scale: f32) -> tiny_skia::Mask { + let mut mask = self.mask.lock().unwrap(); + if mask.is_none() { + let mut new_mask = tiny_skia::Mask::new(size.w as u32, size.h as u32).unwrap(); + + let mut pb = tiny_skia::PathBuilder::new(); + let radius = 8. * scale; + let (w, h) = (size.w as f32, size.h as f32); + + pb.move_to(0., h); // lower-left + + // upper-left rounded corner + pb.line_to(0., radius); + pb.quad_to(0., 0., radius, 0.); + + // upper-right rounded corner + pb.line_to(w - radius, 0.); + pb.quad_to(w, 0., w, radius); + + pb.line_to(w, h); // lower-right + + let path = pb.finish().unwrap(); + new_mask.fill_path( + &path, + tiny_skia::FillRule::EvenOdd, + true, + Default::default(), + ); + + *mask = Some(new_mask); + } + + mask.clone().unwrap() + } + + fn background_color(&self) -> iced_core::Color { + iced_core::Color { + r: 0.1176, + g: 0.1176, + b: 0.1176, + a: 1.0, + } + } } impl IsAlive for CosmicStack { diff --git a/src/shell/element/window.rs b/src/shell/element/window.rs index c611be88..e25f76fd 100644 --- a/src/shell/element/window.rs +++ b/src/shell/element/window.rs @@ -12,9 +12,8 @@ use crate::{ wayland::handlers::screencopy::ScreencopySessions, }; use calloop::LoopHandle; -use cosmic::iced_native::Command; +use cosmic::iced::Command; use cosmic_protocols::screencopy::v1::server::zcosmic_screencopy_session_v1::InputType; -use iced_softbuffer::native::raqote::{DrawOptions, DrawTarget, PathBuilder, SolidSource, Source}; use smithay::{ backend::{ input::KeyState, @@ -35,7 +34,10 @@ use smithay::{ Seat, }, output::Output, - utils::{IsAlive, Logical, Physical, Point, Rectangle, Scale, Serial, Size, Transform}, + utils::{ + Buffer as BufferCoords, IsAlive, Logical, Physical, Point, Rectangle, Scale, Serial, Size, + Transform, + }, wayland::seat::WaylandFocus, }; use std::{ @@ -65,6 +67,7 @@ impl fmt::Debug for CosmicWindow { #[derive(Clone)] pub struct CosmicWindowInternal { pub(super) window: CosmicSurface, + mask: Arc>>, /// TODO: This needs to be per seat pointer_entered: Arc, last_seat: Arc, Serial)>>>, @@ -119,6 +122,7 @@ impl CosmicWindow { CosmicWindow(IcedElement::new( CosmicWindowInternal { window, + mask: Arc::new(Mutex::new(None)), pointer_entered: Arc::new(AtomicU8::new(Focus::None as u8)), last_seat: Arc::new(Mutex::new(None)), last_title: Arc::new(Mutex::new(last_title)), @@ -141,6 +145,7 @@ impl CosmicWindow { p.window .set_geometry(Rectangle::from_loc_and_size(loc, size)); }); + self.0.with_program(|p| p.mask.lock().unwrap().take()); self.0.resize(Size::from((geo.size.w, SSD_HEIGHT))); } @@ -218,12 +223,15 @@ impl Program for CosmicWindowInternal { Command::none() } - fn background(&self, target: &mut DrawTarget<&mut [u32]>) { - let radius = 8.; - let (w, h) = (target.width() as f32, target.height() as f32); + fn clip_mask(&self, size: Size, scale: f32) -> tiny_skia::Mask { + let mut mask = self.mask.lock().unwrap(); + if mask.is_none() { + let mut new_mask = tiny_skia::Mask::new(size.w as u32, size.h as u32).unwrap(); + + let mut pb = tiny_skia::PathBuilder::new(); + let radius = 8. * scale; + let (w, h) = (size.w as f32, size.h as f32); - if !(self.window.is_maximized() || self.window.is_fullscreen()) { - let mut pb = PathBuilder::new(); pb.move_to(0., h); // lower-left // upper-left rounded corner @@ -236,17 +244,63 @@ impl Program for CosmicWindowInternal { pb.line_to(w, h); // lower-right - let path = pb.finish(); - target.push_clip(&path); + let path = pb.finish().unwrap(); + new_mask.fill_path( + &path, + tiny_skia::FillRule::EvenOdd, + true, + Default::default(), + ); + + *mask = Some(new_mask); } + mask.clone().unwrap() + } + + fn background_color(&self) -> iced_core::Color { if self.window.is_activated() { - target.clear(SolidSource::from_unpremultiplied_argb(u8::MAX, 30, 30, 30)); + iced_core::Color { + r: 0.1176, + g: 0.1176, + b: 0.1176, + a: 1.0, + } } else { - target.clear(SolidSource::from_unpremultiplied_argb(u8::MAX, 39, 39, 39)); + iced_core::Color { + r: 0.153, + g: 0.153, + b: 0.153, + a: 1.0, + } } + } - target.pop_clip(); + fn foreground( + &self, + pixels: &mut tiny_skia::PixmapMut<'_>, + damage: &[Rectangle], + ) { + if !self.window.is_activated() { + let mask = self.mask.lock().unwrap(); + let mut paint = tiny_skia::Paint::default(); + paint.set_color_rgba8(0, 0, 0, 102); + + for rect in damage { + pixels.fill_rect( + tiny_skia::Rect::from_xywh( + rect.loc.x as f32, + rect.loc.y as f32, + rect.size.w as f32, + rect.size.h as f32, + ) + .unwrap(), + &paint, + Default::default(), + mask.as_ref(), + ); + } + } } fn view(&self) -> cosmic::Element<'_, Self::Message> { @@ -257,42 +311,6 @@ impl Program for CosmicWindowInternal { .on_close(Message::Close) .into_element() } - - fn foreground(&self, target: &mut DrawTarget<&mut [u32]>) { - if !self.window.is_activated() { - let radius = 8.; - let (w, h) = (target.width() as f32, target.height() as f32); - - if !(self.window.is_maximized() || self.window.is_fullscreen()) { - let mut pb = PathBuilder::new(); - pb.move_to(0., h); // lower-left - - // upper-left rounded corner - pb.line_to(0., radius); - pb.quad_to(0., 0., radius, 0.); - - // upper-right rounded corner - pb.line_to(w - radius, 0.); - pb.quad_to(w, 0., w, radius); - - pb.line_to(w, h); // lower-right - - let path = pb.finish(); - target.push_clip(&path); - } - - let mut options = DrawOptions::new(); - options.alpha = 0.4; - target.fill_rect( - 0., - 0., - w, - h, - &Source::Solid(SolidSource::from_unpremultiplied_argb(u8::MAX, 0, 0, 0)), - &options, - ); - } - } } impl IsAlive for CosmicWindow { @@ -329,6 +347,7 @@ impl SpaceElement for CosmicWindow { } fn set_activate(&self, activated: bool) { SpaceElement::set_activate(&self.0, activated); + self.0.force_redraw(); self.0 .with_program(|p| SpaceElement::set_activate(&p.window, activated)); } diff --git a/src/utils/iced.rs b/src/utils/iced.rs index b23dc201..93266f44 100644 --- a/src/utils/iced.rs +++ b/src/utils/iced.rs @@ -5,25 +5,28 @@ use std::{ sync::{mpsc::Receiver, Arc, Mutex}, }; -pub use cosmic::Renderer as IcedRenderer; -use cosmic::Theme; use cosmic::{ - iced_native::{ - command::Action, + iced::{ event::Event, keyboard::{Event as KeyboardEvent, Modifiers as IcedModifiers}, mouse::{Button as MouseButton, Event as MouseEvent, ScrollDelta}, - program::{Program as IcedProgram, State}, - renderer::Style, window::{Event as WindowEvent, Id}, - Command, Debug, Point as IcedPoint, Size as IcedSize, + Command, Point as IcedPoint, Rectangle as IcedRectangle, Size as IcedSize, }, - Element, + iced_runtime::{ + command::Action, + program::{Program as IcedProgram, State}, + Debug, + }, + Renderer as IcedRenderer, Theme, }; -use iced_softbuffer::{ - native::{raqote::DrawTarget, *}, +use iced_core::{renderer::Style, Color}; +use iced_renderer::Backend as BackendWrapper; +use iced_tiny_skia::{ + graphics::{damage, Primitive, Viewport}, Backend, }; +pub type Element<'a, Message> = cosmic::iced::Element<'a, Message, IcedRenderer>; use ordered_float::OrderedFloat; use smithay::{ @@ -47,7 +50,10 @@ use smithay::{ output::Output, reexports::calloop::RegistrationToken, reexports::calloop::{self, futures::Scheduler, LoopHandle}, - utils::{IsAlive, Logical, Physical, Point, Rectangle, Scale, Serial, Size, Transform}, + utils::{ + Buffer as BufferCoords, IsAlive, Logical, Physical, Point, Rectangle, Scale, Serial, Size, + Transform, + }, }; #[derive(Debug)] @@ -88,11 +94,15 @@ pub trait Program { } fn view(&self) -> Element<'_, Self::Message>; - fn background(&self, target: &mut DrawTarget<&mut [u32]>) { - let _ = target; - } - fn foreground(&self, target: &mut DrawTarget<&mut [u32]>) { - let _ = target; + fn clip_mask(&self, size: Size, scale: f32) -> tiny_skia::Mask; + fn background_color(&self) -> Color; + + fn foreground( + &self, + pixels: &mut tiny_skia::PixmapMut<'_>, + damage: &[Rectangle], + ) { + let _ = (pixels, damage); } } @@ -105,7 +115,7 @@ impl IcedProgram for ProgramWrapper

{ self.0.update(message, &self.1) } - fn view(&self) -> Element<'_, Self::Message> { + fn view(&self, _id: Id) -> Element<'_, Self::Message> { self.0.view() } } @@ -113,7 +123,7 @@ impl IcedProgram for ProgramWrapper

{ struct IcedElementInternal { // draw buffer outputs: Vec, - buffers: HashMap, (MemoryRenderBuffer, bool)>, + buffers: HashMap, (MemoryRenderBuffer, Option<(Vec, Color)>)>, // state size: Size, @@ -163,10 +173,12 @@ impl IcedElement

{ handle: LoopHandle<'static, crate::state::Data>, ) -> IcedElement

{ let size = size.into(); - let mut renderer = IcedRenderer::new(Backend::new()); + let mut renderer = + IcedRenderer::new(BackendWrapper::TinySkia(Backend::new(Default::default()))); let mut debug = Debug::new(); let state = State::new( + Id(0), ProgramWrapper(program, handle.clone()), IcedSize::new(size.w as f32, size.h as f32), &mut renderer, @@ -217,7 +229,7 @@ impl IcedElement

{ } internal_ref.size = size; - for (scale, (buffer, needs_redraw)) in internal_ref.buffers.iter_mut() { + for (scale, (buffer, old_primitives)) in internal_ref.buffers.iter_mut() { let buffer_size = internal_ref .size .to_f64() @@ -225,15 +237,19 @@ impl IcedElement

{ .to_i32_round(); *buffer = MemoryRenderBuffer::new(Fourcc::Argb8888, buffer_size, 1, Transform::Normal, None); - *needs_redraw = true; + *old_primitives = None; } internal_ref.update(true); } pub fn force_update(&self) { + self.0.lock().unwrap().update(true); + } + + pub fn force_redraw(&self) { let mut internal = self.0.lock().unwrap(); - for (_buffer, ref mut needs_redraw) in internal.buffers.values_mut() { - *needs_redraw = true; + for (_buffer, ref mut old_primitives) in internal.buffers.values_mut() { + *old_primitives = None; } internal.update(true); } @@ -255,6 +271,7 @@ impl IcedElementInternal

{ let actions = self .state .update( + Id(0), IcedSize::new(self.size.w as f32, self.size.h as f32), IcedPoint::new(cursor_pos.x as f32, cursor_pos.y as f32), &mut self.renderer, @@ -262,17 +279,12 @@ impl IcedElementInternal

{ &Style { text_color: self.theme.cosmic().on_bg_color().into(), }, - &mut cosmic::iced_native::clipboard::Null, + &mut iced_core::clipboard::Null, &mut self.debug, ) .1 .map(|command| command.actions()); - if actions.is_some() { - for (_buffer, ref mut needs_redraw) in self.buffers.values_mut() { - *needs_redraw = true; - } - } let actions = actions.unwrap_or_default(); actions .into_iter() @@ -468,7 +480,7 @@ impl SpaceElement for IcedElement

{ fn set_activate(&self, activated: bool) { let mut internal = self.0.lock().unwrap(); internal.state.queue_event(Event::Window( - Id::MAIN, + Id(0), if activated { WindowEvent::Focused } else { @@ -497,7 +509,7 @@ impl SpaceElement for IcedElement

{ Transform::Normal, None, ), - true, + None, ), ); } @@ -547,7 +559,7 @@ impl SpaceElement for IcedElement

{ Transform::Normal, None, ), - true, + None, ), ); } @@ -570,64 +582,80 @@ where alpha: f32, ) -> Vec { let mut internal = self.0.lock().unwrap(); - - let _ = internal.update(false); // TODO + let _ = internal.update(false); // makes partial borrows easier let internal_ref = &mut *internal; - if let Some((buffer, ref mut needs_redraw)) = + if let Some((buffer, ref mut old_primitives)) = internal_ref.buffers.get_mut(&OrderedFloat(scale.x)) { - let size = internal_ref + let size: Size = internal_ref .size .to_f64() .to_buffer(scale.x, Transform::Normal) .to_i32_round(); - if *needs_redraw && size.w > 0 && size.h > 0 { + if size.w > 0 && size.h > 0 { let renderer = &mut internal_ref.renderer; let state_ref = &internal_ref.state; + let mut clip_mask = state_ref.program().0.clip_mask(size, scale.x as f32); + let overlay = internal_ref.debug.overlay(); + buffer .render() .draw(move |buf| { - let mut target = raqote::DrawTarget::from_backing( - size.w, - size.h, - bytemuck::cast_slice_mut::<_, u32>(buf), - ); - - target.clear(raqote::SolidSource::from_unpremultiplied_argb(0, 0, 0, 0)); - state_ref.program().0.background(&mut target); - - let draw_options = raqote::DrawOptions { - // Default to antialiasing off for now - antialias: raqote::AntialiasMode::None, - ..Default::default() - }; - - // Having at least one clip fixes some font rendering issues - target.push_clip_rect(raqote::IntRect::new( - raqote::IntPoint::new(0, 0), - raqote::IntPoint::new(size.w, size.h), - )); + let mut pixels = + tiny_skia::PixmapMut::from_bytes(buf, size.w as u32, size.h as u32) + .expect("Failed to create pixel map"); renderer.with_primitives(|backend, primitives| { - for primitive in primitives.iter() { - draw_primitive( - &mut target, - &draw_options, - backend, - scale.x as f32, - primitive, - ); - } - }); + let BackendWrapper::TinySkia(ref mut backend) = backend; + let background_color = state_ref.program().0.background_color(); + let bounds = IcedSize::new(size.w as u32, size.h as u32); + let viewport = Viewport::with_physical_size(bounds, scale.x); - state_ref.program().0.foreground(&mut target); - Result::<_, ()>::Ok(vec![Rectangle::from_loc_and_size((0, 0), size)]) + let mut damage = old_primitives + .as_ref() + .and_then(|(last_primitives, last_color)| { + (last_color == &background_color) + .then(|| damage::list(last_primitives, primitives)) + }) + .unwrap_or_else(|| { + vec![IcedRectangle::with_size(viewport.logical_size())] + }); + damage = damage::group(damage, scale.x as f32, bounds); + + if !damage.is_empty() { + backend.draw( + &mut pixels, + &mut clip_mask, + primitives, + &viewport, + &damage, + background_color, + &overlay, + ); + + *old_primitives = Some((primitives.to_vec(), background_color)); + } + + let damage = damage + .into_iter() + .map(|x| x.snap()) + .map(|damage_rect| { + Rectangle::from_loc_and_size( + (damage_rect.x as i32, damage_rect.y as i32), + (damage_rect.width as i32, damage_rect.height as i32), + ) + }) + .collect::>(); + + state_ref.program().0.foreground(&mut pixels, &damage); + + Result::<_, ()>::Ok(damage) + }) }) .unwrap(); - *needs_redraw = false; } if let Ok(buffer) = MemoryRenderBufferRenderElement::from_buffer(