diff --git a/Cargo.lock b/Cargo.lock index 869a2b6..9de0662 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,6 +33,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "ahash" version = "0.8.11" @@ -84,9 +95,9 @@ dependencies = [ [[package]] name = "android-activity" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", "bitflags 2.6.0", @@ -98,7 +109,7 @@ dependencies = [ "log", "ndk", "ndk-context", - "ndk-sys", + "ndk-sys 0.6.0+11769913", "num_enum", "thiserror", ] @@ -196,9 +207,9 @@ checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "as-raw-xcb-connection" @@ -239,6 +250,30 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-executor" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" +dependencies = [ + "async-lock", + "blocking", + "futures-lite", +] + [[package]] name = "async-io" version = "2.3.4" @@ -364,9 +399,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.7" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bit-set" @@ -416,32 +451,13 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" -dependencies = [ - "objc-sys", -] - -[[package]] -name = "block2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" -dependencies = [ - "block-sys", - "objc2 0.4.1", -] - [[package]] name = "block2" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2 0.5.2", + "objc2", ] [[package]] @@ -764,19 +780,21 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.10.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75acbfb314aeb4f5210d379af45ed1ec2c98c7f1790bf57b8a4c562ac0c51b71" +checksum = "59fd57d82eb4bfe7ffa9b1cec0c05e2fd378155b47f255a67983cb4afe0e80c2" dependencies = [ - "fontdb", - "libm", + "bitflags 2.6.0", + "fontdb 0.16.2", "log", "rangemap", - "rustc-hash", - "rustybuzz 0.11.0", + "rayon", + "rustc-hash 1.1.0", + "rustybuzz", "self_cell", "swash", "sys-locale", + "ttf-parser 0.21.1", "unicode-bidi", "unicode-linebreak", "unicode-script", @@ -865,12 +883,40 @@ dependencies = [ "winapi", ] +[[package]] +name = "dark-light" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a76fa97167fa740dcdbfe18e8895601e1bc36525f09b044e00916e717c03a3c" +dependencies = [ + "dconf_rs", + "detect-desktop-environment", + "dirs", + "objc", + "rust-ini", + "web-sys", + "winreg", + "zbus", +] + [[package]] name = "data-url" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" +[[package]] +name = "dconf_rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7046468a81e6a002061c01e6a7c83139daf91b11c30e66795b13217c2d885c8b" + +[[package]] +name = "detect-desktop-environment" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21d8ad60dd5b13a4ee6bd8fa2d5d88965c597c67bce32b5fc49c94f55cb50810" + [[package]] name = "digest" version = "0.10.7" @@ -881,6 +927,26 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "dispatch" version = "0.2.0" @@ -896,12 +962,24 @@ dependencies = [ "libloading 0.8.5", ] +[[package]] +name = "dlv-list" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" + [[package]] name = "downcast-rs" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "dpi" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" + [[package]] name = "drm" version = "0.12.0" @@ -1136,21 +1214,35 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1fcfcd44ca6e90c921fee9fa665d530b21ef1327a4c1a6c5250ea44b776ada7" dependencies = [ - "roxmltree 0.20.0", + "roxmltree", ] [[package]] name = "fontdb" -version = "0.15.0" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020e203f177c0fb250fb19455a252e838d2bbbce1f80f25ecc42402aafa8cd38" +checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.8.0", + "memmap2 0.9.4", "slotmap", "tinyvec", - "ttf-parser 0.19.2", + "ttf-parser 0.20.0", +] + +[[package]] +name = "fontdb" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e32eac81c1135c1df01d4e6d4233c47ba11f6a6d07f33e0bba09d18797077770" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2 0.9.4", + "slotmap", + "tinyvec", + "ttf-parser 0.21.1", ] [[package]] @@ -1323,16 +1415,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "gif" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" -dependencies = [ - "color_quant", - "weezl", -] - [[package]] name = "gif" version = "0.13.1" @@ -1467,18 +1549,6 @@ dependencies = [ "gl_generator", ] -[[package]] -name = "glyphon" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a62d0338e4056db6a73221c2fb2e30619452f6ea9651bac4110f51b0f7a7581" -dependencies = [ - "cosmic-text", - "etagere", - "lru", - "wgpu", -] - [[package]] name = "gobject-sys" version = "0.20.1" @@ -1530,7 +1600,7 @@ checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ "bitflags 2.6.0", "gpu-descriptor-types", - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -1562,13 +1632,22 @@ dependencies = [ "crunchy", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.8", +] + [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash", + "ahash 0.8.11", "allocator-api2", ] @@ -1648,12 +1727,12 @@ dependencies = [ [[package]] name = "iced" -version = "0.12.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d4eb0fbbefb8c428b70680e77ed9013887b17c1d6be366b40f264f956d1a096" +checksum = "88acfabc84ec077eaf9ede3457ffa3a104626d79022a9bf7f296093b1d60c73f" dependencies = [ - "iced_core", - "iced_futures", + "iced_core 0.13.1", + "iced_futures 0.13.1", "iced_renderer", "iced_widget", "iced_winit", @@ -1671,14 +1750,33 @@ dependencies = [ "glam", "log", "num-traits", - "palette", "raw-window-handle", "smol_str", "thiserror", - "web-time", + "web-time 0.2.4", "xxhash-rust", ] +[[package]] +name = "iced_core" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa341b914c93e1afc651c8b5c5b6c88aa68aa92e7d9923366b97a85a7f2ba46" +dependencies = [ + "bitflags 2.6.0", + "bytes", + "dark-light", + "glam", + "log", + "num-traits", + "once_cell", + "palette", + "rustc-hash 2.0.0", + "smol_str", + "thiserror", + "web-time 1.1.0", +] + [[package]] name = "iced_futures" version = "0.12.0" @@ -1686,50 +1784,75 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "370bad88fb3832cbeeb3fa6c486b4701fb7e8da32a753b3101d4ce81fc1d9497" dependencies = [ "futures", - "iced_core", + "iced_core 0.12.3", "log", + "wasm-bindgen-futures", + "wasm-timer", +] + +[[package]] +name = "iced_futures" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b9b08fd632f5131344702869eea35fdebef9e548ab504942ac6b44fb42c90e2" +dependencies = [ + "futures", + "iced_core 0.13.1", + "log", + "rustc-hash 2.0.0", "tokio", "wasm-bindgen-futures", "wasm-timer", ] +[[package]] +name = "iced_glyphon" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c3bb56f1820ca252bc1d0994ece33d233a55657c0c263ea7cb16895adbde82" +dependencies = [ + "cosmic-text", + "etagere", + "lru", + "rustc-hash 2.0.0", + "wgpu", +] + [[package]] name = "iced_graphics" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a044c193ef0840eacabfa05424717331d1fc5b3ecb9a89316200c75da2ba9a4" +checksum = "ba25a18cfa6d5cc160aca7e1b34f73ccdff21680fa8702168c09739767b6c66f" dependencies = [ "bitflags 2.6.0", "bytemuck", "cosmic-text", "half", - "iced_core", - "iced_futures", + "iced_core 0.13.1", + "iced_futures 0.13.1", "image", "kamadak-exif", "log", "once_cell", "raw-window-handle", - "rustc-hash", + "rustc-hash 2.0.0", "thiserror", "unicode-segmentation", - "xxhash-rust", ] [[package]] name = "iced_layershell" -version = "0.6.0" +version = "0.7.0-beta1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b229ba826cb0eb36c5e70b75de0d6624f283abefd0c4394dffe02547fea1d1" +checksum = "a07e6a4645814ecc8ad2506f8b489ed5472ba28b3903006512b90f6bd74d5ec3" dependencies = [ "futures", "iced", - "iced_core", - "iced_futures", + "iced_core 0.13.1", + "iced_futures 0.13.1", "iced_graphics", "iced_renderer", "iced_runtime", - "iced_style", "layershellev", "log", "thiserror", @@ -1739,9 +1862,9 @@ dependencies = [ [[package]] name = "iced_renderer" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c281e03001d566058f53dec9325bbe61c62da715341206d2627f57a3ecc7f69" +checksum = "73558208059f9e622df2bf434e044ee2f838ce75201a023cf0ca3e1244f46c2a" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -1752,32 +1875,22 @@ dependencies = [ [[package]] name = "iced_runtime" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a79f852c01cc6d61663c94379cb3974ac3ad315a28c504e847d573e094f46822" +checksum = "f72474ab379b1c53f4ec5e468c66f8e307f8db13c865c2714d2c4a4a5b38c9a1" dependencies = [ - "iced_core", - "iced_futures", + "bytes", + "iced_core 0.13.1", + "iced_futures 0.13.1", "raw-window-handle", "thiserror", ] -[[package]] -name = "iced_style" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ea42a740915d2a5a9ff9c3aa0bca28b16e9fb660bc8f675eed71d186cadb579" -dependencies = [ - "iced_core", - "once_cell", - "palette", -] - [[package]] name = "iced_tiny_skia" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2228781f4d381a1cbbd7905a9f077351aa8d37269094021d5d9e779f130aff" +checksum = "c625d368284fcc43b0b36b176f76eff1abebe7959dd58bd8ce6897d641962a50" dependencies = [ "bytemuck", "cosmic-text", @@ -1785,57 +1898,61 @@ dependencies = [ "kurbo 0.10.4", "log", "resvg", - "rustc-hash", + "rustc-hash 2.0.0", "softbuffer", "tiny-skia", - "xxhash-rust", ] [[package]] name = "iced_wgpu" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c243b6700452886aac1ee1987e84d9fb43b56b53fea9a1eb67713fd0fde244" +checksum = "8194d7666004b8e947f89ab7446d323ab0b882971226c1913ef98764c9e4bbc4" dependencies = [ "bitflags 2.6.0", "bytemuck", "futures", "glam", - "glyphon", "guillotiere", + "iced_glyphon", "iced_graphics", "log", "once_cell", "resvg", + "rustc-hash 2.0.0", + "thiserror", "wgpu", ] [[package]] name = "iced_widget" -version = "0.12.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e01b2212adecf1cb80e2267f302c0e0c263e55f97812056949199ccf9f0b908" +checksum = "23eef161bcd216f3472916570919dc3542647285da9cc81085b8d5cb434dc870" dependencies = [ "iced_renderer", "iced_runtime", - "iced_style", "num-traits", + "once_cell", + "rustc-hash 2.0.0", "thiserror", "unicode-segmentation", ] [[package]] name = "iced_winit" -version = "0.12.2" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63f66831d0e399b93f631739121a6171780d344b275d56808b9504d8ca75c7d2" +checksum = "f44cd4e1c594b6334f409282937bf972ba14d31fedf03c23aa595d982a2fda28" dependencies = [ + "iced_futures 0.13.1", "iced_graphics", "iced_runtime", - "iced_style", "log", + "rustc-hash 2.0.0", "thiserror", "tracing", + "wasm-bindgen-futures", "web-sys", "winapi", "window_clipboard", @@ -1854,17 +1971,6 @@ dependencies = [ "zbus", ] -[[package]] -name = "icrate" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" -dependencies = [ - "block2 0.3.0", - "dispatch", - "objc2 0.4.1", -] - [[package]] name = "idna" version = "0.5.0" @@ -1885,7 +1991,7 @@ dependencies = [ "byteorder", "color_quant", "exr", - "gif 0.13.1", + "gif", "jpeg-decoder", "num-traits", "png", @@ -1906,7 +2012,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -2001,18 +2107,19 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "kurbo" -version = "0.9.5" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" +checksum = "1618d4ebd923e97d67e7cd363d80aef35fe961005cbbbb3d2dad8bdd1bc63440" dependencies = [ "arrayvec", + "smallvec", ] [[package]] name = "kurbo" -version = "0.10.4" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1618d4ebd923e97d67e7cd363d80aef35fe961005cbbbb3d2dad8bdd1bc63440" +checksum = "89234b2cc610a7dd927ebde6b41dd1a5d4214cffaef4cf1fb2195d592f92518f" dependencies = [ "arrayvec", "smallvec", @@ -2030,7 +2137,7 @@ dependencies = [ "futures-util", "gio", "iced", - "iced_futures", + "iced_futures 0.12.0", "iced_layershell", "iced_runtime", "iced_zbus_notification", @@ -2046,9 +2153,9 @@ dependencies = [ [[package]] name = "layershellev" -version = "0.6.0" +version = "0.7.0-beta1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12591cf9def8038a7f7144daad28821ab591f735d7938906d5e2b38e91a17c53" +checksum = "5455f239975bad4ad356129ebe51ca5d3803b82f724ba71ea8753817bbf4b2a0" dependencies = [ "bitflags 2.6.0", "log", @@ -2120,6 +2227,16 @@ dependencies = [ "redox_syscall 0.4.1", ] +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", +] + [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -2153,9 +2270,6 @@ name = "lru" version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" -dependencies = [ - "hashbrown", -] [[package]] name = "malloc_buf" @@ -2255,7 +2369,7 @@ dependencies = [ "indexmap", "log", "num-traits", - "rustc-hash", + "rustc-hash 1.1.0", "spirv", "termcolor", "thiserror", @@ -2264,14 +2378,14 @@ dependencies = [ [[package]] name = "ndk" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ "bitflags 2.6.0", "jni-sys", "log", - "ndk-sys", + "ndk-sys 0.6.0+11769913", "num_enum", "raw-window-handle", "thiserror", @@ -2292,6 +2406,15 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + [[package]] name = "nix" version = "0.29.0" @@ -2382,16 +2505,6 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" -[[package]] -name = "objc2" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" -dependencies = [ - "objc-sys", - "objc2-encode 3.0.0", -] - [[package]] name = "objc2" version = "0.5.2" @@ -2399,7 +2512,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ "objc-sys", - "objc2-encode 4.0.3", + "objc2-encode", ] [[package]] @@ -2409,15 +2522,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ "bitflags 2.6.0", - "block2 0.5.1", + "block2", "libc", - "objc2 0.5.2", + "objc2", "objc2-core-data", "objc2-core-image", "objc2-foundation", "objc2-quartz-core", ] +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + [[package]] name = "objc2-core-data" version = "0.2.2" @@ -2425,8 +2562,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-foundation", ] @@ -2436,17 +2573,23 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-foundation", "objc2-metal", ] [[package]] -name = "objc2-encode" -version = "3.0.0" +name = "objc2-core-location" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", +] [[package]] name = "objc2-encode" @@ -2461,10 +2604,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ "bitflags 2.6.0", - "block2 0.5.1", + "block2", "dispatch", "libc", - "objc2 0.5.2", + "objc2", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", ] [[package]] @@ -2474,8 +2629,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-foundation", ] @@ -2486,12 +2641,67 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-foundation", "objc2-metal", ] +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + [[package]] name = "objc_exception" version = "0.1.2" @@ -2531,7 +2741,17 @@ version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" dependencies = [ - "libredox", + "libredox 0.0.2", +] + +[[package]] +name = "ordered-multimap" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +dependencies = [ + "dlv-list", + "hashbrown 0.12.3", ] [[package]] @@ -2688,7 +2908,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -2697,6 +2917,26 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -2888,12 +3128,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "rctree" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" - [[package]] name = "read-fonts" version = "0.20.0" @@ -2913,15 +3147,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -2940,6 +3165,17 @@ dependencies = [ "bitflags 2.6.0", ] +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom", + "libredox 0.1.3", + "thiserror", +] + [[package]] name = "regex" version = "1.10.6" @@ -2977,15 +3213,14 @@ checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" [[package]] name = "resvg" -version = "0.36.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7980f653f9a7db31acff916a262c3b78c562919263edea29bf41a056e20497" +checksum = "944d052815156ac8fa77eaac055220e95ba0b01fa8887108ca710c03805d9051" dependencies = [ - "gif 0.12.0", + "gif", "jpeg-decoder", "log", "pico-args", - "png", "rgb", "svgtypes", "tiny-skia", @@ -3003,18 +3238,19 @@ dependencies = [ [[package]] name = "roxmltree" -version = "0.18.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862340e351ce1b271a378ec53f304a5558f7db87f3769dc655a8f6ecbb68b302" -dependencies = [ - "xmlparser", -] +checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] -name = "roxmltree" -version = "0.20.0" +name = "rust-ini" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" +checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +dependencies = [ + "cfg-if", + "ordered-multimap", +] [[package]] name = "rustc-demangle" @@ -3028,6 +3264,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustix" version = "0.38.34" @@ -3043,31 +3285,15 @@ dependencies = [ [[package]] name = "rustybuzz" -version = "0.10.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71cd15fef9112a1f94ac64b58d1e4628192631ad6af4dc69997f995459c874e7" +checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" dependencies = [ - "bitflags 1.3.2", - "bytemuck", - "smallvec", - "ttf-parser 0.19.2", - "unicode-bidi-mirroring", - "unicode-ccc", - "unicode-properties", - "unicode-script", -] - -[[package]] -name = "rustybuzz" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee8fe2a8461a0854a37101fe7a1b13998d0cfa987e43248e81d2a5f4570f6fa" -dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "bytemuck", "libm", "smallvec", - "ttf-parser 0.20.0", + "ttf-parser 0.21.1", "unicode-bidi-mirroring", "unicode-ccc", "unicode-properties", @@ -3097,14 +3323,14 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" -version = "0.8.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b31447ca297092c5a9916fc3b955203157b37c19ca8edde4f52e9843e602c7" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" dependencies = [ "ab_glyph", "log", "memmap2 0.9.4", - "smithay-client-toolkit 0.18.1", + "smithay-client-toolkit 0.19.2", "tiny-skia", ] @@ -3204,6 +3430,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + [[package]] name = "skrifa" version = "0.20.0" @@ -3337,7 +3569,7 @@ dependencies = [ "js-sys", "log", "memmap2 0.9.4", - "objc2 0.5.2", + "objc2", "objc2-app-kit", "objc2-foundation", "objc2-quartz-core", @@ -3395,12 +3627,12 @@ checksum = "20e16a0f46cf5fd675563ef54f26e83e20f2366bcf027bcb3cc3ed2b98aaf2ca" [[package]] name = "svgtypes" -version = "0.12.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71499ff2d42f59d26edb21369a308ede691421f79ebc0f001e2b1fd3a7c9e52" +checksum = "794de53cc48eaabeed0ab6a3404a65f40b3e38c067e4435883a65d2aa4ca000e" dependencies = [ - "kurbo 0.9.5", - "siphasher", + "kurbo 0.11.1", + "siphasher 1.0.1", ] [[package]] @@ -3715,15 +3947,15 @@ dependencies = [ [[package]] name = "ttf-parser" -version = "0.19.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49d64318d8311fc2668e48b63969f4343e0a85c4a109aa8460d6672e364b8bd1" +checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" [[package]] name = "ttf-parser" -version = "0.20.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" +checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" [[package]] name = "ttf-parser" @@ -3756,15 +3988,15 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-bidi-mirroring" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d12260fb92d52f9008be7e4bca09f584780eb2266dc8fecc6a192bec561694" +checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" [[package]] name = "unicode-ccc" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" +checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" [[package]] name = "unicode-ident" @@ -3836,63 +4068,29 @@ dependencies = [ [[package]] name = "usvg" -version = "0.36.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51daa774fe9ee5efcf7b4fec13019b8119cda764d9a8b5b06df02bb1445c656" +checksum = "b84ea542ae85c715f07b082438a4231c3760539d902e11d093847a0b22963032" dependencies = [ "base64", - "log", - "pico-args", - "usvg-parser", - "usvg-text-layout", - "usvg-tree", - "xmlwriter", -] - -[[package]] -name = "usvg-parser" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c88a5ffaa338f0e978ecf3d4e00d8f9f493e29bed0752e1a808a1db16afc40" -dependencies = [ "data-url", "flate2", + "fontdb 0.18.0", "imagesize", - "kurbo 0.9.5", + "kurbo 0.11.1", "log", - "roxmltree 0.18.1", + "pico-args", + "roxmltree", + "rustybuzz", "simplecss", - "siphasher", + "siphasher 1.0.1", + "strict-num", "svgtypes", - "usvg-tree", -] - -[[package]] -name = "usvg-text-layout" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d2374378cb7a3fb8f33894e0fdb8625e1bbc4f25312db8d91f862130b541593" -dependencies = [ - "fontdb", - "kurbo 0.9.5", - "log", - "rustybuzz 0.10.0", + "tiny-skia-path", "unicode-bidi", "unicode-script", "unicode-vo", - "usvg-tree", -] - -[[package]] -name = "usvg-tree" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cacb0c5edeaf3e80e5afcf5b0d4004cc1d36318befc9a7c6606507e5d0f4062" -dependencies = [ - "rctree", - "strict-num", - "svgtypes", - "tiny-skia-path", + "xmlwriter", ] [[package]] @@ -4019,9 +4217,9 @@ dependencies = [ [[package]] name = "waycrate_xkbkeycode" -version = "0.6.0" +version = "0.7.0-beta1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33dff363c7d3e4907c199ac092e66e6d4f7129a526aa8cbc41ef22a50d3af098" +checksum = "99785b3520e668e4cca4733d7d596b57192edfdb38b0dfcf8f67f02c8db2bc57" dependencies = [ "bitflags 2.6.0", "log", @@ -4119,14 +4317,14 @@ dependencies = [ [[package]] name = "wayland-protocols-plasma" -version = "0.2.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" +checksum = "f79f2d57c7fcc6ab4d602adba364bf59a5c24de57bd194486bf9b8360e06bfc4" dependencies = [ "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols 0.31.2", + "wayland-protocols 0.32.3", "wayland-scanner", ] @@ -4181,9 +4379,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.67" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -4199,6 +4397,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "weezl" version = "0.1.8" @@ -4248,7 +4456,7 @@ dependencies = [ "parking_lot 0.12.3", "profiling", "raw-window-handle", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", "thiserror", "web-sys", @@ -4284,7 +4492,7 @@ dependencies = [ "log", "metal", "naga", - "ndk-sys", + "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", "parking_lot 0.12.3", @@ -4292,7 +4500,7 @@ dependencies = [ "range-alloc", "raw-window-handle", "renderdoc-sys", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", "thiserror", "wasm-bindgen", @@ -4391,15 +4599,6 @@ dependencies = [ "windows-targets 0.42.2", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -4598,47 +4797,51 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" -version = "0.29.15" +version = "0.30.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca" +checksum = "0be9e76a1f1077e04a411f0b989cbd3c93339e1771cb41e71ac4aee95bfd2c67" dependencies = [ - "ahash", + "ahash 0.8.11", "android-activity", "atomic-waker", "bitflags 2.6.0", + "block2", "bytemuck", - "calloop 0.12.4", - "cfg_aliases 0.1.1", + "calloop 0.13.0", + "cfg_aliases 0.2.1", + "concurrent-queue", "core-foundation", "core-graphics", "cursor-icon", - "icrate", + "dpi", "js-sys", "libc", - "log", "memmap2 0.9.4", "ndk", - "ndk-sys", - "objc2 0.4.1", - "once_cell", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", "orbclient", "percent-encoding", + "pin-project", "raw-window-handle", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "rustix", "sctk-adwaita", - "smithay-client-toolkit 0.18.1", + "smithay-client-toolkit 0.19.2", "smol_str", + "tracing", "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", "wayland-backend", "wayland-client", - "wayland-protocols 0.31.2", + "wayland-protocols 0.32.3", "wayland-protocols-plasma", "web-sys", - "web-time", - "windows-sys 0.48.0", + "web-time 1.1.0", + "windows-sys 0.52.0", "x11-dl", "x11rb", "xkbcommon-dl", @@ -4662,6 +4865,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + [[package]] name = "x11-dl" version = "2.21.0" @@ -4755,12 +4967,6 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "539a77ee7c0de333dcc6da69b177380a0b81e0dacfa4f7344c465a36871ee601" -[[package]] -name = "xmlparser" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" - [[package]] name = "xmlwriter" version = "0.1.0" @@ -4786,9 +4992,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" dependencies = [ "async-broadcast", + "async-executor", + "async-fs", + "async-io", + "async-lock", "async-process", "async-recursion", + "async-task", "async-trait", + "blocking", "enumflags2", "event-listener", "futures-core", diff --git a/lala_bar/Cargo.toml b/lala_bar/Cargo.toml index d5d25fb..8877820 100644 --- a/lala_bar/Cargo.toml +++ b/lala_bar/Cargo.toml @@ -12,7 +12,7 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -iced = { version = "0.12", features = [ +iced = { version = "0.13.0", features = [ "tokio", "debug", "image", @@ -20,8 +20,8 @@ iced = { version = "0.12", features = [ "svg", ] } #iced_native = "0.12" -iced_runtime = "0.12" -iced_layershell = "0.6.0" +iced_runtime = "0.13.0" +iced_layershell = "0.7.0-beta1" tokio = { version = "1.40", features = ["full"] } iced_futures = "0.12.0" env_logger = "0.11.5" diff --git a/lala_bar/src/launcher.rs b/lala_bar/src/launcher.rs index cd8b320..2f1d2ec 100644 --- a/lala_bar/src/launcher.rs +++ b/lala_bar/src/launcher.rs @@ -2,9 +2,9 @@ mod applications; use applications::{all_apps, App}; use iced::widget::{column, scrollable, text_input}; -use iced::{Command, Element, Event, Length}; -use iced_runtime::command::Action; +use iced::{Element, Event, Length, Task as Command}; use iced_runtime::window::Action as WindowAction; +use iced_runtime::Action; use super::Message; @@ -66,7 +66,7 @@ impl Launcher { if let Some((_, (_, app))) = index { app.launch(); self.should_delete = true; - Command::single(Action::Window(WindowAction::Close(id))) + iced_runtime::task::effect(Action::Window(WindowAction::Close(id))) } else { Command::none() } @@ -79,7 +79,7 @@ impl Launcher { LaunchMessage::Launch(index) => { self.apps[index].launch(); self.should_delete = true; - Command::single(Action::Window(WindowAction::Close(id))) + iced_runtime::task::effect(Action::Window(WindowAction::Close(id))) } LaunchMessage::IcedEvent(event) => { let mut len = self.apps.len(); @@ -113,7 +113,9 @@ impl Launcher { } keyboard::Key::Named(Named::Escape) => { self.should_delete = true; - return Command::single(Action::Window(WindowAction::Close(id))); + return iced_runtime::task::effect(Action::Window( + WindowAction::Close(id), + )); } _ => {} } diff --git a/lala_bar/src/launcher/applications.rs b/lala_bar/src/launcher/applications.rs index da404be..8ef4bec 100644 --- a/lala_bar/src/launcher/applications.rs +++ b/lala_bar/src/launcher/applications.rs @@ -7,7 +7,7 @@ use gio::{AppLaunchContext, DesktopAppInfo}; use gio::prelude::*; use iced::widget::{button, column, image, row, svg, text}; -use iced::{theme, Pixels}; +use iced::Pixels; use iced::{Element, Length}; use super::Message; @@ -85,9 +85,9 @@ impl App { .width(Length::Fill) .height(Length::Fixed(85.)) .style(if selected { - theme::Button::Primary + button::primary } else { - theme::Button::Secondary + button::secondary }) .into() } diff --git a/lala_bar/src/main.rs b/lala_bar/src/main.rs index 8ae6ade..ef2b9f0 100644 --- a/lala_bar/src/main.rs +++ b/lala_bar/src/main.rs @@ -6,8 +6,8 @@ use iced::widget::{ button, checkbox, column, container, image, row, scrollable, slider, svg, text, text_input, Space, }; -use iced::{executor, Font}; -use iced::{Command, Element, Length, Theme}; +use iced::{executor, Alignment, Font}; +use iced::{Element, Length, Task as Command, Theme}; use iced_layershell::actions::{ LayershellCustomActionsWithIdAndInfo, LayershellCustomActionsWithInfo, }; @@ -22,14 +22,12 @@ use chrono::prelude::*; use iced_layershell::reexport::{Anchor, KeyboardInteractivity, Layer, NewLayerShellSettings}; use iced_layershell::settings::{LayerShellSettings, Settings}; use iced_layershell::MultiApplication; -use iced_runtime::command::Action; use iced_runtime::window::Action as WindowAction; +use iced_runtime::Action; -use futures::channel::mpsc::{channel, Receiver, Sender}; +use futures::channel::mpsc::{channel, Sender}; -use tokio::sync::Mutex; - -use std::sync::{Arc, LazyLock}; +use std::sync::LazyLock; mod aximer; mod launcher; @@ -106,9 +104,9 @@ impl NotifyUnitWidgetInfo { fn notify_button<'a>(&self) -> Element<'a, Message> { let notify = &self.unit; let notify_theme = if notify.is_critical() { - iced::theme::Button::Primary + button::primary } else { - iced::theme::Button::Secondary + button::secondary }; match notify.image() { Some(ImageInfo::Svg(path)) => button(row![ @@ -133,11 +131,11 @@ impl NotifyUnitWidgetInfo { .on_press(Message::RemoveNotify(self.unit.id)) .into(), Some(ImageInfo::Data { + pixels, width, height, - pixels, }) => button(row![ - image(image::Handle::from_pixels( + image(image::Handle::from_rgba( width as u32, height as u32, pixels @@ -175,7 +173,7 @@ impl NotifyUnitWidgetInfo { ]) .width(Length::Fill) .height(Length::Fill) - .style(iced::theme::Button::Secondary) + .style(button::secondary) .on_press(Message::RemoveNotify(self.unit.id)) .into(), _ => button(column![ @@ -203,6 +201,9 @@ struct LalaMusicBar { service_data: Option, left: i64, right: i64, + left_text: String, + right_text: String, + balance_text: String, bar_index: SliderIndex, launcher: Option, launcherid: Option, @@ -212,8 +213,7 @@ struct LalaMusicBar { showned_notifications: HashMap, cached_notifications: HashMap, cached_hidden_notifications: Vec, - sender: Sender, - receiver: Arc>>, + sender: Option>, quite_mode: bool, datetime: DateTime, @@ -234,8 +234,7 @@ impl LalaMusicBar { Space::with_width(5.), text(dateday) ]) - .center_x() - .center_y() + .center_y(Length::Fill) .height(Length::Fill) .into() } @@ -298,6 +297,9 @@ impl LalaMusicBar { fn update_balance(&mut self) { self.left = aximer::get_left().unwrap_or(0); self.right = aximer::get_right().unwrap_or(0); + self.left_text = format!("left {}%", self.left); + self.right_text = format!("right {}%", self.right); + self.balance_text = format!("balance {}%", self.balance_percent()); } fn set_balance(&mut self, balance: u8) { @@ -357,7 +359,9 @@ impl LalaMusicBar { self.cached_notifications.insert(*id, info.clone()); } *nid = removed_id; - commands.push(Command::single(Action::Window(WindowAction::Close(*id)))); + commands.push(iced_runtime::task::effect(Action::Window( + WindowAction::Close(*id), + ))); has_removed = true; } } @@ -378,7 +382,9 @@ impl LalaMusicBar { // NOTE: we should delete to be deleted notification if notifications_count <= MAX_SHOWN_NOTIFICATIONS_COUNT { if let Some(id) = self.hidenid { - commands.push(Command::single(Action::Window(WindowAction::Close(id)))); + commands.push(iced_runtime::task::effect(Action::Window( + WindowAction::Close(id), + ))); } } @@ -394,11 +400,10 @@ impl LalaMusicBar { impl LalaMusicBar { fn balance_bar(&self) -> Element { - let show_text = format!("balance {}%", self.balance_percent()); row![ button("<").on_press(Message::SliderIndexPre), Space::with_width(Length::Fixed(1.)), - text(&show_text), + text(&self.balance_text), Space::with_width(Length::Fixed(10.)), slider(0..=100, self.balance_percent(), Message::BalanceChanged), Space::with_width(Length::Fixed(10.)), @@ -413,32 +418,33 @@ impl LalaMusicBar { Space::with_width(Length::Fixed(1.)), button(">").on_press(Message::SliderIndexNext) ] + .align_y(Alignment::Center) .into() } fn left_bar(&self) -> Element { - let show_text = format!("left {}%", self.left); row![ button("<").on_press(Message::SliderIndexPre), Space::with_width(Length::Fixed(1.)), - text(&show_text), + text(&self.left_text), Space::with_width(Length::Fixed(10.)), slider(0..=100, self.left as u8, Message::UpdateLeft), Space::with_width(Length::Fixed(10.)), button(">").on_press(Message::SliderIndexNext) ] + .align_y(Alignment::Center) .into() } fn right_bar(&self) -> Element { - let show_text = format!("right {}%", self.right); row![ button("<").on_press(Message::SliderIndexPre), Space::with_width(Length::Fixed(1.)), - text(&show_text), + text(&self.right_text), Space::with_width(Length::Fixed(10.)), slider(0..=100, self.right as u8, Message::UpdateRight), Space::with_width(Length::Fixed(10.)), button(">").on_press(Message::SliderIndexNext) ] + .align_y(Alignment::Center) .into() } @@ -490,10 +496,12 @@ impl LalaMusicBar { ..Default::default() }) .shaping(text::Shaping::Advanced) - .style(iced::theme::Text::Color(iced::Color::WHITE)), + .style(|_theme| text::Style { + color: Some(iced::Color::WHITE), + }), ) .width(Length::Fill) - .center_x() + .center_x(Length::Fill) .into(), ); view_elements.push(Space::with_height(10.).into()); @@ -510,12 +518,12 @@ impl LalaMusicBar { .into(), container(checkbox("quite mode", self.quite_mode).on_toggle(Message::QuiteMode)) .width(Length::Fill) - .center_x() + .center_x(Length::Fill) .into(), Space::with_height(10.).into(), container(button(text("clear all")).on_press(Message::ClearAllNotifications)) .width(Length::Fill) - .center_x() + .center_x(Length::Fill) .into(), Space::with_height(10.).into(), ]); @@ -549,6 +557,39 @@ enum Message { ClearAllNotifications, QuiteMode(bool), CloseErrorNotification(iced::window::Id), + Ready(Sender), + + // LayerShellInfo + NewLayerShell { + info: LaLaInfo, + settings: NewLayerShellSettings, + }, + ForgetLastOutput, + MarginChange { + id: iced::window::Id, + margin: (i32, i32, i32, i32), + }, +} + +impl TryInto for Message { + type Error = Self; + fn try_into(self) -> Result { + match self { + Self::NewLayerShell { info, settings } => Ok(LaLaShellIdAction::new( + None, + LalaShellAction::NewLayerShell((settings, info)), + )), + Self::ForgetLastOutput => Ok(LaLaShellIdAction::new( + None, + LalaShellAction::ForgetLastOutput, + )), + Self::MarginChange { id, margin } => Ok(LaLaShellIdAction::new( + Some(id), + LalaShellAction::MarginChange(margin), + )), + _ => Err(self), + } + } } impl From for Message { @@ -605,8 +646,8 @@ impl LalaMusicBar { return container(col) .width(Length::Fill) .height(Length::Fill) - .center_x() - .center_y() + .center_x(Length::Fill) + .center_y(Length::Fill) .into(); }; let title = &service_data.metadata.xesam_title; @@ -632,32 +673,40 @@ impl LalaMusicBar { ..Default::default() }) .shaping(text::Shaping::Advanced) - .style(iced::theme::Text::Color(iced::Color::WHITE)), + .style(|_theme| text::Style { + color: Some(iced::Color::WHITE), + }), ) .width(Length::Fill) - .center_x(); + .center_x(Length::Fill); let can_play = service_data.can_play; let can_pause = service_data.can_pause; let can_go_next = service_data.can_go_next; let can_go_pre = service_data.can_go_previous; - let mut button_pre = button(svg(GO_PREVIOUS_HANDLE.clone())) + let mut button_pre = button(svg(GO_PREVIOUS_HANDLE.clone()).width(25.).height(25.)) .width(30.) .height(30.); if can_go_pre { button_pre = button_pre.on_press(Message::RequestPre); } - let mut button_next = button(svg(GO_NEXT_HANDLE.clone())).width(30.).height(30.); + let mut button_next = button(svg(GO_NEXT_HANDLE.clone()).width(25.).height(25.)) + .width(30.) + .height(30.); if can_go_next { button_next = button_next.on_press(Message::RequestNext); } let button_play = if service_data.playback_status == "Playing" { - let mut btn = button(svg(PAUSE_HANDLE.clone())).width(30.).height(30.); + let mut btn = button(svg(PAUSE_HANDLE.clone()).width(25.).height(25.)) + .width(30.) + .height(30.); if can_pause { btn = btn.on_press(Message::RequestPause); } btn } else { - let mut btn = button(svg(PLAY_HANDLE.clone())).width(30.).height(30.); + let mut btn = button(svg(PLAY_HANDLE.clone()).width(25.).height(25.)) + .width(30.) + .height(30.); if can_play { btn = btn.on_press(Message::RequestPlay); } @@ -665,7 +714,7 @@ impl LalaMusicBar { }; let buttons = container(row![button_pre, button_play, button_next].spacing(5)) .width(Length::Fill) - .center_x(); + .center_x(Length::Fill); let col = if let Some(art_url) = art_url { row![ @@ -700,8 +749,8 @@ impl LalaMusicBar { container(col) .width(Length::Fill) .height(Length::Fill) - .center_x() - .center_y() + .center_x(Length::Fill) + .center_y(Length::Fill) .into() } } @@ -714,12 +763,14 @@ impl MultiApplication for LalaMusicBar { type WindowInfo = LaLaInfo; fn new(_flags: Self::Flags) -> (Self, Command) { - let (sender, receiver) = channel::(100); ( Self { service_data: None, - left: aximer::get_left().unwrap_or(0), - right: aximer::get_right().unwrap_or(0), + left: 0, + right: 0, + left_text: "".to_string(), + right_text: "".to_string(), + balance_text: "".to_string(), bar_index: SliderIndex::Balance, launcher: None, launcherid: None, @@ -729,12 +780,14 @@ impl MultiApplication for LalaMusicBar { showned_notifications: HashMap::new(), cached_notifications: HashMap::new(), cached_hidden_notifications: Vec::new(), - sender, - receiver: Arc::new(Mutex::new(receiver)), + sender: None, quite_mode: false, datetime: Local::now(), }, - Command::perform(get_metadata_initial(), Message::DBusInfoUpdate), + Command::batch(vec![ + Command::done(Message::UpdateBalance), + Command::perform(get_metadata_initial(), Message::DBusInfoUpdate), + ]), ) } @@ -896,30 +949,24 @@ impl MultiApplication for LalaMusicBar { Message::ToggleLauncher => { if self.launcher.is_some() { if let Some(id) = self.launcherid { - return Command::single(Action::Window(WindowAction::Close(id))); + return iced_runtime::task::effect(Action::Window(WindowAction::Close(id))); } return Command::none(); } self.launcher = Some(Launcher::new()); return Command::batch(vec![ - Command::single( - LaLaShellIdAction::new( - iced::window::Id::MAIN, - LalaShellAction::NewLayerShell(( - NewLayerShellSettings { - size: Some((500, 700)), - exclusive_zone: None, - anchor: Anchor::Left | Anchor::Bottom, - layer: Layer::Top, - margin: None, - keyboard_interactivity: KeyboardInteractivity::Exclusive, - use_last_output: false, - }, - LaLaInfo::Launcher, - )), - ) - .into(), - ), + Command::done(Message::NewLayerShell { + settings: NewLayerShellSettings { + size: Some((500, 700)), + exclusive_zone: None, + anchor: Anchor::Left | Anchor::Bottom, + layer: Layer::Top, + margin: None, + keyboard_interactivity: KeyboardInteractivity::Exclusive, + use_last_output: false, + }, + info: LaLaInfo::Launcher, + }), self.launcher.as_ref().unwrap().focus_input(), ]); } @@ -927,28 +974,22 @@ impl MultiApplication for LalaMusicBar { if self.right_panel.is_some() { if let Some(id) = self.right_panel { self.right_panel.take(); - return Command::single(Action::Window(WindowAction::Close(id))); + return iced_runtime::task::effect(Action::Window(WindowAction::Close(id))); } return Command::none(); } - return Command::single( - LaLaShellIdAction::new( - iced::window::Id::MAIN, - LalaShellAction::NewLayerShell(( - NewLayerShellSettings { - size: Some((300, 0)), - exclusive_zone: Some(300), - anchor: Anchor::Right | Anchor::Bottom | Anchor::Top, - layer: Layer::Top, - margin: None, - keyboard_interactivity: KeyboardInteractivity::None, - use_last_output: false, - }, - LaLaInfo::RightPanel, - )), - ) - .into(), - ); + return Command::done(Message::NewLayerShell { + settings: NewLayerShellSettings { + size: Some((300, 0)), + exclusive_zone: Some(300), + anchor: Anchor::Right | Anchor::Bottom | Anchor::Top, + layer: Layer::Top, + margin: None, + keyboard_interactivity: KeyboardInteractivity::None, + use_last_output: false, + }, + info: LaLaInfo::RightPanel, + }); } Message::Notify(NotifyMessage::UnitAdd(notify)) => { if let Some(onotify) = self.notifications.get_mut(¬ify.id) { @@ -1009,43 +1050,34 @@ impl MultiApplication for LalaMusicBar { } } else { // NOTE: if not all shown, then do as the way before - commands.push(Command::single( - LaLaShellIdAction::new( - iced::window::Id::MAIN, - LalaShellAction::NewLayerShell(( - NewLayerShellSettings { - size: Some((300, 130)), - exclusive_zone: None, - anchor: Anchor::Right | Anchor::Top, - layer: Layer::Top, - margin: Some((10, 10, 10, 10)), - keyboard_interactivity: KeyboardInteractivity::OnDemand, - use_last_output: true, - }, - LaLaInfo::Notify(Box::new(NotifyUnitWidgetInfo { - to_delete: false, - counter: 0, - upper: 10, - inline_reply: String::new(), - unit: *notify.clone(), - })), - )), - ) - .into(), - )); + commands.push(Command::done(Message::NewLayerShell { + settings: NewLayerShellSettings { + size: Some((300, 130)), + exclusive_zone: None, + anchor: Anchor::Right | Anchor::Top, + layer: Layer::Top, + margin: Some((10, 10, 10, 10)), + keyboard_interactivity: KeyboardInteractivity::OnDemand, + use_last_output: true, + }, + info: LaLaInfo::Notify(Box::new(NotifyUnitWidgetInfo { + to_delete: false, + counter: 0, + upper: 10, + inline_reply: String::new(), + unit: *notify.clone(), + })), + })); // NOTE: remove the new one let to_adjust_notification = &showned_notifications_now[1..]; for ((_, unit), (id, _)) in to_adjust_notification.iter().zip(showned_values.iter()) { - commands.push(Command::single( - LaLaShellIdAction::new( - **id, - LalaShellAction::MarginChange((unit.upper, 10, 10, 10)), - ) - .into(), - )); + commands.push(Command::done(Message::MarginChange { + id: **id, + margin: (unit.upper, 10, 10, 10), + })); } } } @@ -1054,24 +1086,18 @@ impl MultiApplication for LalaMusicBar { && self.hidenid.is_none() && !self.quite_mode { - commands.push(Command::single( - LaLaShellIdAction::new( - iced::window::Id::MAIN, - LalaShellAction::NewLayerShell(( - NewLayerShellSettings { - size: Some((300, 25)), - exclusive_zone: None, - anchor: Anchor::Right | Anchor::Top, - layer: Layer::Top, - margin: Some((EXTRAINF_MARGIN, 10, 10, 10)), - keyboard_interactivity: KeyboardInteractivity::None, - use_last_output: true, - }, - LaLaInfo::HiddenInfo, - )), - ) - .into(), - )); + commands.push(Command::done(Message::NewLayerShell { + settings: NewLayerShellSettings { + size: Some((300, 25)), + exclusive_zone: None, + anchor: Anchor::Right | Anchor::Top, + layer: Layer::Top, + margin: Some((EXTRAINF_MARGIN, 10, 10, 10)), + keyboard_interactivity: KeyboardInteractivity::None, + use_last_output: true, + }, + info: LaLaInfo::HiddenInfo, + })); } self.update_hidden_notification(); return Command::batch(commands); @@ -1082,12 +1108,14 @@ impl MultiApplication for LalaMusicBar { let mut commands = vec![]; if quite { for (id, _nid) in self.showned_notifications.iter() { - commands.push(Command::single(Action::Window(WindowAction::Close(*id)))); + commands.push(iced_runtime::task::effect(Action::Window( + WindowAction::Close(*id), + ))); } if let Some(extra_id) = self.hidenid { - commands.push(Command::single(Action::Window(WindowAction::Close( - extra_id, - )))); + commands.push(iced_runtime::task::effect(Action::Window( + WindowAction::Close(extra_id), + ))); } } else { for (_, notify_info) in self @@ -1095,46 +1123,34 @@ impl MultiApplication for LalaMusicBar { .iter() .filter(|(_, info)| info.counter < MAX_SHOWN_NOTIFICATIONS_COUNT) { - commands.push(Command::single( - LaLaShellIdAction::new( - iced::window::Id::MAIN, - LalaShellAction::NewLayerShell(( - NewLayerShellSettings { - size: Some((300, 130)), - exclusive_zone: None, - anchor: Anchor::Right | Anchor::Top, - layer: Layer::Top, - margin: Some((notify_info.upper, 10, 10, 10)), - keyboard_interactivity: KeyboardInteractivity::OnDemand, - use_last_output: true, - }, - LaLaInfo::Notify(Box::new(notify_info.clone())), - )), - ) - .into(), - )); + commands.push(Command::done(Message::NewLayerShell { + settings: NewLayerShellSettings { + size: Some((300, 130)), + exclusive_zone: None, + anchor: Anchor::Right | Anchor::Top, + layer: Layer::Top, + margin: Some((notify_info.upper, 10, 10, 10)), + keyboard_interactivity: KeyboardInteractivity::OnDemand, + use_last_output: true, + }, + info: LaLaInfo::Notify(Box::new(notify_info.clone())), + })); } if self.notifications.len() > MAX_SHOWN_NOTIFICATIONS_COUNT && self.hidenid.is_none() { - commands.push(Command::single( - LaLaShellIdAction::new( - iced::window::Id::MAIN, - LalaShellAction::NewLayerShell(( - NewLayerShellSettings { - size: Some((300, 25)), - exclusive_zone: None, - anchor: Anchor::Right | Anchor::Top, - layer: Layer::Top, - margin: Some((EXTRAINF_MARGIN, 10, 10, 10)), - keyboard_interactivity: KeyboardInteractivity::None, - use_last_output: true, - }, - LaLaInfo::HiddenInfo, - )), - ) - .into(), - )); + commands.push(Command::done(Message::NewLayerShell { + settings: NewLayerShellSettings { + size: Some((300, 25)), + exclusive_zone: None, + anchor: Anchor::Right | Anchor::Top, + layer: Layer::Top, + margin: Some((EXTRAINF_MARGIN, 10, 10, 10)), + keyboard_interactivity: KeyboardInteractivity::None, + use_last_output: true, + }, + info: LaLaInfo::HiddenInfo, + })); } } self.update_hidden_notification(); @@ -1148,13 +1164,7 @@ impl MultiApplication for LalaMusicBar { Message::CheckOutput => { if self.notifications.is_empty() { - return Command::single( - LaLaShellIdAction::new( - iced::window::Id::MAIN, - LalaShellAction::ForgetLastOutput, - ) - .into(), - ); + return Command::done(Message::ForgetLastOutput); } } Message::LauncherInfo(message) => { @@ -1166,6 +1176,8 @@ impl MultiApplication for LalaMusicBar { } Message::InlineReply((notify_id, text)) => { self.sender + .as_mut() + .unwrap() .try_send(NotifyCommand::InlineReply { id: notify_id, text, @@ -1175,6 +1187,8 @@ impl MultiApplication for LalaMusicBar { } Message::RemoveNotify(notify_id) => { self.sender + .as_mut() + .unwrap() .try_send(NotifyCommand::ActionInvoked { id: notify_id, action_key: DEFAULT_ACTION.to_string(), @@ -1193,23 +1207,27 @@ impl MultiApplication for LalaMusicBar { let mut commands = self .showned_notifications .keys() - .map(|id| Command::single(Action::Window(WindowAction::Close(*id)))) + .map(|id| iced_runtime::task::effect(Action::Window(WindowAction::Close(*id)))) .collect::>(); self.notifications.clear(); if let Some(id) = self.hidenid { - commands.push(Command::single(Action::Window(WindowAction::Close(id)))); + commands.push(iced_runtime::task::effect(Action::Window( + WindowAction::Close(id), + ))); } commands.push(Command::perform(async {}, |_| Message::CheckOutput)); return Command::batch(commands); } Message::CloseErrorNotification(id) => { - return Command::single(Action::Window(WindowAction::Close(id))); + return iced_runtime::task::effect(Action::Window(WindowAction::Close(id))); } Message::RequestUpdateTime => { self.datetime = Local::now(); } + Message::Ready(sender) => self.sender = Some(sender), + _ => unreachable!(), } Command::none() } @@ -1273,8 +1291,9 @@ impl MultiApplication for LalaMusicBar { } fn subscription(&self) -> iced::Subscription { - let rv = self.receiver.clone(); - iced::subscription::Subscription::batch([ + //let rv = self.receiver.clone(); + + iced::Subscription::batch([ iced::time::every(std::time::Duration::from_secs(1)) .map(|_| Message::RequestDBusInfoUpdate), iced::time::every(std::time::Duration::from_secs(10)) @@ -1282,74 +1301,80 @@ impl MultiApplication for LalaMusicBar { iced::time::every(std::time::Duration::from_secs(5)).map(|_| Message::UpdateBalance), iced::event::listen() .map(|event| Message::LauncherInfo(LaunchMessage::IcedEvent(event))), - iced::subscription::channel(std::any::TypeId::of::<()>(), 100, |sender| async move { - let mut receiver = rv.lock().await; - let Ok(connection) = start_connection( - sender, - vec![ - "body".to_owned(), - "body-markup".to_owned(), - "actions".to_owned(), - "icon-static".to_owned(), - "x-canonical-private-synchronous".to_owned(), - "x-dunst-stack-tag".to_owned(), - "inline-reply".to_owned(), - ], - VersionInfo { - name: "LaLaMako".to_owned(), - vendor: "waycrate".to_owned(), - version: env!("CARGO_PKG_VERSION").to_owned(), - spec_version: env!("CARGO_PKG_VERSION_PATCH").to_owned(), - }, - ) - .await - else { - pending::<()>().await; - unreachable!() - }; - type LaLaMakoMusic = LaLaMako; - let Ok(lalaref) = connection - .object_server() - .interface::<_, LaLaMakoMusic>(NOTIFICATION_SERVICE_PATH) + iced::Subscription::run(|| { + iced::stream::channel(100, |mut output| async move { + use iced::futures::sink::SinkExt; + let (sender, mut receiver) = channel(100); + + // Send the sender back to the application + output.send(Message::Ready(sender)).await.ok(); + let Ok(connection) = start_connection( + output, + vec![ + "body".to_owned(), + "body-markup".to_owned(), + "actions".to_owned(), + "icon-static".to_owned(), + "x-canonical-private-synchronous".to_owned(), + "x-dunst-stack-tag".to_owned(), + "inline-reply".to_owned(), + ], + VersionInfo { + name: "LaLaMako".to_owned(), + vendor: "waycrate".to_owned(), + version: env!("CARGO_PKG_VERSION").to_owned(), + spec_version: env!("CARGO_PKG_VERSION_PATCH").to_owned(), + }, + ) .await - else { - pending::<()>().await; - unreachable!() - }; - - while let Some(cmd) = receiver.next().await { - match cmd { - NotifyCommand::ActionInvoked { id, action_key } => { - LaLaMakoMusic::action_invoked( - lalaref.signal_context(), - id, - &action_key, - ) - .await - .ok(); - } - NotifyCommand::InlineReply { id, text } => { - LaLaMakoMusic::notification_replied( - lalaref.signal_context(), - id, - &text, - ) - .await - .ok(); - } - NotifyCommand::NotificationClosed { id, reason } => { - LaLaMakoMusic::notification_closed( - lalaref.signal_context(), - id, - reason, - ) - .await - .ok(); + else { + pending::<()>().await; + unreachable!() + }; + type LaLaMakoMusic = LaLaMako; + let Ok(lalaref) = connection + .object_server() + .interface::<_, LaLaMakoMusic>(NOTIFICATION_SERVICE_PATH) + .await + else { + pending::<()>().await; + unreachable!() + }; + + while let Some(cmd) = receiver.next().await { + match cmd { + NotifyCommand::ActionInvoked { id, action_key } => { + LaLaMakoMusic::action_invoked( + lalaref.signal_context(), + id, + &action_key, + ) + .await + .ok(); + } + NotifyCommand::InlineReply { id, text } => { + LaLaMakoMusic::notification_replied( + lalaref.signal_context(), + id, + &text, + ) + .await + .ok(); + } + NotifyCommand::NotificationClosed { id, reason } => { + LaLaMakoMusic::notification_closed( + lalaref.signal_context(), + id, + reason, + ) + .await + .ok(); + } } } - } - pending::<()>().await; - unreachable!() + pending::<()>().await; + unreachable!() + }) }), ]) }