From 30e99d3830ecac91fa6375675cc70e96eaf5bbe9 Mon Sep 17 00:00:00 2001 From: 4JX <79868816+4JX@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:17:51 +0200 Subject: [PATCH 01/15] Update dependencies --- .github/workflows/compile-rust.yml | 5 +- .github/workflows/release-rust.yml | 4 +- Cargo.lock | 3555 +++++++++++++++++++++------- app/Cargo.toml | 45 +- app/src/effects/ambient.rs | 45 +- app/src/effects/ripple.rs | 2 +- app/src/effects/temperature.rs | 6 +- app/src/gui/effect_options.rs | 4 +- app/src/gui/mod.rs | 46 +- app/src/gui/profile_list.rs | 3 +- app/src/main.rs | 15 +- driver/Cargo.toml | 4 +- flake.lock | 32 +- flake.nix | 61 +- vcpkg.json | 2 +- 15 files changed, 2784 insertions(+), 1045 deletions(-) diff --git a/.github/workflows/compile-rust.yml b/.github/workflows/compile-rust.yml index 00f3f46..c7ade72 100644 --- a/.github/workflows/compile-rust.yml +++ b/.github/workflows/compile-rust.yml @@ -21,13 +21,13 @@ jobs: artifact_name: target/debug/legion-kb-rgb asset_name: legion-kb-rgb-linux triplet: x64-linux - vcpkgCommitId: 'f6a5d4e8eb7476b8d7fc12a56dff300c1c986131' + vcpkgCommitId: 'ab67d6306b5e9af69684af5ec761c97731e75834' - name: windows os: windows-latest artifact_name: target/debug/legion-kb-rgb.exe asset_name: legion-kb-rgb-windows triplet: x64-windows-static - vcpkgCommitId: 'f6a5d4e8eb7476b8d7fc12a56dff300c1c986131' + vcpkgCommitId: 'ab67d6306b5e9af69684af5ec761c97731e75834' env: VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} @@ -66,6 +66,7 @@ jobs: - name: Set up VCPKG deps uses: lukka/run-vcpkg@v11 id: runvcpkg + # if: ${{ runner.os != 'Linux' }} with: vcpkgGitCommitId: '${{ matrix.vcpkgCommitId }}' # Run vcpkg with the command specified by the `runVcpkgFormatString` input. diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index e677125..ebe8e1b 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -21,13 +21,13 @@ jobs: artifact_name: target/release/legion-kb-rgb asset_name: legion-kb-rgb-linux triplet: x64-linux - vcpkgCommitId: 'f6a5d4e8eb7476b8d7fc12a56dff300c1c986131' + vcpkgCommitId: 'ab67d6306b5e9af69684af5ec761c97731e75834' - name: windows os: windows-latest artifact_name: target/release/legion-kb-rgb.exe asset_name: legion-kb-rgb-windows triplet: x64-windows-static - vcpkgCommitId: 'f6a5d4e8eb7476b8d7fc12a56dff300c1c986131' + vcpkgCommitId: 'ab67d6306b5e9af69684af5ec761c97731e75834' env: VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} diff --git a/Cargo.lock b/Cargo.lock index 7aeacdd..531db65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,65 +20,67 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c98a5d094590335462354da402d754fe2cb78f0e6ce5024611c28ed539c1de" +checksum = "74a4b14f3d99c1255dcba8f45621ab1a2e7540a0009652d33989005a4d0bfc6b" [[package]] name = "accesskit_consumer" -version = "0.15.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca541e0fdb600916d196a940228df99b86d804fd2e6ef13894d7814f2799db43" +checksum = "8c17cca53c09fbd7288667b22a201274b9becaa27f0b91bf52a526db95de45e6" dependencies = [ "accesskit", ] [[package]] name = "accesskit_macos" -version = "0.7.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4baea9413f0daf1cd4aab199bc09f8139cd726ce7673d523c27d186b8b878325" +checksum = "cd3b6ae1eabbfbced10e840fd3fce8a93ae84f174b3e4ba892ab7bcb42e477a7" dependencies = [ "accesskit", "accesskit_consumer", - "objc2", + "objc2 0.3.0-beta.3.patch-leaks.3", "once_cell", ] [[package]] name = "accesskit_unix" -version = "0.5.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d1517421278cc8e67422d0786a18cf4291093ebe49eadf1cf989ff80e57f90" +checksum = "09f46c18d99ba61ad7123dd13eeb0c104436ab6af1df6a1cd8c11054ed394a08" dependencies = [ "accesskit", "accesskit_consumer", "async-channel", + "async-once-cell", "atspi", - "futures-lite", - "serde 1.0.164", + "futures-lite 1.13.0", + "once_cell", + "serde 1.0.210", "zbus", ] [[package]] name = "accesskit_windows" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11c7f177739f23bd19bb856e4a64fdd96eb8638ec0a6a6dde9a7019a9e91c53" +checksum = "afcae27ec0974fc7c3b0b318783be89fd1b2e66dd702179fe600166a38ff4a0b" dependencies = [ "accesskit", "accesskit_consumer", - "arrayvec", "once_cell", "paste", - "windows 0.44.0", + "static_assertions", + "windows 0.48.0", ] [[package]] name = "accesskit_winit" -version = "0.14.1" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f1bd64cd0b480cafb7bdd91eb489a1ff50f0f5702437b9efa32a25b8bb82a1" +checksum = "5284218aca17d9e150164428a0ebc7b955f70e3a9a78b4c20894513aabf98a67" dependencies = [ "accesskit", "accesskit_macos", @@ -102,12 +104,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - [[package]] name = "ahash" version = "0.7.6" @@ -121,13 +117,15 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "getrandom 0.2.10", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -139,15 +137,29 @@ dependencies = [ "memchr", ] +[[package]] +name = "aligned-vec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + [[package]] name = "android-activity" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c77a0045eda8b888c76ea473c2b0515ba6f471d318f8927c5c72240937035a6" +checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" dependencies = [ "android-properties", - "bitflags", + "bitflags 2.6.0", "cc", + "cesu8", + "jni 0.21.1", "jni-sys", "libc", "log", @@ -155,6 +167,7 @@ dependencies = [ "ndk-context", "ndk-sys", "num_enum", + "thiserror", ] [[package]] @@ -182,7 +195,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fa490e751f3878eb9accb9f18988eca52c2337ce000a8bf31ef50d4c723ca9e" dependencies = [ "android_log-sys", - "env_logger", + "env_logger 0.10.0", "log", "once_cell", ] @@ -207,24 +220,24 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" @@ -246,12 +259,12 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -266,27 +279,41 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" dependencies = [ - "num-traits 0.2.15", + "num-traits 0.2.19", ] +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" + [[package]] name = "arboard" -version = "3.2.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6041616acea41d67c4a984709ddab1587fd0b10efe5cc563fee954d2f011854" +checksum = "df099ccb16cd014ff054ac1bf392c67feeef57164b05c42f037cd40f5d4357f4" dependencies = [ "clipboard-win", "log", - "objc", - "objc-foundation", - "objc_id", - "once_cell", + "objc2 0.5.2", + "objc2-app-kit", + "objc2-foundation", "parking_lot", - "thiserror", - "winapi", "x11rb", ] +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + [[package]] name = "arrayref" version = "0.3.7" @@ -299,25 +326,41 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[package]] +name = "ash" +version = "0.37.3+1.3.251" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" +dependencies = [ + "libloading 0.7.4", +] + [[package]] name = "async-broadcast" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" dependencies = [ - "event-listener", + "event-listener 2.5.3", "futures-core", ] [[package]] name = "async-channel" -version = "1.8.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener-strategy", "futures-core", + "pin-project-lite", ] [[package]] @@ -326,41 +369,106 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" dependencies = [ - "async-lock", + "async-lock 2.7.0", "async-task", "concurrent-queue", - "fastrand", - "futures-lite", + "fastrand 1.9.0", + "futures-lite 1.13.0", "slab", ] +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.7.0", + "autocfg 1.1.0", + "blocking", + "futures-lite 1.13.0", +] + [[package]] name = "async-io" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.7.0", "autocfg 1.1.0", "cfg-if", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", - "polling", - "rustix", + "polling 2.8.0", + "rustix 0.37.20", "slab", "socket2 0.4.9", "waker-fn", ] +[[package]] +name = "async-io" +version = "2.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" +dependencies = [ + "async-lock 3.4.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.3.0", + "parking", + "polling 3.7.3", + "rustix 0.38.37", + "slab", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "async-lock" version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" dependencies = [ - "event-listener", + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener 5.3.1", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-once-cell" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9338790e78aa95a416786ec8389546c4b6a1dfc3dc36071ed9518a9413a542eb" + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.7.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.37", + "windows-sys 0.48.0", ] [[package]] @@ -369,9 +477,27 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + +[[package]] +name = "async-signal" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" +dependencies = [ + "async-io 2.3.4", + "async-lock 3.4.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.37", + "signal-hook-registry", + "slab", + "windows-sys 0.59.0", ] [[package]] @@ -386,36 +512,63 @@ version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "atspi" -version = "0.10.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674e7a3376837b2e7d12d34d58ac47073c491dc3bf6f71a7adaf687d4d817faa" +checksum = "6059f350ab6f593ea00727b334265c4dfc7fd442ee32d264794bd9bdc68e87ca" +dependencies = [ + "atspi-common", + "atspi-connection", + "atspi-proxies", +] + +[[package]] +name = "atspi-common" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92af95f966d2431f962bc632c2e68eda7777330158bf640c4af4249349b2cdf5" dependencies = [ - "async-recursion", - "async-trait", - "atspi-macros", "enumflags2", - "futures-lite", - "serde 1.0.164", - "tracing", + "serde 1.0.210", + "static_assertions", "zbus", "zbus_names", + "zvariant", ] [[package]] -name = "atspi-macros" -version = "0.2.0" +name = "atspi-connection" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb4870a32c0eaa17e35bca0e6b16020635157121fb7d45593d242c295bc768" +checksum = "a0c65e7d70f86d4c0e3b2d585d9bf3f979f0b19d635a336725a88d279f76b939" dependencies = [ - "quote 1.0.33", - "syn 1.0.109", + "atspi-common", + "atspi-proxies", + "futures-lite 1.13.0", + "zbus", +] + +[[package]] +name = "atspi-proxies" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6495661273703e7a229356dcbe8c8f38223d697aacfaf0e13590a9ac9977bb52" +dependencies = [ + "atspi-common", + "serde 1.0.210", + "zbus", ] [[package]] @@ -444,6 +597,29 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "av1-grain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational 0.4.1", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2" +dependencies = [ + "arrayvec", +] + [[package]] name = "backtrace" version = "0.3.67" @@ -465,13 +641,42 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bindgen" +version = "0.59.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "clap 2.34.0", + "env_logger 0.9.3", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2 1.0.86", + "quote 1.0.37", + "regex", + "rustc-hash", + "shlex", + "which", +] + [[package]] name = "bindgen" version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cexpr", "clang-sys", "lazy_static", @@ -479,15 +684,30 @@ dependencies = [ "log", "peeking_take_while", "prettyplease", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "regex", "rustc-hash", "shlex", - "syn 2.0.38", + "syn 2.0.77", "which", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bit_field" version = "0.10.2" @@ -500,6 +720,18 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "bitstream-io" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b81e1519b0d82120d2fd469d5bfb2919a9361c48b02d82d04befc1cdd2002452" + [[package]] name = "block" version = "0.1.6" @@ -521,7 +753,16 @@ version = "0.1.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" dependencies = [ - "objc-sys", + "objc-sys 0.2.0-beta.2", +] + +[[package]] +name = "block-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" +dependencies = [ + "objc-sys 0.3.5", ] [[package]] @@ -530,10 +771,48 @@ version = "0.2.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" dependencies = [ - "block-sys", - "objc2-encode", + "block-sys 0.1.0-beta.1", + "objc2-encode 2.0.0-pre.2", +] + +[[package]] +name = "block2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" +dependencies = [ + "block-sys 0.2.1", + "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", +] + +[[package]] +name = "blocking" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite 2.3.0", + "piper", ] +[[package]] +name = "built" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "236e6289eda5a812bc6b53c3b024039382a2895fbbeef2d748b2931546d392c4" + [[package]] name = "bumpalo" version = "3.13.0" @@ -542,9 +821,9 @@ checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" dependencies = [ "bytemuck_derive", ] @@ -555,9 +834,9 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -566,51 +845,106 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + [[package]] name = "bytes" -version = "1.4.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ - "serde 1.0.164", + "serde 1.0.210", ] [[package]] name = "calloop" -version = "0.10.6" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" +checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" dependencies = [ - "bitflags", + "bitflags 2.6.0", "log", - "nix 0.25.1", - "slotmap", + "polling 3.7.3", + "rustix 0.38.37", + "slab", "thiserror", - "vec_map", ] [[package]] -name = "cc" -version = "1.0.79" +name = "calloop" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "jobserver", + "bitflags 2.6.0", + "log", + "polling 3.7.3", + "rustix 0.38.37", + "slab", + "thiserror", ] [[package]] -name = "cesu8" -version = "1.1.0" +name = "calloop-wayland-source" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" +checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" +dependencies = [ + "calloop 0.12.4", + "rustix 0.38.37", + "wayland-backend", + "wayland-client", +] [[package]] -name = "cexpr" -version = "0.6.0" +name = "calloop-wayland-source" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ - "nom", + "calloop 0.13.0", + "rustix 0.38.37", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "cc" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" +dependencies = [ + "jobserver", + "libc", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", ] [[package]] @@ -643,7 +977,7 @@ dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", - "num-traits 0.2.15", + "num-traits 0.2.19", "time 0.1.45", "wasm-bindgen", "winapi", @@ -668,7 +1002,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "strsim 0.8.0", "textwrap", "unicode-width", @@ -677,56 +1011,51 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.5" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2686c4115cb0810d9a984776e197823d08ec94f176549a89a9efded477c456dc" +checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.5" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e53afce1efce6ed1f633cf0e57612fe51db54a1ee4fd8f8503d078fe02d69ae" +checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", - "once_cell", - "strsim 0.10.0", + "strsim 0.11.1", ] [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ - "heck 0.4.1", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "heck 0.5.0", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "clipboard-win" -version = "4.5.0" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" dependencies = [ "error-code", - "str-buf", - "winapi", ] [[package]] @@ -735,21 +1064,21 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] name = "cocoa" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "cocoa-foundation", - "core-foundation", + "core-foundation 0.9.4", "core-graphics", - "foreign-types", + "foreign-types 0.5.0", "libc", "objc", ] @@ -760,20 +1089,30 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", - "core-foundation", + "core-foundation 0.9.4", "core-graphics-types", - "foreign-types", + "foreign-types 0.3.2", "libc", "objc", ] +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "color-eyre" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a667583cca8c4f8436db8de46ea8233c42a7d9ae424a82d338f2e4675229204" +checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" dependencies = [ "backtrace", "color-spantrace", @@ -808,6 +1147,37 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "com" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" +dependencies = [ + "com_macros", +] + +[[package]] +name = "com_macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" +dependencies = [ + "com_macros_support", + "proc-macro2 1.0.86", + "syn 1.0.109", +] + +[[package]] +name = "com_macros_support" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 1.0.109", +] + [[package]] name = "combine" version = "4.6.6" @@ -826,9 +1196,9 @@ checksum = "7439becb5fafc780b6f4de382b1a7a3e70234afe783854a4702ee8adbb838609" [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -836,10 +1206,10 @@ dependencies = [ [[package]] name = "confy" version = "0.4.0-2" -source = "git+https://github.com/open-trade/confy#9f231b2039cf8a8f8cdf6b829c5ac0016e146077" +source = "git+https://github.com/rustdesk-org/confy#83db9ec19a2f97e9718aef69e4fc5611bb382479" dependencies = [ "directories-next", - "serde 1.0.164", + "serde 1.0.210", "thiserror", "toml 0.5.11", ] @@ -855,9 +1225,19 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" dependencies = [ "core-foundation-sys", "libc", @@ -865,31 +1245,31 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ - "bitflags", - "core-foundation", + "bitflags 1.3.2", + "core-foundation 0.9.4", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] [[package]] name = "core-graphics-types" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ - "bitflags", - "core-foundation", + "bitflags 1.3.2", + "core-foundation 0.9.4", "libc", ] @@ -913,11 +1293,10 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.8" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ - "cfg-if", "crossbeam-utils", ] @@ -957,12 +1336,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -980,6 +1356,12 @@ dependencies = [ "typenum", ] +[[package]] +name = "cursor-icon" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" + [[package]] name = "custom_derive" version = "0.1.7" @@ -1018,44 +1400,37 @@ dependencies = [ ] [[package]] -name = "deflate" -version = "0.8.6" +name = "deranged" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ - "adler32", - "byteorder", + "powerfmt", ] -[[package]] -name = "deranged" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" - [[package]] name = "derivative" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "syn 1.0.109", ] [[package]] name = "device_query" -version = "1.1.3" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240bfe23da1cc62df990c5446c0268005bf4ba166890c4b4f266093bc12ccccc" +checksum = "bafa241a89a5edccff5057d0b85fbc083a781bd03d766c11a688331604980985" dependencies = [ "lazy_static", "macos-accessibility-client", "pkg-config", "readkey", "readmouse", - "windows 0.46.0", + "windows 0.48.0", "x11", ] @@ -1079,15 +1454,6 @@ dependencies = [ "dirs-sys-next", ] -[[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-next" version = "2.0.0" @@ -1098,17 +1464,6 @@ dependencies = [ "dirs-sys-next", ] -[[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 = "dirs-sys-next" version = "0.1.2" @@ -1158,6 +1513,15 @@ dependencies = [ "syn 0.15.44", ] +[[package]] +name = "document-features" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" +dependencies = [ + "litrs", +] + [[package]] name = "downcast-rs" version = "1.2.0" @@ -1172,11 +1536,12 @@ checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" [[package]] name = "ecolor" -version = "0.23.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf4e52dbbb615cfd30cf5a5265335c217b5fd8d669593cea74a517d9c605af" +checksum = "2e6b451ff1143f6de0f33fc7f1b68fecfd2c7de06e104de96c4514de3f5396f8" dependencies = [ "bytemuck", + "emath", ] [[package]] @@ -1190,42 +1555,48 @@ dependencies = [ [[package]] name = "eframe" -version = "0.23.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d9efede6c8905d3fc51a5ec9a506d4da4011bbcae0253d0304580fe40af3f5" +checksum = "6490ef800b2e41ee129b1f32f9ac15f713233fe3bc18e241a1afe1e4fb6811e0" dependencies = [ + "ahash 0.8.11", "bytemuck", - "cocoa", + "document-features", "egui", + "egui-wgpu", "egui-winit", "egui_glow", "glow", "glutin", "glutin-winit", - "image 0.24.6", + "image 0.25.2", "js-sys", "log", - "objc", + "objc2 0.5.2", + "objc2-app-kit", + "objc2-foundation", "parking_lot", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.2", "static_assertions", - "thiserror", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "web-time", "winapi", "winit", ] [[package]] name = "egui" -version = "0.23.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd69fed5fcf4fbb8225b24e80ea6193b61e17a625db105ef0c4d71dde6eb8b7" +checksum = "20c97e70a2768de630f161bb5392cbd3874fcf72868f14df0e002e82e06cb798" dependencies = [ "accesskit", - "ahash 0.8.3", + "ahash 0.8.11", + "emath", "epaint", "log", "nohash-hasher", @@ -1233,33 +1604,53 @@ dependencies = [ [[package]] name = "egui-modal" -version = "0.2.5" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "930210dbd95b65bdd9251e0ab2e9db7572d58675f018c611d7e500b7ff5226b2" +checksum = "4d3bc636d5ddc0c4a90d7a24c7d84db10fb2f789298e9c50cdddd28832e83f1e" dependencies = [ "egui", ] [[package]] name = "egui-notify" -version = "0.10.0" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0c6c49d9c02771e28f3b40289c16b4473308807b1ed09a878713d7f11e3dcad" +dependencies = [ + "egui", +] + +[[package]] +name = "egui-wgpu" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3b10f21c7bb2afaecb8d98677cdb233a8b1f336b9b95abd610a33aeced04fc" +checksum = "47c7a7c707877c3362a321ebb4f32be811c0b91f7aebf345fb162405c0218b4c" dependencies = [ + "ahash 0.8.11", + "bytemuck", + "document-features", "egui", + "epaint", + "log", + "thiserror", + "type-map", + "web-time", + "wgpu", + "winit", ] [[package]] name = "egui-winit" -version = "0.23.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15479a96d9fadccf5dac690bdc6373b97b8e1c0dd28367058f25a5298da0195" +checksum = "fac4e066af341bf92559f60dbdf2020b2a03c963415349af5f3f8d79ff7a4926" dependencies = [ "accesskit_winit", + "ahash 0.8.11", "arboard", "egui", "log", - "raw-window-handle", + "raw-window-handle 0.6.2", "smithay-clipboard", "web-time", "webbrowser", @@ -1268,39 +1659,41 @@ dependencies = [ [[package]] name = "egui_file" -version = "0.11.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d36bb265b94d54e34378528b5895fbf132db63a8547376947f452edfda98d2d" +checksum = "60f345a124846bdfe3b35a43b74bb2a485c5494c106cb646748edcd6c10bc24d" dependencies = [ "egui", ] [[package]] name = "egui_glow" -version = "0.23.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6726c08798822280038bbad2e32f4fc3cbed800cd51c6e34e99cd2d60cc1bc" +checksum = "4e2bdc8b38cfa17cc712c4ae079e30c71c00cd4c2763c9e16dc7860a02769103" dependencies = [ + "ahash 0.8.11", "bytemuck", "egui", "glow", "log", - "memoffset 0.6.5", + "memoffset 0.9.0", "wasm-bindgen", "web-sys", + "winit", ] [[package]] name = "either" -version = "1.8.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "emath" -version = "0.23.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef2b29de53074e575c18b694167ccbe6e5191f7b25fe65175a0d905a32eeec0" +checksum = "0a6a21708405ea88f63d8309650b4d77431f4bc28fb9d8e6f77d3963b51249e6" dependencies = [ "bytemuck", ] @@ -1312,7 +1705,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" dependencies = [ "enumflags2_derive", - "serde 1.0.164", + "serde 1.0.210", ] [[package]] @@ -1321,9 +1714,22 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", ] [[package]] @@ -1341,12 +1747,12 @@ dependencies = [ [[package]] name = "epaint" -version = "0.23.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58067b840d009143934d91d8dcb8ded054d8301d7c11a517ace0a99bb1e1595e" +checksum = "3f0dcc0a0771e7500e94cd1cb797bd13c9f23b9409bdc3c824e2cbc562b7fa01" dependencies = [ "ab_glyph", - "ahash 0.8.3", + "ahash 0.8.11", "bytemuck", "ecolor", "emath", @@ -1356,41 +1762,32 @@ dependencies = [ ] [[package]] -name = "errno" -version = "0.3.1" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "errno" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] name = "error-code" -version = "2.3.1" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" -dependencies = [ - "libc", - "str-buf", -] +checksum = "a5d9305ccc6942a704f4335694ecd3de2ea531b114ac2d51f5f843750787a92f" [[package]] name = "error-stack" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27a72baa257b5e0e2de241967bc5ee8f855d6072351042688621081d66b2a76b" +checksum = "fe413319145d1063f080f27556fd30b1d70b01e2ba10c2a6e40d4be982ffc5d1" dependencies = [ "anyhow", "rustc_version", @@ -1402,6 +1799,38 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "5.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener 5.3.1", + "pin-project-lite", +] + [[package]] name = "exr" version = "1.6.4" @@ -1430,11 +1859,13 @@ dependencies = [ [[package]] name = "fast_image_resize" -version = "2.7.3" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc789a40040e11bbe4ba31ca319406805a12fe3f8d71314bbc4bd076602ad55a" +checksum = "2ca4b58827213977eabab8ee8d8258db8441338f3a1832a1c0f2de3372175531" dependencies = [ - "num-traits 0.2.15", + "cfg-if", + "document-features", + "num-traits 0.2.19", "thiserror", ] @@ -1447,6 +1878,12 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" + [[package]] name = "fdeflate" version = "0.3.0" @@ -1483,7 +1920,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8cbf17b871570c1f8612b763bac3e86290602bcf5dc3c5ce657e0e1e9071d9e" dependencies = [ - "serde 1.0.164", + "serde 1.0.210", "serde_derive", "winreg 0.5.1", ] @@ -1500,9 +1937,9 @@ dependencies = [ [[package]] name = "flexi_logger" -version = "0.25.5" +version = "0.27.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e7b68b1f7ce9c62856598e99cd6742b9cedb6186b47aa989a82640f20bfa9b" +checksum = "469e584c031833564840fb0cdbce99bdfe946fd45480a188545e73a76f45461c" dependencies = [ "chrono", "crossbeam-channel", @@ -1535,7 +1972,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -1544,6 +2002,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.0" @@ -1613,7 +2077,7 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", @@ -1622,15 +2086,25 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +dependencies = [ + "futures-core", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -1675,12 +2149,12 @@ dependencies = [ [[package]] name = "gethostname" -version = "0.2.3" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" dependencies = [ "libc", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -1709,19 +2183,9 @@ dependencies = [ [[package]] name = "gif" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06" -dependencies = [ - "color_quant", - "weezl", -] - -[[package]] -name = "gif" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" dependencies = [ "color_quant", "weezl", @@ -1750,7 +2214,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c685013b7515e668f1b57a165b009d4d28cb139a8a989bbd699c10dad29d0c5" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-executor", @@ -1771,11 +2235,11 @@ checksum = "41486a26d1366a8032b160b59065a59fb528530a46a49f627e7048fb8c064039" dependencies = [ "anyhow", "heck 0.3.3", - "itertools", + "itertools 0.9.0", "proc-macro-crate 0.1.5", "proc-macro-error", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "syn 1.0.109", ] @@ -1786,7 +2250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7e9b997a66e9a23d073f2b1abb4dbfc3925e0b8952f67efd8d9b6e168e4cdc1" dependencies = [ "libc", - "system-deps", + "system-deps 1.3.2", ] [[package]] @@ -1797,9 +2261,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "glow" -version = "0.12.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "807edf58b70c0b5b2181dd39fe1839dbdb3ba02645630dc5f753e23da307f762" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" dependencies = [ "js-sys", "slotmap", @@ -1809,54 +2273,55 @@ dependencies = [ [[package]] name = "glutin" -version = "0.30.9" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b0385782048be65f0a9dd046c469d6a758a53fe1aa63a8111dea394d2ffa2f" +checksum = "18fcd4ae4e86d991ad1300b8f57166e5be0c95ef1f63f3f5b827f8a164548746" dependencies = [ - "bitflags", + "bitflags 2.6.0", "cfg_aliases", "cgl", - "core-foundation", + "core-foundation 0.9.4", "dispatch", "glutin_egl_sys", "glutin_glx_sys", "glutin_wgl_sys", - "libloading 0.7.4", - "objc2", + "icrate", + "libloading 0.8.0", + "objc2 0.4.1", "once_cell", - "raw-window-handle", - "wayland-sys 0.30.1", - "windows-sys 0.45.0", + "raw-window-handle 0.5.2", + "wayland-sys", + "windows-sys 0.48.0", "x11-dl", ] [[package]] name = "glutin-winit" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629a873fc04062830bfe8f97c03773bcd7b371e23bcc465d0a61448cd1588fa4" +checksum = "1ebcdfba24f73b8412c5181e56f092b5eff16671c514ce896b258a0a64bd7735" dependencies = [ "cfg_aliases", "glutin", - "raw-window-handle", + "raw-window-handle 0.5.2", "winit", ] [[package]] name = "glutin_egl_sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b3bcbddc51573b977fc6dca5d93867e4f29682cdbaf5d13e48f4fa4346d4d87" +checksum = "77cc5623f5309ef433c3dd4ca1223195347fe62c413da8e2fdd0eb76db2d9bcd" dependencies = [ "gl_generator", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "glutin_glx_sys" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b53cb5fe568964aa066a3ba91eac5ecbac869fb0842cd0dc9e412434f1a1494" +checksum = "a165fd686c10dcc2d45380b35796e577eacfd43d4660ee741ec8ebe2201b3b4f" dependencies = [ "gl_generator", "x11-dl", @@ -1864,9 +2329,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef89398e90033fc6bc65e9bd42fd29bbbfd483bda5b56dc5562f455550618165" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" dependencies = [ "gl_generator", ] @@ -1879,7 +2344,59 @@ checksum = "952133b60c318a62bf82ee75b93acc7e84028a093e06b9e27981c2b6fe68218c" dependencies = [ "glib-sys", "libc", - "system-deps", + "system-deps 1.3.2", +] + +[[package]] +name = "gpu-alloc" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" +dependencies = [ + "bitflags 2.6.0", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "gpu-allocator" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" +dependencies = [ + "log", + "presser", + "thiserror", + "winapi", + "windows 0.52.0", +] + +[[package]] +name = "gpu-descriptor" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c08c1f623a8d0b722b8b99f821eb0ba672a1618f0d3b16ddbee1cedd2dd8557" +dependencies = [ + "bitflags 2.6.0", + "gpu-descriptor-types", + "hashbrown 0.14.5", +] + +[[package]] +name = "gpu-descriptor-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" +dependencies = [ + "bitflags 2.6.0", ] [[package]] @@ -1888,7 +2405,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ff5d0f7ff308ae37e6eb47b6ded17785bdea06e438a708cd09e0288c1862f33" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "futures-channel", "futures-core", @@ -1912,7 +2429,7 @@ version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc80888271338c3ede875d8cafc452eb207476ff5539dcbe0018a8f5b827af0e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-core", "futures-sink", "glib", @@ -1936,7 +2453,7 @@ dependencies = [ "gstreamer-base-sys", "gstreamer-sys", "libc", - "system-deps", + "system-deps 1.3.2", ] [[package]] @@ -1945,7 +2462,7 @@ version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bafd01c56f59cb10f4b5a10f97bb4bdf8c2b2784ae5b04da7e2d400cf6e6afcf" dependencies = [ - "bitflags", + "bitflags 1.3.2", "glib", "glib-sys", "gobject-sys", @@ -1965,7 +2482,7 @@ dependencies = [ "gobject-sys", "gstreamer-sys", "libc", - "system-deps", + "system-deps 1.3.2", ] [[package]] @@ -1977,7 +2494,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps", + "system-deps 1.3.2", ] [[package]] @@ -1986,7 +2503,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7bbb1485d87469849ec45c08e03c2f280d3ea20ff3c439d03185be54e3ce98e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-util", "glib", @@ -2012,7 +2529,7 @@ dependencies = [ "gstreamer-base-sys", "gstreamer-sys", "libc", - "system-deps", + "system-deps 1.3.2", ] [[package]] @@ -2033,24 +2550,51 @@ dependencies = [ "ahash 0.7.6", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash 0.8.11", + "allocator-api2", +] + +[[package]] +name = "hassle-rs" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" +dependencies = [ + "bitflags 2.6.0", + "com", + "libc", + "libloading 0.8.0", + "thiserror", + "widestring 1.1.0", + "winapi", +] + [[package]] name = "hbb_common" version = "0.1.0" -source = "git+https://github.com/rustdesk/rustdesk?rev=6c15dd6#6c15dd6fd508f7435864a391f0009f52720edbd0" +source = "git+https://github.com/rustdesk/rustdesk?rev=40af9dc#40af9dc78beb26ea9444859de4676ff974b34dab" dependencies = [ "anyhow", "backtrace", + "base64 0.22.1", "bytes", "chrono", "confy", "directories-next", "dirs-next", "dlopen", - "env_logger", + "env_logger 0.10.0", "filetime", "flexi_logger", "futures", "futures-util", + "httparse", "lazy_static", "libc", "log", @@ -2061,15 +2605,23 @@ dependencies = [ "protobuf-codegen", "rand 0.8.5", "regex", - "serde 1.0.164", + "rustls-pki-types", + "rustls-platform-verifier", + "serde 1.0.210", "serde_derive", + "serde_json 1.0.128", "socket2 0.3.19", "sodiumoxide", - "sysinfo", + "sysinfo 0.29.10", + "thiserror", "tokio", + "tokio-native-tls", + "tokio-rustls", "tokio-socks", "tokio-util", "toml 0.7.4", + "url", + "uuid", "winapi", "zstd", ] @@ -2089,6 +2641,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -2109,9 +2667,15 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "hex" @@ -2119,16 +2683,23 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + [[package]] name = "hidapi" -version = "2.3.3" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f841dbb77615e116fb2ca38044b42310370f0d093c774a72361670ff2ae431b" +checksum = "03b876ecf37e86b359573c16c8366bc3eba52b689884a0fc42ba3f67203d2a8b" dependencies = [ "cc", + "cfg-if", "libc", "pkg-config", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2140,6 +2711,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "httparse" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" + [[package]] name = "humantime" version = "2.1.0" @@ -2169,6 +2746,17 @@ dependencies = [ "cc", ] +[[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.4.0" @@ -2181,58 +2769,76 @@ dependencies = [ [[package]] name = "image" -version = "0.23.14" +version = "0.24.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" +checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" dependencies = [ "bytemuck", "byteorder", "color_quant", - "gif 0.11.4", - "jpeg-decoder 0.1.22", - "num-iter", - "num-rational 0.3.2", - "num-traits 0.2.15", - "png 0.16.8", - "scoped_threadpool", - "tiff 0.6.1", + "gif", + "jpeg-decoder", + "num-traits 0.2.19", + "png", + "tiff", ] [[package]] name = "image" -version = "0.24.6" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" +checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" dependencies = [ "bytemuck", - "byteorder", + "byteorder-lite", "color_quant", "exr", - "gif 0.12.0", - "jpeg-decoder 0.3.0", - "num-rational 0.4.1", - "num-traits 0.2.15", - "png 0.17.9", + "gif", + "image-webp", + "num-traits 0.2.19", + "png", "qoi", - "tiff 0.8.1", + "ravif", + "rayon", + "rgb", + "tiff", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f79afb8cbee2ef20f59ccd477a218c12a93943d075b492015ecb1bb81f8ee904" +dependencies = [ + "byteorder-lite", + "quick-error", ] [[package]] name = "imageproc" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7923654f3ce7cb6849d5dc9e544aaeab49c508a90b56c721b046e7234c74ab53" +checksum = "b6aee993351d466301a29655d628bfc6f5a35a0d062b6160ca0808f425805fd7" dependencies = [ + "approx", "conv", - "image 0.23.14", - "itertools", - "num 0.3.1", + "image 0.24.9", + "itertools 0.10.5", + "nalgebra", + "num", "rand 0.7.3", "rand_distr", - "rulinalg", "rusttype", ] +[[package]] +name = "imgref" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" + [[package]] name = "indenter" version = "0.3.3" @@ -2246,7 +2852,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg 1.1.0", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", ] [[package]] @@ -2256,9 +2872,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", +] + +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -2267,7 +2891,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] @@ -2287,9 +2911,9 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.9", "io-lifetimes", - "rustix", + "rustix 0.37.20", "windows-sys 0.48.0", ] @@ -2303,6 +2927,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.9.0" @@ -2312,6 +2942,24 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.3.4" @@ -2324,6 +2972,20 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +[[package]] +name = "jni" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +dependencies = [ + "cesu8", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", +] + [[package]] name = "jni" version = "0.21.1" @@ -2348,35 +3010,37 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "jpeg-decoder" -version = "0.1.22" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" +checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" [[package]] -name = "jpeg-decoder" -version = "0.3.0" +name = "js-sys" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ - "rayon", + "wasm-bindgen", ] [[package]] -name = "js-sys" -version = "0.3.64" +name = "khronos-egl" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ - "wasm-bindgen", + "libc", + "libloading 0.8.0", + "pkg-config", ] [[package]] @@ -2387,9 +3051,9 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "ksni" -version = "0.1.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c7d627125aac4ea80802d51d9f8c3e4ceb948792414b0e345903ff78337b3a7" +checksum = "4934310bdd016e55725482b8d35ac0c16fd058c1b955d8959aa2d953b918c85b" dependencies = [ "dbus", "dbus-codegen", @@ -2419,7 +3083,7 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" name = "legion-kb-rgb" version = "0.19.6" dependencies = [ - "clap 4.3.5", + "clap 4.5.17", "color-eyre", "crossbeam-channel", "device_query", @@ -2429,18 +3093,18 @@ dependencies = [ "egui_file", "error-stack", "fast_image_resize", - "image 0.24.6", + "image 0.25.2", "legion-rgb-driver", "open", "photon-rs", "rand 0.8.5", "scrap", - "serde 1.0.164", - "serde_json 1.0.97", + "serde 1.0.210", + "serde_json 1.0.128", "single-instance", - "strum 0.25.0", - "strum_macros 0.25.2", - "sysinfo", + "strum 0.26.3", + "strum_macros 0.26.4", + "sysinfo 0.31.4", "thiserror", "tray-item", "winapi", @@ -2457,9 +3121,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.146" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libdbus-sys" @@ -2470,6 +3134,17 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "libfuzzer-sys" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" +dependencies = [ + "arbitrary", + "cc", + "once_cell", +] + [[package]] name = "libloading" version = "0.7.4" @@ -2508,6 +3183,18 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + [[package]] name = "lock_api" version = "0.4.10" @@ -2524,6 +3211,15 @@ version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + [[package]] name = "mac_address" version = "1.1.5" @@ -2537,9 +3233,10 @@ dependencies = [ [[package]] name = "machine-uid" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26141aceb9f046065617266f41a4a652e4583da643472a10a89b4b3664d99eb6" +source = "git+https://github.com/rustdesk-org/machine-uid#381ff579c1dc3a6c54db9dfec47c44bcb0246542" dependencies = [ + "bindgen 0.59.2", + "cc", "winreg 0.11.0", ] @@ -2549,7 +3246,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edf7710fbff50c24124331760978fb9086d6de6288dcdb38b25a97f8b1bdebbb" dependencies = [ - "core-foundation", + "core-foundation 0.9.4", "core-foundation-sys", ] @@ -2564,13 +3261,23 @@ dependencies = [ [[package]] name = "matrixmultiply" -version = "0.1.15" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcad67dcec2d58ff56f6292582377e6921afdf3bfbd533e26fb8900ae575e002" +checksum = "9380b911e3e96d10c1f415da0876389aaf1b56759054eeb0de7df940c456ba1a" dependencies = [ + "autocfg 1.1.0", "rawpointer", ] +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", +] + [[package]] name = "memchr" version = "2.5.0" @@ -2579,9 +3286,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.10" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] @@ -2597,37 +3304,42 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.9.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ "autocfg 1.1.0", ] [[package]] -name = "minimal-lexical" -version = "0.2.1" +name = "memoffset" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg 1.1.0", +] [[package]] -name = "miniz_oxide" -version = "0.3.7" +name = "metal" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" +checksum = "5637e166ea14be6063a3f8ba5ccb9a4159df7d8f6d61c02fc3d480b1f90dcfcb" dependencies = [ - "adler32", + "bitflags 2.6.0", + "block", + "core-graphics-types", + "foreign-types 0.5.0", + "log", + "objc", + "paste", ] [[package]] -name = "miniz_oxide" -version = "0.4.4" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg 1.1.0", -] +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" @@ -2650,14 +3362,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2667,27 +3379,82 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0419348c027fa7be448d2ae7ea0e4e04c2334c31dc4e74ab29f00a2a7ca69204" [[package]] -name = "nanorand" -version = "0.7.0" +name = "naga" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +checksum = "e536ae46fcab0876853bd4a632ede5df4b1c2527a58f6c5a4150fe86be858231" dependencies = [ - "getrandom 0.2.10", + "arrayvec", + "bit-set", + "bitflags 2.6.0", + "codespan-reporting", + "hexf-parse", + "indexmap 2.5.0", + "log", + "num-traits 0.2.19", + "rustc-hash", + "spirv", + "termcolor", + "thiserror", + "unicode-xid 0.2.6", ] [[package]] -name = "ndk" -version = "0.7.0" +name = "nalgebra" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +checksum = "4fb2d0de08694bed883320212c18ee3008576bfe8c306f4c3c4a58b4876998be" dependencies = [ - "bitflags", - "jni-sys", - "ndk-sys", - "num_enum", - "raw-window-handle", - "thiserror", -] + "approx", + "matrixmultiply", + "num-complex", + "num-rational 0.4.1", + "num-traits 0.2.19", + "simba", + "typenum", +] + +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom 0.2.10", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "ndk" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" +dependencies = [ + "bitflags 2.6.0", + "jni-sys", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.2", + "thiserror", +] [[package]] name = "ndk-context" @@ -2697,33 +3464,27 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.4.1+23.1.7779620" +version = "0.5.0+25.2.9519653" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" dependencies = [ "jni-sys", ] [[package]] -name = "nix" -version = "0.23.2" +name = "new_debug_unreachable" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" -dependencies = [ - "bitflags", - "cc", - "cfg-if", - "libc", - "memoffset 0.6.5", -] +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nix" -version = "0.24.3" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" dependencies = [ - "bitflags", + "bitflags 1.3.2", + "cc", "cfg-if", "libc", "memoffset 0.6.5", @@ -2731,16 +3492,14 @@ dependencies = [ [[package]] name = "nix" -version = "0.25.1" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ - "autocfg 1.1.0", - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", - "memoffset 0.6.5", - "pin-utils", + "memoffset 0.7.1", ] [[package]] @@ -2759,6 +3518,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + [[package]] name = "ntapi" version = "0.4.1" @@ -2770,56 +3535,62 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df031e117bca634c262e9bd3173776844b6c17a90b3741c9163663b4385af76" -dependencies = [ - "windows-sys 0.45.0", -] - -[[package]] -name = "num" -version = "0.1.42" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" +checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68" dependencies = [ - "num-integer", - "num-iter", - "num-traits 0.2.15", + "windows-sys 0.48.0", ] [[package]] name = "num" -version = "0.3.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7a8e9be5e039e2ff869df49155f1c06bd01ade2117ec783e56ab0932b67a8f" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ "num-bigint", "num-complex", "num-integer", "num-iter", - "num-rational 0.3.2", - "num-traits 0.2.15", + "num-rational 0.4.1", + "num-traits 0.2.19", ] [[package]] name = "num-bigint" -version = "0.3.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg 1.1.0", "num-integer", - "num-traits 0.2.15", + "num-traits 0.2.19", ] [[package]] name = "num-complex" -version = "0.3.1" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits 0.2.19", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ - "num-traits 0.2.15", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -2829,7 +3600,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg 1.1.0", - "num-traits 0.2.15", + "num-traits 0.2.19", ] [[package]] @@ -2840,7 +3611,7 @@ checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ "autocfg 1.1.0", "num-integer", - "num-traits 0.2.15", + "num-traits 0.2.19", ] [[package]] @@ -2850,9 +3621,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" dependencies = [ "autocfg 1.1.0", - "num-bigint", "num-integer", - "num-traits 0.2.15", + "num-traits 0.2.19", ] [[package]] @@ -2862,8 +3632,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg 1.1.0", + "num-bigint", "num-integer", - "num-traits 0.2.15", + "num-traits 0.2.19", ] [[package]] @@ -2872,14 +3643,14 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" dependencies = [ - "num-traits 0.2.15", + "num-traits 0.2.19", ] [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg 1.1.0", ] @@ -2896,23 +3667,23 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.11" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.11" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -2941,15 +3712,81 @@ version = "0.2.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + [[package]] name = "objc2" version = "0.3.0-beta.3.patch-leaks.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" dependencies = [ - "block2", - "objc-sys", - "objc2-encode", + "block2 0.2.0-alpha.6", + "objc-sys 0.2.0-beta.2", + "objc2-encode 2.0.0-pre.2", +] + +[[package]] +name = "objc2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" +dependencies = [ + "objc-sys 0.3.5", + "objc2-encode 3.0.0", +] + +[[package]] +name = "objc2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +dependencies = [ + "objc-sys 0.3.5", + "objc2-encode 4.0.3", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.6.0", + "block2 0.5.1", + "libc", + "objc2 0.5.2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +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", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +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", + "objc2-foundation", + "objc2-metal", ] [[package]] @@ -2958,7 +3795,56 @@ version = "2.0.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" dependencies = [ - "objc-sys", + "objc-sys 0.2.0-beta.2", +] + +[[package]] +name = "objc2-encode" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" + +[[package]] +name = "objc2-encode" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.6.0", + "block2 0.5.1", + "libc", + "objc2 0.5.2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +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", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +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", + "objc2-foundation", + "objc2-metal", ] [[package]] @@ -2981,21 +3867,65 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "open" -version = "5.0.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfabf1927dce4d6fdf563d63328a0a506101ced3ec780ca2135747336c98cef8" +checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" dependencies = [ "is-wsl", "libc", "pathdiff", ] +[[package]] +name = "openssl" +version = "0.10.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "foreign-types 0.3.2", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "orbclient" version = "0.3.45" @@ -3021,9 +3951,9 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38731fa859ef679f1aec66ca9562165926b442f298467f76f5990f431efe87dc" dependencies = [ - "serde 1.0.164", + "serde 1.0.210", "serde_derive", - "serde_json 1.0.97", + "serde_json 1.0.128", ] [[package]] @@ -3063,7 +3993,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f9cd68f7112581033f157e56c77ac4a5538ec5836a2e39284e65bd7d7275e49" dependencies = [ "approx", - "num-traits 0.2.15", + "num-traits 0.2.19", "palette_derive", "phf 0.11.2", ] @@ -3075,8 +4005,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05eedf46a8e7c27f74af0c9cfcdb004ceca158cb1b918c6f68f8d7a549b3e427" dependencies = [ "find-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "syn 1.0.109", ] @@ -3106,7 +4036,7 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -3196,9 +4126,9 @@ checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator 0.11.2", "phf_shared 0.11.2", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -3222,18 +4152,19 @@ dependencies = [ [[package]] name = "photon-rs" version = "0.3.2" -source = "git+https://github.com/silvia-odwyer/photon?rev=3e8a2a6#3e8a2a68241d69c3980df7d149b65c3357001d14" +source = "git+https://github.com/silvia-odwyer/photon?rev=d084f68#d084f6842c29bbb4838bf97bc98fd8c45b892cba" dependencies = [ - "base64", - "image 0.23.14", + "base64 0.13.1", + "image 0.24.9", "imageproc", + "instant", "palette", "perlin2d", "rand 0.7.3", "rusttype", - "serde 1.0.164", + "serde 1.0.210", "thiserror", - "time 0.3.26", + "time 0.3.36", ] [[package]] @@ -3251,16 +4182,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -3269,22 +4200,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "pkg-config" -version = "0.3.27" +name = "piper" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand 2.1.1", + "futures-io", +] [[package]] -name = "png" -version = "0.16.8" +name = "pkg-config" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" -dependencies = [ - "bitflags", - "crc32fast", - "deflate", - "miniz_oxide 0.3.7", -] +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "png" @@ -3292,7 +4222,7 @@ version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", @@ -3306,7 +4236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg 1.1.0", - "bitflags", + "bitflags 1.3.2", "cfg-if", "concurrent-queue", "libc", @@ -3315,12 +4245,39 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi 0.4.0", + "pin-project-lite", + "rustix 0.38.37", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + [[package]] name = "pretty-hex" version = "0.2.1" @@ -3333,8 +4290,8 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9825a04601d60621feed79c4e6b56d65db77cdca55cef43b46b0de1096d1c282" dependencies = [ - "proc-macro2 1.0.69", - "syn 2.0.38", + "proc-macro2 1.0.86", + "syn 2.0.77", ] [[package]] @@ -3363,8 +4320,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "syn 1.0.109", "version_check", ] @@ -3375,8 +4332,8 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "version_check", ] @@ -3386,23 +4343,42 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid", + "unicode-xid 0.1.0", ] [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] +[[package]] +name = "profiling" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" +dependencies = [ + "quote 1.0.37", + "syn 2.0.77", +] + [[package]] name = "protobuf" -version = "3.2.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55bad9126f378a853655831eb7363b7b01b81d19f8cb1218861086ca4a1a61e" +checksum = "0bcc343da15609eaecd65f8aa76df8dc4209d325131d8219358c0aaaebab0bf6" dependencies = [ "bytes", "once_cell", @@ -3412,9 +4388,9 @@ dependencies = [ [[package]] name = "protobuf-codegen" -version = "3.2.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd418ac3c91caa4032d37cb80ff0d44e2ebe637b2fb243b6234bf89cdac4901" +checksum = "c4d0cde5642ea4df842b13eb9f59ea6fafa26dcb43e3e1ee49120e9757556189" dependencies = [ "anyhow", "once_cell", @@ -3427,12 +4403,12 @@ dependencies = [ [[package]] name = "protobuf-parse" -version = "3.2.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d39b14605eaa1f6a340aec7f320b34064feb26c93aec35d6a9a2272a8ddfa49" +checksum = "1b0e9b447d099ae2c4993c0cbb03c7a9d6c937b17f2d56cfc0b1550e6fcfdb76" dependencies = [ "anyhow", - "indexmap", + "indexmap 2.5.0", "log", "protobuf", "protobuf-support", @@ -3443,9 +4419,9 @@ dependencies = [ [[package]] name = "protobuf-support" -version = "3.2.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d4d7b8601c814cfb36bcebb79f0e61e45e1e93640cf778837833bbed05c372" +checksum = "f0766e3675a627c327e4b3964582594b0e8741305d628a98a5de75a1d15f99b9" dependencies = [ "thiserror", ] @@ -3459,6 +4435,21 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quick-xml" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a05e2e8efddfa51a84ca47cec303fac86c8541b686d37cac5efc0e094417bc" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "0.6.13" @@ -3470,11 +4461,11 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.86", ] [[package]] @@ -3664,22 +4655,77 @@ dependencies = [ ] [[package]] -name = "raw-window-handle" -version = "0.5.2" +name = "rav1e" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" +dependencies = [ + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools 0.12.1", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits 0.2.19", + "once_cell", + "paste", + "profiling", + "rand 0.8.5", + "rand_chacha 0.3.1", + "simd_helpers", + "system-deps 6.1.1", + "thiserror", + "v_frame", + "wasm-bindgen", +] [[package]] -name = "rawpointer" -version = "0.1.0" +name = "ravif" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebac11a9d2e11f2af219b8b8d833b76b1ea0e054aa0e8d8e9e4cbde353bdf019" +checksum = "a8f0bfd976333248de2078d350bfdf182ff96e168a24d23d2436cef320dd4bdd" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rgb", +] [[package]] -name = "rayon" -version = "1.7.0" +name = "raw-window-handle" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "rayon" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -3687,14 +4733,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -3708,9 +4752,9 @@ dependencies = [ [[package]] name = "readkey" -version = "0.1.7" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d401b6d6a1725a59f1b4e813275d289dff3ad09c72b373a10a7a8217ba3146" +checksum = "7677f98ca49bc9bb26e04c8abf80ba579e2cb98e8a384a0ff8128ad70670d249" [[package]] name = "readmouse" @@ -3724,7 +4768,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -3733,7 +4777,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -3765,13 +4809,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] -name = "rulinalg" -version = "0.4.2" +name = "renderdoc-sys" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ada202c9685e1d72a7420c578e92b358dbf807d3dfabb676a3dab9cc3bb12f" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + +[[package]] +name = "rgb" +version = "0.8.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" dependencies = [ - "matrixmultiply", - "num 0.1.42", + "bytemuck", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.10", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", ] [[package]] @@ -3801,14 +4865,109 @@ version = "0.37.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", "windows-sys 0.48.0", ] +[[package]] +name = "rustix" +version = "0.38.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys 0.4.14", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.23.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +dependencies = [ + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" + +[[package]] +name = "rustls-platform-verifier" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490" +dependencies = [ + "core-foundation 0.9.4", + "core-foundation-sys", + "jni 0.19.0", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-roots", + "winapi", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rusttype" version = "0.9.3" @@ -3831,6 +4990,15 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +[[package]] +name = "safe_arch" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3460605018fdc9612bce72735cba0d27efbcd9904780d44c7e3a9948f96148a" +dependencies = [ + "bytemuck", +] + [[package]] name = "same-file" version = "1.0.6" @@ -3841,16 +5009,19 @@ dependencies = [ ] [[package]] -name = "scoped-tls" -version = "1.0.1" +name = "schannel" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +dependencies = [ + "windows-sys 0.59.0", +] [[package]] -name = "scoped_threadpool" -version = "0.1.9" +name = "scoped-tls" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" @@ -3861,10 +5032,10 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scrap" version = "0.5.0" -source = "git+https://github.com/rustdesk/rustdesk?rev=6c15dd6#6c15dd6fd508f7435864a391f0009f52720edbd0" +source = "git+https://github.com/rustdesk/rustdesk?rev=40af9dc#40af9dc78beb26ea9444859de4676ff974b34dab" dependencies = [ "android_logger", - "bindgen", + "bindgen 0.65.1", "block", "cfg-if", "dbus", @@ -3872,11 +5043,13 @@ dependencies = [ "gstreamer-app", "gstreamer-video", "hbb_common", - "jni", + "jni 0.21.1", "lazy_static", "log", + "ndk-context", "num_cpus", - "serde_json 1.0.97", + "serde 1.0.210", + "serde_json 1.0.128", "target_build_utils", "tracing", "webm", @@ -3885,17 +5058,41 @@ dependencies = [ [[package]] name = "sctk-adwaita" -version = "0.5.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" +checksum = "70b31447ca297092c5a9916fc3b955203157b37c19ca8edde4f52e9843e602c7" dependencies = [ "ab_glyph", "log", "memmap2", - "smithay-client-toolkit", + "smithay-client-toolkit 0.18.1", "tiny-skia", ] +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "num-bigint", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "semver" version = "1.0.17" @@ -3910,22 +5107,22 @@ checksum = "34b623917345a631dc9608d5194cc206b3fe6c3554cd1c75b937e55e285254af" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -3942,13 +5139,14 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.97" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa 1.0.6", + "memchr", "ryu", - "serde 1.0.164", + "serde 1.0.210", ] [[package]] @@ -3957,9 +5155,9 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -3968,7 +5166,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" dependencies = [ - "serde 1.0.164", + "serde 1.0.210", ] [[package]] @@ -4012,12 +5210,34 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +[[package]] +name = "simba" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3fd720c48c53cace224ae62bef1bbff363a70c68c4802a78b5cc6159618176" +dependencies = [ + "approx", + "num-complex", + "num-traits 0.2.19", + "paste", + "wide", +] + [[package]] name = "simd-adler32" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote 1.0.37", +] + [[package]] name = "single-instance" version = "0.3.3" @@ -4027,7 +5247,7 @@ dependencies = [ "libc", "nix 0.23.2", "thiserror", - "widestring", + "widestring 0.4.3", "winapi", ] @@ -4069,31 +5289,72 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "smithay-client-toolkit" -version = "0.16.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" dependencies = [ - "bitflags", - "calloop", - "dlib", - "lazy_static", + "bitflags 2.6.0", + "calloop 0.12.4", + "calloop-wayland-source 0.2.0", + "cursor-icon", + "libc", "log", "memmap2", - "nix 0.24.3", - "pkg-config", + "rustix 0.38.37", + "thiserror", + "wayland-backend", "wayland-client", + "wayland-csd-frame", "wayland-cursor", - "wayland-protocols", + "wayland-protocols 0.31.2", + "wayland-protocols-wlr 0.2.0", + "wayland-scanner", + "xkeysym", ] [[package]] -name = "smithay-clipboard" -version = "0.6.6" +name = "smithay-client-toolkit" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ - "smithay-client-toolkit", + "bitflags 2.6.0", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.37", + "thiserror", + "wayland-backend", "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols 0.32.4", + "wayland-protocols-wlr 0.3.4", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-clipboard" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc8216eec463674a0e90f29e0ae41a4db573ec5b56b1c6c1c71615d249b6d846" +dependencies = [ + "libc", + "smithay-client-toolkit 0.19.2", + "wayland-backend", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde 1.0.210", ] [[package]] @@ -4117,6 +5378,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "sodiumoxide" version = "0.2.7" @@ -4126,7 +5397,7 @@ dependencies = [ "ed25519", "libc", "libsodium-sys", - "serde 1.0.164", + "serde 1.0.210", ] [[package]] @@ -4139,16 +5410,19 @@ dependencies = [ ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "spirv" +version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" +dependencies = [ + "bitflags 2.6.0", +] [[package]] -name = "str-buf" -version = "1.0.6" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strict-num" @@ -4164,9 +5438,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" @@ -4176,9 +5450,9 @@ checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" [[package]] name = "strum" -version = "0.25.0" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" [[package]] name = "strum_macros" @@ -4187,24 +5461,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" dependencies = [ "heck 0.3.3", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "syn 1.0.109", ] [[package]] name = "strum_macros" -version = "0.25.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.4.1", - "proc-macro2 1.0.69", - "quote 1.0.33", + "heck 0.5.0", + "proc-macro2 1.0.86", + "quote 1.0.37", "rustversion", - "syn 2.0.38", + "syn 2.0.77", ] +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "syn" version = "0.15.44" @@ -4213,7 +5493,7 @@ checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", - "unicode-xid", + "unicode-xid 0.1.0", ] [[package]] @@ -4222,27 +5502,26 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.38" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "unicode-ident", ] [[package]] name = "sysinfo" -version = "0.29.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557d0845b86eea8182f7b10dff120214fb6cd9fd937b6f4917714e546a38695" +version = "0.29.10" +source = "git+https://github.com/rustdesk-org/sysinfo?branch=rlim_max#90b1705d909a4902dbbbdea37ee64db17841077d" dependencies = [ "cfg-if", "core-foundation-sys", @@ -4250,7 +5529,21 @@ dependencies = [ "ntapi", "once_cell", "rayon", - "winapi", + "windows 0.51.1", +] + +[[package]] +name = "sysinfo" +version = "0.31.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be" +dependencies = [ + "core-foundation-sys", + "libc", + "memchr", + "ntapi", + "rayon", + "windows 0.57.0", ] [[package]] @@ -4265,9 +5558,28 @@ dependencies = [ "strum_macros 0.18.0", "thiserror", "toml 0.5.11", - "version-compare", + "version-compare 0.0.10", +] + +[[package]] +name = "system-deps" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30c2de8a4d8f4b823d634affc9cd2a74ec98c53a756f317e529a48046cbf71f3" +dependencies = [ + "cfg-expr", + "heck 0.4.1", + "pkg-config", + "toml 0.7.4", + "version-compare 0.1.1", ] +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + [[package]] name = "target_build_utils" version = "0.3.1" @@ -4287,17 +5599,17 @@ checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ "autocfg 1.1.0", "cfg-if", - "fastrand", + "fastrand 1.9.0", "redox_syscall 0.3.5", - "rustix", + "rustix 0.37.20", "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -4313,22 +5625,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -4343,23 +5655,12 @@ dependencies = [ [[package]] name = "tiff" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437" -dependencies = [ - "jpeg-decoder 0.1.22", - "miniz_oxide 0.4.4", - "weezl", -] - -[[package]] -name = "tiff" -version = "0.8.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" dependencies = [ "flate2", - "jpeg-decoder 0.3.0", + "jpeg-decoder", "weezl", ] @@ -4376,40 +5677,42 @@ dependencies = [ [[package]] name = "time" -version = "0.3.26" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a79d09ac6b08c1ab3906a2f7cc2e81a0e27c7ae89c63812df75e52bef0751e07" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", - "serde 1.0.164", + "num-conv", + "powerfmt", + "serde 1.0.210", "time-core", ] [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "tiny-skia" -version = "0.8.4" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" dependencies = [ "arrayref", "arrayvec", "bytemuck", "cfg-if", - "png 0.17.9", + "log", "tiny-skia-path", ] [[package]] name = "tiny-skia-path" -version = "0.8.4" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" dependencies = [ "arrayref", "bytemuck", @@ -4433,38 +5736,58 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ - "autocfg 1.1.0", + "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.4.9", + "socket2 0.5.7", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "rustls", + "rustls-pki-types", + "tokio", ] [[package]] name = "tokio-socks" -version = "0.5.1-2" -source = "git+https://github.com/open-trade/tokio-socks#14a5c2564fa20a2765ea53d03c573ee2b7e20421" +version = "0.5.2-1" +source = "git+https://github.com/rustdesk-org/tokio-socks#94e97c6d7c93b0bcbfa54f2dc397c1da0a6e43d3" dependencies = [ "bytes", "either", @@ -4488,7 +5811,7 @@ dependencies = [ "futures-io", "futures-sink", "futures-util", - "hashbrown", + "hashbrown 0.12.3", "pin-project-lite", "slab", "tokio", @@ -4501,7 +5824,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "serde 1.0.164", + "serde 1.0.210", ] [[package]] @@ -4510,7 +5833,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" dependencies = [ - "serde 1.0.164", + "serde 1.0.210", "serde_spanned", "toml_datetime", "toml_edit", @@ -4522,7 +5845,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" dependencies = [ - "serde 1.0.164", + "serde 1.0.210", ] [[package]] @@ -4531,8 +5854,8 @@ version = "0.19.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" dependencies = [ - "indexmap", - "serde 1.0.164", + "indexmap 1.9.3", + "serde 1.0.210", "serde_spanned", "toml_datetime", "winnow", @@ -4556,9 +5879,9 @@ version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8803eee176538f94ae9a14b55b2804eb7e1441f8210b1c31290b3bccdccff73b" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -4594,9 +5917,9 @@ dependencies = [ [[package]] name = "tray-item" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e87dd77acd3451f2a894d1596cdd73f931972eef8847696a3c8376fce3f760" +checksum = "59d4bd406170690dc30eabb3badc67a085beaf9b2c3b1923afcc9c26a2191353" dependencies = [ "cocoa", "core-graphics", @@ -4606,7 +5929,7 @@ dependencies = [ "objc-foundation", "objc_id", "padlock", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4622,10 +5945,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a464a4b34948a5f67fddd2b823c62d9d92e44be75058b99939eae6c5b6960b33" [[package]] -name = "typenum" -version = "1.16.0" +name = "type-map" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" +dependencies = [ + "rustc-hash", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uds_windows" @@ -4676,6 +6008,18 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.4.0" @@ -4693,12 +6037,38 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +[[package]] +name = "uuid" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +dependencies = [ + "getrandom 0.2.10", +] + +[[package]] +name = "v_frame" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b" +dependencies = [ + "aligned-vec", + "num-traits 0.2.19", + "wasm-bindgen", +] + [[package]] name = "valuable" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "vec_map" version = "0.8.2" @@ -4711,6 +6081,12 @@ version = "0.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" +[[package]] +name = "version-compare" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" + [[package]] name = "version_check" version = "0.9.4" @@ -4753,34 +6129,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -4790,123 +6167,172 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ - "quote 1.0.33", + "quote 1.0.37", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] -name = "wayland-client" -version = "0.29.5" +name = "wayland-backend" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ - "bitflags", + "cc", "downcast-rs", - "libc", - "nix 0.24.3", + "rustix 0.38.37", "scoped-tls", - "wayland-commons", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" +dependencies = [ + "bitflags 2.6.0", + "rustix 0.38.37", + "wayland-backend", "wayland-scanner", - "wayland-sys 0.29.5", ] [[package]] -name = "wayland-commons" -version = "0.29.5" +name = "wayland-csd-frame" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "nix 0.24.3", - "once_cell", - "smallvec", - "wayland-sys 0.29.5", + "bitflags 2.6.0", + "cursor-icon", + "wayland-backend", ] [[package]] name = "wayland-cursor" -version = "0.29.5" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +checksum = "3a94697e66e76c85923b0d28a0c251e8f0666f58fc47d316c0f4da6da75d37cb" dependencies = [ - "nix 0.24.3", + "rustix 0.38.37", "wayland-client", "xcursor", ] [[package]] name = "wayland-protocols" -version = "0.29.5" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" dependencies = [ - "bitflags", + "bitflags 2.6.0", + "wayland-backend", "wayland-client", - "wayland-commons", "wayland-scanner", ] [[package]] -name = "wayland-scanner" -version = "0.29.5" +name = "wayland-protocols" +version = "0.32.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +checksum = "2b5755d77ae9040bb872a25026555ce4cb0ae75fd923e90d25fba07d81057de0" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "xml-rs", + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", ] [[package]] -name = "wayland-sys" -version = "0.29.5" +name = "wayland-protocols-plasma" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" dependencies = [ - "dlib", - "lazy_static", - "pkg-config", + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols 0.31.2", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols 0.31.2", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad87b5fd1b1d3ca2f792df8f686a2a11e3fe1077b71096f7a175ab699f89109" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols 0.32.4", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" +dependencies = [ + "proc-macro2 1.0.86", + "quick-xml", + "quote 1.0.37", ] [[package]] name = "wayland-sys" -version = "0.30.1" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" dependencies = [ "dlib", - "lazy_static", "log", + "once_cell", "pkg-config", ] [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -4924,44 +6350,156 @@ dependencies = [ [[package]] name = "webbrowser" -version = "0.8.10" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd222aa310eb7532e3fd427a5d7db7e44bc0b0cf1c1e21139c345325511a85b6" +checksum = "2e5f07fb9bc8de2ddfe6b24a71a75430673fd679e568c48b52716cef1cfae923" dependencies = [ - "core-foundation", + "block2 0.5.1", + "core-foundation 0.10.0", "home", - "jni", + "jni 0.21.1", "log", "ndk-context", - "objc", - "raw-window-handle", + "objc2 0.5.2", + "objc2-foundation", "url", "web-sys", ] [[package]] name = "webm" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecb047148a12ef1fd8ab26302bca7e82036f005c3073b48e17cc1b44ec577136" +version = "1.1.0" +source = "git+https://github.com/rustdesk-org/rust-webm#d2c4d3ac133c7b0e4c0f656da710b48391981e64" dependencies = [ "webm-sys", ] [[package]] name = "webm-sys" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ded6ec82ccf51fe265b0b2b1579cac839574ed910c17baac58e807f8a9de7f3" +version = "1.0.4" +source = "git+https://github.com/rustdesk-org/rust-webm#d2c4d3ac133c7b0e4c0f656da710b48391981e64" dependencies = [ "cc", ] +[[package]] +name = "webpki-roots" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "weezl" -version = "0.1.7" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" + +[[package]] +name = "wgpu" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90e37c7b9921b75dfd26dd973fdcbce36f13dfa6e2dc82aece584e0ed48c355c" +dependencies = [ + "arrayvec", + "cfg-if", + "cfg_aliases", + "document-features", + "js-sys", + "log", + "parking_lot", + "profiling", + "raw-window-handle 0.6.2", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d50819ab545b867d8a454d1d756b90cd5f15da1f2943334ca314af10583c9d39" +dependencies = [ + "arrayvec", + "bit-vec", + "bitflags 2.6.0", + "cfg_aliases", + "codespan-reporting", + "document-features", + "indexmap 2.5.0", + "log", + "naga", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle 0.6.2", + "rustc-hash", + "smallvec", + "thiserror", + "web-sys", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-hal" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +checksum = "172e490a87295564f3fcc0f165798d87386f6231b04d4548bca458cbbfd63222" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bitflags 2.6.0", + "cfg_aliases", + "core-graphics-types", + "glow", + "glutin_wgl_sys", + "gpu-alloc", + "gpu-allocator", + "gpu-descriptor", + "hassle-rs", + "js-sys", + "khronos-egl", + "libc", + "libloading 0.8.0", + "log", + "metal", + "naga", + "ndk-sys", + "objc", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle 0.6.2", + "renderdoc-sys", + "rustc-hash", + "smallvec", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types", + "winapi", +] + +[[package]] +name = "wgpu-types" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1353d9a46bff7f955a680577f34c69122628cc2076e1d6f3a9be6ef00ae793ef" +dependencies = [ + "bitflags 2.6.0", + "js-sys", + "web-sys", +] [[package]] name = "which" @@ -4974,12 +6512,28 @@ dependencies = [ "once_cell", ] +[[package]] +name = "wide" +version = "0.7.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b828f995bf1e9622031f8009f8481a85406ce1f4d4588ff746d872043e855690" +dependencies = [ + "bytemuck", + "safe_arch", +] + [[package]] name = "widestring" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + [[package]] name = "winapi" version = "0.3.9" @@ -5006,71 +6560,135 @@ dependencies = [ ] [[package]] -name = "winapi-wsapoll" -version = "0.1.1" +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "winapi", + "windows-implement 0.48.0", + "windows-interface 0.48.0", + "windows-targets 0.48.5", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +dependencies = [ + "windows-core 0.51.1", + "windows-targets 0.48.5", +] [[package]] name = "windows" -version = "0.44.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-implement", - "windows-interface", - "windows-targets 0.42.2", + "windows-core 0.52.0", + "windows-targets 0.52.6", ] [[package]] name = "windows" -version = "0.46.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" +checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" dependencies = [ - "windows-targets 0.42.2", + "windows-core 0.57.0", + "windows-targets 0.52.6", ] [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" dependencies = [ - "windows-targets 0.48.0", + "windows-implement 0.57.0", + "windows-interface 0.57.0", + "windows-result", + "windows-targets 0.52.6", ] [[package]] name = "windows-implement" -version = "0.44.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce87ca8e3417b02dc2a8a22769306658670ec92d78f1bd420d6310a67c245c6" +checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "syn 1.0.109", ] +[[package]] +name = "windows-implement" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + [[package]] name = "windows-interface" -version = "0.44.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853f69a591ecd4f810d29f17e902d40e349fb05b0b11fff63b08b826bfe39c7f" +checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "syn 1.0.109", ] +[[package]] +name = "windows-interface" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -5086,7 +6704,25 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -5106,17 +6742,33 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -5127,9 +6779,15 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -5139,9 +6797,15 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -5151,9 +6815,21 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -5163,9 +6839,15 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -5175,9 +6857,15 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -5187,9 +6875,15 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -5199,9 +6893,15 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windres" @@ -5215,37 +6915,51 @@ dependencies = [ [[package]] name = "winit" -version = "0.28.6" +version = "0.29.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866db3f712fffba75d31bf0cdecf357c8aeafd158c5b7ab51dba2a2b2d47f196" +checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca" dependencies = [ + "ahash 0.8.11", "android-activity", - "bitflags", + "atomic-waker", + "bitflags 2.6.0", + "bytemuck", + "calloop 0.12.4", "cfg_aliases", - "core-foundation", + "core-foundation 0.9.4", "core-graphics", - "dispatch", - "instant", + "cursor-icon", + "icrate", + "js-sys", "libc", "log", - "mio", + "memmap2", "ndk", - "objc2", + "ndk-sys", + "objc2 0.4.1", "once_cell", "orbclient", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.2", "redox_syscall 0.3.5", + "rustix 0.38.37", "sctk-adwaita", - "smithay-client-toolkit", + "smithay-client-toolkit 0.18.1", + "smol_str", + "unicode-segmentation", "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", "wayland-client", - "wayland-commons", - "wayland-protocols", - "wayland-scanner", + "wayland-protocols 0.31.2", + "wayland-protocols-plasma", "web-sys", - "windows-sys 0.45.0", + "web-time", + "windows-sys 0.48.0", "x11-dl", + "x11rb", + "xkbcommon-dl", ] [[package]] @@ -5263,7 +6977,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a27a759395c1195c4cc5cda607ef6f8f6498f64e78f7900f5de0a127a424704a" dependencies = [ - "serde 1.0.164", + "serde 1.0.210", "winapi", ] @@ -5300,25 +7014,24 @@ dependencies = [ [[package]] name = "x11rb" -version = "0.10.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" dependencies = [ + "as-raw-xcb-connection", "gethostname", - "nix 0.24.3", - "winapi", - "winapi-wsapoll", + "libc", + "libloading 0.8.0", + "once_cell", + "rustix 0.38.37", "x11rb-protocol", ] [[package]] name = "x11rb-protocol" -version = "0.10.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" -dependencies = [ - "nix 0.24.3", -] +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" [[package]] name = "xcursor" @@ -5329,6 +7042,35 @@ dependencies = [ "nom", ] +[[package]] +name = "xdg-home" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.6.0", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + [[package]] name = "xml-rs" version = "0.8.14" @@ -5337,37 +7079,40 @@ checksum = "52839dc911083a8ef63efa4d039d1f58b5e409f923e44c80828f206f66e5541c" [[package]] name = "zbus" -version = "3.10.0" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f770930448dd412a4a7131dd968a8e6df0064db4d7916fbbd2d6c3f26b566938" +checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" dependencies = [ "async-broadcast", "async-executor", - "async-io", - "async-lock", + "async-fs", + "async-io 1.13.0", + "async-lock 2.7.0", + "async-process", "async-recursion", "async-task", "async-trait", + "blocking", "byteorder", "derivative", - "dirs", "enumflags2", - "event-listener", + "event-listener 2.5.3", "futures-core", "futures-sink", "futures-util", "hex", - "nix 0.25.1", + "nix 0.26.4", "once_cell", "ordered-stream", "rand 0.8.5", - "serde 1.0.164", + "serde 1.0.210", "serde_repr", "sha1", "static_assertions", "tracing", "uds_windows", "winapi", + "xdg-home", "zbus_macros", "zbus_names", "zvariant", @@ -5375,58 +7120,89 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.10.0" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4832059b438689017db7340580ebabba07f114eab91bf990c6e55052408b40d8" +checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "regex", "syn 1.0.109", + "zvariant_utils", ] [[package]] name = "zbus_names" -version = "2.5.1" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82441e6033be0a741157a72951a3e4957d519698f3a824439cc131c5ba77ac2a" +checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" dependencies = [ - "serde 1.0.164", + "serde 1.0.210", "static_assertions", "zvariant", ] +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + [[package]] name = "zstd" -version = "0.12.3+zstd.1.5.2" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "6.0.5+zstd.1.5.4" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56d9e60b4b1758206c238a10165fbcae3ca37b01744e394c463463f6529d23b" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ - "libc", "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", - "libc", "pkg-config", ] +[[package]] +name = "zune-core" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" + [[package]] name = "zune-inflate" version = "0.2.54" @@ -5436,29 +7212,38 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "zune-jpeg" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16099418600b4d8f028622f73ff6e3deaabdff330fb9a2a131dea781ee8b0768" +dependencies = [ + "zune-core", +] + [[package]] name = "zvariant" -version = "3.14.0" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622cc473f10cef1b0d73b7b34a266be30ebdcfaea40ec297dd8cbda088f9f93c" +checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" dependencies = [ "byteorder", "enumflags2", "libc", - "serde 1.0.164", + "serde 1.0.210", "static_assertions", "zvariant_derive", ] [[package]] name = "zvariant_derive" -version = "3.14.0" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d9c1b57352c25b778257c661f3c4744b7cefb7fc09dd46909a153cce7773da2" +checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "syn 1.0.109", "zvariant_utils", ] @@ -5469,7 +7254,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.86", + "quote 1.0.37", "syn 1.0.109", ] diff --git a/app/Cargo.toml b/app/Cargo.toml index 87fdcdd..e7809a5 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -13,45 +13,46 @@ license = "GPL-3.0" legion-rgb-driver = { path = "../driver" } # Cli -clap = { version = "4.1.2", features = ["color", "cargo", "derive"] } +clap = { version = "4.5.17", features = ["color", "cargo", "derive"] } # Ui -eframe = "0.23.0" -egui-modal = "0.2.5" +eframe = "0.28.1" +egui-modal = "0.4.0" # egui-modal = { git = "https://github.com/n00kii/egui-modal", rev = "8443238" } -egui_file = "0.11.0" -egui-notify = "0.10.0" +egui_file = "0.18.0" +egui-notify = "0.15.0" # egui-notify = { git = "https://github.com/ItsEthra/egui-notify", rev = "bc5eb67" } # App window, taskbar and tray icon loading -image = "0.24.5" +image = "0.25.2" # AmbientLight effect -scrap = { git = "https://github.com/rustdesk/rustdesk", rev = "6c15dd6", features = [ +scrap = { git = "https://github.com/rustdesk/rustdesk", rev = "40af9dc", features = [ "wayland", + # "linux-pkg-config", ] } -fast_image_resize = "2.4.0" +fast_image_resize = "4.2.1" # default-features = false just removes the use_wasm feature that removes a lot of unecessary slack # since this app wont ever use the web # photon-rs = { version = "0.3.2", default-features = false } -photon-rs = { git = "https://github.com/silvia-odwyer/photon", rev = "3e8a2a6", default-features = false } +photon-rs = { git = "https://github.com/silvia-odwyer/photon", rev = "d084f68", default-features = false } # Keyboard and mouse grabbing -device_query = "1.1.3" +device_query = "2.1.0" rand = "0.8.5" -strum = "0.25.0" -strum_macros = "0.25.2" -serde = { version = "1.0.152", features = ["derive"] } -serde_json = "1.0.91" -color-eyre = "0.6.2" -sysinfo = "0.29.0" -crossbeam-channel = "0.5.8" -thiserror = "1.0.38" +strum = "0.26.3" +strum_macros = "0.26.4" +serde = { version = "1.0.210", features = ["derive"] } +serde_json = "1.0.128" +color-eyre = "0.6.3" +sysinfo = "0.31.4" +crossbeam-channel = "0.5.13" +thiserror = "1.0.63" single-instance = "0.3.3" -open = "5.0.0" -error-stack = "0.4.1" +open = "5.3.0" +error-stack = "0.5.0" winapi = { version = "0.3.9", features = ["consoleapi", "wincon"] } # Fix versions to stop cargo from yelling about dependency resolution @@ -60,10 +61,10 @@ winapi = { version = "0.3.9", features = ["consoleapi", "wincon"] } [target.'cfg(target_os = "windows")'.dependencies] -tray-item = { version = "0.8.0" } +tray-item = { version = "0.10.0" } [target.'cfg(target_os = "linux")'.dependencies] -tray-item = { version = "0.8.0", features = ["ksni"] } +tray-item = { version = "0.10.0", features = ["ksni"] } [build-dependencies] windres = "0.2.2" diff --git a/app/src/effects/ambient.rs b/app/src/effects/ambient.rs index 02500a7..fa3d5f1 100644 --- a/app/src/effects/ambient.rs +++ b/app/src/effects/ambient.rs @@ -1,5 +1,4 @@ use std::{ - num::NonZeroU32, sync::atomic::Ordering, thread, time::{Duration, Instant}, @@ -8,12 +7,12 @@ use std::{ use fast_image_resize as fr; use fr::Resizer; -use scrap::{Capturer, Display, Frame, TraitCapturer}; +use scrap::{Capturer, Display, Frame, TraitCapturer, TraitPixelBuffer}; #[derive(Clone, Copy)] struct ScreenDimensions { - src: (NonZeroU32, NonZeroU32), - dest: (NonZeroU32, NonZeroU32), + src: (u32, u32), + dest: (u32, u32), } pub(super) struct AmbientLight; @@ -24,15 +23,15 @@ impl AmbientLight { //Display setup let display = Display::all().unwrap().remove(0); - let mut capturer = Capturer::new(display, false).expect("Couldn't begin capture."); + let mut capturer = Capturer::new(display).expect("Couldn't begin capture."); let dimensions = ScreenDimensions { - src: (NonZeroU32::new(capturer.width() as u32).unwrap(), NonZeroU32::new(capturer.height() as u32).unwrap()), - dest: (NonZeroU32::new(4).unwrap(), NonZeroU32::new(1).unwrap()), + src: (capturer.width() as u32, capturer.height() as u32), + dest: (4, 1), }; let seconds_per_frame = Duration::from_nanos(1_000_000_000 / u64::from(fps)); - let mut resizer = fr::Resizer::new(fr::ResizeAlg::Convolution(fr::FilterType::Box)); + let mut resizer = fr::Resizer::new(); #[cfg(target_os = "windows")] let mut try_gdi = 1; @@ -43,7 +42,7 @@ impl AmbientLight { #[allow(clippy::single_match)] match capturer.frame(seconds_per_frame) { Ok(frame) => { - let rgb = process_frame(&frame, dimensions, &mut resizer, saturation_boost); + let rgb = process_frame(frame, dimensions, &mut resizer, saturation_boost); manager.keyboard.set_colors_to(&rgb).unwrap(); #[cfg(target_os = "windows")] @@ -83,36 +82,34 @@ impl AmbientLight { } } -fn process_frame(frame: &Frame, dimensions: ScreenDimensions, resizer: &mut Resizer, saturation_boost: f32) -> [u8; 12] { +fn process_frame(frame: Frame, dimensions: ScreenDimensions, resizer: &mut Resizer, saturation_boost: f32) -> [u8; 12] { // Adapted from https://github.com/Cykooz/fast_image_resize#resize-image // Read source image from file // HACK: Override opacity manually to ensure some kind of output because of jank elsewhere - let mut frame_vec = frame.to_vec(); + let Frame::PixelBuffer(buf) = frame else { + unreachable!("Attempted to extract vec from Texture variant in the Ambient effect"); + }; - for rgba in frame_vec.chunks_exact_mut(4) { - rgba[3] = 255; - } - - let mut src_image = fr::Image::from_vec_u8(dimensions.src.0, dimensions.src.1, frame_vec, fr::PixelType::U8x4).unwrap(); + let frame_vec = buf.data().to_vec(); + // for rgba in frame_vec.chunks_exact_mut(4) { + // rgba[3] = 255; + // } - // Create MulDiv instance - let alpha_mul_div: fr::MulDiv = fr::MulDiv::default(); - // Multiple RGB channels of source image by alpha channel - alpha_mul_div.multiply_alpha_inplace(&mut src_image.view_mut()).unwrap(); + let src_image = fr::images::Image::from_vec_u8(dimensions.src.0, dimensions.src.1, frame_vec, fr::PixelType::U8x4).unwrap(); // Create container for data of destination image - let mut dst_image = fr::Image::new(dimensions.dest.0, dimensions.dest.1, fr::PixelType::U8x4); + let mut dst_image = fr::images::Image::new(dimensions.dest.0, dimensions.dest.1, fr::PixelType::U8x4); // Get mutable view of destination image data - let mut dst_view = dst_image.view_mut(); + // let mut dst_view = dst_image.view_mut(); // Create Resizer instance and resize source image // into buffer of destination image - resizer.resize(&src_image.view(), &mut dst_view).unwrap(); + resizer.resize(&src_image, &mut dst_image, None).unwrap(); // Divide RGB channels of destination image by alpha - alpha_mul_div.divide_alpha_inplace(&mut dst_view).unwrap(); + // alpha_mul_div.divide_alpha_inplace(&mut dst_view).unwrap(); let bgr_arr = dst_image.buffer(); diff --git a/app/src/effects/ripple.rs b/app/src/effects/ripple.rs index 1349e0a..d2818d9 100644 --- a/app/src/effects/ripple.rs +++ b/app/src/effects/ripple.rs @@ -48,7 +48,7 @@ impl Ripple { Keycode::Z, Keycode::X, Keycode::LControl, - Keycode::Meta, + Keycode::LMeta, Keycode::LAlt, ]; let keys_zone_2: [Keycode; 29] = [ diff --git a/app/src/effects/temperature.rs b/app/src/effects/temperature.rs index bc9c95e..83eddc2 100644 --- a/app/src/effects/temperature.rs +++ b/app/src/effects/temperature.rs @@ -1,6 +1,6 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; -use sysinfo::{ComponentExt, System, SystemExt}; +use sysinfo::{Components, System}; pub(super) struct Temperature; @@ -19,7 +19,9 @@ impl Temperature { let mut sys = System::new_all(); sys.refresh_all(); - for component in sys.components_mut() { + let mut components = Components::new_with_refreshed_list(); + + for component in components.iter_mut() { if component.label().contains("Tctl") { while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { component.refresh(); diff --git a/app/src/gui/effect_options.rs b/app/src/gui/effect_options.rs index 75954be..4ca2cb7 100644 --- a/app/src/gui/effect_options.rs +++ b/app/src/gui/effect_options.rs @@ -32,9 +32,7 @@ impl EffectOptions { } }); - ui.scope(|ui| { - ui.set_enabled(profile.effect.takes_direction()); - + ui.add_enabled_ui(profile.effect.takes_direction(), |ui| { ComboBox::from_label("Direction") .width(COMBOBOX_WIDTH) .selected_text({ diff --git a/app/src/gui/mod.rs b/app/src/gui/mod.rs index 779c185..6182b51 100644 --- a/app/src/gui/mod.rs +++ b/app/src/gui/mod.rs @@ -5,7 +5,7 @@ use device_query::{DeviceQuery, Keycode}; #[cfg(debug_assertions)] use eframe::egui::style::DebugOptions; use eframe::{ - egui::{CentralPanel, Context, Frame, Layout, ScrollArea, Style, TopBottomPanel}, + egui::{CentralPanel, Context, Frame, Layout, ScrollArea, Style, TopBottomPanel, ViewportCommand}, emath::Align, epaint::{Color32, Rounding, Vec2}, CreationContext, @@ -33,7 +33,6 @@ pub struct App { settings: Settings, instance_not_unique: bool, - hide_window: bool, window_open_rx: Option>, // The tray struct needs to be kept from being dropped for the tray to appear on windows // If this is none it will be assumed there's no tray regardless of cause @@ -51,7 +50,6 @@ pub struct App { } pub enum GuiMessage { - ShowWindow, CycleProfiles, Quit, } @@ -65,7 +63,7 @@ pub enum CustomEffectState { } impl App { - pub fn new(output: OutputType, hide_window: bool, tx: Sender, rx: Receiver) -> Self { + pub fn new(output: OutputType, tx: Sender, rx: Receiver) -> Self { let manager_result = EffectManager::new(effects::OperationMode::Gui); let instance_not_unique = if let Err(err) = &manager_result { @@ -84,7 +82,6 @@ impl App { settings, instance_not_unique, - hide_window, window_open_rx: Some(rx), tray: None, @@ -111,7 +108,9 @@ impl App { app } - pub fn init(mut self, cc: &CreationContext<'_>, gui_sender: Sender) -> Self { + pub fn init(mut self, cc: &CreationContext<'_>, gui_sender: Sender, hide_window: bool) -> Self { + cc.egui_ctx.send_viewport_cmd(ViewportCommand::Visible(!hide_window)); + //Create the tray icon #[cfg(target_os = "linux")] let tray_icon = load_tray_icon(include_bytes!("../../res/trayIcon.ico")); @@ -125,12 +124,13 @@ impl App { self.tray = if let Ok(mut tray) = tray_result { let mut is_err = false; - let show_sender = gui_sender.clone(); let egui_ctx = cc.egui_ctx.clone(); is_err |= tray .add_menu_item("Show", move || { egui_ctx.request_repaint(); - show_sender.send(GuiMessage::ShowWindow).unwrap() + + egui_ctx.send_viewport_cmd(ViewportCommand::Visible(true)); + egui_ctx.send_viewport_cmd(ViewportCommand::Focus); }) .is_err(); @@ -161,7 +161,7 @@ impl App { loop { let keys = state.get_keys(); - if keys.contains(&Keycode::Meta) && keys.contains(&Keycode::RAlt) { + if keys.contains(&Keycode::LMeta) && keys.contains(&Keycode::RAlt) { if !lock_switching { let _ = gui_sender.send(GuiMessage::CycleProfiles); ctx.request_repaint(); @@ -183,11 +183,10 @@ impl App { } impl eframe::App for App { - fn update(&mut self, ctx: &eframe::egui::Context, frame: &mut eframe::Frame) { + fn update(&mut self, ctx: &eframe::egui::Context, _frame: &mut eframe::Frame) { if let Some(rx) = &self.window_open_rx { if let Ok(message) = rx.try_recv() { match message { - GuiMessage::ShowWindow => self.hide_window = false, GuiMessage::CycleProfiles => self.cycle_profiles(), GuiMessage::Quit => self.exit_app(), } @@ -203,7 +202,7 @@ impl eframe::App for App { self.exit_app(); }; - frame.set_visible(!self.hide_window); + // frame.set_visible(!self.hide_window); TopBottomPanel::top("top-panel").show(ctx, |ui| { self.menu_bar.show(ctx, ui, &mut self.settings.current_profile, &mut self.custom_effect, &mut self.profile_changed); @@ -216,9 +215,9 @@ impl eframe::App for App { ui.with_layout(Layout::left_to_right(Align::Center).with_cross_justify(true), |ui| { ui.vertical(|ui| { - let res = ui.scope(|ui| { - ui.set_enabled(self.settings.current_profile.effect.takes_color_array() && matches!(self.custom_effect, CustomEffectState::None)); + let can_tweak_colors = self.settings.current_profile.effect.takes_color_array() && matches!(self.custom_effect, CustomEffectState::None); + let res = ui.add_enabled_ui(can_tweak_colors, |ui| { ui.style_mut().spacing.item_spacing.y = self.theme.spacing.medium; let response = ui.horizontal(|ui| { @@ -244,8 +243,7 @@ impl eframe::App for App { ui.set_width(res.inner.rect.width()); - ui.scope(|ui| { - ui.set_enabled(matches!(self.custom_effect, CustomEffectState::None)); + ui.add_enabled_ui(matches!(self.custom_effect, CustomEffectState::None), |ui| { self.effect_options.show(ui, &mut self.settings.current_profile, &mut self.profile_changed, &self.theme.spacing); }); @@ -297,14 +295,14 @@ impl eframe::App for App { self.profile_changed = false; } - } - fn on_close_event(&mut self) -> bool { - if self.tray.is_some() { - self.hide_window = true; - false - } else { - true + if ctx.input(|i| i.viewport().close_requested()) { + if self.tray.is_some() { + ctx.send_viewport_cmd(ViewportCommand::CancelClose); + ctx.send_viewport_cmd(ViewportCommand::Visible(false)); + } else { + // Close normally + } } } @@ -328,8 +326,8 @@ impl App { show_expand_width: false, show_expand_height: false, show_resize: false, - show_blocking_widget: false, show_interactive_widgets: false, + show_widget_hits: false, }, ..Style::default() }; diff --git a/app/src/gui/profile_list.rs b/app/src/gui/profile_list.rs index 6f70b3d..1116a9c 100644 --- a/app/src/gui/profile_list.rs +++ b/app/src/gui/profile_list.rs @@ -39,8 +39,7 @@ impl ProfileList { modal.button(ui, "Cancel"); - ui.scope(|ui| { - ui.set_enabled(!is_empty && !name_not_unique); + ui.add_enabled_ui(!is_empty && !name_not_unique, |ui| { if modal.button(ui, "Save").clicked() { current_profile.name = self.new_profile_name.clone(); self.profiles.push(current_profile.clone()); diff --git a/app/src/main.rs b/app/src/main.rs index ebed731..c94691d 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -13,7 +13,7 @@ mod util; use cli::{GuiCommand, OutputType}; use color_eyre::{eyre::eyre, Result}; -use eframe::{epaint::Vec2, IconData}; +use eframe::{egui::IconData, epaint::Vec2}; use gui::{App, GuiMessage}; const WINDOW_SIZE: Vec2 = Vec2::new(500., 400.); @@ -84,19 +84,20 @@ fn init() -> Result<()> { fn start_ui(output_type: OutputType, hide_window: bool) { let app_icon = load_icon_data(include_bytes!("../res/trayIcon.ico")); let native_options = eframe::NativeOptions { - initial_window_size: Some(WINDOW_SIZE), - min_window_size: Some(WINDOW_SIZE), - max_window_size: Some(WINDOW_SIZE), - icon_data: Some(app_icon), + viewport: eframe::egui::ViewportBuilder::default() + .with_inner_size(WINDOW_SIZE) + .with_min_inner_size(WINDOW_SIZE) + .with_max_inner_size(WINDOW_SIZE) + .with_icon(app_icon), ..eframe::NativeOptions::default() }; let (gui_sender, gui_receiver) = crossbeam_channel::unbounded::(); let gui_sender_clone = gui_sender.clone(); - let app = App::new(output_type, hide_window, gui_sender_clone, gui_receiver); + let app = App::new(output_type, gui_sender_clone, gui_receiver); - eframe::run_native("Legion RGB", native_options, Box::new(|cc| Box::new(app.init(cc, gui_sender)))).unwrap(); + eframe::run_native("Legion RGB", native_options, Box::new(move |cc| Ok(Box::new(app.init(cc, gui_sender, hide_window))))).unwrap(); } #[must_use] diff --git a/driver/Cargo.toml b/driver/Cargo.toml index cf60c68..9a7dd09 100644 --- a/driver/Cargo.toml +++ b/driver/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -thiserror = "1.0.38" -hidapi = { version = "2.1.2", default-features = false, features = [ +thiserror = "1.0.63" +hidapi = { version = "2.6.3", default-features = false, features = [ "linux-static-libusb", ] } diff --git a/flake.lock b/flake.lock index 8c9aaa6..1400884 100644 --- a/flake.lock +++ b/flake.lock @@ -1,17 +1,12 @@ { "nodes": { "crane": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, "locked": { - "lastModified": 1703439018, - "narHash": "sha256-VT+06ft/x3eMZ1MJxWzQP3zXFGcrxGo5VR2rB7t88hs=", + "lastModified": 1725409566, + "narHash": "sha256-PrtLmqhM6UtJP7v7IGyzjBFhbG4eOAHT6LPYOFmYfbk=", "owner": "ipetkov", "repo": "crane", - "rev": "afdcd41180e3dfe4dac46b5ee396e3b12ccc967a", + "rev": "7e4586bad4e3f8f97a9271def747cf58c4b68f3c", "type": "github" }, "original": { @@ -25,11 +20,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -40,11 +35,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1703499205, - "narHash": "sha256-lF9rK5mSUfIZJgZxC3ge40tp1gmyyOXZ+lRY3P8bfbg=", + "lastModified": 1726583932, + "narHash": "sha256-zACxiQx8knB3F8+Ze+1BpiYrI+CbhxyWpcSID9kVhkQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e1fa12d4f6c6fe19ccb59cac54b5b3f25e160870", + "rev": "658e7223191d2598641d50ee4e898126768fe847", "type": "github" }, "original": { @@ -64,19 +59,16 @@ }, "rust-overlay": { "inputs": { - "flake-utils": [ - "flake-utils" - ], "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1703902408, - "narHash": "sha256-qXdWvu+tlgNjeoz8yQMRKSom6QyRROfgpmeOhwbujqw=", + "lastModified": 1726712837, + "narHash": "sha256-Ob7DNyHKtOQpWetmNj/V+OgMkGXh6Ep1dNa6AN/4sSI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "319f57cd2c34348c55970a4bf2b35afe82088681", + "rev": "6283b1d6ca31fa320ecee82806123e773b2ff993", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e2f4ebe..8810ec5 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ crane = { url = "github:ipetkov/crane"; - inputs.nixpkgs.follows = "nixpkgs"; + # inputs.nixpkgs.follows = "nixpkgs"; }; flake-utils.url = "github:numtide/flake-utils"; @@ -15,7 +15,7 @@ url = "github:oxalica/rust-overlay"; inputs = { nixpkgs.follows = "nixpkgs"; - flake-utils.follows = "flake-utils"; + # flake-utils.follows = "flake-utils"; }; }; }; @@ -28,7 +28,7 @@ overlays = [ (import rust-overlay) ]; }; - rustVersion = "1.73.0"; + rustVersion = "1.81.0"; rust = pkgs.rust-bin.stable.${rustVersion}.default.override { extensions = [ @@ -60,55 +60,15 @@ freetype xorg.libXrandr libGL + wayland + libxkbcommon ] ++ sharedDeps; - - - # Manually simulate a vcpkg installation so that it can link the libraries - # properly. Borrowed and adapted from: https://github.com/NixOS/nixpkgs/blob/69a35ff92dc404bf04083be2fad4f3643b2152c9/pkgs/applications/networking/remote/rustdesk/default.nix#L51 - vcpkg = pkgs.stdenv.mkDerivation { - pname = "vcpkg"; - version = "1.0.0"; - - unpackPhase = - let - vcpkg_target = "x64-linux"; - - updates_vcpkg_file = pkgs.writeText "update_vcpkg_legion-kb-rgb" - '' - Package : libyuv - Architecture : ${vcpkg_target} - Version : 1.0 - Status : is installed - Package : libvpx - Architecture : ${vcpkg_target} - Version : 1.0 - Status : is installed - ''; - in - '' - mkdir -p vcpkg/.vcpkg-root - mkdir -p vcpkg/installed/${vcpkg_target}/lib - mkdir -p vcpkg/installed/vcpkg/updates - ln -s ${updates_vcpkg_file} vcpkg/installed/vcpkg/status - mkdir -p vcpkg/installed/vcpkg/info - touch vcpkg/installed/vcpkg/info/libyuv_1.0_${vcpkg_target}.list - touch vcpkg/installed/vcpkg/info/libvpx_1.0_${vcpkg_target}.list - ln -s ${pkgs.libvpx.out}/lib/* vcpkg/installed/${vcpkg_target}/lib/ - ln -s ${pkgs.libyuv.out}/lib/* vcpkg/installed/${vcpkg_target}/lib/ - ''; - - installPhase = '' - cp -r vcpkg $out - ''; - }; - envVars = rec { RUST_BACKTRACE = 1; # MOLD_PATH = "${pkgs.mold.out}/bin/mold"; # RUSTFLAGS = "-Clink-arg=-fuse-ld=${MOLD_PATH} -Clinker=clang"; LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib"; - VCPKG_ROOT = "${vcpkg.out}"; }; # Allow a few more files to be included in the build workspace @@ -126,10 +86,12 @@ filter = workspaceFilter; }; + # https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ru/rustdesk/package.nix buildInputs = with pkgs; [ libvpx libyuv + libaom ] ++ sharedDeps ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [ ]; @@ -144,11 +106,14 @@ stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.stdenv; + # Forgo using VCPKG hacks on local builds because pain + cargoExtraArgs = nixLib.optionals stdenv.isLinux ''--locked --features "scrap/linux-pkg-config"''; + inherit (craneLib.crateNameFromCargoToml { cargoToml = ./app/Cargo.toml; }) pname version; cargoArtifacts = craneLib.buildDepsOnly ({ - inherit pname version src buildInputs nativeBuildInputs stdenv; + inherit pname version src buildInputs nativeBuildInputs stdenv cargoExtraArgs; # This magic thing here is needed otherwise the build fails # https://github.com/ipetkov/crane/issues/411#issuecomment-1743441117 @@ -159,7 +124,7 @@ # The main application derivation legion-kb-rgb = craneLib.buildPackage ({ - inherit pname version src cargoArtifacts buildInputs nativeBuildInputs stdenv; + inherit pname version src cargoArtifacts buildInputs nativeBuildInputs stdenv cargoExtraArgs; doCheck = false; @@ -188,7 +153,7 @@ in pkgs.mkShell { LD_LIBRARY_PATH = nixLib.makeLibraryPath deps; - inherit (envVars) VCPKG_ROOT LIBCLANG_PATH; + inherit (envVars) LIBCLANG_PATH; buildInputs = [ rust ] ++ deps; }; diff --git a/vcpkg.json b/vcpkg.json index 65d9935..efb1d16 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,5 +1,5 @@ { "name": "l5p-kb-rgb", "version-string": "0.1.0", - "dependencies": ["libvpx", "libyuv"] + "dependencies": ["libvpx", "libyuv", "aom"] } From d2b8f35415f199530d9fe761d5d6a2324a3709af Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Sat, 26 Oct 2024 13:30:50 +0200 Subject: [PATCH 02/15] Disable running in the background for wayland --- app/src/gui/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/gui/mod.rs b/app/src/gui/mod.rs index 6182b51..28ae34b 100644 --- a/app/src/gui/mod.rs +++ b/app/src/gui/mod.rs @@ -297,7 +297,7 @@ impl eframe::App for App { } if ctx.input(|i| i.viewport().close_requested()) { - if self.tray.is_some() { + if self.tray.is_some() && !std::env::var("WAYLAND_DISPLAY").is_ok() { ctx.send_viewport_cmd(ViewportCommand::CancelClose); ctx.send_viewport_cmd(ViewportCommand::Visible(false)); } else { From 64c98d3a1fb651156b4911bab50e0ce31338e872 Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Sat, 26 Oct 2024 18:33:10 +0200 Subject: [PATCH 03/15] Delete deny.toml --- deny.toml | 210 ------------------------------------------------------ 1 file changed, 210 deletions(-) delete mode 100644 deny.toml diff --git a/deny.toml b/deny.toml deleted file mode 100644 index 3233074..0000000 --- a/deny.toml +++ /dev/null @@ -1,210 +0,0 @@ -# This template contains all of the possible sections and their default values - -# Note that all fields that take a lint level have these possible values: -# * deny - An error will be produced and the check will fail -# * warn - A warning will be produced, but the check will not fail -# * allow - No warning or error will be produced, though in some cases a note -# will be - -# The values provided in this template are the default values that will be used -# when any section or field is not specified in your own configuration - -# If 1 or more target triples (and optionally, target_features) are specified, -# only the specified targets will be checked when running `cargo deny check`. -# This means, if a particular package is only ever used as a target specific -# dependency, such as, for example, the `nix` crate only being used via the -# `target_family = "unix"` configuration, that only having windows targets in -# this list would mean the nix crate, as well as any of its exclusive -# dependencies not shared by any other crates, would be ignored, as the target -# list here is effectively saying which targets you are building for. -targets = [ - # The triple can be any string, but only the target triples built in to - # rustc (as of 1.40) can be checked against actual config expressions - #{ triple = "x86_64-unknown-linux-musl" }, - # You can also specify which target_features you promise are enabled for a - # particular target. target_features are currently not validated against - # the actual valid features supported by the target architecture. - #{ triple = "wasm32-unknown-unknown", features = ["atomics"] }, -] - -# This section is considered when running `cargo deny check advisories` -# More documentation for the advisories section can be found here: -# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html -[advisories] -# The path where the advisory database is cloned/fetched into -db-path = "~/.cargo/advisory-db" -# The url(s) of the advisory databases to use -db-urls = ["https://github.com/rustsec/advisory-db"] -# The lint level for security vulnerabilities -vulnerability = "deny" -# The lint level for unmaintained crates -unmaintained = "warn" -# The lint level for crates that have been yanked from their source registry -yanked = "warn" -# The lint level for crates with security notices. Note that as of -# 2019-12-17 there are no security notice advisories in -# https://github.com/rustsec/advisory-db -notice = "warn" -# A list of advisory IDs to ignore. Note that ignored advisories will still -# output a note when they are encountered. -ignore = [ - #"RUSTSEC-0000-0000", -] -# Threshold for security vulnerabilities, any vulnerability with a CVSS score -# lower than the range specified will be ignored. Note that ignored advisories -# will still output a note when they are encountered. -# * None - CVSS Score 0.0 -# * Low - CVSS Score 0.1 - 3.9 -# * Medium - CVSS Score 4.0 - 6.9 -# * High - CVSS Score 7.0 - 8.9 -# * Critical - CVSS Score 9.0 - 10.0 -#severity-threshold = - -# This section is considered when running `cargo deny check licenses` -# More documentation for the licenses section can be found here: -# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html -[licenses] -# The lint level for crates which do not have a detectable license -unlicensed = "deny" -# List of explicitly allowed licenses -# See https://spdx.org/licenses/ for list of possible licenses -# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. -allow = [ - "Unlicense", - "MIT", - "Apache-2.0", - "Apache-2.0 WITH LLVM-exception", - "ISC", - "BSD-3-Clause", - "BSD-2-Clause", - "Zlib", -] -# List of explicitly disallowed licenses -# See https://spdx.org/licenses/ for list of possible licenses -# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. -deny = [ - #"Nokia", -] -# Lint level for licenses considered copyleft -copyleft = "warn" -# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses -# * both - The license will be approved if it is both OSI-approved *AND* FSF -# * either - The license will be approved if it is either OSI-approved *OR* FSF -# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF -# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved -# * neither - This predicate is ignored and the default lint level is used -allow-osi-fsf-free = "neither" -# Lint level used when no other predicates are matched -# 1. License isn't in the allow or deny lists -# 2. License isn't copyleft -# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither" -default = "deny" -# The confidence threshold for detecting a license from license text. -# The higher the value, the more closely the license text must be to the -# canonical license text of a valid SPDX license file. -# [possible values: any between 0.0 and 1.0]. -confidence-threshold = 0.8 -# Allow 1 or more licenses on a per-crate basis, so that particular licenses -# aren't accepted for every possible crate as with the normal allow list -exceptions = [ - # Each entry is the crate and version constraint, and its specific allow - # list - #{ allow = ["Zlib"], name = "adler32", version = "*" }, -] - -# Some crates don't have (easily) machine readable licensing information, -# adding a clarification entry for it allows you to manually specify the -# licensing information -#[[licenses.clarify]] -# The name of the crate the clarification applies to -#name = "ring" -# The optional version constraint for the crate -#version = "*" -# The SPDX expression for the license requirements of the crate -#expression = "MIT AND ISC AND OpenSSL" -# One or more files in the crate's source used as the "source of truth" for -# the license expression. If the contents match, the clarification will be used -# when running the license check, otherwise the clarification will be ignored -# and the crate will be checked normally, which may produce warnings or errors -# depending on the rest of your configuration -#license-files = [ -# Each entry is a crate relative path, and the (opaque) hash of its contents -#{ path = "LICENSE", hash = 0xbd0eed23 } -#] - -[licenses.private] -# If true, ignores workspace crates that aren't published, or are only -# published to private registries. -# To see how to mark a crate as unpublished (to the official registry), -# visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field. -ignore = false -# One or more private registries that you might publish crates to, if a crate -# is only published to private registries, and ignore is true, the crate will -# not have its license(s) checked -registries = [ - #"https://sekretz.com/registry -] - -# This section is considered when running `cargo deny check bans`. -# More documentation about the 'bans' section can be found here: -# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html -[bans] -# Lint level for when multiple versions of the same crate are detected -multiple-versions = "warn" -# Lint level for when a crate version requirement is `*` -wildcards = "allow" -# The graph highlighting used when creating dotgraphs for crates -# with multiple versions -# * lowest-version - The path to the lowest versioned duplicate is highlighted -# * simplest-path - The path to the version with the fewest edges is highlighted -# * all - Both lowest-version and simplest-path are used -highlight = "all" -# List of crates that are allowed. Use with care! -allow = [ - #{ name = "ansi_term", version = "=0.11.0" }, -] -# List of crates to deny -deny = [ - # Each entry the name of a crate and a version range. If version is - # not specified, all versions will be matched. - #{ name = "ansi_term", version = "=0.11.0" }, - # - # Wrapper crates can optionally be specified to allow the crate when it - # is a direct dependency of the otherwise banned crate - #{ name = "ansi_term", version = "=0.11.0", wrappers = [] }, -] -# Certain crates/versions that will be skipped when doing duplicate detection. -skip = [ - #{ name = "ansi_term", version = "=0.11.0" }, -] -# Similarly to `skip` allows you to skip certain crates during duplicate -# detection. Unlike skip, it also includes the entire tree of transitive -# dependencies starting at the specified crate, up to a certain depth, which is -# by default infinite -skip-tree = [ - #{ name = "ansi_term", version = "=0.11.0", depth = 20 }, -] - -# This section is considered when running `cargo deny check sources`. -# More documentation about the 'sources' section can be found here: -# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html -[sources] -# Lint level for what to happen when a crate from a crate registry that is not -# in the allow list is encountered -unknown-registry = "warn" -# Lint level for what to happen when a crate from a git repository that is not -# in the allow list is encountered -unknown-git = "warn" -# List of URLs for allowed crate registries. Defaults to the crates.io index -# if not specified. If it is specified but empty, no registries are allowed. -allow-registry = ["https://github.com/rust-lang/crates.io-index"] -# List of URLs for allowed Git repositories -allow-git = [] - -[sources.allow-org] -# 1 or more github.com organizations to allow git sources for -github = [""] -# 1 or more gitlab.com organizations to allow git sources for -gitlab = [""] -# 1 or more bitbucket.org organizations to allow git sources for -bitbucket = [""] From 11945efcff83d9f65346a313c88557cc2a6a3025 Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Mon, 4 Nov 2024 18:52:58 +0100 Subject: [PATCH 04/15] Migrate to tray-icon --- .github/workflows/compile-rust.yml | 6 +- .github/workflows/release-rust.yml | 6 +- Cargo.lock | 661 +++++++++++++++++++++-------- README.md | 9 +- app/Cargo.toml | 26 +- app/build.rs | 9 - app/src/gui/mod.rs | 137 +++--- app/src/main.rs | 10 +- app/src/tray.rs | 53 +++ flake.nix | 9 + 10 files changed, 664 insertions(+), 262 deletions(-) delete mode 100644 app/build.rs create mode 100644 app/src/tray.rs diff --git a/.github/workflows/compile-rust.yml b/.github/workflows/compile-rust.yml index c7ade72..c01cda3 100644 --- a/.github/workflows/compile-rust.yml +++ b/.github/workflows/compile-rust.yml @@ -21,13 +21,13 @@ jobs: artifact_name: target/debug/legion-kb-rgb asset_name: legion-kb-rgb-linux triplet: x64-linux - vcpkgCommitId: 'ab67d6306b5e9af69684af5ec761c97731e75834' + vcpkgCommitId: '335a153de3e398208df4d25eff89d831727bc5da' - name: windows os: windows-latest artifact_name: target/debug/legion-kb-rgb.exe asset_name: legion-kb-rgb-windows triplet: x64-windows-static - vcpkgCommitId: 'ab67d6306b5e9af69684af5ec761c97731e75834' + vcpkgCommitId: '335a153de3e398208df4d25eff89d831727bc5da' env: VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} @@ -55,7 +55,7 @@ jobs: if [ "$RUNNER_OS" == "Linux" ]; then sudo apt-get update -y sudo apt install -y libunwind-dev - sudo apt-get install -y libx11-dev nasm libdbus-1-dev libudev-dev libxcb-randr0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libxi-dev libxtst-dev libusb-1.0-0-dev + sudo apt-get install -y libx11-dev nasm libdbus-1-dev libudev-dev libxcb-randr0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libxi-dev libxtst-dev libusb-1.0-0-dev libpango1.0-dev libgtk-3-dev libxdo-dev libappindicator3-dev elif [ "$RUNNER_OS" == "macOS" ]; then brew install nasm elif [ "$RUNNER_OS" == "Windows" ]; then diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index ebe8e1b..4cd5aba 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -21,13 +21,13 @@ jobs: artifact_name: target/release/legion-kb-rgb asset_name: legion-kb-rgb-linux triplet: x64-linux - vcpkgCommitId: 'ab67d6306b5e9af69684af5ec761c97731e75834' + vcpkgCommitId: '335a153de3e398208df4d25eff89d831727bc5da' - name: windows os: windows-latest artifact_name: target/release/legion-kb-rgb.exe asset_name: legion-kb-rgb-windows triplet: x64-windows-static - vcpkgCommitId: 'ab67d6306b5e9af69684af5ec761c97731e75834' + vcpkgCommitId: '335a153de3e398208df4d25eff89d831727bc5da' env: VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} @@ -55,7 +55,7 @@ jobs: if [ "$RUNNER_OS" == "Linux" ]; then sudo apt-get update -y sudo apt install -y libunwind-dev - sudo apt-get install -y libx11-dev nasm libdbus-1-dev libudev-dev libxcb-randr0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libxi-dev libxtst-dev libusb-1.0-0-dev + sudo apt-get install -y libx11-dev nasm libdbus-1-dev libudev-dev libxcb-randr0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libxi-dev libxtst-dev libusb-1.0-0-dev libpango1.0-dev libgtk-3-dev libxdo-dev libappindicator3-dev elif [ "$RUNNER_OS" == "macOS" ]; then brew install nasm elif [ "$RUNNER_OS" == "Windows" ]; then diff --git a/Cargo.lock b/Cargo.lock index 531db65..6f771ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -517,6 +517,29 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "atk" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" +dependencies = [ + "atk-sys", + "glib 0.18.5", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" +dependencies = [ + "glib-sys 0.18.1", + "gobject-sys 0.18.0", + "libc", + "system-deps 6.1.1", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -725,6 +748,9 @@ name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde 1.0.210", +] [[package]] name = "bitstream-io" @@ -860,6 +886,31 @@ dependencies = [ "serde 1.0.210", ] +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.6.0", + "cairo-sys-rs", + "glib 0.18.5", + "libc", + "once_cell", + "thiserror", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys 0.18.1", + "libc", + "system-deps 6.1.1", +] + [[package]] name = "calloop" version = "0.12.4" @@ -1067,37 +1118,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "cocoa" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation 0.9.4", - "core-graphics", - "foreign-types 0.5.0", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation 0.9.4", - "core-graphics-types", - "foreign-types 0.3.2", - "libc", - "objc", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -1188,12 +1208,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "concat-string" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7439becb5fafc780b6f4de382b1a7a3e70234afe783854a4702ee8adbb838609" - [[package]] name = "concurrent-queue" version = "2.5.0" @@ -1257,7 +1271,20 @@ checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", "core-foundation 0.9.4", - "core-graphics-types", + "core-graphics-types 0.1.3", + "foreign-types 0.5.0", + "libc", +] + +[[package]] +name = "core-graphics" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.10.0", + "core-graphics-types 0.2.0", "foreign-types 0.5.0", "libc", ] @@ -1273,6 +1300,17 @@ dependencies = [ "libc", ] +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.10.0", + "libc", +] + [[package]] name = "cpufeatures" version = "0.2.8" @@ -1379,26 +1417,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "dbus-codegen" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a49da9fdfbe872d4841d56605dc42efa5e6ca3291299b87f44e1cde91a28617c" -dependencies = [ - "clap 2.34.0", - "dbus", - "xml-rs", -] - -[[package]] -name = "dbus-tree" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f456e698ae8e54575e19ddb1f9b7bce2298568524f215496b248eb9498b4f508" -dependencies = [ - "dbus", -] - [[package]] name = "deranged" version = "0.3.11" @@ -1454,6 +1472,15 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + [[package]] name = "dirs-next" version = "2.0.0" @@ -1464,6 +1491,18 @@ dependencies = [ "dirs-sys-next", ] +[[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 = "dirs-sys-next" version = "0.1.2" @@ -1528,6 +1567,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +[[package]] +name = "dpi" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" + [[package]] name = "dtoa" version = "0.4.8" @@ -1893,6 +1938,16 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset 0.9.0", + "rustc_version", +] + [[package]] name = "filetime" version = "0.2.21" @@ -1914,17 +1969,6 @@ dependencies = [ "toml 0.5.11", ] -[[package]] -name = "find-winsdk" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8cbf17b871570c1f8612b763bac3e86290602bcf5dc3c5ce657e0e1e9071d9e" -dependencies = [ - "serde 1.0.210", - "serde_derive", - "winreg 0.5.1", -] - [[package]] name = "flate2" version = "1.0.26" @@ -2137,6 +2181,64 @@ dependencies = [ "slab", ] +[[package]] +name = "gdk" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib 0.18.5", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib 0.18.5", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", + "libc", + "system-deps 6.1.1", +] + +[[package]] +name = "gdk-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", + "libc", + "pango-sys", + "pkg-config", + "system-deps 6.1.1", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -2197,6 +2299,38 @@ version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib 0.18.5", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys 0.18.1", + "gobject-sys 0.18.0", + "libc", + "system-deps 6.1.1", + "winapi", +] + [[package]] name = "gl_generator" version = "0.14.0" @@ -2220,13 +2354,36 @@ dependencies = [ "futures-executor", "futures-task", "futures-util", - "glib-macros", - "glib-sys", - "gobject-sys", + "glib-macros 0.10.1", + "glib-sys 0.10.1", + "gobject-sys 0.10.0", "libc", "once_cell", ] +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.6.0", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros 0.18.5", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror", +] + [[package]] name = "glib-macros" version = "0.10.1" @@ -2243,6 +2400,20 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.2", + "proc-macro-error", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + [[package]] name = "glib-sys" version = "0.10.1" @@ -2253,6 +2424,16 @@ dependencies = [ "system-deps 1.3.2", ] +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps 6.1.1", +] + [[package]] name = "glob" version = "0.3.1" @@ -2342,11 +2523,22 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "952133b60c318a62bf82ee75b93acc7e84028a093e06b9e27981c2b6fe68218c" dependencies = [ - "glib-sys", + "glib-sys 0.10.1", "libc", "system-deps 1.3.2", ] +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys 0.18.1", + "libc", + "system-deps 6.1.1", +] + [[package]] name = "gpu-alloc" version = "0.6.0" @@ -2410,9 +2602,9 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "glib", - "glib-sys", - "gobject-sys", + "glib 0.10.3", + "glib-sys 0.10.1", + "gobject-sys 0.10.0", "gstreamer-sys", "libc", "muldiv", @@ -2432,9 +2624,9 @@ dependencies = [ "bitflags 1.3.2", "futures-core", "futures-sink", - "glib", - "glib-sys", - "gobject-sys", + "glib 0.10.3", + "glib-sys 0.10.1", + "gobject-sys 0.10.0", "gstreamer", "gstreamer-app-sys", "gstreamer-base", @@ -2449,7 +2641,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "813f64275c9e7b33b828b9efcf9dfa64b95996766d4de996e84363ac65b87e3d" dependencies = [ - "glib-sys", + "glib-sys 0.10.1", "gstreamer-base-sys", "gstreamer-sys", "libc", @@ -2463,9 +2655,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bafd01c56f59cb10f4b5a10f97bb4bdf8c2b2784ae5b04da7e2d400cf6e6afcf" dependencies = [ "bitflags 1.3.2", - "glib", - "glib-sys", - "gobject-sys", + "glib 0.10.3", + "glib-sys 0.10.1", + "gobject-sys 0.10.0", "gstreamer", "gstreamer-base-sys", "gstreamer-sys", @@ -2478,8 +2670,8 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b7b6dc2d6e160a1ae28612f602bd500b3fa474ce90bf6bb2f08072682beef5" dependencies = [ - "glib-sys", - "gobject-sys", + "glib-sys 0.10.1", + "gobject-sys 0.10.0", "gstreamer-sys", "libc", "system-deps 1.3.2", @@ -2491,8 +2683,8 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1f154082d01af5718c5f8a8eb4f565a4ea5586ad8833a8fc2c2aa6844b601d" dependencies = [ - "glib-sys", - "gobject-sys", + "glib-sys 0.10.1", + "gobject-sys 0.10.0", "libc", "system-deps 1.3.2", ] @@ -2506,9 +2698,9 @@ dependencies = [ "bitflags 1.3.2", "futures-channel", "futures-util", - "glib", - "glib-sys", - "gobject-sys", + "glib 0.10.3", + "glib-sys 0.10.1", + "gobject-sys 0.10.0", "gstreamer", "gstreamer-base", "gstreamer-base-sys", @@ -2524,14 +2716,66 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92347e46438007d6a2386302125f62cb9df6769cdacb931af5c0f12c1ee21de4" dependencies = [ - "glib-sys", - "gobject-sys", + "glib-sys 0.10.1", + "gobject-sys 0.10.0", "gstreamer-base-sys", "gstreamer-sys", "libc", "system-deps 1.3.2", ] +[[package]] +name = "gtk" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib 0.18.5", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", + "libc", + "pango-sys", + "system-deps 6.1.1", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + [[package]] name = "half" version = "2.2.1" @@ -3032,6 +3276,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags 2.6.0", + "serde 1.0.210", + "unicode-segmentation", +] + [[package]] name = "khronos-egl" version = "6.0.0" @@ -3049,18 +3304,6 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" -[[package]] -name = "ksni" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4934310bdd016e55725482b8d35ac0c16fd058c1b955d8959aa2d953b918c85b" -dependencies = [ - "dbus", - "dbus-codegen", - "dbus-tree", - "thiserror", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -3093,6 +3336,7 @@ dependencies = [ "egui_file", "error-stack", "fast_image_resize", + "gtk", "image 0.25.2", "legion-rgb-driver", "open", @@ -3106,9 +3350,8 @@ dependencies = [ "strum_macros 0.26.4", "sysinfo 0.31.4", "thiserror", - "tray-item", + "tray-icon", "winapi", - "windres", ] [[package]] @@ -3119,6 +3362,30 @@ dependencies = [ "thiserror", ] +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib 0.18.5", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading 0.7.4", + "once_cell", +] + [[package]] name = "libc" version = "0.2.158" @@ -3177,6 +3444,25 @@ dependencies = [ "walkdir", ] +[[package]] +name = "libxdo" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00333b8756a3d28e78def82067a377de7fa61b24909000aeaa2b446a948d14db" +dependencies = [ + "libxdo-sys", +] + +[[package]] +name = "libxdo-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23b9e7e2b7831bbd8aac0bbeeeb7b68cbebc162b227e7052e8e55829a09212" +dependencies = [ + "libc", + "x11", +] + [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -3237,7 +3523,7 @@ source = "git+https://github.com/rustdesk-org/machine-uid#381ff579c1dc3a6c54db9d dependencies = [ "bindgen 0.59.2", "cc", - "winreg 0.11.0", + "winreg", ] [[package]] @@ -3328,7 +3614,7 @@ checksum = "5637e166ea14be6063a3f8ba5ccb9a4159df7d8f6d61c02fc3d480b1f90dcfcb" dependencies = [ "bitflags 2.6.0", "block", - "core-graphics-types", + "core-graphics-types 0.1.3", "foreign-types 0.5.0", "log", "objc", @@ -3372,6 +3658,26 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "muda" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8123dfd4996055ac9b15a60ad263b44b01e539007523ad7a4a533a3d93b0591" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "libxdo", + "objc2 0.5.2", + "objc2-app-kit", + "objc2-foundation", + "once_cell", + "png", + "thiserror", + "windows-sys 0.59.0", +] + [[package]] name = "muldiv" version = "0.2.1" @@ -3695,17 +4001,6 @@ dependencies = [ "malloc_buf", ] -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - [[package]] name = "objc-sys" version = "0.2.0-beta.2" @@ -3847,15 +4142,6 @@ dependencies = [ "objc2-metal", ] -[[package]] -name = "objc_id" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" -dependencies = [ - "objc", -] - [[package]] name = "object" version = "0.30.4" @@ -3926,6 +4212,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "orbclient" version = "0.3.45" @@ -3980,12 +4272,6 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" -[[package]] -name = "padlock" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c10569378a1dacd9f30dbe7ae49e054d2c45dc2f8ee49899903e09c3924e8b6f" - [[package]] name = "palette" version = "0.6.1" @@ -4010,6 +4296,31 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib 0.18.5", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys 0.18.1", + "gobject-sys 0.18.0", + "libc", + "system-deps 6.1.1", +] + [[package]] name = "parking" version = "2.1.0" @@ -4310,7 +4621,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.10", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -5048,6 +5369,7 @@ dependencies = [ "log", "ndk-context", "num_cpus", + "pkg-config", "serde 1.0.210", "serde_json 1.0.128", "target_build_utils", @@ -5836,14 +6158,14 @@ dependencies = [ "serde 1.0.210", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.19.10", ] [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde 1.0.210", ] @@ -5858,7 +6180,18 @@ dependencies = [ "serde 1.0.210", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.4.7", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.5.0", + "toml_datetime", + "winnow 0.5.40", ] [[package]] @@ -5916,20 +6249,23 @@ dependencies = [ ] [[package]] -name = "tray-item" -version = "0.10.0" +name = "tray-icon" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59d4bd406170690dc30eabb3badc67a085beaf9b2c3b1923afcc9c26a2191353" +checksum = "7c92af36a182b46206723bdf8a7942e20838cde1cf062e5b97854d57eb01763b" dependencies = [ - "cocoa", - "core-graphics", - "ksni", - "libc", - "objc", - "objc-foundation", - "objc_id", - "padlock", - "windows-sys 0.52.0", + "core-graphics 0.24.0", + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2 0.5.2", + "objc2-app-kit", + "objc2-foundation", + "once_cell", + "png", + "thiserror", + "windows-sys 0.59.0", ] [[package]] @@ -6460,7 +6796,7 @@ dependencies = [ "ash", "bitflags 2.6.0", "cfg_aliases", - "core-graphics-types", + "core-graphics-types 0.1.3", "glow", "glutin_wgl_sys", "gpu-alloc", @@ -6903,16 +7239,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windres" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82115619221b2b66001a39088b8059d171b1f9005a00d6a10c6e8a71a30a4cdc" -dependencies = [ - "concat-string", - "find-winsdk", -] - [[package]] name = "winit" version = "0.29.15" @@ -6927,7 +7253,7 @@ dependencies = [ "calloop 0.12.4", "cfg_aliases", "core-foundation 0.9.4", - "core-graphics", + "core-graphics 0.23.2", "cursor-icon", "icrate", "js-sys", @@ -6972,13 +7298,12 @@ dependencies = [ ] [[package]] -name = "winreg" -version = "0.5.1" +name = "winnow" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27a759395c1195c4cc5cda607ef6f8f6498f64e78f7900f5de0a127a424704a" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ - "serde 1.0.210", - "winapi", + "memchr", ] [[package]] diff --git a/README.md b/README.md index 2dab19f..c1533c9 100644 --- a/README.md +++ b/README.md @@ -182,14 +182,17 @@ This program has been tested to work on: - [Rust](https://www.rust-lang.org/tools/install) - [Git](https://git-scm.com/downloads) -- On Linux, you'll need additional dependencies: -#### Ubuntu +#### Linux (Ubuntu) ```sh -sudo apt-get install -y libclang-dev libxcb-shm0-dev libusb-1.0-0-dev libx11-dev nasm libdbus-1-dev libudev-dev libxcb-randr0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libxi-dev libxtst-dev +sudo apt-get install -y libclang-dev libxcb-shm0-dev libusb-1.0-0-dev libx11-dev nasm libdbus-1-dev libudev-dev libxcb-randr0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libxi-dev libxtst-dev libpango1.0-dev libgtk-3-dev libxdo-dev libappindicator3-dev ``` + + + + ### Using `cargo-make` Works on both Windows and Linux. diff --git a/app/Cargo.toml b/app/Cargo.toml index e7809a5..18b5283 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -55,27 +55,31 @@ open = "5.3.0" error-stack = "0.5.0" winapi = { version = "0.3.9", features = ["consoleapi", "wincon"] } -# Fix versions to stop cargo from yelling about dependency resolution - -# Dependabot alerts +# Tray icon +[target.'cfg(any(target_os = "macos", target_os = "windows"))'.dependencies] +tray-icon = { version = "0.19.1", default-features = false } +[target.'cfg(target_os = "linux")'.dependencies] +tray-icon = "0.19.1" +gtk = "0.18.1" -[target.'cfg(target_os = "windows")'.dependencies] -tray-item = { version = "0.10.0" } +# Fix versions to stop cargo from yelling about dependency resolution -[target.'cfg(target_os = "linux")'.dependencies] -tray-item = { version = "0.10.0", features = ["ksni"] } +# Dependabot alerts -[build-dependencies] -windres = "0.2.2" +# HACK: Add a dummy feature to the program because rust-analyzer doesn't want +# to enable linux-pkg-config itself for whatever reason +[features] +scrap-pkg-config = ["scrap/linux-pkg-config"] [package.metadata.vcpkg] git = "https://github.com/microsoft/vcpkg" -rev = "f6a5d4e" +rev = "335a153" [package.metadata.vcpkg.target] -x86_64-unknown-linux-gnu = { dependencies = ["libvpx", "libyuv"] } +x86_64-unknown-linux-gnu = { dependencies = ["libvpx", "libyuv", "aom"] } x86_64-pc-windows-msvc = { dependencies = [ "libvpx:x64-windows-static", "libyuv:x64-windows-static", + "aom:x64-windows-static", ] } diff --git a/app/build.rs b/app/build.rs deleted file mode 100644 index e55a2e1..0000000 --- a/app/build.rs +++ /dev/null @@ -1,9 +0,0 @@ -extern crate windres; - -fn main() { - #[cfg(target_os = "windows")] - { - use windres::Build; - Build::new().compile("./res/resources.rc").unwrap(); - } -} diff --git a/app/src/gui/mod.rs b/app/src/gui/mod.rs index 28ae34b..3d05735 100644 --- a/app/src/gui/mod.rs +++ b/app/src/gui/mod.rs @@ -1,6 +1,11 @@ use std::{mem, process, thread, time::Duration}; -use crossbeam_channel::{Receiver, Sender}; +#[cfg(target_os = "linux")] +use std::sync::{ + atomic::{AtomicBool, Ordering}, + Arc, +}; + use device_query::{DeviceQuery, Keycode}; #[cfg(debug_assertions)] use eframe::egui::style::DebugOptions; @@ -12,13 +17,17 @@ use eframe::{ }; use strum::IntoEnumIterator; -use tray_item::{IconSource, TrayItem}; +#[cfg(target_os = "linux")] +use tray_icon::menu::MenuEvent; +#[cfg(not(target_os = "linux"))] +use tray_icon::{menu::MenuEvent, TrayIcon}; use crate::{ cli::OutputType, effects::{self, custom_effect::CustomEffect, EffectManager, ManagerCreationError}, enums::Effects, persist::Settings, + tray::{self, QUIT_ID, SHOW_ID}, }; use self::{effect_options::EffectOptions, menu_bar::MenuBarState, profile_list::ProfileList, style::Theme}; @@ -33,10 +42,16 @@ pub struct App { settings: Settings, instance_not_unique: bool, - window_open_rx: Option>, - // The tray struct needs to be kept from being dropped for the tray to appear on windows + gui_tx: crossbeam_channel::Sender, + gui_rx: crossbeam_channel::Receiver, + + // For Linux + #[cfg(target_os = "linux")] + has_tray: Arc, + // The tray struct needs to be kept from being dropped for the tray to appear on windows/mac // If this is none it will be assumed there's no tray regardless of cause - tray: Option, + #[cfg(not(target_os = "linux"))] + tray: Option, manager: Option, profile_changed: bool, @@ -63,7 +78,9 @@ pub enum CustomEffectState { } impl App { - pub fn new(output: OutputType, tx: Sender, rx: Receiver) -> Self { + pub fn new(output: OutputType) -> Self { + let (gui_tx, gui_rx) = crossbeam_channel::unbounded::(); + let manager_result = EffectManager::new(effects::OperationMode::Gui); let instance_not_unique = if let Err(err) = &manager_result { @@ -77,12 +94,17 @@ impl App { let settings: Settings = Settings::load(); let profiles = settings.profiles.clone(); + let gui_tx_c = gui_tx.clone(); // Default app state let mut app = Self { settings, instance_not_unique, - window_open_rx: Some(rx), + gui_tx, + gui_rx, + #[cfg(target_os = "linux")] + has_tray: Arc::new(AtomicBool::new(false)), + #[cfg(not(target_os = "linux"))] tray: None, manager, @@ -90,7 +112,7 @@ impl App { profile_changed: true, custom_effect: CustomEffectState::default(), - menu_bar: MenuBarState::new(tx), + menu_bar: MenuBarState::new(gui_tx_c), profile_list: ProfileList::new(profiles), effect_options: EffectOptions::default(), global_rgb: [0; 3], @@ -108,51 +130,56 @@ impl App { app } - pub fn init(mut self, cc: &CreationContext<'_>, gui_sender: Sender, hide_window: bool) -> Self { + pub fn init(mut self, cc: &CreationContext<'_>, hide_window: bool) -> Self { cc.egui_ctx.send_viewport_cmd(ViewportCommand::Visible(!hide_window)); - //Create the tray icon + #[cfg(not(target_os = "linux"))] + { + self.tray = tray::build_tray(true); + } + // Since egui uses winit under the hood and doesn't use gtk on Linux, and we need gtk for + // the tray icon to show up, we need to spawn a thread + // where we initialize gtk and create the tray_icon #[cfg(target_os = "linux")] - let tray_icon = load_tray_icon(include_bytes!("../../res/trayIcon.ico")); + { + let has_tray_c = self.has_tray.clone(); - #[cfg(target_os = "linux")] - let tray_result = TrayItem::new("Keyboard RGB", tray_icon); + std::thread::spawn(move || { + gtk::init().unwrap(); - #[cfg(target_os = "windows")] - let tray_result = TrayItem::new("Keyboard RGB", IconSource::Resource("trayIcon")); + let tray_icon = tray::build_tray(true); + has_tray_c.store(tray_icon.is_some(), Ordering::SeqCst); - self.tray = if let Ok(mut tray) = tray_result { - let mut is_err = false; + gtk::main(); + }); + } - let egui_ctx = cc.egui_ctx.clone(); - is_err |= tray - .add_menu_item("Show", move || { + let egui_ctx = cc.egui_ctx.clone(); + let gui_tx = self.gui_tx.clone(); + std::thread::spawn(move || loop { + // println!("a"); + // if let Ok(event) = TrayIconEvent::receiver().try_recv() { + // println!("{:?}", event); + // } + + if let Ok(event) = MenuEvent::receiver().recv() { + if event.id == SHOW_ID { + println!("show"); egui_ctx.request_repaint(); egui_ctx.send_viewport_cmd(ViewportCommand::Visible(true)); egui_ctx.send_viewport_cmd(ViewportCommand::Focus); - }) - .is_err(); - - let quit_sender = gui_sender.clone(); - let egui_ctx = cc.egui_ctx.clone(); - is_err |= tray - .add_menu_item("Quit", move || { + } else if event.id == QUIT_ID { + println!("quit"); egui_ctx.request_repaint(); - quit_sender.send(GuiMessage::Quit).unwrap() - }) - .is_err(); - if !is_err { - Some(tray) - } else { - None + let _ = gui_tx.send(GuiMessage::Quit); + } } - } else { - None - }; + }); let ctx = cc.egui_ctx.clone(); + let gui_tx_c = self.gui_tx.clone(); if self.manager.is_some() { thread::spawn(move || { let state = device_query::DeviceState::new(); @@ -163,7 +190,7 @@ impl App { if keys.contains(&Keycode::LMeta) && keys.contains(&Keycode::RAlt) { if !lock_switching { - let _ = gui_sender.send(GuiMessage::CycleProfiles); + let _ = gui_tx_c.send(GuiMessage::CycleProfiles); ctx.request_repaint(); lock_switching = true; } @@ -184,12 +211,10 @@ impl App { impl eframe::App for App { fn update(&mut self, ctx: &eframe::egui::Context, _frame: &mut eframe::Frame) { - if let Some(rx) = &self.window_open_rx { - if let Ok(message) = rx.try_recv() { - match message { - GuiMessage::CycleProfiles => self.cycle_profiles(), - GuiMessage::Quit => self.exit_app(), - } + if let Ok(message) = self.gui_rx.try_recv() { + match message { + GuiMessage::CycleProfiles => self.cycle_profiles(), + GuiMessage::Quit => self.exit_app(), } } @@ -297,7 +322,15 @@ impl eframe::App for App { } if ctx.input(|i| i.viewport().close_requested()) { - if self.tray.is_some() && !std::env::var("WAYLAND_DISPLAY").is_ok() { + #[cfg(target_os = "linux")] + if self.has_tray.load(Ordering::Relaxed) && !std::env::var("WAYLAND_DISPLAY").is_ok() { + ctx.send_viewport_cmd(ViewportCommand::CancelClose); + ctx.send_viewport_cmd(ViewportCommand::Visible(false)); + } else { + // Close normally + } + #[cfg(not(target_os = "linux"))] + if self.tray.is_some() { ctx.send_viewport_cmd(ViewportCommand::CancelClose); ctx.send_viewport_cmd(ViewportCommand::Visible(false)); } else { @@ -360,17 +393,3 @@ impl App { } } } - -#[cfg(target_os = "linux")] -#[must_use] -pub fn load_tray_icon(image_data: &[u8]) -> IconSource { - let image = image::load_from_memory(image_data).unwrap(); - let image_buffer = image.to_rgba8(); - let pixels = image_buffer.into_flat_samples().samples; - - IconSource::Data { - data: pixels, - width: image.width() as i32, - height: image.height() as i32, - } -} diff --git a/app/src/main.rs b/app/src/main.rs index c94691d..db2bb10 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -9,12 +9,13 @@ mod enums; mod gui; mod persist; mod profile; +mod tray; mod util; use cli::{GuiCommand, OutputType}; use color_eyre::{eyre::eyre, Result}; use eframe::{egui::IconData, epaint::Vec2}; -use gui::{App, GuiMessage}; +use gui::App; const WINDOW_SIZE: Vec2 = Vec2::new(500., 400.); @@ -92,12 +93,9 @@ fn start_ui(output_type: OutputType, hide_window: bool) { ..eframe::NativeOptions::default() }; - let (gui_sender, gui_receiver) = crossbeam_channel::unbounded::(); + let app = App::new(output_type); - let gui_sender_clone = gui_sender.clone(); - let app = App::new(output_type, gui_sender_clone, gui_receiver); - - eframe::run_native("Legion RGB", native_options, Box::new(move |cc| Ok(Box::new(app.init(cc, gui_sender, hide_window))))).unwrap(); + eframe::run_native("Legion RGB", native_options, Box::new(move |cc| Ok(Box::new(app.init(cc, hide_window))))).unwrap(); } #[must_use] diff --git a/app/src/tray.rs b/app/src/tray.rs new file mode 100644 index 0000000..f071011 --- /dev/null +++ b/app/src/tray.rs @@ -0,0 +1,53 @@ +use tray_icon::{ + menu::{Menu, MenuItem}, + Icon, TrayIcon, TrayIconBuilder, +}; + +pub const SHOW_ID: &str = "tray-show"; +pub const QUIT_ID: &str = "tray-quit"; + +struct TrayMenuItems { + show: MenuItem, + quit: MenuItem, +} + +impl TrayMenuItems { + fn build() -> Self { + let show = MenuItem::with_id(SHOW_ID, "Show", true, None); + let quit = MenuItem::with_id(QUIT_ID, "Quit", true, None); + + Self { show, quit } + } +} + +fn build_tray_menu(items: &TrayMenuItems, has_gui: bool) -> Menu { + let menu = Menu::new(); + if has_gui { + menu.append_items(&[&items.show]).unwrap(); + } + menu.append_items(&[&items.quit]).unwrap(); + menu +} + +pub fn build_tray(has_gui: bool) -> Option { + let items = TrayMenuItems::build(); + let menu = build_tray_menu(&items, has_gui); + + TrayIconBuilder::new() + .with_tooltip("Legion Keyboard Control") + .with_icon(load_tray_icon(include_bytes!("../res/trayIcon.ico"))) + .with_menu(Box::new(menu)) + .build() + .ok() +} + +#[must_use] +fn load_tray_icon(image_data: &[u8]) -> Icon { + use tray_icon::Icon; + + let image = image::load_from_memory(image_data).unwrap(); + let image_buffer = image.to_rgba8(); + let pixels = image_buffer.into_flat_samples().samples; + + Icon::from_rgba(pixels, image.width(), image.height()).unwrap() +} diff --git a/flake.nix b/flake.nix index 8810ec5..176e79c 100644 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,12 @@ xorg.libXi libusb1 expat + + # Tray icon + pango + gtk3 + gdk-pixbuf + xdotool ]; # Libraries needed at runtime @@ -62,6 +68,9 @@ libGL wayland libxkbcommon + + # Tray icon + libayatana-appindicator ] ++ sharedDeps; envVars = rec { From a1a2384cfd2410960baaefb8d1782b73ec9519a0 Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Tue, 8 Oct 2024 22:34:25 +0530 Subject: [PATCH 05/15] Add rules for all 2024 models --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c1533c9..139ce1c 100644 --- a/README.md +++ b/README.md @@ -86,13 +86,24 @@ The best way to add a new effect is to directly edit the source code, as it allo **Note**: By default, on Linux you will have to run the program with root privileges, however, you can remedy this by adding the following `udev` rule (in a path similar to `/etc/udev/rules.d/99-kblight.rules`): +- **2024 Models:** + +```sh +# Pro Models +SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c995", MODE="0666" +# Regular Legions +SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c994", MODE="0666" +# LOQ Models +SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c993", MODE="0666" +``` + - **2023 Models:** ```sh -# Regular legions +# Pro Models SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c985", MODE="0666" +# Regular Legions SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c984", MODE="0666" - # LOQ Models SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c983", MODE="0666" ``` From 3f8996fd388ed7777b69e2b7ed589e76bd48c53d Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Mon, 4 Nov 2024 23:43:00 +0100 Subject: [PATCH 06/15] Use a compact markdown table for the udev rules --- README.md | 64 +++++++++++++++---------------------------------------- 1 file changed, 17 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 139ce1c..b8581e5 100644 --- a/README.md +++ b/README.md @@ -63,11 +63,11 @@ The best way to add a new effect is to directly edit the source code, as it allo ```json { - "effect_steps": [ - {"rgb_array": [0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0], "step_type": "Set", "brightness": 1, "steps": 100, "delay_between_steps": 100, "sleep": 100}, - {"rgb_array": [0, 100, 0, 0, 0, 200, 0, 0, 200, 200, 0, 0], "step_type": "Transition", "brightness": 1, "steps": 100, "delay_between_steps": 100, "sleep": 100} - ], - "should_loop": true + "effect_steps": [ + {"rgb_array": [0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0], "step_type": "Set", "brightness": 1, "steps": 100, "delay_between_steps": 100, "sleep": 100}, + {"rgb_array": [0, 100, 0, 0, 0, 200, 0, 0, 200, 200, 0, 0], "step_type": "Transition", "brightness": 1, "steps": 100, "delay_between_steps": 100, "sleep": 100} + ], + "should_loop": true } ``` @@ -86,54 +86,24 @@ The best way to add a new effect is to directly edit the source code, as it allo **Note**: By default, on Linux you will have to run the program with root privileges, however, you can remedy this by adding the following `udev` rule (in a path similar to `/etc/udev/rules.d/99-kblight.rules`): -- **2024 Models:** +### Format ```sh -# Pro Models -SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c995", MODE="0666" -# Regular Legions -SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c994", MODE="0666" -# LOQ Models -SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c993", MODE="0666" +SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="####", MODE="0666" ``` -- **2023 Models:** +Where `idProduct` can be found in these tables: -```sh -# Pro Models -SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c985", MODE="0666" -# Regular Legions -SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c984", MODE="0666" -# LOQ Models -SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c983", MODE="0666" -``` - -- **2022 Models:** - -```sh -# Regular legions -SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c975", MODE="0666" - -# Ideapad models -SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c973", MODE="0666" -``` - -- **2021 Models:** +| Year | Pro Models | Regular Legions | LOQ Models | +| ---- | ---------- | --------------- | ---------- | +| 2024 | `c995` | `c994` | `c993` | +| 2023 | `c985` | `c984` | `c983` | -```sh -# Regular legions -SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c965", MODE="0666" - - -# Ideapad models -SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c963", MODE="0666" -``` - -- **2020 Models:** - -```sh -SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="c955", MODE="0666" -``` +| Year | Regular Legions | Ideapad Models | +| ---- | --------------- | -------------- | +| 2022 | `c975` | `c973` | +| 2021 | `c965` | `c963` | +| 2020 | `c955` | | And then reloading the rules: From 0cf1837c7cbff7b7465a172933594f1348f9b840 Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Sat, 9 Nov 2024 16:05:12 +0100 Subject: [PATCH 07/15] Disable window hiding See https://github.com/4JX/L5P-Keyboard-RGB/issues/181 --- Cargo.lock | 6 +- app/Cargo.toml | 1 + app/src/cli.rs | 12 +++- app/src/effects/custom_effect.rs | 2 +- app/src/effects/mod.rs | 2 +- app/src/gui/menu_bar.rs | 20 +++--- app/src/gui/mod.rs | 114 +++++++++++++------------------ app/src/main.rs | 33 ++++++++- app/src/tray.rs | 12 ++-- flake.lock | 18 ++--- 10 files changed, 120 insertions(+), 100 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f771ee..f27908c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3986,7 +3986,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 2.0.2", "proc-macro2 1.0.86", "quote 1.0.37", "syn 2.0.77", @@ -6058,9 +6058,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", diff --git a/app/Cargo.toml b/app/Cargo.toml index 18b5283..2d261b3 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -17,6 +17,7 @@ clap = { version = "4.5.17", features = ["color", "cargo", "derive"] } # Ui eframe = "0.28.1" +# tokio = { version = "1.41.1" } egui-modal = "0.4.0" # egui-modal = { git = "https://github.com/n00kii/egui-modal", rev = "8443238" } egui_file = "0.18.0" diff --git a/app/src/cli.rs b/app/src/cli.rs index f01b8bd..47e66c8 100644 --- a/app/src/cli.rs +++ b/app/src/cli.rs @@ -135,6 +135,7 @@ pub enum GuiCommand { } /// What instruction was received through the CLI +#[derive(Clone)] pub enum OutputType { Profile(Profile), Custom(CustomEffect), @@ -150,7 +151,12 @@ pub fn try_cli() -> Result { let output = parse_cli()?; match output { - CliOutput::Gui { hide_window, output } => Ok(GuiCommand::Start { hide_window, output }), + CliOutput::Gui { hide_window, output } => { + if hide_window { + println!("Window hiding is currently not supported. See https://github.com/4JX/L5P-Keyboard-RGB/issues/181"); + } + Ok(GuiCommand::Start { hide_window, output }) + } CliOutput::Cli(output) => { let manager_result = effects::EffectManager::new(effects::OperationMode::Cli); @@ -173,12 +179,12 @@ pub fn try_cli() -> Result { match output { OutputType::Profile(profile) => { effect_manager.set_profile(profile); - effect_manager.join_and_exit(); + effect_manager.shutdown(); Ok(GuiCommand::Exit) } OutputType::Custom(effect) => { effect_manager.custom_effect(effect); - effect_manager.join_and_exit(); + effect_manager.shutdown(); Ok(GuiCommand::Exit) } OutputType::Exit => Ok(GuiCommand::Exit), diff --git a/app/src/effects/custom_effect.rs b/app/src/effects/custom_effect.rs index f53f0d3..da19c06 100644 --- a/app/src/effects/custom_effect.rs +++ b/app/src/effects/custom_effect.rs @@ -22,7 +22,7 @@ pub enum EffectType { Transition, } -#[derive(Deserialize, Serialize, Debug)] +#[derive(Deserialize, Serialize, Debug, Clone)] pub struct CustomEffect { pub effect_steps: Vec, pub should_loop: bool, diff --git a/app/src/effects/mod.rs b/app/src/effects/mod.rs index 57605ca..ce68889 100644 --- a/app/src/effects/mod.rs +++ b/app/src/effects/mod.rs @@ -145,7 +145,7 @@ impl EffectManager { self.tx.send(Message::CustomEffect { effect }).unwrap(); } - pub fn join_and_exit(mut self) { + pub fn shutdown(mut self) { self.tx.send(Message::Exit).unwrap(); if let Some(handle) = self.inner_handle.take() { handle.join().unwrap(); diff --git a/app/src/gui/menu_bar.rs b/app/src/gui/menu_bar.rs index 12fd245..f9be266 100644 --- a/app/src/gui/menu_bar.rs +++ b/app/src/gui/menu_bar.rs @@ -12,11 +12,12 @@ use crate::{effects::custom_effect::CustomEffect, gui::modals, profile::Profile} use super::{CustomEffectState, GuiMessage}; pub struct MenuBarState { + // TODO: Re-enable when upstream fixes window visibility + #[allow(dead_code)] gui_sender: Sender, opened_file: Option, open_file_dialog: Option, file_kind: Option, - toasts: Toasts, } impl MenuBarState { @@ -26,7 +27,6 @@ impl MenuBarState { opened_file: None, open_file_dialog: None, file_kind: None, - toasts: Toasts::default(), } } } @@ -38,9 +38,7 @@ enum FileOperation { } impl MenuBarState { - pub fn show(&mut self, ctx: &Context, ui: &mut egui::Ui, current_profile: &mut Profile, current_effect: &mut CustomEffectState, changed: &mut bool) { - self.toasts.show(ctx); - + pub fn show(&mut self, ctx: &Context, ui: &mut egui::Ui, current_profile: &mut Profile, current_effect: &mut CustomEffectState, changed: &mut bool, toasts: &mut Toasts) { self.show_menu(ctx, ui); if let Some(dialog) = &mut self.open_file_dialog { @@ -55,7 +53,7 @@ impl MenuBarState { *changed = true; } Err(_) => { - self.toasts.error("Could not load profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); + toasts.error("Could not load profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); } }, FileOperation::LoadEffect => match CustomEffect::from_file(path) { @@ -64,12 +62,12 @@ impl MenuBarState { *changed = true; } Err(_) => { - self.toasts.error("Could not load custom effect.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); + toasts.error("Could not load custom effect.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); } }, FileOperation::SaveProfile => { if current_profile.save_profile(path).is_err() { - self.toasts.error("Could not save profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); + toasts.error("Could not save profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); }; } } @@ -118,9 +116,9 @@ impl MenuBarState { open::that("https://www.buymeacoffee.com/4JXdev").unwrap(); } - if ui.button("Exit").clicked() { - self.gui_sender.send(GuiMessage::Quit).unwrap(); - } + // if ui.button("Exit").clicked() { + // self.gui_sender.send(GuiMessage::Quit).unwrap(); + // } #[cfg(target_os = "windows")] { diff --git a/app/src/gui/mod.rs b/app/src/gui/mod.rs index 3d05735..d6e78a6 100644 --- a/app/src/gui/mod.rs +++ b/app/src/gui/mod.rs @@ -1,6 +1,5 @@ use std::{mem, process, thread, time::Duration}; -#[cfg(target_os = "linux")] use std::sync::{ atomic::{AtomicBool, Ordering}, Arc, @@ -16,18 +15,16 @@ use eframe::{ CreationContext, }; +use egui_notify::Toasts; use strum::IntoEnumIterator; -#[cfg(target_os = "linux")] use tray_icon::menu::MenuEvent; -#[cfg(not(target_os = "linux"))] -use tray_icon::{menu::MenuEvent, TrayIcon}; use crate::{ cli::OutputType, effects::{self, custom_effect::CustomEffect, EffectManager, ManagerCreationError}, enums::Effects, persist::Settings, - tray::{self, QUIT_ID, SHOW_ID}, + tray::{QUIT_ID, SHOW_ID}, }; use self::{effect_options::EffectOptions, menu_bar::MenuBarState, profile_list::ProfileList, style::Theme}; @@ -45,13 +42,8 @@ pub struct App { gui_tx: crossbeam_channel::Sender, gui_rx: crossbeam_channel::Receiver, - // For Linux - #[cfg(target_os = "linux")] has_tray: Arc, - // The tray struct needs to be kept from being dropped for the tray to appear on windows/mac - // If this is none it will be assumed there's no tray regardless of cause - #[cfg(not(target_os = "linux"))] - tray: Option, + visible: Arc, manager: Option, profile_changed: bool, @@ -62,6 +54,7 @@ pub struct App { effect_options: EffectOptions, global_rgb: [u8; 3], theme: Theme, + toasts: Toasts, } pub enum GuiMessage { @@ -78,7 +71,7 @@ pub enum CustomEffectState { } impl App { - pub fn new(output: OutputType) -> Self { + pub fn new(output: OutputType, has_tray: Arc, visible: Arc) -> Self { let (gui_tx, gui_rx) = crossbeam_channel::unbounded::(); let manager_result = EffectManager::new(effects::OperationMode::Gui); @@ -102,10 +95,9 @@ impl App { instance_not_unique, gui_tx, gui_rx, - #[cfg(target_os = "linux")] - has_tray: Arc::new(AtomicBool::new(false)), - #[cfg(not(target_os = "linux"))] - tray: None, + + has_tray, + visible, manager, // Default to true for an instant update on launch @@ -117,6 +109,7 @@ impl App { effect_options: EffectOptions::default(), global_rgb: [0; 3], theme: Theme::default(), + toasts: Toasts::default(), }; // Update the state according to the option chosen by the user @@ -130,50 +123,25 @@ impl App { app } - pub fn init(mut self, cc: &CreationContext<'_>, hide_window: bool) -> Self { - cc.egui_ctx.send_viewport_cmd(ViewportCommand::Visible(!hide_window)); - - #[cfg(not(target_os = "linux"))] - { - self.tray = tray::build_tray(true); - } - // Since egui uses winit under the hood and doesn't use gtk on Linux, and we need gtk for - // the tray icon to show up, we need to spawn a thread - // where we initialize gtk and create the tray_icon - #[cfg(target_os = "linux")] - { - let has_tray_c = self.has_tray.clone(); - - std::thread::spawn(move || { - gtk::init().unwrap(); - - let tray_icon = tray::build_tray(true); - has_tray_c.store(tray_icon.is_some(), Ordering::SeqCst); - - gtk::main(); - }); - } + pub fn init(self, cc: &CreationContext<'_>) -> Self { + // cc.egui_ctx.send_viewport_cmd(ViewportCommand::Visible(self.visible)); let egui_ctx = cc.egui_ctx.clone(); let gui_tx = self.gui_tx.clone(); - std::thread::spawn(move || loop { - // println!("a"); - // if let Ok(event) = TrayIconEvent::receiver().try_recv() { - // println!("{:?}", event); - // } + let has_tray = self.has_tray.clone(); + std::thread::spawn(move || loop { if let Ok(event) = MenuEvent::receiver().recv() { if event.id == SHOW_ID { - println!("show"); egui_ctx.request_repaint(); egui_ctx.send_viewport_cmd(ViewportCommand::Visible(true)); egui_ctx.send_viewport_cmd(ViewportCommand::Focus); } else if event.id == QUIT_ID { - println!("quit"); egui_ctx.request_repaint(); let _ = gui_tx.send(GuiMessage::Quit); + has_tray.store(false, Ordering::SeqCst); } } }); @@ -218,6 +186,17 @@ impl eframe::App for App { } } + // Show active toast messages + self.toasts.show(ctx); + + // TODO: Remove when upstream fixes window hiding + if !self.visible.load(Ordering::SeqCst) { + self.visible.store(true, Ordering::SeqCst); + self.toasts + .warning("Window hiding is currently not supported.\nSee https://github.com/4JX/L5P-Keyboard-RGB/issues/181") + .set_duration(None); + } + if self.instance_not_unique && modals::unique_instance(ctx) { self.exit_app(); }; @@ -227,10 +206,9 @@ impl eframe::App for App { self.exit_app(); }; - // frame.set_visible(!self.hide_window); - TopBottomPanel::top("top-panel").show(ctx, |ui| { - self.menu_bar.show(ctx, ui, &mut self.settings.current_profile, &mut self.custom_effect, &mut self.profile_changed); + self.menu_bar + .show(ctx, ui, &mut self.settings.current_profile, &mut self.custom_effect, &mut self.profile_changed, &mut self.toasts); }); CentralPanel::default() @@ -321,28 +299,34 @@ impl eframe::App for App { self.profile_changed = false; } - if ctx.input(|i| i.viewport().close_requested()) { - #[cfg(target_os = "linux")] - if self.has_tray.load(Ordering::Relaxed) && !std::env::var("WAYLAND_DISPLAY").is_ok() { - ctx.send_viewport_cmd(ViewportCommand::CancelClose); - ctx.send_viewport_cmd(ViewportCommand::Visible(false)); - } else { - // Close normally - } - #[cfg(not(target_os = "linux"))] - if self.tray.is_some() { - ctx.send_viewport_cmd(ViewportCommand::CancelClose); - ctx.send_viewport_cmd(ViewportCommand::Visible(false)); - } else { - // Close normally - } - } + // if ctx.input(|i| i.viewport().close_requested()) { + // #[cfg(target_os = "linux")] + // if self.has_tray.load(Ordering::Relaxed) && !std::env::var("WAYLAND_DISPLAY").is_ok() { + // ctx.send_viewport_cmd(ViewportCommand::CancelClose); + // ctx.send_viewport_cmd(ViewportCommand::Visible(false)); + // } else { + // // Close normally + // } + // #[cfg(not(target_os = "linux"))] + // if self.tray.is_some() { + // ctx.send_viewport_cmd(ViewportCommand::CancelClose); + // ctx.send_viewport_cmd(ViewportCommand::Visible(false)); + // } else { + // // Close normally + // } + // } } fn on_exit(&mut self, _gl: Option<&eframe::glow::Context>) { self.settings.profiles = std::mem::take(&mut self.profile_list.profiles); self.settings.save(); + + self.visible.store(false, Ordering::SeqCst); + + if let Some(manager) = self.manager.take() { + manager.shutdown(); + } } } diff --git a/app/src/main.rs b/app/src/main.rs index db2bb10..f39fd30 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -12,11 +12,17 @@ mod profile; mod tray; mod util; +use std::sync::{ + atomic::{AtomicBool, Ordering}, + Arc, +}; + use cli::{GuiCommand, OutputType}; use color_eyre::{eyre::eyre, Result}; use eframe::{egui::IconData, epaint::Vec2}; use gui::App; +const APP_ICON: &'static [u8; 14987] = include_bytes!("../res/trayIcon.ico"); const WINDOW_SIZE: Vec2 = Vec2::new(500., 400.); fn main() { @@ -83,7 +89,10 @@ fn init() -> Result<()> { } fn start_ui(output_type: OutputType, hide_window: bool) { - let app_icon = load_icon_data(include_bytes!("../res/trayIcon.ico")); + let has_tray = Arc::new(AtomicBool::new(true)); + let visible = Arc::new(AtomicBool::new(!hide_window)); + + let app_icon = load_icon_data(APP_ICON); let native_options = eframe::NativeOptions { viewport: eframe::egui::ViewportBuilder::default() .with_inner_size(WINDOW_SIZE) @@ -93,9 +102,27 @@ fn start_ui(output_type: OutputType, hide_window: bool) { ..eframe::NativeOptions::default() }; - let app = App::new(output_type); + let has_tray_c = has_tray.clone(); + + // Since egui uses winit under the hood and doesn't use gtk on Linux, and we need gtk for + // the tray icon to show up, we need to spawn a thread + // where we initialize gtk and create the tray_icon + { + std::thread::spawn(move || { + #[cfg(target_os = "linux")] + gtk::init().unwrap(); + + let tray_icon = tray::build_tray(true); + has_tray_c.store(tray_icon.is_some(), Ordering::SeqCst); + + #[cfg(target_os = "linux")] + gtk::main(); + }); + } + + let app = App::new(output_type, has_tray.clone(), visible.clone()); - eframe::run_native("Legion RGB", native_options, Box::new(move |cc| Ok(Box::new(app.init(cc, hide_window))))).unwrap(); + eframe::run_native("Legion RGB", native_options, Box::new(move |cc| Ok(Box::new(app.init(cc))))).unwrap(); } #[must_use] diff --git a/app/src/tray.rs b/app/src/tray.rs index f071011..2a60523 100644 --- a/app/src/tray.rs +++ b/app/src/tray.rs @@ -3,10 +3,13 @@ use tray_icon::{ Icon, TrayIcon, TrayIconBuilder, }; +use crate::APP_ICON; + pub const SHOW_ID: &str = "tray-show"; pub const QUIT_ID: &str = "tray-quit"; struct TrayMenuItems { + #[allow(dead_code)] show: MenuItem, quit: MenuItem, } @@ -22,9 +25,10 @@ impl TrayMenuItems { fn build_tray_menu(items: &TrayMenuItems, has_gui: bool) -> Menu { let menu = Menu::new(); - if has_gui { - menu.append_items(&[&items.show]).unwrap(); - } + // TODO: Wait for upstream fix + // if has_gui { + // menu.append_items(&[&items.show]).unwrap(); + // } menu.append_items(&[&items.quit]).unwrap(); menu } @@ -35,7 +39,7 @@ pub fn build_tray(has_gui: bool) -> Option { TrayIconBuilder::new() .with_tooltip("Legion Keyboard Control") - .with_icon(load_tray_icon(include_bytes!("../res/trayIcon.ico"))) + .with_icon(load_tray_icon(APP_ICON)) .with_menu(Box::new(menu)) .build() .ok() diff --git a/flake.lock b/flake.lock index 1400884..21d8970 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "crane": { "locked": { - "lastModified": 1725409566, - "narHash": "sha256-PrtLmqhM6UtJP7v7IGyzjBFhbG4eOAHT6LPYOFmYfbk=", + "lastModified": 1731098351, + "narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=", "owner": "ipetkov", "repo": "crane", - "rev": "7e4586bad4e3f8f97a9271def747cf58c4b68f3c", + "rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28", "type": "github" }, "original": { @@ -35,11 +35,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726583932, - "narHash": "sha256-zACxiQx8knB3F8+Ze+1BpiYrI+CbhxyWpcSID9kVhkQ=", + "lastModified": 1730958623, + "narHash": "sha256-JwQZIGSYnRNOgDDoIgqKITrPVil+RMWHsZH1eE1VGN0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "658e7223191d2598641d50ee4e898126768fe847", + "rev": "85f7e662eda4fa3a995556527c87b2524b691933", "type": "github" }, "original": { @@ -64,11 +64,11 @@ ] }, "locked": { - "lastModified": 1726712837, - "narHash": "sha256-Ob7DNyHKtOQpWetmNj/V+OgMkGXh6Ep1dNa6AN/4sSI=", + "lastModified": 1731119076, + "narHash": "sha256-2eVhmocCZHJlFAz6Mt3EwPdFFVAtGgIySJc1EHQVxcc=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "6283b1d6ca31fa320ecee82806123e773b2ff993", + "rev": "23c4b3ba5f806fcf25d5a3b6b54fa0d07854c032", "type": "github" }, "original": { From fb30201b8b9e37f4ad8c3cea6e357d307764a4bf Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Sun, 17 Nov 2024 17:15:22 +0100 Subject: [PATCH 08/15] Cleanup CLI code --- app/src/cli.rs | 198 +++++++++++++++++++--------------------- app/src/gui/menu_bar.rs | 9 +- app/src/main.rs | 50 +++++----- 3 files changed, 122 insertions(+), 135 deletions(-) diff --git a/app/src/cli.rs b/app/src/cli.rs index 47e66c8..d396f40 100644 --- a/app/src/cli.rs +++ b/app/src/cli.rs @@ -1,4 +1,4 @@ -use std::{convert::TryInto, path::PathBuf, process, str::FromStr}; +use std::{convert::TryInto, path::PathBuf, str::FromStr}; use clap::{arg, command, Parser, Subcommand}; use error_stack::{Result, ResultExt}; @@ -110,25 +110,15 @@ fn parse_colors(arg: &str) -> std::result::Result<[u8; 12], String> { pub enum CliOutput { /// Start the UI - Gui { hide_window: bool, output: OutputType }, + Gui { hide_window: bool, output_type: OutputType }, /// CLI arguments were passed Cli(OutputType), } -impl CliOutput { - fn maybe_gui(start_gui: bool, hide_window: bool, output: OutputType) -> Self { - if start_gui { - Self::Gui { hide_window, output } - } else { - Self::Cli(output) - } - } -} - pub enum GuiCommand { /// Start the UI - Start { hide_window: bool, output: OutputType }, + Start { hide_window: bool, output_type: OutputType }, /// Close the program as the CLI was invoked Exit, @@ -148,115 +138,119 @@ pub enum OutputType { pub struct CliError; pub fn try_cli() -> Result { - let output = parse_cli()?; + let output_type = parse_cli()?; - match output { - CliOutput::Gui { hide_window, output } => { + match output_type { + CliOutput::Gui { hide_window, output_type } => { if hide_window { println!("Window hiding is currently not supported. See https://github.com/4JX/L5P-Keyboard-RGB/issues/181"); } - Ok(GuiCommand::Start { hide_window, output }) + Ok(GuiCommand::Start { hide_window, output_type }) } - CliOutput::Cli(output) => { - let manager_result = effects::EffectManager::new(effects::OperationMode::Cli); - - let instance_not_unique = if let Err(err) = &manager_result { - &ManagerCreationError::InstanceAlreadyRunning == err.current_context() - } else { - false - }; - - // Don't interrupt other instances if trying to interact with the keyboard - if let OutputType::Profile(..) | OutputType::Custom(..) = output { - if instance_not_unique { - println!("Another instance of the program is already running, please close it before starting a new one."); - process::exit(0); - } - } + CliOutput::Cli(output_type) => handle_cli_output(output_type), + } +} - let mut effect_manager = manager_result.unwrap(); +fn handle_cli_output(output_type: OutputType) -> Result { + let manager_result = effects::EffectManager::new(effects::OperationMode::Cli); + let instance_not_unique = manager_result + .as_ref() + .err() + .map_or(false, |err| &ManagerCreationError::InstanceAlreadyRunning == err.current_context()); - match output { - OutputType::Profile(profile) => { - effect_manager.set_profile(profile); - effect_manager.shutdown(); - Ok(GuiCommand::Exit) - } - OutputType::Custom(effect) => { - effect_manager.custom_effect(effect); - effect_manager.shutdown(); - Ok(GuiCommand::Exit) - } - OutputType::Exit => Ok(GuiCommand::Exit), - OutputType::NoArgs => unreachable!("No arguments were provided but the app is in CLI mode"), - } - } + if matches!(output_type, OutputType::Profile(..) | OutputType::Custom(..)) && instance_not_unique { + println!("Another instance of the program is already running, please close it before starting a new one."); + return Ok(GuiCommand::Exit); } + + let mut effect_manager = manager_result.change_context(CliError)?; + + let command_result = match output_type { + OutputType::Profile(profile) => { + effect_manager.set_profile(profile); + Ok(GuiCommand::Exit) + } + OutputType::Custom(effect) => { + effect_manager.custom_effect(effect); + Ok(GuiCommand::Exit) + } + OutputType::Exit => Ok(GuiCommand::Exit), + OutputType::NoArgs => unreachable!("No arguments were provided but the app is in CLI mode"), + }; + + effect_manager.shutdown(); + command_result } fn parse_cli() -> Result { let cli = Cli::parse(); - let Some(subcommand) = cli.command else { - let exec_name = std::env::current_exe().unwrap().file_name().unwrap().to_string_lossy().into_owned(); - println!("No subcommands found, starting in GUI mode. To view the possible subcommands type \"{exec_name} --help\".",); - return Ok(CliOutput::maybe_gui(true, cli.hide_window, OutputType::NoArgs)); - }; - - match subcommand { - Commands::Set { - effect, - colors, - brightness, - speed, - direction, - save, - } => { - let direction = direction.unwrap_or_default(); - - let rgb_array: [u8; 12] = if effect.takes_color_array() { - colors.unwrap_or_else(|| { - println!("This effect requires specifying the colors to use."); - process::exit(0); - }) - } else { - [0; 12] - }; - - let profile = Profile { - name: "Profile".to_string(), - rgb_zones: profile::arr_to_zones(rgb_array), + if let Some(subcommand) = cli.command { + match subcommand { + Commands::Set { effect, - direction, - speed, + colors, brightness, - }; + speed, + direction, + save, + } => { + let direction = direction.unwrap_or_default(); + let rgb_array = if effect.takes_color_array() { + colors.unwrap_or_else(|| { + println!("This effect requires specifying the colors to use."); + std::process::exit(0); + }) + } else { + [0; 12] + }; + + let profile = Profile { + name: "Profile".to_string(), + rgb_zones: profile::arr_to_zones(rgb_array), + effect, + direction, + speed, + brightness, + }; + + if let Some(filename) = save { + profile.save_profile(&filename).expect("Failed to save."); + } - if let Some(filename) = save { - profile.save_profile(&filename).expect("Failed to save."); + return Ok(CliOutput::Cli(OutputType::Profile(profile))); } - - Ok(CliOutput::maybe_gui(cli.gui, cli.hide_window, OutputType::Profile(profile))) - } - Commands::List => { - println!("List of available effects:"); - for (i, effect) in Effects::iter().enumerate() { - println!("{}. {effect}", i + 1); + Commands::List => { + println!("List of available effects:"); + for (i, effect) in Effects::iter().enumerate() { + println!("{}. {effect}", i + 1); + } + return Ok(CliOutput::Cli(OutputType::Exit)); } - Ok(CliOutput::maybe_gui(false, cli.hide_window, OutputType::Exit)) - } - - Commands::LoadProfile { path } => { - let profile = Profile::load_profile(&path).change_context(CliError)?; - - Ok(CliOutput::maybe_gui(cli.gui, cli.hide_window, OutputType::Profile(profile))) - } - - Commands::CustomEffect { path } => { - let effect = CustomEffect::from_file(&path).change_context(CliError)?; + Commands::LoadProfile { path } => { + let profile = Profile::load_profile(&path).change_context(CliError)?; + return Ok(CliOutput::Gui { + hide_window: cli.hide_window, + output_type: OutputType::Profile(profile), + }); + } - Ok(CliOutput::maybe_gui(cli.gui, cli.hide_window, OutputType::Custom(effect))) + Commands::CustomEffect { path } => { + let effect = CustomEffect::from_file(&path).change_context(CliError)?; + return Ok(CliOutput::Gui { + hide_window: cli.hide_window, + output_type: OutputType::Custom(effect), + }); + } } } + + // If no subcommands were found, start in GUI mode + let exec_name = std::env::current_exe().unwrap().file_name().unwrap().to_string_lossy().into_owned(); + println!("No subcommands found, starting in GUI mode. To view the possible subcommands type \"{exec_name} --help\"."); + Ok(CliOutput::Gui { + hide_window: cli.hide_window, + output_type: OutputType::NoArgs, + }) } diff --git a/app/src/gui/menu_bar.rs b/app/src/gui/menu_bar.rs index f9be266..b01bf40 100644 --- a/app/src/gui/menu_bar.rs +++ b/app/src/gui/menu_bar.rs @@ -39,7 +39,7 @@ enum FileOperation { impl MenuBarState { pub fn show(&mut self, ctx: &Context, ui: &mut egui::Ui, current_profile: &mut Profile, current_effect: &mut CustomEffectState, changed: &mut bool, toasts: &mut Toasts) { - self.show_menu(ctx, ui); + self.show_menu(ctx, ui, toasts); if let Some(dialog) = &mut self.open_file_dialog { if dialog.show(ctx).selected() { @@ -79,7 +79,7 @@ impl MenuBarState { } } - fn show_menu(&mut self, ctx: &Context, ui: &mut egui::Ui) { + fn show_menu(&mut self, ctx: &Context, ui: &mut egui::Ui, toasts: &mut Toasts) { use egui::menu; menu::bar(ui, |ui| { @@ -127,10 +127,7 @@ impl MenuBarState { ui.with_layout(Layout::right_to_left(Align::Center), |ui| { if ui.button("📜").clicked() { if !console::alloc() { - self.toasts - .error("Could not allocate debug terminal.") - .set_duration(Some(Duration::from_millis(5000))) - .set_closable(true); + toasts.error("Could not allocate debug terminal.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); } println!("Debug terminal enabled."); } diff --git a/app/src/main.rs b/app/src/main.rs index f39fd30..1db4e20 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -22,32 +22,32 @@ use color_eyre::{eyre::eyre, Result}; use eframe::{egui::IconData, epaint::Vec2}; use gui::App; -const APP_ICON: &'static [u8; 14987] = include_bytes!("../res/trayIcon.ico"); +const APP_ICON: &[u8; 14987] = include_bytes!("../res/trayIcon.ico"); const WINDOW_SIZE: Vec2 = Vec2::new(500., 400.); fn main() { #[cfg(target_os = "windows")] { setup_panic().unwrap(); - - // This just enables output if the program is already being ran from the CLI - console::attach(); - let res = init(); - console::free(); - - if res.is_err() { - std::process::exit(2); - } + run_windows(); } #[cfg(target_os = "linux")] { color_eyre::install().unwrap(); - init().unwrap(); } } +#[cfg(target_os = "windows")] +fn run_windows() { + console::attach(); + if init().is_err() { + std::process::exit(2); + } + console::free(); +} + #[cfg(target_os = "windows")] fn setup_panic() -> Result<()> { // A somewhat unwrapped version of color_eyre::install() to add a "wait for enter" after printing the text @@ -61,14 +61,12 @@ fn setup_panic() -> Result<()> { std::panic::set_hook(Box::new(move |panic_info| { if !console::alloc() { - // No point trying to print without a console... - return; + return; // No console to print to } eprintln!("{}", panic_hook.panic_report(panic_info)); println!("Press Enter to continue..."); let _ = std::io::stdin().read_line(&mut String::new()); - std::process::exit(1); })); @@ -79,9 +77,8 @@ fn init() -> Result<()> { let cli_output = cli::try_cli().map_err(|err| eyre!("{:?}", err))?; match cli_output { - GuiCommand::Start { hide_window, output } => { - start_ui(output, hide_window); - + GuiCommand::Start { hide_window, output_type } => { + start_ui(output_type, hide_window); Ok(()) } GuiCommand::Exit => Ok(()), @@ -107,18 +104,16 @@ fn start_ui(output_type: OutputType, hide_window: bool) { // Since egui uses winit under the hood and doesn't use gtk on Linux, and we need gtk for // the tray icon to show up, we need to spawn a thread // where we initialize gtk and create the tray_icon - { - std::thread::spawn(move || { - #[cfg(target_os = "linux")] - gtk::init().unwrap(); + std::thread::spawn(move || { + #[cfg(target_os = "linux")] + gtk::init().unwrap(); - let tray_icon = tray::build_tray(true); - has_tray_c.store(tray_icon.is_some(), Ordering::SeqCst); + let tray_icon = tray::build_tray(true); + has_tray_c.store(tray_icon.is_some(), Ordering::SeqCst); - #[cfg(target_os = "linux")] - gtk::main(); - }); - } + #[cfg(target_os = "linux")] + gtk::main(); + }); let app = App::new(output_type, has_tray.clone(), visible.clone()); @@ -128,6 +123,7 @@ fn start_ui(output_type: OutputType, hide_window: bool) { #[must_use] fn load_icon_data(image_data: &[u8]) -> IconData { let image = image::load_from_memory(image_data).unwrap(); + let image_buffer = image.to_rgba8(); let pixels = image_buffer.into_flat_samples().samples; From add7d387a0d2385d26a5562c82b460cd98f991d0 Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Sun, 17 Nov 2024 19:53:39 +0100 Subject: [PATCH 09/15] Fix #148 --- app/src/console.rs | 30 +++++++++++++++++++++++++++++- app/src/gui/menu_bar.rs | 2 +- app/src/main.rs | 7 ++----- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/app/src/console.rs b/app/src/console.rs index 385e26f..0385143 100644 --- a/app/src/console.rs +++ b/app/src/console.rs @@ -11,8 +11,11 @@ // These functions enable that, primarily for the purposes of displaying Rust // panics. -use winapi::um::consoleapi::AllocConsole; +use winapi::um::consoleapi::{AllocConsole, GetConsoleMode, SetConsoleMode}; +use winapi::um::processenv::GetStdHandle; +use winapi::um::winbase::STD_OUTPUT_HANDLE; use winapi::um::wincon::{AttachConsole, FreeConsole, GetConsoleWindow, ATTACH_PARENT_PROCESS}; +use winapi::{shared::minwindef::DWORD, um::wincon::ENABLE_VIRTUAL_TERMINAL_PROCESSING}; /// Check if we're attached to an existing Windows console pub fn is_attached() -> bool { @@ -45,3 +48,28 @@ pub fn alloc() -> bool { pub fn free() { unsafe { FreeConsole() }; } + +/// Enable ANSI escape codes for color output in the console. +pub fn enable_ansi_support() -> bool { + let handle = unsafe { GetStdHandle(STD_OUTPUT_HANDLE) }; + let mut mode: DWORD = 0; + + // Get the current console mode + if unsafe { GetConsoleMode(handle, &mut mode) } == 0 { + return false; // Failed to get console mode + } + + // Enable virtual terminal processing + mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; + + // Set the new console mode + unsafe { SetConsoleMode(handle, mode) != 0 } +} + +pub fn alloc_with_color_support() -> bool { + if alloc() { + return enable_ansi_support(); + } + + false // Failed to allocate a console +} diff --git a/app/src/gui/menu_bar.rs b/app/src/gui/menu_bar.rs index b01bf40..cc62a27 100644 --- a/app/src/gui/menu_bar.rs +++ b/app/src/gui/menu_bar.rs @@ -126,7 +126,7 @@ impl MenuBarState { use eframe::{egui::Layout, emath::Align}; ui.with_layout(Layout::right_to_left(Align::Center), |ui| { if ui.button("📜").clicked() { - if !console::alloc() { + if !console::alloc_with_color_support() { toasts.error("Could not allocate debug terminal.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); } println!("Debug terminal enabled."); diff --git a/app/src/main.rs b/app/src/main.rs index 1db4e20..eff436f 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -51,16 +51,13 @@ fn run_windows() { #[cfg(target_os = "windows")] fn setup_panic() -> Result<()> { // A somewhat unwrapped version of color_eyre::install() to add a "wait for enter" after printing the text - use color_eyre::config::Theme; - let builder = color_eyre::config::HookBuilder::default() - // HACK: Forgo colors in windows outputs because I cannot figure out why allocated consoles don't display them - .theme(Theme::new()); + let builder = color_eyre::config::HookBuilder::default(); let (panic_hook, eyre_hook) = builder.into_hooks(); eyre_hook.install()?; std::panic::set_hook(Box::new(move |panic_info| { - if !console::alloc() { + if !console::alloc_with_color_support() { return; // No console to print to } From 61780a951d356fddf925d94925b09c8360500cdc Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Sun, 17 Nov 2024 20:14:57 +0100 Subject: [PATCH 10/15] Fix tray on Windows --- app/src/main.rs | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/app/src/main.rs b/app/src/main.rs index eff436f..d23440e 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -12,9 +12,13 @@ mod profile; mod tray; mod util; -use std::sync::{ - atomic::{AtomicBool, Ordering}, - Arc, +use std::{ + cell::RefCell, + rc::Rc, + sync::{ + atomic::{AtomicBool, Ordering}, + Arc, + }, }; use cli::{GuiCommand, OutputType}; @@ -101,20 +105,36 @@ fn start_ui(output_type: OutputType, hide_window: bool) { // Since egui uses winit under the hood and doesn't use gtk on Linux, and we need gtk for // the tray icon to show up, we need to spawn a thread // where we initialize gtk and create the tray_icon + #[cfg(target_os = "linux")] std::thread::spawn(move || { - #[cfg(target_os = "linux")] gtk::init().unwrap(); let tray_icon = tray::build_tray(true); has_tray_c.store(tray_icon.is_some(), Ordering::SeqCst); - #[cfg(target_os = "linux")] gtk::main(); }); + #[cfg(not(target_os = "linux"))] + let mut _tray_icon = Rc::new(RefCell::new(None)); + #[cfg(not(target_os = "linux"))] + let tray_c = _tray_icon.clone(); + let app = App::new(output_type, has_tray.clone(), visible.clone()); - eframe::run_native("Legion RGB", native_options, Box::new(move |cc| Ok(Box::new(app.init(cc))))).unwrap(); + eframe::run_native( + "Legion RGB", + native_options, + Box::new(move |cc| { + #[cfg(target_os = "windows")] + { + tray_c.borrow_mut().replace(tray::build_tray(true)); + has_tray_c.store(tray_c.borrow().is_some(), Ordering::SeqCst); + } + Ok(Box::new(app.init(cc))) + }), + ) + .unwrap(); } #[must_use] From 57b97a0776aa9b7103035e1eab5eea10e581eb88 Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Sun, 17 Nov 2024 23:17:37 +0100 Subject: [PATCH 11/15] Remove the effect wrapper structs --- app/src/effects/ambient.rs | 96 ++++++------- app/src/effects/christmas.rs | 152 ++++++++++---------- app/src/effects/disco.rs | 20 ++- app/src/effects/fade.rs | 60 ++++---- app/src/effects/lightning.rs | 38 +++-- app/src/effects/mod.rs | 31 ++-- app/src/effects/ripple.rs | 250 +++++++++------------------------ app/src/effects/swipe.rs | 32 ++--- app/src/effects/temperature.rs | 58 ++++---- app/src/effects/zones.rs | 111 +++++++++++++++ app/src/gui/menu_bar.rs | 1 + app/src/main.rs | 13 +- app/src/tray.rs | 2 +- 13 files changed, 413 insertions(+), 451 deletions(-) create mode 100644 app/src/effects/zones.rs diff --git a/app/src/effects/ambient.rs b/app/src/effects/ambient.rs index fa3d5f1..17df960 100644 --- a/app/src/effects/ambient.rs +++ b/app/src/effects/ambient.rs @@ -15,68 +15,64 @@ struct ScreenDimensions { dest: (u32, u32), } -pub(super) struct AmbientLight; +pub fn play(manager: &mut super::Inner, fps: u8, saturation_boost: f32) { + while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { + //Display setup + let display = Display::all().unwrap().remove(0); -impl AmbientLight { - pub fn play(manager: &mut super::Inner, fps: u8, saturation_boost: f32) { - while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - //Display setup - let display = Display::all().unwrap().remove(0); + let mut capturer = Capturer::new(display).expect("Couldn't begin capture."); - let mut capturer = Capturer::new(display).expect("Couldn't begin capture."); + let dimensions = ScreenDimensions { + src: (capturer.width() as u32, capturer.height() as u32), + dest: (4, 1), + }; - let dimensions = ScreenDimensions { - src: (capturer.width() as u32, capturer.height() as u32), - dest: (4, 1), - }; + let seconds_per_frame = Duration::from_nanos(1_000_000_000 / u64::from(fps)); + let mut resizer = fr::Resizer::new(); - let seconds_per_frame = Duration::from_nanos(1_000_000_000 / u64::from(fps)); - let mut resizer = fr::Resizer::new(); + #[cfg(target_os = "windows")] + let mut try_gdi = 1; - #[cfg(target_os = "windows")] - let mut try_gdi = 1; + while !manager.stop_signals.keyboard_stop_signal.load(Ordering::SeqCst) { + let now = Instant::now(); - while !manager.stop_signals.keyboard_stop_signal.load(Ordering::SeqCst) { - let now = Instant::now(); + #[allow(clippy::single_match)] + match capturer.frame(seconds_per_frame) { + Ok(frame) => { + let rgb = process_frame(frame, dimensions, &mut resizer, saturation_boost); - #[allow(clippy::single_match)] - match capturer.frame(seconds_per_frame) { - Ok(frame) => { - let rgb = process_frame(frame, dimensions, &mut resizer, saturation_boost); - - manager.keyboard.set_colors_to(&rgb).unwrap(); - #[cfg(target_os = "windows")] - { - try_gdi = 0; - } + manager.keyboard.set_colors_to(&rgb).unwrap(); + #[cfg(target_os = "windows")] + { + try_gdi = 0; } - Err(error) => match error.kind() { - std::io::ErrorKind::WouldBlock => - { - #[cfg(target_os = "windows")] - if try_gdi > 0 && !capturer.is_gdi() { - if try_gdi > 3 { - capturer.set_gdi(); - try_gdi = 0; - } - try_gdi += 1; - } - } - _ => - { - #[cfg(windows)] - if !capturer.is_gdi() { + } + Err(error) => match error.kind() { + std::io::ErrorKind::WouldBlock => + { + #[cfg(target_os = "windows")] + if try_gdi > 0 && !capturer.is_gdi() { + if try_gdi > 3 { capturer.set_gdi(); - continue; + try_gdi = 0; } + try_gdi += 1; } - }, - } + } + _ => + { + #[cfg(windows)] + if !capturer.is_gdi() { + capturer.set_gdi(); + continue; + } + } + }, + } - let elapsed_time = now.elapsed(); - if elapsed_time < seconds_per_frame { - thread::sleep(seconds_per_frame - elapsed_time); - } + let elapsed_time = now.elapsed(); + if elapsed_time < seconds_per_frame { + thread::sleep(seconds_per_frame - elapsed_time); } } } diff --git a/app/src/effects/christmas.rs b/app/src/effects/christmas.rs index ee648b5..9543fb7 100644 --- a/app/src/effects/christmas.rs +++ b/app/src/effects/christmas.rs @@ -2,96 +2,92 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; use rand::Rng; -pub(super) struct Christmas; - -impl Christmas { - pub fn play(manager: &mut super::Inner, thread_rng: &mut rand::rngs::ThreadRng) { - let xmas_color_array = [[255, 10, 10], [255, 255, 20], [30, 255, 30], [70, 70, 255]]; - let subeffect_count = 4; - let mut last_subeffect = -1; - while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - let mut subeffect = thread_rng.gen_range(0..subeffect_count); - while last_subeffect == subeffect { - subeffect = thread_rng.gen_range(0..subeffect_count); - } - last_subeffect = subeffect; +pub fn play(manager: &mut super::Inner, thread_rng: &mut rand::rngs::ThreadRng) { + let xmas_color_array = [[255, 10, 10], [255, 255, 20], [30, 255, 30], [70, 70, 255]]; + let subeffect_count = 4; + let mut last_subeffect = -1; + while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { + let mut subeffect = thread_rng.gen_range(0..subeffect_count); + while last_subeffect == subeffect { + subeffect = thread_rng.gen_range(0..subeffect_count); + } + last_subeffect = subeffect; - match subeffect { - 0 => { - for _i in 0..3 { - for colors in xmas_color_array { - manager.keyboard.solid_set_colors_to(colors).unwrap(); - thread::sleep(Duration::from_millis(500)); - } + match subeffect { + 0 => { + for _i in 0..3 { + for colors in xmas_color_array { + manager.keyboard.solid_set_colors_to(colors).unwrap(); + thread::sleep(Duration::from_millis(500)); } } - 1 => { - let color_1_index = thread_rng.gen_range(0..4); - let used_colors_1: [u8; 3] = xmas_color_array[color_1_index]; + } + 1 => { + let color_1_index = thread_rng.gen_range(0..4); + let used_colors_1: [u8; 3] = xmas_color_array[color_1_index]; - let mut color_2_index = thread_rng.gen_range(0..4); - while color_1_index == color_2_index { - color_2_index = thread_rng.gen_range(0..4); - } - let used_colors_2: [u8; 3] = xmas_color_array[color_2_index]; + let mut color_2_index = thread_rng.gen_range(0..4); + while color_1_index == color_2_index { + color_2_index = thread_rng.gen_range(0..4); + } + let used_colors_2: [u8; 3] = xmas_color_array[color_2_index]; - for _i in 0..4 { - manager.keyboard.solid_set_colors_to(used_colors_1).unwrap(); - thread::sleep(Duration::from_millis(400)); - manager.keyboard.solid_set_colors_to(used_colors_2).unwrap(); - thread::sleep(Duration::from_millis(400)); - } + for _i in 0..4 { + manager.keyboard.solid_set_colors_to(used_colors_1).unwrap(); + thread::sleep(Duration::from_millis(400)); + manager.keyboard.solid_set_colors_to(used_colors_2).unwrap(); + thread::sleep(Duration::from_millis(400)); } - 2 => { - let steps = 100; - manager.keyboard.transition_colors_to(&[0; 12], steps, 1).unwrap(); - let mut used_colors_array: [u8; 12] = [0; 12]; - let left_or_right = thread_rng.gen_range(0..2); - if left_or_right == 0 { - for color in xmas_color_array { - for j in (0..12).step_by(3) { - used_colors_array[j] = color[0]; - used_colors_array[j + 1] = color[1]; - used_colors_array[j + 2] = color[2]; - manager.keyboard.transition_colors_to(&used_colors_array, steps, 1).unwrap(); - } - for j in (0..12).step_by(3) { - used_colors_array[j] = 0; - used_colors_array[j + 1] = 0; - used_colors_array[j + 2] = 0; - manager.keyboard.transition_colors_to(&used_colors_array, steps, 1).unwrap(); - } + } + 2 => { + let steps = 100; + manager.keyboard.transition_colors_to(&[0; 12], steps, 1).unwrap(); + let mut used_colors_array: [u8; 12] = [0; 12]; + let left_or_right = thread_rng.gen_range(0..2); + if left_or_right == 0 { + for color in xmas_color_array { + for j in (0..12).step_by(3) { + used_colors_array[j] = color[0]; + used_colors_array[j + 1] = color[1]; + used_colors_array[j + 2] = color[2]; + manager.keyboard.transition_colors_to(&used_colors_array, steps, 1).unwrap(); } - } else { - for i in 0..4 { - for j in (0..12).step_by(3) { - used_colors_array[11 - j] = xmas_color_array[3 - i][0]; - used_colors_array[11 - (j + 1)] = xmas_color_array[3 - i][1]; - used_colors_array[11 - (j + 2)] = xmas_color_array[3 - i][2]; - manager.keyboard.transition_colors_to(&used_colors_array, steps, 1).unwrap(); - } - for j in (0..12).step_by(3) { - used_colors_array[11 - j] = 0; - used_colors_array[11 - (j + 1)] = 0; - used_colors_array[11 - (j + 2)] = 0; - manager.keyboard.transition_colors_to(&used_colors_array, steps, 1).unwrap(); - } + for j in (0..12).step_by(3) { + used_colors_array[j] = 0; + used_colors_array[j + 1] = 0; + used_colors_array[j + 2] = 0; + manager.keyboard.transition_colors_to(&used_colors_array, steps, 1).unwrap(); } } - } - 3 => { - let state1 = [255, 255, 255, 0, 0, 0, 255, 255, 255, 0, 0, 0]; - let state2 = [0, 0, 0, 255, 255, 255, 0, 0, 0, 255, 255, 255]; - let steps = 30; - for _i in 0..4 { - manager.keyboard.transition_colors_to(&state1, steps, 1).unwrap(); - thread::sleep(Duration::from_millis(400)); - manager.keyboard.transition_colors_to(&state2, steps, 1).unwrap(); - thread::sleep(Duration::from_millis(400)); + } else { + for i in 0..4 { + for j in (0..12).step_by(3) { + used_colors_array[11 - j] = xmas_color_array[3 - i][0]; + used_colors_array[11 - (j + 1)] = xmas_color_array[3 - i][1]; + used_colors_array[11 - (j + 2)] = xmas_color_array[3 - i][2]; + manager.keyboard.transition_colors_to(&used_colors_array, steps, 1).unwrap(); + } + for j in (0..12).step_by(3) { + used_colors_array[11 - j] = 0; + used_colors_array[11 - (j + 1)] = 0; + used_colors_array[11 - (j + 2)] = 0; + manager.keyboard.transition_colors_to(&used_colors_array, steps, 1).unwrap(); + } } } - _ => unreachable!("Subeffect index for Christmas effect is out of range."), } + 3 => { + let state1 = [255, 255, 255, 0, 0, 0, 255, 255, 255, 0, 0, 0]; + let state2 = [0, 0, 0, 255, 255, 255, 0, 0, 0, 255, 255, 255]; + let steps = 30; + for _i in 0..4 { + manager.keyboard.transition_colors_to(&state1, steps, 1).unwrap(); + thread::sleep(Duration::from_millis(400)); + manager.keyboard.transition_colors_to(&state2, steps, 1).unwrap(); + thread::sleep(Duration::from_millis(400)); + } + } + _ => unreachable!("Subeffect index for Christmas effect is out of range."), } } } diff --git a/app/src/effects/disco.rs b/app/src/effects/disco.rs index a27ccfc..ff6d152 100644 --- a/app/src/effects/disco.rs +++ b/app/src/effects/disco.rs @@ -4,18 +4,14 @@ use rand::Rng; use crate::profile::Profile; -pub(super) struct Disco; +pub fn play(manager: &mut super::Inner, p: &Profile, thread_rng: &mut rand::rngs::ThreadRng) { + while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { + let colors = [[255, 0, 0], [255, 255, 0], [0, 255, 0], [0, 255, 255], [0, 0, 255], [255, 0, 255]]; + let colors_index = thread_rng.gen_range(0..6); + let new_values = colors[colors_index]; -impl Disco { - pub fn play(manager: &mut super::Inner, p: &Profile, thread_rng: &mut rand::rngs::ThreadRng) { - while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - let colors = [[255, 0, 0], [255, 255, 0], [0, 255, 0], [0, 255, 255], [0, 0, 255], [255, 0, 255]]; - let colors_index = thread_rng.gen_range(0..6); - let new_values = colors[colors_index]; - - let zone_index = thread_rng.gen_range(0..4); - manager.keyboard.set_zone_by_index(zone_index, new_values).unwrap(); - thread::sleep(Duration::from_millis(2000 / (u64::from(p.speed) * 4))); - } + let zone_index = thread_rng.gen_range(0..4); + manager.keyboard.set_zone_by_index(zone_index, new_values).unwrap(); + thread::sleep(Duration::from_millis(2000 / (u64::from(p.speed) * 4))); } } diff --git a/app/src/effects/fade.rs b/app/src/effects/fade.rs index dbe1450..a0c9d1a 100644 --- a/app/src/effects/fade.rs +++ b/app/src/effects/fade.rs @@ -11,48 +11,44 @@ use device_query::DeviceQuery; use crate::profile::Profile; -pub(super) struct Fade; +pub fn play(manager: &mut super::Inner, p: &Profile) { + let stop_signals = manager.stop_signals.clone(); -impl Fade { - pub fn play(manager: &mut super::Inner, p: &Profile) { - let stop_signals = manager.stop_signals.clone(); + let kill_thread = Arc::new(AtomicBool::new(false)); + let exit_thread = kill_thread.clone(); - let kill_thread = Arc::new(AtomicBool::new(false)); - let exit_thread = kill_thread.clone(); + let state = device_query::DeviceState::new(); + thread::spawn(move || { let state = device_query::DeviceState::new(); - thread::spawn(move || { - let state = device_query::DeviceState::new(); + loop { + if !state.get_keys().is_empty() { + stop_signals.keyboard_stop_signal.store(true, Ordering::SeqCst); + } - loop { - if !state.get_keys().is_empty() { - stop_signals.keyboard_stop_signal.store(true, Ordering::SeqCst); - } + if exit_thread.load(Ordering::SeqCst) { + break; + } - if exit_thread.load(Ordering::SeqCst) { - break; - } + thread::sleep(Duration::from_millis(5)); + } + }); - thread::sleep(Duration::from_millis(5)); - } - }); - - let mut now = Instant::now(); - while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - if state.get_keys().is_empty() { - if now.elapsed() > Duration::from_secs(20 / u64::from(p.speed)) { - manager.keyboard.transition_colors_to(&[0; 12], 230, 3).unwrap(); - } else { - thread::sleep(Duration::from_millis(20)); - } + let mut now = Instant::now(); + while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { + if state.get_keys().is_empty() { + if now.elapsed() > Duration::from_secs(20 / u64::from(p.speed)) { + manager.keyboard.transition_colors_to(&[0; 12], 230, 3).unwrap(); } else { - manager.keyboard.set_colors_to(&p.rgb_array()).unwrap(); - manager.stop_signals.keyboard_stop_signal.store(false, Ordering::SeqCst); - now = Instant::now(); + thread::sleep(Duration::from_millis(20)); } + } else { + manager.keyboard.set_colors_to(&p.rgb_array()).unwrap(); + manager.stop_signals.keyboard_stop_signal.store(false, Ordering::SeqCst); + now = Instant::now(); } - - kill_thread.store(true, Ordering::SeqCst); } + + kill_thread.store(true, Ordering::SeqCst); } diff --git a/app/src/effects/lightning.rs b/app/src/effects/lightning.rs index cd6cc25..e94ffc8 100644 --- a/app/src/effects/lightning.rs +++ b/app/src/effects/lightning.rs @@ -4,30 +4,26 @@ use rand::{rngs::ThreadRng, Rng}; use crate::profile::Profile; -pub(super) struct Lightning; +pub fn play(manager: &mut super::Inner, p: &Profile, thread_rng: &mut ThreadRng) { + while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { + let profile_array = p.rgb_array(); -impl Lightning { - pub fn play(manager: &mut super::Inner, p: &Profile, thread_rng: &mut ThreadRng) { - while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - let profile_array = p.rgb_array(); - - if manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - break; - } - let zone_index = thread_rng.gen_range(0..4); - let steps = thread_rng.gen_range(50..=200); + if manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { + break; + } + let zone_index = thread_rng.gen_range(0..4); + let steps = thread_rng.gen_range(50..=200); - let mut arr = [0; 12]; - let zone_start = zone_index * 3; + let mut arr = [0; 12]; + let zone_start = zone_index * 3; - arr[zone_start] = profile_array[zone_start]; - arr[zone_start + 1] = profile_array[zone_start + 1]; - arr[zone_start + 2] = profile_array[zone_start + 2]; + arr[zone_start] = profile_array[zone_start]; + arr[zone_start + 1] = profile_array[zone_start + 1]; + arr[zone_start + 2] = profile_array[zone_start + 2]; - manager.keyboard.set_colors_to(&arr).unwrap(); - manager.keyboard.transition_colors_to(&[0; 12], steps / p.speed, 5).unwrap(); - let sleep_time = thread_rng.gen_range(100..=2000); - thread::sleep(Duration::from_millis(sleep_time)); - } + manager.keyboard.set_colors_to(&arr).unwrap(); + manager.keyboard.transition_colors_to(&[0; 12], steps / p.speed, 5).unwrap(); + let sleep_time = thread_rng.gen_range(100..=2000); + thread::sleep(Duration::from_millis(sleep_time)); } } diff --git a/app/src/effects/mod.rs b/app/src/effects/mod.rs index ce68889..8992840 100644 --- a/app/src/effects/mod.rs +++ b/app/src/effects/mod.rs @@ -16,17 +16,7 @@ use std::{ use std::{sync::Arc, thread::JoinHandle}; use thiserror::Error; -use self::{ - ambient::AmbientLight, - christmas::Christmas, - custom_effect::{CustomEffect, EffectType}, - disco::Disco, - fade::Fade, - lightning::Lightning, - ripple::Ripple, - swipe::Swipe, - temperature::Temperature, -}; +use self::custom_effect::{CustomEffect, EffectType}; mod ambient; mod christmas; @@ -37,6 +27,7 @@ mod lightning; mod ripple; mod swipe; mod temperature; +mod zones; #[derive(Debug, Error, PartialEq)] #[error("Could not create keyboard manager")] @@ -189,23 +180,23 @@ impl Inner { } }, - Effects::Lightning => Lightning::play(self, &profile, &mut thread_rng), + Effects::Lightning => lightning::play(self, &profile, &mut thread_rng), Effects::AmbientLight { mut fps, mut saturation_boost } => { fps = fps.clamp(1, 60); saturation_boost = saturation_boost.clamp(0.0, 1.0); - AmbientLight::play(self, fps, saturation_boost); + ambient::play(self, fps, saturation_boost); } Effects::SmoothWave => { profile.rgb_zones = profile::arr_to_zones([255, 0, 0, 0, 255, 0, 0, 0, 255, 255, 0, 255]); - Swipe::play(self, &profile); + swipe::play(self, &profile); } - Effects::Swipe => Swipe::play(self, &profile), - Effects::Disco => Disco::play(self, &profile, &mut thread_rng), - Effects::Christmas => Christmas::play(self, &mut thread_rng), - Effects::Fade => Fade::play(self, &profile), - Effects::Temperature => Temperature::play(self), - Effects::Ripple => Ripple::play(self, &profile), + Effects::Swipe => swipe::play(self, &profile), + Effects::Disco => disco::play(self, &profile, &mut thread_rng), + Effects::Christmas => christmas::play(self, &mut thread_rng), + Effects::Fade => fade::play(self, &profile), + Effects::Temperature => temperature::play(self), + Effects::Ripple => ripple::play(self, &profile), } self.stop_signals.store_false(); } diff --git a/app/src/effects/ripple.rs b/app/src/effects/ripple.rs index d2818d9..80df69a 100644 --- a/app/src/effects/ripple.rs +++ b/app/src/effects/ripple.rs @@ -10,7 +10,7 @@ use std::{ use device_query::{DeviceEvents, Keycode}; -use crate::profile::Profile; +use crate::{effects::zones::KEY_ZONES, profile::Profile}; #[derive(Clone, Copy, PartialEq, Eq, Debug)] enum RippleMove { @@ -20,214 +20,102 @@ enum RippleMove { Off, } -pub(super) struct Ripple; - -impl Ripple { - pub fn play(manager: &mut super::Inner, p: &Profile) { - // Welcome to the definition of i-don't-know-what-im-doing - let keys_zone_1: [Keycode; 24] = [ - Keycode::Escape, - Keycode::F1, - Keycode::F2, - Keycode::F3, - Keycode::F4, - Keycode::Grave, - Keycode::Key1, - Keycode::Key2, - Keycode::Key3, - Keycode::Key4, - Keycode::Tab, - Keycode::Q, - Keycode::W, - Keycode::E, - Keycode::CapsLock, - Keycode::A, - Keycode::S, - Keycode::D, - Keycode::LShift, - Keycode::Z, - Keycode::X, - Keycode::LControl, - Keycode::LMeta, - Keycode::LAlt, - ]; - let keys_zone_2: [Keycode; 29] = [ - Keycode::F5, - Keycode::F6, - Keycode::F7, - Keycode::F8, - Keycode::F9, - Keycode::F10, - Keycode::Key5, - Keycode::Key6, - Keycode::Key7, - Keycode::Key8, - Keycode::Key9, - Keycode::R, - Keycode::T, - Keycode::Y, - Keycode::U, - Keycode::I, - Keycode::F, - Keycode::G, - Keycode::H, - Keycode::J, - Keycode::K, - Keycode::C, - Keycode::V, - Keycode::B, - Keycode::N, - Keycode::M, - Keycode::Comma, - Keycode::Space, - Keycode::RAlt, - ]; - let keys_zone_3: [Keycode; 25] = [ - Keycode::F11, - Keycode::F12, - Keycode::Insert, - Keycode::Delete, - Keycode::Key0, - Keycode::Minus, - Keycode::Equal, - Keycode::Backspace, - Keycode::O, - Keycode::P, - Keycode::LeftBracket, - Keycode::RightBracket, - Keycode::Enter, - Keycode::L, - Keycode::Semicolon, - Keycode::Apostrophe, - Keycode::BackSlash, - Keycode::Dot, - Keycode::Slash, - Keycode::RShift, - Keycode::RControl, - Keycode::Up, - Keycode::Down, - Keycode::Left, - Keycode::Right, - ]; - - let keys_zone_4: [Keycode; 18] = [ - Keycode::Home, - Keycode::End, - Keycode::PageUp, - Keycode::PageDown, - Keycode::NumpadDivide, - Keycode::NumpadMultiply, - Keycode::NumpadSubtract, - Keycode::Numpad7, - Keycode::Numpad8, - Keycode::Numpad9, - Keycode::Numpad4, - Keycode::Numpad5, - Keycode::Numpad6, - Keycode::NumpadAdd, - Keycode::Numpad1, - Keycode::Numpad2, - Keycode::Numpad3, - Keycode::Numpad0, - ]; - - let key_zones = [keys_zone_1.to_vec(), keys_zone_2.to_vec(), keys_zone_3.to_vec(), keys_zone_4.to_vec()]; - - let stop_signals = manager.stop_signals.clone(); - - let kill_thread = Arc::new(AtomicBool::new(false)); - let exit_thread = kill_thread.clone(); - - enum Event { - KeyPress(Keycode), - KeyRelease(Keycode), - } +pub fn play(manager: &mut super::Inner, p: &Profile) { + // Welcome to the definition of i-don't-know-what-im-doing + let stop_signals = manager.stop_signals.clone(); - let (tx, rx) = crossbeam_channel::unbounded::(); + let kill_thread = Arc::new(AtomicBool::new(false)); + let exit_thread = kill_thread.clone(); - thread::spawn(move || { - let state = device_query::DeviceState::new(); + enum Event { + KeyPress(Keycode), + KeyRelease(Keycode), + } - // tx_clone.send(Event::KeyPress(Keycode::Meta)).unwrap(); - let tx_clone = tx.clone(); + let (tx, rx) = crossbeam_channel::unbounded::(); - let guard = state.on_key_down(move |key| { - stop_signals.keyboard_stop_signal.store(true, Ordering::SeqCst); + thread::spawn(move || { + let state = device_query::DeviceState::new(); - let _ = tx_clone.send(Event::KeyPress(*key)); - }); + // tx_clone.send(Event::KeyPress(Keycode::Meta)).unwrap(); + let tx_clone = tx.clone(); - let guard2 = state.on_key_up(move |key| { - let _ = tx.send(Event::KeyRelease(*key)); - }); + let guard = state.on_key_down(move |key| { + stop_signals.keyboard_stop_signal.store(true, Ordering::SeqCst); - loop { - if exit_thread.load(Ordering::SeqCst) { - drop(guard); - drop(guard2); + let _ = tx_clone.send(Event::KeyPress(*key)); + }); - break; - } + let guard2 = state.on_key_up(move |key| { + let _ = tx.send(Event::KeyRelease(*key)); + }); - thread::sleep(Duration::from_millis(5)); + loop { + if exit_thread.load(Ordering::SeqCst) { + drop(guard); + drop(guard2); + + break; } - }); - let mut zone_pressed: [HashSet; 4] = [HashSet::new(), HashSet::new(), HashSet::new(), HashSet::new()]; - let mut zone_state: [RippleMove; 4] = [RippleMove::Off, RippleMove::Off, RippleMove::Off, RippleMove::Off]; + thread::sleep(Duration::from_millis(5)); + } + }); - let mut last_step_time = Instant::now(); + let mut zone_pressed: [HashSet; 4] = [HashSet::new(), HashSet::new(), HashSet::new(), HashSet::new()]; + let mut zone_state: [RippleMove; 4] = [RippleMove::Off, RippleMove::Off, RippleMove::Off, RippleMove::Off]; - while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - match rx.try_recv() { - Ok(event) => match event { - Event::KeyPress(key) => { - for (i, zone) in key_zones.iter().enumerate() { - if zone.contains(&key) { - zone_pressed[i].insert(key); - } - } + let mut last_step_time = Instant::now(); - manager.stop_signals.keyboard_stop_signal.store(false, Ordering::SeqCst); - } - Event::KeyRelease(key) => { - for (i, zone) in key_zones.iter().enumerate() { - if zone.contains(&key) { - zone_pressed[i].remove(&key); - } + while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { + match rx.try_recv() { + Ok(event) => match event { + Event::KeyPress(key) => { + for (i, zone) in KEY_ZONES.iter().enumerate() { + if zone.contains(&key) { + zone_pressed[i].insert(key); } } - }, - Err(err) => { - if let crossbeam_channel::TryRecvError::Disconnected = err { - break; + + manager.stop_signals.keyboard_stop_signal.store(false, Ordering::SeqCst); + } + Event::KeyRelease(key) => { + for (i, zone) in KEY_ZONES.iter().enumerate() { + if zone.contains(&key) { + zone_pressed[i].remove(&key); + } } } + }, + Err(err) => { + if let crossbeam_channel::TryRecvError::Disconnected = err { + break; + } } + } - zone_state = advance_zone_state(zone_state, &mut last_step_time, &p.speed); + zone_state = advance_zone_state(zone_state, &mut last_step_time, &p.speed); - for (i, pressed) in zone_pressed.iter().enumerate() { - if !pressed.is_empty() { - zone_state[i] = RippleMove::Center; - } + for (i, pressed) in zone_pressed.iter().enumerate() { + if !pressed.is_empty() { + zone_state[i] = RippleMove::Center; } + } - let rgb_array = p.rgb_array(); - let mut final_arr: [u8; 12] = [0; 12]; + let rgb_array = p.rgb_array(); + let mut final_arr: [u8; 12] = [0; 12]; - for (i, ripple_move) in zone_state.iter().enumerate() { - if ripple_move != &RippleMove::Off { - final_arr[(i * 3)..((i * 3) + 3)].copy_from_slice(&rgb_array[(i * 3)..((i * 3) + 3)]); - } + for (i, ripple_move) in zone_state.iter().enumerate() { + if ripple_move != &RippleMove::Off { + final_arr[(i * 3)..((i * 3) + 3)].copy_from_slice(&rgb_array[(i * 3)..((i * 3) + 3)]); } - - manager.keyboard.transition_colors_to(&final_arr, 20, 0).unwrap(); - thread::sleep(Duration::from_millis(50)); } - kill_thread.store(true, Ordering::SeqCst); + manager.keyboard.transition_colors_to(&final_arr, 20, 0).unwrap(); + thread::sleep(Duration::from_millis(50)); } + + kill_thread.store(true, Ordering::SeqCst); } fn advance_zone_state(zone_state: [RippleMove; 4], last_step_time: &mut Instant, speed: &u8) -> [RippleMove; 4] { diff --git a/app/src/effects/swipe.rs b/app/src/effects/swipe.rs index e1f2b03..048a7ac 100644 --- a/app/src/effects/swipe.rs +++ b/app/src/effects/swipe.rs @@ -2,28 +2,24 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; use crate::{enums::Direction, profile::Profile}; -pub(super) struct Swipe; +pub fn play(manager: &mut super::Inner, p: &Profile) { + let mut rgb_array = p.rgb_array(); -impl Swipe { - pub fn play(manager: &mut super::Inner, p: &Profile) { - let mut rgb_array = p.rgb_array(); - - while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - if manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - break; - } + while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { + if manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { + break; + } - match p.direction { - Direction::Left => rgb_array.rotate_right(3), - Direction::Right => rgb_array.rotate_left(3), - } + match p.direction { + Direction::Left => rgb_array.rotate_right(3), + Direction::Right => rgb_array.rotate_left(3), + } - manager.keyboard.transition_colors_to(&rgb_array, 150 / p.speed, 10).unwrap(); + manager.keyboard.transition_colors_to(&rgb_array, 150 / p.speed, 10).unwrap(); - if manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - break; - } - thread::sleep(Duration::from_millis(20)); + if manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { + break; } + thread::sleep(Duration::from_millis(20)); } } diff --git a/app/src/effects/temperature.rs b/app/src/effects/temperature.rs index 83eddc2..974f2e0 100644 --- a/app/src/effects/temperature.rs +++ b/app/src/effects/temperature.rs @@ -2,42 +2,38 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; use sysinfo::{Components, System}; -pub(super) struct Temperature; - -impl Temperature { - pub fn play(manager: &mut super::Inner) { - let safe_temp = 20.0; - let ramp_boost = 1.6; - let temp_cool: [f32; 12] = [0.0, 255.0, 0.0, 0.0, 255.0, 0.0, 0.0, 255.0, 0.0, 0.0, 255.0, 0.0]; - let temp_hot: [f32; 12] = [255.0, 0.0, 0.0, 255.0, 0.0, 0.0, 255.0, 0.0, 0.0, 255.0, 0.0, 0.0]; - - let mut color_differences: [f32; 12] = [0.0; 12]; - for index in 0..12 { - color_differences[index] = temp_hot[index] - temp_cool[index]; - } +pub fn play(manager: &mut super::Inner) { + let safe_temp = 20.0; + let ramp_boost = 1.6; + let temp_cool: [f32; 12] = [0.0, 255.0, 0.0, 0.0, 255.0, 0.0, 0.0, 255.0, 0.0, 0.0, 255.0, 0.0]; + let temp_hot: [f32; 12] = [255.0, 0.0, 0.0, 255.0, 0.0, 0.0, 255.0, 0.0, 0.0, 255.0, 0.0, 0.0]; + + let mut color_differences: [f32; 12] = [0.0; 12]; + for index in 0..12 { + color_differences[index] = temp_hot[index] - temp_cool[index]; + } - let mut sys = System::new_all(); - sys.refresh_all(); + let mut sys = System::new_all(); + sys.refresh_all(); - let mut components = Components::new_with_refreshed_list(); + let mut components = Components::new_with_refreshed_list(); - for component in components.iter_mut() { - if component.label().contains("Tctl") { - while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - component.refresh(); - let mut adjusted_temp = component.temperature() - safe_temp; - if adjusted_temp < 0.0 { - adjusted_temp = 0.0; - } - let temp_percent = (adjusted_temp / 100.0) * ramp_boost; + for component in components.iter_mut() { + if component.label().contains("Tctl") { + while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { + component.refresh(); + let mut adjusted_temp = component.temperature() - safe_temp; + if adjusted_temp < 0.0 { + adjusted_temp = 0.0; + } + let temp_percent = (adjusted_temp / 100.0) * ramp_boost; - let mut target = [0.0; 12]; - for index in 0..12 { - target[index] = color_differences[index].mul_add(temp_percent, temp_cool[index]); - } - manager.keyboard.transition_colors_to(&target.map(|val| val as u8), 5, 1).unwrap(); - thread::sleep(Duration::from_millis(200)); + let mut target = [0.0; 12]; + for index in 0..12 { + target[index] = color_differences[index].mul_add(temp_percent, temp_cool[index]); } + manager.keyboard.transition_colors_to(&target.map(|val| val as u8), 5, 1).unwrap(); + thread::sleep(Duration::from_millis(200)); } } } diff --git a/app/src/effects/zones.rs b/app/src/effects/zones.rs new file mode 100644 index 0000000..7fe3a85 --- /dev/null +++ b/app/src/effects/zones.rs @@ -0,0 +1,111 @@ +use device_query::Keycode; + +const KEYS_ZONE_1: [Keycode; 24] = [ + Keycode::Escape, + Keycode::F1, + Keycode::F2, + Keycode::F3, + Keycode::F4, + Keycode::Grave, + Keycode::Key1, + Keycode::Key2, + Keycode::Key3, + Keycode::Key4, + Keycode::Tab, + Keycode::Q, + Keycode::W, + Keycode::E, + Keycode::CapsLock, + Keycode::A, + Keycode::S, + Keycode::D, + Keycode::LShift, + Keycode::Z, + Keycode::X, + Keycode::LControl, + Keycode::LMeta, + Keycode::LAlt, +]; + +const KEYS_ZONE_2: [Keycode; 29] = [ + Keycode::F5, + Keycode::F6, + Keycode::F7, + Keycode::F8, + Keycode::F9, + Keycode::F10, + Keycode::Key5, + Keycode::Key6, + Keycode::Key7, + Keycode::Key8, + Keycode::Key9, + Keycode::R, + Keycode::T, + Keycode::Y, + Keycode::U, + Keycode::I, + Keycode::F, + Keycode::G, + Keycode::H, + Keycode::J, + Keycode::K, + Keycode::C, + Keycode::V, + Keycode::B, + Keycode::N, + Keycode::M, + Keycode::Comma, + Keycode::Space, + Keycode::RAlt, +]; + +const KEYS_ZONE_3: [Keycode; 25] = [ + Keycode::F11, + Keycode::F12, + Keycode::Insert, + Keycode::Delete, + Keycode::Key0, + Keycode::Minus, + Keycode::Equal, + Keycode::Backspace, + Keycode::O, + Keycode::P, + Keycode::LeftBracket, + Keycode::RightBracket, + Keycode::Enter, + Keycode::L, + Keycode::Semicolon, + Keycode::Apostrophe, + Keycode::BackSlash, + Keycode::Dot, + Keycode::Slash, + Keycode::RShift, + Keycode::RControl, + Keycode::Up, + Keycode::Down, + Keycode::Left, + Keycode::Right, +]; + +const KEYS_ZONE_4: [Keycode; 18] = [ + Keycode::Home, + Keycode::End, + Keycode::PageUp, + Keycode::PageDown, + Keycode::NumpadDivide, + Keycode::NumpadMultiply, + Keycode::NumpadSubtract, + Keycode::Numpad7, + Keycode::Numpad8, + Keycode::Numpad9, + Keycode::Numpad4, + Keycode::Numpad5, + Keycode::Numpad6, + Keycode::NumpadAdd, + Keycode::Numpad1, + Keycode::Numpad2, + Keycode::Numpad3, + Keycode::Numpad0, +]; + +pub const KEY_ZONES: [&[Keycode]; 4] = [&KEYS_ZONE_1, &KEYS_ZONE_2, &KEYS_ZONE_3, &KEYS_ZONE_4]; diff --git a/app/src/gui/menu_bar.rs b/app/src/gui/menu_bar.rs index cc62a27..4565498 100644 --- a/app/src/gui/menu_bar.rs +++ b/app/src/gui/menu_bar.rs @@ -79,6 +79,7 @@ impl MenuBarState { } } + #[allow(unused_variables)] fn show_menu(&mut self, ctx: &Context, ui: &mut egui::Ui, toasts: &mut Toasts) { use egui::menu; diff --git a/app/src/main.rs b/app/src/main.rs index d23440e..4ad0ffc 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -12,13 +12,12 @@ mod profile; mod tray; mod util; -use std::{ - cell::RefCell, - rc::Rc, - sync::{ - atomic::{AtomicBool, Ordering}, - Arc, - }, +#[cfg(not(target_os = "linux"))] +use std::{cell::RefCell, rc::Rc}; + +use std::sync::{ + atomic::{AtomicBool, Ordering}, + Arc, }; use cli::{GuiCommand, OutputType}; diff --git a/app/src/tray.rs b/app/src/tray.rs index 2a60523..786d5c9 100644 --- a/app/src/tray.rs +++ b/app/src/tray.rs @@ -23,7 +23,7 @@ impl TrayMenuItems { } } -fn build_tray_menu(items: &TrayMenuItems, has_gui: bool) -> Menu { +fn build_tray_menu(items: &TrayMenuItems, _has_gui: bool) -> Menu { let menu = Menu::new(); // TODO: Wait for upstream fix // if has_gui { From f8b8837e6f518c7b24353de156cd854c0036f269 Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Sun, 17 Nov 2024 23:50:11 +0100 Subject: [PATCH 12/15] Control the effect options UI inside Effects --- app/src/cli.rs | 8 +-- app/src/enums.rs | 2 +- app/src/gui/effect_options.rs | 69 ------------------- app/src/gui/menu_bar.rs | 2 +- app/src/gui/mod.rs | 14 ++-- app/src/gui/profile_list.rs | 7 +- app/src/main.rs | 2 +- app/src/{effects => manager}/custom_effect.rs | 0 app/src/{ => manager}/effects/ambient.rs | 4 +- app/src/{ => manager}/effects/christmas.rs | 4 +- app/src/manager/effects/default_ui.rs | 62 +++++++++++++++++ app/src/{ => manager}/effects/disco.rs | 4 +- app/src/{ => manager}/effects/fade.rs | 4 +- app/src/{ => manager}/effects/lightning.rs | 4 +- app/src/manager/effects/mod.rs | 42 +++++++++++ app/src/{ => manager}/effects/ripple.rs | 7 +- app/src/{ => manager}/effects/swipe.rs | 4 +- app/src/{ => manager}/effects/temperature.rs | 4 +- app/src/{ => manager}/effects/zones.rs | 0 app/src/{effects => manager}/mod.rs | 11 +-- app/src/profile.rs | 9 ++- 21 files changed, 151 insertions(+), 112 deletions(-) delete mode 100644 app/src/gui/effect_options.rs rename app/src/{effects => manager}/custom_effect.rs (100%) rename app/src/{ => manager}/effects/ambient.rs (97%) rename app/src/{ => manager}/effects/christmas.rs (97%) create mode 100644 app/src/manager/effects/default_ui.rs rename app/src/{ => manager}/effects/disco.rs (81%) rename app/src/{ => manager}/effects/fade.rs (93%) rename app/src/{ => manager}/effects/lightning.rs (88%) create mode 100644 app/src/manager/effects/mod.rs rename app/src/{ => manager}/effects/ripple.rs (97%) rename app/src/{ => manager}/effects/swipe.rs (85%) rename app/src/{ => manager}/effects/temperature.rs (95%) rename app/src/{ => manager}/effects/zones.rs (100%) rename app/src/{effects => manager}/mod.rs (98%) diff --git a/app/src/cli.rs b/app/src/cli.rs index d396f40..80976d7 100644 --- a/app/src/cli.rs +++ b/app/src/cli.rs @@ -6,8 +6,8 @@ use strum::IntoEnumIterator; use thiserror::Error; use crate::{ - effects::{self, custom_effect::CustomEffect, ManagerCreationError}, enums::{Brightness, Direction, Effects}, + manager::{self, custom_effect::CustomEffect, ManagerCreationError}, profile::{self, Profile}, }; @@ -152,7 +152,7 @@ pub fn try_cli() -> Result { } fn handle_cli_output(output_type: OutputType) -> Result { - let manager_result = effects::EffectManager::new(effects::OperationMode::Cli); + let manager_result = manager::EffectManager::new(manager::OperationMode::Cli); let instance_not_unique = manager_result .as_ref() .err() @@ -205,8 +205,8 @@ fn parse_cli() -> Result { [0; 12] }; - let profile = Profile { - name: "Profile".to_string(), + let mut profile = Profile { + name: None, rgb_zones: profile::arr_to_zones(rgb_array), effect, direction, diff --git a/app/src/enums.rs b/app/src/enums.rs index 7d8054d..6b6b86c 100644 --- a/app/src/enums.rs +++ b/app/src/enums.rs @@ -1,4 +1,4 @@ -use crate::{effects::custom_effect::CustomEffect, profile::Profile}; +use crate::{manager::custom_effect::CustomEffect, profile::Profile}; use serde::{Deserialize, Serialize}; use strum_macros::{Display, EnumIter, EnumString, IntoStaticStr}; diff --git a/app/src/gui/effect_options.rs b/app/src/gui/effect_options.rs deleted file mode 100644 index 4ca2cb7..0000000 --- a/app/src/gui/effect_options.rs +++ /dev/null @@ -1,69 +0,0 @@ -use eframe::egui::{ComboBox, Slider, Ui}; -use legion_rgb_driver::SPEED_RANGE; -use strum::IntoEnumIterator; - -use crate::{ - enums::{Brightness, Direction, Effects}, - profile::Profile, -}; - -use super::style::SpacingStyle; - -#[derive(Default)] -pub struct EffectOptions; - -const COMBOBOX_WIDTH: f32 = 20.0; - -impl EffectOptions { - pub fn show(&mut self, ui: &mut Ui, profile: &mut Profile, update_lights: &mut bool, spacing: &SpacingStyle) { - ui.scope(|ui| { - ui.style_mut().spacing.item_spacing = spacing.default; - - ComboBox::from_label("Brightness") - .width(COMBOBOX_WIDTH) - .selected_text({ - let text: &'static str = profile.brightness.into(); - text - }) - .show_ui(ui, |ui| { - for val in Brightness::iter() { - let text: &'static str = val.into(); - *update_lights |= ui.selectable_value(&mut profile.brightness, val, text).changed(); - } - }); - - ui.add_enabled_ui(profile.effect.takes_direction(), |ui| { - ComboBox::from_label("Direction") - .width(COMBOBOX_WIDTH) - .selected_text({ - let text: &'static str = profile.direction.into(); - text - }) - .show_ui(ui, |ui| { - for val in Direction::iter() { - let text: &'static str = val.into(); - *update_lights |= ui.selectable_value(&mut profile.direction, val, text).changed(); - } - }); - }); - - if let Effects::AmbientLight { fps, saturation_boost: saturation } = &mut profile.effect { - ui.horizontal(|ui| { - *update_lights |= ui.add(Slider::new(fps, 1..=60)).changed(); - ui.label("FPS"); - }); - ui.horizontal(|ui| { - *update_lights |= ui.add(Slider::new(saturation, 0.0..=1.0)).changed(); - ui.label("Saturation Boost"); - }); - } else { - let range = if profile.effect.is_built_in() { SPEED_RANGE } else { 1..=10 }; - - ui.horizontal(|ui| { - *update_lights |= ui.add_enabled(profile.effect.takes_speed(), Slider::new(&mut profile.speed, range)).changed(); - ui.label("Speed"); - }); - } - }); - } -} diff --git a/app/src/gui/menu_bar.rs b/app/src/gui/menu_bar.rs index 4565498..7f7fa9d 100644 --- a/app/src/gui/menu_bar.rs +++ b/app/src/gui/menu_bar.rs @@ -7,7 +7,7 @@ use egui_file::FileDialog; use egui_notify::Toasts; use std::{path::PathBuf, time::Duration}; -use crate::{effects::custom_effect::CustomEffect, gui::modals, profile::Profile}; +use crate::{gui::modals, manager::custom_effect::CustomEffect, profile::Profile}; use super::{CustomEffectState, GuiMessage}; diff --git a/app/src/gui/mod.rs b/app/src/gui/mod.rs index d6e78a6..9f521f2 100644 --- a/app/src/gui/mod.rs +++ b/app/src/gui/mod.rs @@ -21,19 +21,18 @@ use tray_icon::menu::MenuEvent; use crate::{ cli::OutputType, - effects::{self, custom_effect::CustomEffect, EffectManager, ManagerCreationError}, enums::Effects, + manager::{self, custom_effect::CustomEffect, EffectManager, ManagerCreationError}, persist::Settings, tray::{QUIT_ID, SHOW_ID}, }; -use self::{effect_options::EffectOptions, menu_bar::MenuBarState, profile_list::ProfileList, style::Theme}; +use self::{menu_bar::MenuBarState, profile_list::ProfileList, style::Theme}; -mod effect_options; mod menu_bar; mod modals; mod profile_list; -mod style; +pub mod style; pub struct App { settings: Settings, @@ -51,7 +50,6 @@ pub struct App { menu_bar: MenuBarState, profile_list: ProfileList, - effect_options: EffectOptions, global_rgb: [u8; 3], theme: Theme, toasts: Toasts, @@ -74,7 +72,7 @@ impl App { pub fn new(output: OutputType, has_tray: Arc, visible: Arc) -> Self { let (gui_tx, gui_rx) = crossbeam_channel::unbounded::(); - let manager_result = EffectManager::new(effects::OperationMode::Gui); + let manager_result = EffectManager::new(manager::OperationMode::Gui); let instance_not_unique = if let Err(err) = &manager_result { &ManagerCreationError::InstanceAlreadyRunning == err.current_context() @@ -106,7 +104,6 @@ impl App { menu_bar: MenuBarState::new(gui_tx_c), profile_list: ProfileList::new(profiles), - effect_options: EffectOptions::default(), global_rgb: [0; 3], theme: Theme::default(), toasts: Toasts::default(), @@ -247,7 +244,8 @@ impl eframe::App for App { ui.set_width(res.inner.rect.width()); ui.add_enabled_ui(matches!(self.custom_effect, CustomEffectState::None), |ui| { - self.effect_options.show(ui, &mut self.settings.current_profile, &mut self.profile_changed, &self.theme.spacing); + let mut effect = self.settings.current_profile.effect; + effect.show_ui(ui, &mut self.settings.current_profile, &mut self.profile_changed, &self.theme); }); self.profile_list diff --git a/app/src/gui/profile_list.rs b/app/src/gui/profile_list.rs index 1116a9c..63a3a28 100644 --- a/app/src/gui/profile_list.rs +++ b/app/src/gui/profile_list.rs @@ -35,13 +35,13 @@ impl ProfileList { modal.buttons(ui, |ui| { let is_empty = self.new_profile_name.is_empty(); - let name_not_unique = self.profiles.iter().any(|prof| prof.name == self.new_profile_name); + let name_not_unique = self.profiles.iter().any(|prof| prof.name.as_ref() == Some(&self.new_profile_name)); modal.button(ui, "Cancel"); ui.add_enabled_ui(!is_empty && !name_not_unique, |ui| { if modal.button(ui, "Save").clicked() { - current_profile.name = self.new_profile_name.clone(); + current_profile.name = Some(self.new_profile_name.clone()); self.profiles.push(current_profile.clone()); }; }); @@ -99,7 +99,8 @@ impl ProfileList { ScrollArea::vertical().auto_shrink([false; 2]).show(ui, |ui| { ui.horizontal_wrapped(|ui| { for prof in &self.profiles { - if ui.selectable_value(current_profile, prof.clone(), &prof.name).clicked() { + let name = prof.name.as_ref().map(|s| s.as_str()).unwrap_or("Unnamed"); + if ui.selectable_value(current_profile, prof.clone(), name).clicked() { *changed = true; *custom_effect_state = CustomEffectState::None; }; diff --git a/app/src/main.rs b/app/src/main.rs index 4ad0ffc..31281a9 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -4,9 +4,9 @@ mod cli; #[cfg(target_os = "windows")] mod console; -mod effects; mod enums; mod gui; +mod manager; mod persist; mod profile; mod tray; diff --git a/app/src/effects/custom_effect.rs b/app/src/manager/custom_effect.rs similarity index 100% rename from app/src/effects/custom_effect.rs rename to app/src/manager/custom_effect.rs diff --git a/app/src/effects/ambient.rs b/app/src/manager/effects/ambient.rs similarity index 97% rename from app/src/effects/ambient.rs rename to app/src/manager/effects/ambient.rs index 17df960..8a65fb6 100644 --- a/app/src/effects/ambient.rs +++ b/app/src/manager/effects/ambient.rs @@ -9,13 +9,15 @@ use fast_image_resize as fr; use fr::Resizer; use scrap::{Capturer, Display, Frame, TraitCapturer, TraitPixelBuffer}; +use crate::manager::Inner; + #[derive(Clone, Copy)] struct ScreenDimensions { src: (u32, u32), dest: (u32, u32), } -pub fn play(manager: &mut super::Inner, fps: u8, saturation_boost: f32) { +pub fn play(manager: &mut Inner, fps: u8, saturation_boost: f32) { while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { //Display setup let display = Display::all().unwrap().remove(0); diff --git a/app/src/effects/christmas.rs b/app/src/manager/effects/christmas.rs similarity index 97% rename from app/src/effects/christmas.rs rename to app/src/manager/effects/christmas.rs index 9543fb7..cd24273 100644 --- a/app/src/effects/christmas.rs +++ b/app/src/manager/effects/christmas.rs @@ -2,7 +2,9 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; use rand::Rng; -pub fn play(manager: &mut super::Inner, thread_rng: &mut rand::rngs::ThreadRng) { +use crate::manager::Inner; + +pub fn play(manager: &mut Inner, thread_rng: &mut rand::rngs::ThreadRng) { let xmas_color_array = [[255, 10, 10], [255, 255, 20], [30, 255, 30], [70, 70, 255]]; let subeffect_count = 4; let mut last_subeffect = -1; diff --git a/app/src/manager/effects/default_ui.rs b/app/src/manager/effects/default_ui.rs new file mode 100644 index 0000000..657e9e8 --- /dev/null +++ b/app/src/manager/effects/default_ui.rs @@ -0,0 +1,62 @@ +use eframe::egui::{ComboBox, Slider, Ui}; +use legion_rgb_driver::SPEED_RANGE; +use strum::IntoEnumIterator; + +use crate::{ + enums::{Brightness, Direction}, + gui::style::SpacingStyle, + profile::Profile, +}; + +const COMBOBOX_WIDTH: f32 = 20.0; + +pub fn show(ui: &mut Ui, profile: &mut Profile, update_lights: &mut bool, spacing: &SpacingStyle) { + ui.scope(|ui| { + ui.style_mut().spacing.item_spacing = spacing.default; + + show_brightness(ui, profile, update_lights); + show_direction(ui, profile, update_lights); + show_effect_settings(ui, profile, update_lights); + }); +} + +pub fn show_brightness(ui: &mut Ui, profile: &mut Profile, update_lights: &mut bool) { + ComboBox::from_label("Brightness") + .width(COMBOBOX_WIDTH) + .selected_text({ + let text: &'static str = profile.brightness.into(); + text + }) + .show_ui(ui, |ui| { + for val in Brightness::iter() { + let text: &'static str = val.into(); + *update_lights |= ui.selectable_value(&mut profile.brightness, val, text).changed(); + } + }); +} + +pub fn show_direction(ui: &mut Ui, profile: &mut Profile, update_lights: &mut bool) { + ui.add_enabled_ui(profile.effect.takes_direction(), |ui| { + ComboBox::from_label("Direction") + .width(COMBOBOX_WIDTH) + .selected_text({ + let text: &'static str = profile.direction.into(); + text + }) + .show_ui(ui, |ui| { + for val in Direction::iter() { + let text: &'static str = val.into(); + *update_lights |= ui.selectable_value(&mut profile.direction, val, text).changed(); + } + }); + }); +} + +pub fn show_effect_settings(ui: &mut Ui, profile: &mut Profile, update_lights: &mut bool) { + let range = if profile.effect.is_built_in() { SPEED_RANGE } else { 1..=10 }; + + ui.horizontal(|ui| { + *update_lights |= ui.add_enabled(profile.effect.takes_speed(), Slider::new(&mut profile.speed, range)).changed(); + ui.label("Speed"); + }); +} diff --git a/app/src/effects/disco.rs b/app/src/manager/effects/disco.rs similarity index 81% rename from app/src/effects/disco.rs rename to app/src/manager/effects/disco.rs index ff6d152..7a28484 100644 --- a/app/src/effects/disco.rs +++ b/app/src/manager/effects/disco.rs @@ -2,9 +2,9 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; use rand::Rng; -use crate::profile::Profile; +use crate::{manager::Inner, profile::Profile}; -pub fn play(manager: &mut super::Inner, p: &Profile, thread_rng: &mut rand::rngs::ThreadRng) { +pub fn play(manager: &mut Inner, p: &Profile, thread_rng: &mut rand::rngs::ThreadRng) { while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { let colors = [[255, 0, 0], [255, 255, 0], [0, 255, 0], [0, 255, 255], [0, 0, 255], [255, 0, 255]]; let colors_index = thread_rng.gen_range(0..6); diff --git a/app/src/effects/fade.rs b/app/src/manager/effects/fade.rs similarity index 93% rename from app/src/effects/fade.rs rename to app/src/manager/effects/fade.rs index a0c9d1a..3c7cc90 100644 --- a/app/src/effects/fade.rs +++ b/app/src/manager/effects/fade.rs @@ -9,9 +9,9 @@ use std::{ use device_query::DeviceQuery; -use crate::profile::Profile; +use crate::{manager::Inner, profile::Profile}; -pub fn play(manager: &mut super::Inner, p: &Profile) { +pub fn play(manager: &mut Inner, p: &Profile) { let stop_signals = manager.stop_signals.clone(); let kill_thread = Arc::new(AtomicBool::new(false)); diff --git a/app/src/effects/lightning.rs b/app/src/manager/effects/lightning.rs similarity index 88% rename from app/src/effects/lightning.rs rename to app/src/manager/effects/lightning.rs index e94ffc8..6b6d02d 100644 --- a/app/src/effects/lightning.rs +++ b/app/src/manager/effects/lightning.rs @@ -2,9 +2,9 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; use rand::{rngs::ThreadRng, Rng}; -use crate::profile::Profile; +use crate::{manager::Inner, profile::Profile}; -pub fn play(manager: &mut super::Inner, p: &Profile, thread_rng: &mut ThreadRng) { +pub fn play(manager: &mut Inner, p: &Profile, thread_rng: &mut ThreadRng) { while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { let profile_array = p.rgb_array(); diff --git a/app/src/manager/effects/mod.rs b/app/src/manager/effects/mod.rs new file mode 100644 index 0000000..300c131 --- /dev/null +++ b/app/src/manager/effects/mod.rs @@ -0,0 +1,42 @@ +use default_ui::{show_brightness, show_direction}; +use eframe::egui::{self, Slider}; + +use crate::{enums::Effects, profile::Profile}; + +pub mod ambient; +pub mod christmas; +pub mod default_ui; +pub mod disco; +pub mod fade; +pub mod lightning; +pub mod ripple; +pub mod swipe; +pub mod temperature; +pub mod zones; + +impl Effects { + pub fn show_ui(&mut self, ui: &mut egui::Ui, profile: &mut Profile, update_lights: &mut bool, theme: &crate::gui::style::Theme) { + match self { + Effects::AmbientLight { fps, saturation_boost } => { + ui.scope(|ui| { + ui.style_mut().spacing.item_spacing = theme.spacing.default; + + show_brightness(ui, profile, update_lights); + show_direction(ui, profile, update_lights); + + ui.horizontal(|ui| { + *update_lights |= ui.add(Slider::new(fps, 1..=60)).changed(); + ui.label("FPS"); + }); + ui.horizontal(|ui| { + *update_lights |= ui.add(Slider::new(saturation_boost, 0.0..=1.0)).changed(); + ui.label("Saturation Boost"); + }); + }); + } + _ => { + default_ui::show(ui, profile, update_lights, &theme.spacing); + } + } + } +} diff --git a/app/src/effects/ripple.rs b/app/src/manager/effects/ripple.rs similarity index 97% rename from app/src/effects/ripple.rs rename to app/src/manager/effects/ripple.rs index 80df69a..cd32ad9 100644 --- a/app/src/effects/ripple.rs +++ b/app/src/manager/effects/ripple.rs @@ -10,7 +10,10 @@ use std::{ use device_query::{DeviceEvents, Keycode}; -use crate::{effects::zones::KEY_ZONES, profile::Profile}; +use crate::{ + manager::{effects::zones::KEY_ZONES, Inner}, + profile::Profile, +}; #[derive(Clone, Copy, PartialEq, Eq, Debug)] enum RippleMove { @@ -20,7 +23,7 @@ enum RippleMove { Off, } -pub fn play(manager: &mut super::Inner, p: &Profile) { +pub fn play(manager: &mut Inner, p: &Profile) { // Welcome to the definition of i-don't-know-what-im-doing let stop_signals = manager.stop_signals.clone(); diff --git a/app/src/effects/swipe.rs b/app/src/manager/effects/swipe.rs similarity index 85% rename from app/src/effects/swipe.rs rename to app/src/manager/effects/swipe.rs index 048a7ac..bf064e2 100644 --- a/app/src/effects/swipe.rs +++ b/app/src/manager/effects/swipe.rs @@ -1,8 +1,8 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; -use crate::{enums::Direction, profile::Profile}; +use crate::{enums::Direction, manager::Inner, profile::Profile}; -pub fn play(manager: &mut super::Inner, p: &Profile) { +pub fn play(manager: &mut Inner, p: &Profile) { let mut rgb_array = p.rgb_array(); while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { diff --git a/app/src/effects/temperature.rs b/app/src/manager/effects/temperature.rs similarity index 95% rename from app/src/effects/temperature.rs rename to app/src/manager/effects/temperature.rs index 974f2e0..a1b4426 100644 --- a/app/src/effects/temperature.rs +++ b/app/src/manager/effects/temperature.rs @@ -2,7 +2,9 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; use sysinfo::{Components, System}; -pub fn play(manager: &mut super::Inner) { +use crate::manager::Inner; + +pub fn play(manager: &mut Inner) { let safe_temp = 20.0; let ramp_boost = 1.6; let temp_cool: [f32; 12] = [0.0, 255.0, 0.0, 0.0, 255.0, 0.0, 0.0, 255.0, 0.0, 0.0, 255.0, 0.0]; diff --git a/app/src/effects/zones.rs b/app/src/manager/effects/zones.rs similarity index 100% rename from app/src/effects/zones.rs rename to app/src/manager/effects/zones.rs diff --git a/app/src/effects/mod.rs b/app/src/manager/mod.rs similarity index 98% rename from app/src/effects/mod.rs rename to app/src/manager/mod.rs index 8992840..844f6d5 100644 --- a/app/src/effects/mod.rs +++ b/app/src/manager/mod.rs @@ -4,6 +4,7 @@ use crate::{ }; use crossbeam_channel::{Receiver, Sender}; +use effects::{ambient, christmas, disco, fade, lightning, ripple, swipe, temperature}; use error_stack::{Result, ResultExt}; use legion_rgb_driver::{BaseEffects, Keyboard, SPEED_RANGE}; use rand::thread_rng; @@ -18,16 +19,8 @@ use thiserror::Error; use self::custom_effect::{CustomEffect, EffectType}; -mod ambient; -mod christmas; pub mod custom_effect; -mod disco; -mod fade; -mod lightning; -mod ripple; -mod swipe; -mod temperature; -mod zones; +mod effects; #[derive(Debug, Error, PartialEq)] #[error("Could not create keyboard manager")] diff --git a/app/src/profile.rs b/app/src/profile.rs index 7508baf..a2c52aa 100644 --- a/app/src/profile.rs +++ b/app/src/profile.rs @@ -28,7 +28,7 @@ type Zones = [KeyboardZone; 4]; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] pub struct Profile { - pub name: String, + pub name: Option, pub rgb_zones: Zones, pub effect: Effects, pub direction: Direction, @@ -39,7 +39,7 @@ pub struct Profile { impl Default for Profile { fn default() -> Self { Self { - name: "Profile".to_string(), + name: None, rgb_zones: Zones::default(), effect: Effects::default(), direction: Direction::default(), @@ -62,7 +62,10 @@ impl Profile { Self::load(path).change_context(LoadProfileError) } - pub fn save_profile(&self, path: &Path) -> Result<(), SaveProfileError> { + pub fn save_profile(&mut self, path: &Path) -> Result<(), SaveProfileError> { + if self.name.is_none() { + self.name = Some("Untitled".to_string()); + } self.save(path).change_context(SaveProfileError) } From 018aee1956d49f11ab4add89e9cef2584223419b Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Mon, 18 Nov 2024 12:01:04 +0100 Subject: [PATCH 13/15] More code cleanup --- app/src/gui/menu_bar.rs | 134 +++++++++++------------ app/src/gui/mod.rs | 204 +++++++++++++++++++----------------- app/src/gui/profile_list.rs | 2 +- app/src/manager/mod.rs | 71 +++++++------ app/src/persist.rs | 7 +- 5 files changed, 221 insertions(+), 197 deletions(-) diff --git a/app/src/gui/menu_bar.rs b/app/src/gui/menu_bar.rs index 7f7fa9d..06e0af7 100644 --- a/app/src/gui/menu_bar.rs +++ b/app/src/gui/menu_bar.rs @@ -15,66 +15,87 @@ pub struct MenuBarState { // TODO: Re-enable when upstream fixes window visibility #[allow(dead_code)] gui_sender: Sender, - opened_file: Option, - open_file_dialog: Option, - file_kind: Option, + load_profile_dialog: FileDialog, + load_effect_dialog: FileDialog, + save_profile_dialog: FileDialog, } impl MenuBarState { pub(super) fn new(gui_sender: Sender) -> Self { Self { gui_sender, - opened_file: None, - open_file_dialog: None, - file_kind: None, + load_profile_dialog: FileDialog::open_file(None).default_size(Vec2::splat(300.0)), + load_effect_dialog: FileDialog::open_file(None).default_size(Vec2::splat(300.0)), + save_profile_dialog: FileDialog::save_file(None).default_size(Vec2::splat(300.0)), } } -} - -enum FileOperation { - LoadProfile, - LoadEffect, - SaveProfile, -} -impl MenuBarState { pub fn show(&mut self, ctx: &Context, ui: &mut egui::Ui, current_profile: &mut Profile, current_effect: &mut CustomEffectState, changed: &mut bool, toasts: &mut Toasts) { self.show_menu(ctx, ui, toasts); + self.handle_load_profile(ctx, current_profile, changed, toasts); + self.handle_save_profile(ctx, current_profile, toasts); + self.handle_load_effect(ctx, current_effect, changed, toasts); + } - if let Some(dialog) = &mut self.open_file_dialog { - if dialog.show(ctx).selected() { - if let Some(path) = dialog.path() { - self.opened_file = Some(path.to_owned()); - if let Some(kind) = &self.file_kind { - match kind { - FileOperation::LoadProfile => match Profile::load_profile(path) { - Ok(profile) => { - *current_profile = profile; - *changed = true; - } - Err(_) => { - toasts.error("Could not load profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); - } - }, - FileOperation::LoadEffect => match CustomEffect::from_file(path) { - Ok(effect) => { - *current_effect = CustomEffectState::Queued(effect); - *changed = true; - } - Err(_) => { - toasts.error("Could not load custom effect.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); - } - }, - FileOperation::SaveProfile => { - if current_profile.save_profile(path).is_err() { - toasts.error("Could not save profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); - }; - } - } + fn handle_load_profile(&mut self, ctx: &Context, current_profile: &mut Profile, changed: &mut bool, toasts: &mut Toasts) { + if self.load_profile_dialog.show(ctx).selected() { + if let Some(path) = self.load_profile_dialog.path().map(|p| p.to_path_buf()) { + match Profile::load_profile(&path) { + Ok(profile) => { + *current_profile = profile; + *changed = true; + } + Err(_) => { + toasts.error("Could not load profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); } + } + self.update_paths(path); + } + } + } - self.file_kind = None; + fn handle_save_profile(&mut self, ctx: &Context, current_profile: &mut Profile, toasts: &mut Toasts) { + if self.save_profile_dialog.show(ctx).selected() { + if let Some(path) = self.save_profile_dialog.path().map(|p| p.to_path_buf()) { + if current_profile.save_profile(&path).is_err() { + toasts.error("Could not save profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); } + self.update_paths(path); + } + } + } + + fn handle_load_effect(&mut self, ctx: &Context, current_effect: &mut CustomEffectState, changed: &mut bool, toasts: &mut Toasts) { + if self.load_effect_dialog.show(ctx).selected() { + if let Some(path) = self.load_effect_dialog.path().map(|p| p.to_path_buf()) { + match CustomEffect::from_file(&path) { + Ok(effect) => { + *current_effect = CustomEffectState::Queued(effect); + *changed = true; + } + Err(_) => { + toasts.error("Could not load custom effect.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); + } + } + self.update_paths(path); + } + } + } + + fn update_paths(&mut self, path: PathBuf) { + let mut save_paths = |path: PathBuf| { + self.load_profile_dialog.set_path(path.clone()); + self.load_effect_dialog.set_path(path.clone()); + self.save_profile_dialog.set_path(path); + }; + + if path.exists() { + if path.is_file() { + if let Some(parent) = path.parent() { + save_paths(parent.to_path_buf()) + } + } else { + save_paths(path) } } } @@ -86,25 +107,16 @@ impl MenuBarState { menu::bar(ui, |ui| { ui.menu_button("Profile", |ui| { if ui.button("Open").clicked() { - let mut dialog = self.new_open_dialog(); - self.file_kind = Some(FileOperation::LoadProfile); - dialog.open(); - self.open_file_dialog = Some(dialog); + self.load_profile_dialog.open(); } if ui.button("Save").clicked() { - let mut dialog = self.new_save_dialog(); - self.file_kind = Some(FileOperation::SaveProfile); - dialog.open(); - self.open_file_dialog = Some(dialog); + self.save_profile_dialog.open(); } }); ui.menu_button("Effect", |ui| { if ui.button("Open").clicked() { - let mut dialog = self.new_open_dialog(); - self.file_kind = Some(FileOperation::LoadEffect); - dialog.open(); - self.open_file_dialog = Some(dialog); + self.load_effect_dialog.open(); } }); @@ -136,12 +148,4 @@ impl MenuBarState { } }); } - - fn new_open_dialog(&self) -> FileDialog { - FileDialog::open_file(self.opened_file.clone()).default_size(Vec2::splat(300.0)) - } - - fn new_save_dialog(&self) -> FileDialog { - FileDialog::save_file(self.opened_file.clone()).default_size(Vec2::splat(300.0)) - } } diff --git a/app/src/gui/mod.rs b/app/src/gui/mod.rs index 9f521f2..6f62281 100644 --- a/app/src/gui/mod.rs +++ b/app/src/gui/mod.rs @@ -196,12 +196,11 @@ impl eframe::App for App { if self.instance_not_unique && modals::unique_instance(ctx) { self.exit_app(); - }; + } - // The uniqueness prompt has priority over generic errors if !self.instance_not_unique && self.manager.is_none() && modals::manager_error(ctx) { self.exit_app(); - }; + } TopBottomPanel::top("top-panel").show(ctx, |ui| { self.menu_bar @@ -212,107 +211,14 @@ impl eframe::App for App { .frame(Frame::none().inner_margin(self.theme.spacing.large).fill(Color32::from_gray(26))) .show(ctx, |ui| { ui.style_mut().spacing.item_spacing = Vec2::splat(self.theme.spacing.large); - - ui.with_layout(Layout::left_to_right(Align::Center).with_cross_justify(true), |ui| { - ui.vertical(|ui| { - let can_tweak_colors = self.settings.current_profile.effect.takes_color_array() && matches!(self.custom_effect, CustomEffectState::None); - - let res = ui.add_enabled_ui(can_tweak_colors, |ui| { - ui.style_mut().spacing.item_spacing.y = self.theme.spacing.medium; - - let response = ui.horizontal(|ui| { - ui.style_mut().spacing.interact_size = Vec2::splat(60.0); - - for i in 0..4 { - self.profile_changed |= ui.color_edit_button_srgb(&mut self.settings.current_profile.rgb_zones[i].rgb).changed(); - } - }); - - ui.style_mut().spacing.interact_size = Vec2::new(response.response.rect.width(), 30.0); - - if ui.color_edit_button_srgb(&mut self.global_rgb).changed() { - for i in 0..4 { - self.settings.current_profile.rgb_zones[i].rgb = self.global_rgb; - } - - self.profile_changed = true; - }; - - response.response - }); - - ui.set_width(res.inner.rect.width()); - - ui.add_enabled_ui(matches!(self.custom_effect, CustomEffectState::None), |ui| { - let mut effect = self.settings.current_profile.effect; - effect.show_ui(ui, &mut self.settings.current_profile, &mut self.profile_changed, &self.theme); - }); - - self.profile_list - .show(ctx, ui, &mut self.settings.current_profile, &self.theme.spacing, &mut self.profile_changed, &mut self.custom_effect); - }); - - ui.vertical_centered_justified(|ui| { - if matches!(self.custom_effect, CustomEffectState::Playing) && ui.button("Stop custom effect").clicked() { - self.custom_effect = CustomEffectState::None; - self.profile_changed = true; - }; - - Frame { - rounding: Rounding::same(6.0), - fill: Color32::from_gray(20), - ..Frame::default() - } - .show(ui, |ui| { - ui.style_mut().spacing.item_spacing = self.theme.spacing.default; - - ScrollArea::vertical().show(ui, |ui| { - ui.with_layout(Layout::top_down_justified(Align::Min), |ui| { - for val in Effects::iter() { - let text: &'static str = val.into(); - if ui.selectable_value(&mut self.settings.current_profile.effect, val, text).clicked() { - self.profile_changed = true; - self.custom_effect = CustomEffectState::None; - }; - } - }); - }); - }); - }); - }); + self.show_ui_elements(ctx, ui); }); if self.profile_changed { - if let Some(manager) = self.manager.as_mut() { - if matches!(self.custom_effect, CustomEffectState::None) { - manager.set_profile(self.settings.current_profile.clone()); - } else if matches!(self.custom_effect, CustomEffectState::Queued(_)) { - let state = mem::replace(&mut self.custom_effect, CustomEffectState::Playing); - if let CustomEffectState::Queued(effect) = state { - manager.custom_effect(effect); - } - } - } - - self.profile_changed = false; + self.update_profile(); } - // if ctx.input(|i| i.viewport().close_requested()) { - // #[cfg(target_os = "linux")] - // if self.has_tray.load(Ordering::Relaxed) && !std::env::var("WAYLAND_DISPLAY").is_ok() { - // ctx.send_viewport_cmd(ViewportCommand::CancelClose); - // ctx.send_viewport_cmd(ViewportCommand::Visible(false)); - // } else { - // // Close normally - // } - // #[cfg(not(target_os = "linux"))] - // if self.tray.is_some() { - // ctx.send_viewport_cmd(ViewportCommand::CancelClose); - // ctx.send_viewport_cmd(ViewportCommand::Visible(false)); - // } else { - // // Close normally - // } - // } + // self.handle_close_request(ctx); } fn on_exit(&mut self, _gl: Option<&eframe::glow::Context>) { @@ -374,4 +280,104 @@ impl App { self.profile_changed = true; } } + + fn show_ui_elements(&mut self, ctx: &Context, ui: &mut eframe::egui::Ui) { + ui.with_layout(Layout::left_to_right(Align::Center).with_cross_justify(true), |ui| { + ui.vertical(|ui| { + let can_tweak_colors = self.settings.current_profile.effect.takes_color_array() && matches!(self.custom_effect, CustomEffectState::None); + let res = ui.add_enabled_ui(can_tweak_colors, |ui| { + ui.style_mut().spacing.item_spacing.y = self.theme.spacing.medium; + let response = ui.horizontal(|ui| { + ui.style_mut().spacing.interact_size = Vec2::splat(60.0); + for i in 0..4 { + self.profile_changed |= ui.color_edit_button_srgb(&mut self.settings.current_profile.rgb_zones[i].rgb).changed(); + } + }); + + ui.style_mut().spacing.interact_size = Vec2::new(response.response.rect.width(), 30.0); + if ui.color_edit_button_srgb(&mut self.global_rgb).changed() { + for i in 0..4 { + self.settings.current_profile.rgb_zones[i].rgb = self.global_rgb; + } + self.profile_changed = true; + } + + response.response + }); + + ui.set_width(res.inner.rect.width()); + self.show_effect_ui(ui); + self.profile_list + .show(ctx, ui, &mut self.settings.current_profile, &self.theme.spacing, &mut self.profile_changed, &mut self.custom_effect); + }); + + ui.vertical_centered_justified(|ui| { + if matches!(self.custom_effect, CustomEffectState::Playing) && ui.button("Stop custom effect").clicked() { + self.custom_effect = CustomEffectState::None; + self.profile_changed = true; + } + + Frame { + rounding: Rounding::same(6.0), + fill: Color32::from_gray(20), + ..Frame::default() + } + .show(ui, |ui| { + ui.style_mut().spacing.item_spacing = self.theme.spacing.default; + ScrollArea::vertical().show(ui, |ui| { + ui.with_layout(Layout::top_down_justified(Align::Min), |ui| { + for val in Effects::iter() { + let text: &'static str = val.into(); + if ui.selectable_value(&mut self.settings.current_profile.effect, val, text).clicked() { + self.profile_changed = true; + self.custom_effect = CustomEffectState::None; + } + } + }); + }); + }); + }); + }); + } + + fn show_effect_ui(&mut self, ui: &mut eframe::egui::Ui) { + ui.add_enabled_ui(matches!(self.custom_effect, CustomEffectState::None), |ui| { + let mut effect = self.settings.current_profile.effect; + effect.show_ui(ui, &mut self.settings.current_profile, &mut self.profile_changed, &self.theme); + }); + } + + fn update_profile(&mut self) { + if let Some(manager) = self.manager.as_mut() { + if matches!(self.custom_effect, CustomEffectState::None) { + manager.set_profile(self.settings.current_profile.clone()); + } else if matches!(self.custom_effect, CustomEffectState::Queued(_)) { + let state = mem::replace(&mut self.custom_effect, CustomEffectState::Playing); + if let CustomEffectState::Queued(effect) = state { + manager.custom_effect(effect); + } + } + } + + self.profile_changed = false; + } + + // fn handle_close_request(&mut self, ctx: &Context) { + // if ctx.input(|i| i.viewport().close_requested()) { + // #[cfg(target_os = "linux")] + // let is_wayland = std::env::var("WAYLAND_DISPLAY").is_ok(); + // #[cfg(target_os = "linux")] + // if is_wayland { + // // Force close normally on wayland + // return; + // } + + // if self.has_tray.load(Ordering::Relaxed) { + // ctx.send_viewport_cmd(ViewportCommand::CancelClose); + // ctx.send_viewport_cmd(ViewportCommand::Visible(false)); + // } else { + // // Close normally + // } + // } + // } } diff --git a/app/src/gui/profile_list.rs b/app/src/gui/profile_list.rs index 63a3a28..cb8a7b0 100644 --- a/app/src/gui/profile_list.rs +++ b/app/src/gui/profile_list.rs @@ -99,7 +99,7 @@ impl ProfileList { ScrollArea::vertical().auto_shrink([false; 2]).show(ui, |ui| { ui.horizontal_wrapped(|ui| { for prof in &self.profiles { - let name = prof.name.as_ref().map(|s| s.as_str()).unwrap_or("Unnamed"); + let name = prof.name.as_deref().unwrap_or("Unnamed"); if ui.selectable_value(current_profile, prof.clone(), name).clicked() { *changed = true; *custom_effect_state = CustomEffectState::None; diff --git a/app/src/manager/mod.rs b/app/src/manager/mod.rs index 844f6d5..e82bca9 100644 --- a/app/src/manager/mod.rs +++ b/app/src/manager/mod.rs @@ -7,7 +7,7 @@ use crossbeam_channel::{Receiver, Sender}; use effects::{ambient, christmas, disco, fade, lightning, ripple, swipe, temperature}; use error_stack::{Result, ResultExt}; use legion_rgb_driver::{BaseEffects, Keyboard, SPEED_RANGE}; -use rand::thread_rng; +use rand::{rngs::ThreadRng, thread_rng}; use single_instance::SingleInstance; use std::{ sync::atomic::{AtomicBool, Ordering}, @@ -140,18 +140,28 @@ impl EffectManager { impl Inner { fn set_profile(&mut self, mut profile: Profile) { self.last_profile = profile.clone(); - self.stop_signals.store_false(); let mut thread_rng = thread_rng(); - self.keyboard.set_effect(BaseEffects::Static).unwrap(); if profile.effect.is_built_in() { - let clamped_speed = profile.speed.clamp(SPEED_RANGE.min().unwrap(), SPEED_RANGE.max().unwrap()); - + let clamped_speed = self.clamp_speed(profile.speed); self.keyboard.set_speed(clamped_speed).unwrap(); - }; + } else { + // All custom effects rely on rapidly switching a static color + self.keyboard.set_effect(BaseEffects::Static).unwrap(); + } + self.keyboard.set_brightness(profile.brightness as u8 + 1).unwrap(); + self.apply_effect(&mut profile, &mut thread_rng); + self.stop_signals.store_false(); + } + + fn clamp_speed(&self, speed: u8) -> u8 { + speed.clamp(SPEED_RANGE.min().unwrap(), SPEED_RANGE.max().unwrap()) + } + + fn apply_effect(&mut self, profile: &mut Profile, thread_rng: &mut ThreadRng) { match profile.effect { Effects::Static => { self.keyboard.set_colors_to(&profile.rgb_array()).unwrap(); @@ -164,49 +174,48 @@ impl Inner { Effects::Smooth => { self.keyboard.set_effect(BaseEffects::Smooth).unwrap(); } - Effects::Wave => match profile.direction { - Direction::Left => { - self.keyboard.set_effect(BaseEffects::LeftWave).unwrap(); - } - Direction::Right => { - self.keyboard.set_effect(BaseEffects::RightWave).unwrap(); - } - }, - - Effects::Lightning => lightning::play(self, &profile, &mut thread_rng), + Effects::Wave => { + let effect = match profile.direction { + Direction::Left => BaseEffects::LeftWave, + Direction::Right => BaseEffects::RightWave, + }; + self.keyboard.set_effect(effect).unwrap(); + } + Effects::Lightning => lightning::play(self, profile, thread_rng), Effects::AmbientLight { mut fps, mut saturation_boost } => { fps = fps.clamp(1, 60); saturation_boost = saturation_boost.clamp(0.0, 1.0); - ambient::play(self, fps, saturation_boost); } Effects::SmoothWave => { profile.rgb_zones = profile::arr_to_zones([255, 0, 0, 0, 255, 0, 0, 0, 255, 255, 0, 255]); - swipe::play(self, &profile); + swipe::play(self, profile); } - Effects::Swipe => swipe::play(self, &profile), - Effects::Disco => disco::play(self, &profile, &mut thread_rng), - Effects::Christmas => christmas::play(self, &mut thread_rng), - Effects::Fade => fade::play(self, &profile), + Effects::Swipe => swipe::play(self, profile), + Effects::Disco => disco::play(self, profile, thread_rng), + Effects::Christmas => christmas::play(self, thread_rng), + Effects::Fade => fade::play(self, profile), Effects::Temperature => temperature::play(self), - Effects::Ripple => ripple::play(self, &profile), + Effects::Ripple => ripple::play(self, profile), } - self.stop_signals.store_false(); } fn custom_effect(&mut self, custom_effect: &CustomEffect) { self.stop_signals.store_false(); - 'outer: loop { - for step in custom_effect.effect_steps.clone() { + loop { + for step in &custom_effect.effect_steps { self.keyboard.set_brightness(step.brightness).unwrap(); - if let EffectType::Set = step.step_type { - self.keyboard.set_colors_to(&step.rgb_array).unwrap(); - } else { - self.keyboard.transition_colors_to(&step.rgb_array, step.steps, step.delay_between_steps).unwrap(); + match step.step_type { + EffectType::Set => { + self.keyboard.set_colors_to(&step.rgb_array).unwrap(); + } + _ => { + self.keyboard.transition_colors_to(&step.rgb_array, step.steps, step.delay_between_steps).unwrap(); + } } if self.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { - break 'outer; + return; } thread::sleep(Duration::from_millis(step.sleep)); } diff --git a/app/src/persist.rs b/app/src/persist.rs index 860ebd4..88ca1b6 100644 --- a/app/src/persist.rs +++ b/app/src/persist.rs @@ -41,7 +41,12 @@ impl Settings { let default = PathBuf::from("./settings.json"); if let Ok(maybe_path) = env::var("LEGION_KEYBOARD_CONFIG") { - PathBuf::try_from(maybe_path).unwrap_or(default) + let path = PathBuf::from(maybe_path); + if path.exists() && path.is_file() { + path + } else { + default + } } else { default } From 42501e9d0ebb8a288be3f9070cf7e345e07f81f8 Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Sat, 7 Dec 2024 17:09:21 +0100 Subject: [PATCH 14/15] Implement #169 --- app/src/cli.rs | 8 +- app/src/enums.rs | 2 +- app/src/gui/menu_bar.rs | 13 +- app/src/gui/mod.rs | 145 +++++++++++++-------- app/src/gui/profile_list.rs | 114 ----------------- app/src/gui/saved_items.rs | 176 ++++++++++++++++++++++++++ app/src/main.rs | 1 - app/src/manager/custom_effect.rs | 7 +- app/src/manager/effects/default_ui.rs | 2 +- app/src/manager/effects/disco.rs | 2 +- app/src/manager/effects/fade.rs | 2 +- app/src/manager/effects/lightning.rs | 2 +- app/src/manager/effects/mod.rs | 2 +- app/src/manager/effects/ripple.rs | 4 +- app/src/manager/effects/swipe.rs | 5 +- app/src/manager/mod.rs | 7 +- app/src/{ => manager}/profile.rs | 0 app/src/persist.rs | 7 +- 18 files changed, 306 insertions(+), 193 deletions(-) delete mode 100644 app/src/gui/profile_list.rs create mode 100644 app/src/gui/saved_items.rs rename app/src/{ => manager}/profile.rs (100%) diff --git a/app/src/cli.rs b/app/src/cli.rs index 80976d7..e88dc03 100644 --- a/app/src/cli.rs +++ b/app/src/cli.rs @@ -7,8 +7,12 @@ use thiserror::Error; use crate::{ enums::{Brightness, Direction, Effects}, - manager::{self, custom_effect::CustomEffect, ManagerCreationError}, - profile::{self, Profile}, + manager::{ + self, + custom_effect::CustomEffect, + profile::{self, Profile}, + ManagerCreationError, + }, }; #[macro_export] diff --git a/app/src/enums.rs b/app/src/enums.rs index 6b6b86c..5dd700e 100644 --- a/app/src/enums.rs +++ b/app/src/enums.rs @@ -1,4 +1,4 @@ -use crate::{manager::custom_effect::CustomEffect, profile::Profile}; +use crate::manager::{custom_effect::CustomEffect, profile::Profile}; use serde::{Deserialize, Serialize}; use strum_macros::{Display, EnumIter, EnumString, IntoStaticStr}; diff --git a/app/src/gui/menu_bar.rs b/app/src/gui/menu_bar.rs index 06e0af7..48b4daf 100644 --- a/app/src/gui/menu_bar.rs +++ b/app/src/gui/menu_bar.rs @@ -7,9 +7,12 @@ use egui_file::FileDialog; use egui_notify::Toasts; use std::{path::PathBuf, time::Duration}; -use crate::{gui::modals, manager::custom_effect::CustomEffect, profile::Profile}; +use crate::{ + gui::modals, + manager::{custom_effect::CustomEffect, profile::Profile}, +}; -use super::{CustomEffectState, GuiMessage}; +use super::{GuiMessage, LoadedEffect}; pub struct MenuBarState { // TODO: Re-enable when upstream fixes window visibility @@ -30,7 +33,7 @@ impl MenuBarState { } } - pub fn show(&mut self, ctx: &Context, ui: &mut egui::Ui, current_profile: &mut Profile, current_effect: &mut CustomEffectState, changed: &mut bool, toasts: &mut Toasts) { + pub fn show(&mut self, ctx: &Context, ui: &mut egui::Ui, current_profile: &mut Profile, current_effect: &mut LoadedEffect, changed: &mut bool, toasts: &mut Toasts) { self.show_menu(ctx, ui, toasts); self.handle_load_profile(ctx, current_profile, changed, toasts); self.handle_save_profile(ctx, current_profile, toasts); @@ -65,12 +68,12 @@ impl MenuBarState { } } - fn handle_load_effect(&mut self, ctx: &Context, current_effect: &mut CustomEffectState, changed: &mut bool, toasts: &mut Toasts) { + fn handle_load_effect(&mut self, ctx: &Context, current_effect: &mut LoadedEffect, changed: &mut bool, toasts: &mut Toasts) { if self.load_effect_dialog.show(ctx).selected() { if let Some(path) = self.load_effect_dialog.path().map(|p| p.to_path_buf()) { match CustomEffect::from_file(&path) { Ok(effect) => { - *current_effect = CustomEffectState::Queued(effect); + *current_effect = LoadedEffect::queued(effect); *changed = true; } Err(_) => { diff --git a/app/src/gui/mod.rs b/app/src/gui/mod.rs index 6f62281..61695b7 100644 --- a/app/src/gui/mod.rs +++ b/app/src/gui/mod.rs @@ -1,4 +1,4 @@ -use std::{mem, process, thread, time::Duration}; +use std::{process, thread, time::Duration}; use std::sync::{ atomic::{AtomicBool, Ordering}, @@ -22,21 +22,19 @@ use tray_icon::menu::MenuEvent; use crate::{ cli::OutputType, enums::Effects, - manager::{self, custom_effect::CustomEffect, EffectManager, ManagerCreationError}, + manager::{self, custom_effect::CustomEffect, profile::Profile, EffectManager, ManagerCreationError}, persist::Settings, tray::{QUIT_ID, SHOW_ID}, }; -use self::{menu_bar::MenuBarState, profile_list::ProfileList, style::Theme}; +use self::{menu_bar::MenuBarState, saved_items::SavedItems, style::Theme}; mod menu_bar; mod modals; -mod profile_list; +mod saved_items; pub mod style; pub struct App { - settings: Settings, - instance_not_unique: bool, gui_tx: crossbeam_channel::Sender, gui_rx: crossbeam_channel::Receiver, @@ -45,11 +43,12 @@ pub struct App { visible: Arc, manager: Option, - profile_changed: bool, - custom_effect: CustomEffectState, + state_changed: bool, + loaded_effect: LoadedEffect, + current_profile: Profile, menu_bar: MenuBarState, - profile_list: ProfileList, + saved_items: SavedItems, global_rgb: [u8; 3], theme: Theme, toasts: Toasts, @@ -60,11 +59,45 @@ pub enum GuiMessage { Quit, } +pub struct LoadedEffect { + state: State, + effect: CustomEffect, +} + +impl LoadedEffect { + pub fn default() -> Self { + Self::none() + } + + pub fn none() -> Self { + Self { + state: State::None, + effect: CustomEffect::default(), + } + } + + pub fn queued(effect: CustomEffect) -> Self { + Self { state: State::Queued, effect } + } + + pub fn is_none(&self) -> bool { + matches!(self.state, State::None) + } + + pub fn is_queued(&self) -> bool { + matches!(self.state, State::Queued) + } + + pub fn is_playing(&self) -> bool { + matches!(self.state, State::Playing) + } +} + #[derive(Default)] -pub enum CustomEffectState { +pub enum State { #[default] None, - Queued(CustomEffect), + Queued, Playing, } @@ -83,13 +116,11 @@ impl App { let manager = manager_result.ok(); let settings: Settings = Settings::load(); - let profiles = settings.profiles.clone(); + let Settings { current_profile, profiles, effects } = settings; let gui_tx_c = gui_tx.clone(); // Default app state let mut app = Self { - settings, - instance_not_unique, gui_tx, gui_rx, @@ -99,11 +130,12 @@ impl App { manager, // Default to true for an instant update on launch - profile_changed: true, - custom_effect: CustomEffectState::default(), + state_changed: true, + loaded_effect: LoadedEffect::default(), + current_profile, menu_bar: MenuBarState::new(gui_tx_c), - profile_list: ProfileList::new(profiles), + saved_items: SavedItems::new(profiles, effects), global_rgb: [0; 3], theme: Theme::default(), toasts: Toasts::default(), @@ -111,8 +143,8 @@ impl App { // Update the state according to the option chosen by the user match output { - OutputType::Profile(profile) => app.settings.current_profile = profile, - OutputType::Custom(effect) => app.custom_effect = CustomEffectState::Queued(effect), + OutputType::Profile(profile) => app.current_profile = profile, + OutputType::Custom(effect) => app.loaded_effect = LoadedEffect::queued(effect), OutputType::NoArgs => {} OutputType::Exit => unreachable!("Exiting the app supersedes starting the GUI"), } @@ -204,7 +236,7 @@ impl eframe::App for App { TopBottomPanel::top("top-panel").show(ctx, |ui| { self.menu_bar - .show(ctx, ui, &mut self.settings.current_profile, &mut self.custom_effect, &mut self.profile_changed, &mut self.toasts); + .show(ctx, ui, &mut self.current_profile, &mut self.loaded_effect, &mut self.state_changed, &mut self.toasts); }); CentralPanel::default() @@ -214,17 +246,19 @@ impl eframe::App for App { self.show_ui_elements(ctx, ui); }); - if self.profile_changed { - self.update_profile(); + if self.state_changed { + self.update_state(); } // self.handle_close_request(ctx); } fn on_exit(&mut self, _gl: Option<&eframe::glow::Context>) { - self.settings.profiles = std::mem::take(&mut self.profile_list.profiles); + let SavedItems { profiles, custom_effects, .. } = self.saved_items.clone(); - self.settings.save(); + let mut settings = Settings::new(profiles, custom_effects, self.current_profile.clone()); + + settings.save(); self.visible.store(false, Ordering::SeqCst); @@ -266,55 +300,58 @@ impl App { } fn cycle_profiles(&mut self) { - let len = self.profile_list.profiles.len(); + let len = self.saved_items.profiles.len(); - let current_profile_name = &self.settings.current_profile.name; + let current_profile_name = &self.current_profile.name; - if let Some((i, _)) = self.profile_list.profiles.iter().enumerate().find(|(_, profile)| &profile.name == current_profile_name) { + if let Some((i, _)) = self.saved_items.profiles.iter().enumerate().find(|(_, profile)| &profile.name == current_profile_name) { if i == len - 1 && len > 0 { - self.settings.current_profile = self.profile_list.profiles[0].clone(); + self.current_profile = self.saved_items.profiles[0].clone(); } else { - self.settings.current_profile = self.profile_list.profiles[i + 1].clone(); + self.current_profile = self.saved_items.profiles[i + 1].clone(); } - self.profile_changed = true; + self.state_changed = true; } } fn show_ui_elements(&mut self, ctx: &Context, ui: &mut eframe::egui::Ui) { ui.with_layout(Layout::left_to_right(Align::Center).with_cross_justify(true), |ui| { ui.vertical(|ui| { - let can_tweak_colors = self.settings.current_profile.effect.takes_color_array() && matches!(self.custom_effect, CustomEffectState::None); + let can_tweak_colors = self.current_profile.effect.takes_color_array() && self.loaded_effect.is_none(); + let res = ui.add_enabled_ui(can_tweak_colors, |ui| { ui.style_mut().spacing.item_spacing.y = self.theme.spacing.medium; let response = ui.horizontal(|ui| { ui.style_mut().spacing.interact_size = Vec2::splat(60.0); for i in 0..4 { - self.profile_changed |= ui.color_edit_button_srgb(&mut self.settings.current_profile.rgb_zones[i].rgb).changed(); + self.state_changed |= ui.color_edit_button_srgb(&mut self.current_profile.rgb_zones[i].rgb).changed(); } }); ui.style_mut().spacing.interact_size = Vec2::new(response.response.rect.width(), 30.0); if ui.color_edit_button_srgb(&mut self.global_rgb).changed() { for i in 0..4 { - self.settings.current_profile.rgb_zones[i].rgb = self.global_rgb; + self.current_profile.rgb_zones[i].rgb = self.global_rgb; } - self.profile_changed = true; + self.state_changed = true; } response.response }); ui.set_width(res.inner.rect.width()); + self.show_effect_ui(ui); - self.profile_list - .show(ctx, ui, &mut self.settings.current_profile, &self.theme.spacing, &mut self.profile_changed, &mut self.custom_effect); + + self.saved_items + .show(ctx, ui, &mut self.current_profile, &mut self.loaded_effect, &self.theme.spacing, &mut self.state_changed); }); ui.vertical_centered_justified(|ui| { - if matches!(self.custom_effect, CustomEffectState::Playing) && ui.button("Stop custom effect").clicked() { - self.custom_effect = CustomEffectState::None; - self.profile_changed = true; + if self.loaded_effect.is_playing() && ui.button("Stop custom effect").clicked() { + self.loaded_effect.state = State::None; + self.state_changed = true; } Frame { @@ -328,9 +365,9 @@ impl App { ui.with_layout(Layout::top_down_justified(Align::Min), |ui| { for val in Effects::iter() { let text: &'static str = val.into(); - if ui.selectable_value(&mut self.settings.current_profile.effect, val, text).clicked() { - self.profile_changed = true; - self.custom_effect = CustomEffectState::None; + if ui.selectable_value(&mut self.current_profile.effect, val, text).clicked() { + self.state_changed = true; + self.loaded_effect.state = State::None; } } }); @@ -341,25 +378,25 @@ impl App { } fn show_effect_ui(&mut self, ui: &mut eframe::egui::Ui) { - ui.add_enabled_ui(matches!(self.custom_effect, CustomEffectState::None), |ui| { - let mut effect = self.settings.current_profile.effect; - effect.show_ui(ui, &mut self.settings.current_profile, &mut self.profile_changed, &self.theme); + ui.add_enabled_ui(self.loaded_effect.is_none(), |ui| { + let mut effect = self.current_profile.effect; + effect.show_ui(ui, &mut self.current_profile, &mut self.state_changed, &self.theme); }); } - fn update_profile(&mut self) { + fn update_state(&mut self) { if let Some(manager) = self.manager.as_mut() { - if matches!(self.custom_effect, CustomEffectState::None) { - manager.set_profile(self.settings.current_profile.clone()); - } else if matches!(self.custom_effect, CustomEffectState::Queued(_)) { - let state = mem::replace(&mut self.custom_effect, CustomEffectState::Playing); - if let CustomEffectState::Queued(effect) = state { - manager.custom_effect(effect); - } + if self.loaded_effect.is_none() { + manager.set_profile(self.current_profile.clone()); + } else if self.loaded_effect.is_queued() { + self.loaded_effect.state = State::Playing; + + let effect = self.loaded_effect.effect.clone(); + manager.custom_effect(effect); } } - self.profile_changed = false; + self.state_changed = false; } // fn handle_close_request(&mut self, ctx: &Context) { diff --git a/app/src/gui/profile_list.rs b/app/src/gui/profile_list.rs deleted file mode 100644 index cb8a7b0..0000000 --- a/app/src/gui/profile_list.rs +++ /dev/null @@ -1,114 +0,0 @@ -use eframe::{ - egui::{Context, Frame, ScrollArea, Ui}, - epaint::{Color32, Rounding}, -}; -use egui_modal::Modal; - -use crate::profile::Profile; - -use super::{style::SpacingStyle, CustomEffectState}; - -pub struct ProfileList { - pub profiles: Vec, - new_profile_name: String, -} - -impl ProfileList { - pub fn new(profiles: Vec) -> Self { - Self { - profiles, - new_profile_name: String::default(), - } - } -} - -impl ProfileList { - pub fn show(&mut self, ctx: &Context, ui: &mut Ui, current_profile: &mut Profile, spacing: &SpacingStyle, changed: &mut bool, custom_effect_state: &mut CustomEffectState) { - ui.scope(|ui| { - let modal = Modal::new(ctx, "profile_name_modal"); - - modal.show(|ui| { - modal.title(ui, "Enter the name of the profile"); - modal.frame(ui, |ui| { - ui.text_edit_singleline(&mut self.new_profile_name); - }); - - modal.buttons(ui, |ui| { - let is_empty = self.new_profile_name.is_empty(); - let name_not_unique = self.profiles.iter().any(|prof| prof.name.as_ref() == Some(&self.new_profile_name)); - - modal.button(ui, "Cancel"); - - ui.add_enabled_ui(!is_empty && !name_not_unique, |ui| { - if modal.button(ui, "Save").clicked() { - current_profile.name = Some(self.new_profile_name.clone()); - self.profiles.push(current_profile.clone()); - }; - }); - - if is_empty { - ui.label("You must enter a name"); - } else if name_not_unique { - ui.label("Name already in use"); - } - }); - }); - - ui.style_mut().spacing.item_spacing = spacing.default; - - ui.horizontal(|ui| { - ui.heading("Profiles"); - if ui.button("+").clicked() { - self.new_profile_name.clear(); - - modal.open(); - - // let original_name = profile.name.clone(); - // let mut name = original_name.clone(); - // let mut i = 1; - - // // Find an unique name - // while self.profiles.iter().any(|prof| prof.name == name) { - // i += 1; - // name = format!("{original_name} ({i})"); - // } - - // // If the name had to be changed, update the profile - // if original_name != name { - // profile.name = name; - // } - - // self.profiles.push(profile.clone()); - } - if ui.button("-").clicked() { - self.profiles.retain(|prof| prof != current_profile); - } - }); - - Frame { - rounding: Rounding::same(6.0), - fill: Color32::from_gray(20), - ..Frame::default() - } - .show(ui, |ui| { - ui.set_height(ui.available_height()); - - if self.profiles.is_empty() { - ui.centered_and_justified(|ui| ui.label("No profiles added")); - } else { - ScrollArea::vertical().auto_shrink([false; 2]).show(ui, |ui| { - ui.horizontal_wrapped(|ui| { - for prof in &self.profiles { - let name = prof.name.as_deref().unwrap_or("Unnamed"); - if ui.selectable_value(current_profile, prof.clone(), name).clicked() { - *changed = true; - *custom_effect_state = CustomEffectState::None; - }; - } - }); - }); - } - }); - }); - } -} diff --git a/app/src/gui/saved_items.rs b/app/src/gui/saved_items.rs new file mode 100644 index 0000000..f617ec2 --- /dev/null +++ b/app/src/gui/saved_items.rs @@ -0,0 +1,176 @@ +use eframe::{ + egui::{Context, Frame, RichText, ScrollArea, Ui}, + epaint::{Color32, Rounding}, +}; +use egui_modal::Modal; + +use crate::manager::{custom_effect::CustomEffect, profile::Profile}; + +use super::{style::SpacingStyle, LoadedEffect, State}; + +#[derive(Clone)] +pub struct SavedItems { + pub custom_effects: Vec, + pub profiles: Vec, + + tab: Tab, + new_item_name: String, +} + +#[derive(Copy, Clone, PartialEq, Eq)] +pub enum Tab { + Profiles, + CustomEffects, +} + +impl SavedItems { + pub fn new(profiles: Vec, custom_effects: Vec) -> Self { + Self { + profiles, + custom_effects, + tab: Tab::Profiles, + new_item_name: String::default(), + } + } + + fn setup_modal( + ctx: &Context, id_source: &str, item_name: &str, new_item_name: &mut String, items: &mut Vec, current_item: &mut T, item_name_extractor: fn(&T) -> Option, + item_name_setter: fn(&mut T, String), + ) -> Modal { + let modal = Modal::new(ctx, id_source); + + modal.show(|ui| { + modal.title(ui, item_name); + modal.frame(ui, |ui| { + ui.text_edit_singleline(new_item_name); + }); + + modal.buttons(ui, |ui| { + let is_empty = new_item_name.is_empty(); + let name_not_unique = items.iter().any(|item| item_name_extractor(item) == Some(new_item_name.clone())); + + modal.button(ui, "Cancel"); + + ui.add_enabled_ui(!is_empty && !name_not_unique, |ui| { + if modal.button(ui, "Save").clicked() { + item_name_setter(current_item, new_item_name.clone()); + items.push(current_item.clone()); + }; + }); + + if is_empty { + ui.label("You must enter a name"); + } else if name_not_unique { + ui.label("Name already in use"); + } + }); + }); + + modal + } + + pub fn setup_profile_modal(&mut self, ctx: &Context, current_profile: &mut Profile) -> Modal { + Self::setup_modal( + ctx, + "profile_modal", + "Enter the name of the profile", + &mut self.new_item_name, + &mut self.profiles, + current_profile, + |prof| prof.name.clone(), + |prof, name| prof.name = Some(name), + ) + } + + pub fn setup_effect_modal(&mut self, ctx: &Context, loaded_effect: &mut LoadedEffect) -> Modal { + Self::setup_modal( + ctx, + "effect_modal", + "Enter the name of the custom effect", + &mut self.new_item_name, + &mut self.custom_effects, + &mut loaded_effect.effect, + |effect| effect.name.clone(), + |effect, name| effect.name = Some(name), + ) + } + + pub fn show_header(&mut self, ctx: &Context, ui: &mut Ui, current_profile: &mut Profile, loaded_effect: &mut LoadedEffect) { + ui.selectable_value(&mut self.tab, Tab::Profiles, RichText::new("Profiles").heading()); + ui.selectable_value(&mut self.tab, Tab::CustomEffects, RichText::new("Custom Effects").heading()); + + let profile_modal = self.setup_profile_modal(ctx, current_profile); + let effect_modal = self.setup_effect_modal(ctx, loaded_effect); + + match self.tab { + Tab::Profiles => { + if ui.button("+").clicked() { + self.new_item_name.clear(); + profile_modal.open(); + } + if ui.button("-").clicked() { + self.profiles.retain(|prof| prof != current_profile); + } + } + Tab::CustomEffects => { + if loaded_effect.is_playing() { + if ui.button("+").clicked() { + self.new_item_name.clear(); + effect_modal.open(); + } + } + + if ui.button("-").clicked() { + self.custom_effects.retain(|effect| effect != &loaded_effect.effect); + } + } + } + } + + pub fn show(&mut self, ctx: &Context, ui: &mut Ui, current_profile: &mut Profile, loaded_effect: &mut LoadedEffect, spacing: &SpacingStyle, changed: &mut bool) { + ui.scope(|ui: &mut Ui| { + ui.style_mut().spacing.item_spacing = spacing.default; + + ui.horizontal(|ui| { + self.show_header(ctx, ui, current_profile, loaded_effect); + }); + + Frame { + rounding: Rounding::same(6.0), + fill: Color32::from_gray(20), + ..Frame::default() + } + .show(ui, |ui| { + ui.set_height(ui.available_height()); + + if self.profiles.is_empty() { + ui.centered_and_justified(|ui| ui.label("No profiles added")); + } else { + ScrollArea::vertical().auto_shrink([false; 2]).show(ui, |ui| { + ui.horizontal_wrapped(|ui| match self.tab { + Tab::Profiles => { + for prof in self.profiles.iter() { + let name = prof.name.as_deref().unwrap_or("Unnamed"); + if ui.selectable_value(current_profile, prof.clone(), name).clicked() { + *changed = true; + loaded_effect.state = State::None; + }; + } + } + Tab::CustomEffects => { + for effect in self.custom_effects.iter() { + let name = effect.name.as_deref().unwrap_or("Unnamed"); + if ui.selectable_value(&mut loaded_effect.effect, effect.clone(), name).clicked() { + *changed = true; + loaded_effect.effect = effect.clone(); + loaded_effect.state = State::Queued; + }; + } + } + }); + }); + } + }); + }); + } +} diff --git a/app/src/main.rs b/app/src/main.rs index 31281a9..e6bbaa4 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -8,7 +8,6 @@ mod enums; mod gui; mod manager; mod persist; -mod profile; mod tray; mod util; diff --git a/app/src/manager/custom_effect.rs b/app/src/manager/custom_effect.rs index da19c06..c486151 100644 --- a/app/src/manager/custom_effect.rs +++ b/app/src/manager/custom_effect.rs @@ -6,7 +6,7 @@ use thiserror::Error; use crate::util::StorageTrait; -#[derive(Clone, Deserialize, Serialize, Debug)] +#[derive(Clone, Deserialize, Serialize, Debug, PartialEq)] pub struct EffectStep { pub rgb_array: [u8; 12], pub step_type: EffectType, @@ -16,14 +16,15 @@ pub struct EffectStep { pub sleep: u64, } -#[derive(Clone, Deserialize, Serialize, Debug)] +#[derive(Clone, Deserialize, Serialize, Debug, PartialEq)] pub enum EffectType { Set, Transition, } -#[derive(Deserialize, Serialize, Debug, Clone)] +#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Default)] pub struct CustomEffect { + pub name: Option, pub effect_steps: Vec, pub should_loop: bool, } diff --git a/app/src/manager/effects/default_ui.rs b/app/src/manager/effects/default_ui.rs index 657e9e8..cb8f327 100644 --- a/app/src/manager/effects/default_ui.rs +++ b/app/src/manager/effects/default_ui.rs @@ -5,7 +5,7 @@ use strum::IntoEnumIterator; use crate::{ enums::{Brightness, Direction}, gui::style::SpacingStyle, - profile::Profile, + manager::profile::Profile, }; const COMBOBOX_WIDTH: f32 = 20.0; diff --git a/app/src/manager/effects/disco.rs b/app/src/manager/effects/disco.rs index 7a28484..fe6dea1 100644 --- a/app/src/manager/effects/disco.rs +++ b/app/src/manager/effects/disco.rs @@ -2,7 +2,7 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; use rand::Rng; -use crate::{manager::Inner, profile::Profile}; +use crate::manager::{profile::Profile, Inner}; pub fn play(manager: &mut Inner, p: &Profile, thread_rng: &mut rand::rngs::ThreadRng) { while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { diff --git a/app/src/manager/effects/fade.rs b/app/src/manager/effects/fade.rs index 3c7cc90..a540f76 100644 --- a/app/src/manager/effects/fade.rs +++ b/app/src/manager/effects/fade.rs @@ -9,7 +9,7 @@ use std::{ use device_query::DeviceQuery; -use crate::{manager::Inner, profile::Profile}; +use crate::manager::{profile::Profile, Inner}; pub fn play(manager: &mut Inner, p: &Profile) { let stop_signals = manager.stop_signals.clone(); diff --git a/app/src/manager/effects/lightning.rs b/app/src/manager/effects/lightning.rs index 6b6d02d..b9d3ca3 100644 --- a/app/src/manager/effects/lightning.rs +++ b/app/src/manager/effects/lightning.rs @@ -2,7 +2,7 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; use rand::{rngs::ThreadRng, Rng}; -use crate::{manager::Inner, profile::Profile}; +use crate::manager::{profile::Profile, Inner}; pub fn play(manager: &mut Inner, p: &Profile, thread_rng: &mut ThreadRng) { while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { diff --git a/app/src/manager/effects/mod.rs b/app/src/manager/effects/mod.rs index 300c131..ef85683 100644 --- a/app/src/manager/effects/mod.rs +++ b/app/src/manager/effects/mod.rs @@ -1,7 +1,7 @@ use default_ui::{show_brightness, show_direction}; use eframe::egui::{self, Slider}; -use crate::{enums::Effects, profile::Profile}; +use crate::{enums::Effects, manager::profile::Profile}; pub mod ambient; pub mod christmas; diff --git a/app/src/manager/effects/ripple.rs b/app/src/manager/effects/ripple.rs index cd32ad9..a1beea5 100644 --- a/app/src/manager/effects/ripple.rs +++ b/app/src/manager/effects/ripple.rs @@ -10,9 +10,9 @@ use std::{ use device_query::{DeviceEvents, Keycode}; -use crate::{ - manager::{effects::zones::KEY_ZONES, Inner}, +use crate::manager::{ profile::Profile, + {effects::zones::KEY_ZONES, Inner}, }; #[derive(Clone, Copy, PartialEq, Eq, Debug)] diff --git a/app/src/manager/effects/swipe.rs b/app/src/manager/effects/swipe.rs index bf064e2..f8227a5 100644 --- a/app/src/manager/effects/swipe.rs +++ b/app/src/manager/effects/swipe.rs @@ -1,6 +1,9 @@ use std::{sync::atomic::Ordering, thread, time::Duration}; -use crate::{enums::Direction, manager::Inner, profile::Profile}; +use crate::{ + enums::Direction, + manager::{profile::Profile, Inner}, +}; pub fn play(manager: &mut Inner, p: &Profile) { let mut rgb_array = p.rgb_array(); diff --git a/app/src/manager/mod.rs b/app/src/manager/mod.rs index e82bca9..27989b2 100644 --- a/app/src/manager/mod.rs +++ b/app/src/manager/mod.rs @@ -1,12 +1,10 @@ -use crate::{ - enums::{Direction, Effects, Message}, - profile::{self, Profile}, -}; +use crate::enums::{Direction, Effects, Message}; use crossbeam_channel::{Receiver, Sender}; use effects::{ambient, christmas, disco, fade, lightning, ripple, swipe, temperature}; use error_stack::{Result, ResultExt}; use legion_rgb_driver::{BaseEffects, Keyboard, SPEED_RANGE}; +use profile::Profile; use rand::{rngs::ThreadRng, thread_rng}; use single_instance::SingleInstance; use std::{ @@ -21,6 +19,7 @@ use self::custom_effect::{CustomEffect, EffectType}; pub mod custom_effect; mod effects; +pub mod profile; #[derive(Debug, Error, PartialEq)] #[error("Could not create keyboard manager")] diff --git a/app/src/profile.rs b/app/src/manager/profile.rs similarity index 100% rename from app/src/profile.rs rename to app/src/manager/profile.rs diff --git a/app/src/persist.rs b/app/src/persist.rs index 88ca1b6..64d7c6a 100644 --- a/app/src/persist.rs +++ b/app/src/persist.rs @@ -5,18 +5,23 @@ use std::{ path::PathBuf, }; -use crate::profile::Profile; +use crate::manager::{custom_effect::CustomEffect, profile::Profile}; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize, Default)] pub struct Settings { pub profiles: Vec, + pub effects: Vec, // Up to 0.19.5 #[serde(alias = "ui_state")] pub current_profile: Profile, } impl Settings { + pub fn new(profiles: Vec, effects: Vec, current_profile: Profile) -> Self { + Self { profiles, effects, current_profile } + } + /// Load the settings from the configured path or generate default ones if an error occurs pub fn load() -> Self { let mut persist: Self = Self::default(); From 619a41d8cfebf19984f300c97139d1e6b0507619 Mon Sep 17 00:00:00 2001 From: 4JX <4JXcYvmyu3Hz8fV@protonmail.com> Date: Thu, 2 Jan 2025 00:30:30 +0100 Subject: [PATCH 15/15] Update deps and version --- Cargo.lock | 1534 ++++++++++++------------ app/Cargo.toml | 24 +- app/src/gui/menu_bar.rs | 8 +- app/src/gui/mod.rs | 3 +- app/src/manager/effects/temperature.rs | 23 +- flake.lock | 24 +- 6 files changed, 790 insertions(+), 826 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f27908c..9be52b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,72 +20,93 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.12.3" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a4b14f3d99c1255dcba8f45621ab1a2e7540a0009652d33989005a4d0bfc6b" +checksum = "d3d3b8f9bae46a948369bc4a03e815d4ed6d616bd00de4051133a5019dc31c5a" + +[[package]] +name = "accesskit_atspi_common" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c5dd55e6e94949498698daf4d48fb5659e824d7abec0d394089656ceaf99d4f" +dependencies = [ + "accesskit", + "accesskit_consumer", + "atspi-common", + "serde 1.0.217", + "thiserror", + "zvariant", +] [[package]] name = "accesskit_consumer" -version = "0.16.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c17cca53c09fbd7288667b22a201274b9becaa27f0b91bf52a526db95de45e6" +checksum = "f47983a1084940ba9a39c077a8c63e55c619388be5476ac04c804cfbd1e63459" dependencies = [ "accesskit", + "hashbrown 0.15.2", + "immutable-chunkmap", ] [[package]] name = "accesskit_macos" -version = "0.10.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3b6ae1eabbfbced10e840fd3fce8a93ae84f174b3e4ba892ab7bcb42e477a7" +checksum = "7329821f3bd1101e03a7d2e03bd339e3ac0dc64c70b4c9f9ae1949e3ba8dece1" dependencies = [ "accesskit", "accesskit_consumer", - "objc2 0.3.0-beta.3.patch-leaks.3", - "once_cell", + "hashbrown 0.15.2", + "objc2", + "objc2-app-kit", + "objc2-foundation", ] [[package]] name = "accesskit_unix" -version = "0.6.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f46c18d99ba61ad7123dd13eeb0c104436ab6af1df6a1cd8c11054ed394a08" +checksum = "fcee751cc20d88678c33edaf9c07e8b693cd02819fe89053776f5313492273f5" dependencies = [ "accesskit", - "accesskit_consumer", + "accesskit_atspi_common", "async-channel", - "async-once-cell", + "async-executor", + "async-task", "atspi", - "futures-lite 1.13.0", - "once_cell", - "serde 1.0.210", + "futures-lite", + "futures-util", + "serde 1.0.217", "zbus", ] [[package]] name = "accesskit_windows" -version = "0.15.1" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcae27ec0974fc7c3b0b318783be89fd1b2e66dd702179fe600166a38ff4a0b" +checksum = "24fcd5d23d70670992b823e735e859374d694a3d12bfd8dd32bd3bd8bedb5d81" dependencies = [ "accesskit", "accesskit_consumer", - "once_cell", + "hashbrown 0.15.2", "paste", "static_assertions", - "windows 0.48.0", + "windows 0.58.0", + "windows-core 0.58.0", ] [[package]] name = "accesskit_winit" -version = "0.16.1" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5284218aca17d9e150164428a0ebc7b955f70e3a9a78b4c20894513aabf98a67" +checksum = "6a6a48dad5530b6deb9fc7a52cc6c3bf72cdd9eb8157ac9d32d69f2427a5e879" dependencies = [ "accesskit", "accesskit_macos", "accesskit_unix", "accesskit_windows", + "raw-window-handle", "winit", ] @@ -151,9 +172,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[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", @@ -165,7 +186,7 @@ dependencies = [ "log", "ndk", "ndk-context", - "ndk-sys", + "ndk-sys 0.6.0+11769913", "num_enum", "thiserror", ] @@ -296,7 +317,7 @@ checksum = "df099ccb16cd014ff054ac1bf392c67feeef57164b05c42f037cd40f5d4357f4" dependencies = [ "clipboard-win", "log", - "objc2 0.5.2", + "objc2", "objc2-app-kit", "objc2-foundation", "parking_lot", @@ -311,7 +332,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -322,9 +343,9 @@ checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[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" @@ -334,21 +355,23 @@ checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" [[package]] name = "ash" -version = "0.37.3+1.3.251" +version = "0.38.0+1.3.281" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" dependencies = [ - "libloading 0.7.4", + "libloading 0.8.0", ] [[package]] name = "async-broadcast" -version = "0.5.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" dependencies = [ - "event-listener 2.5.3", + "event-listener", + "event-listener-strategy", "futures-core", + "pin-project-lite", ] [[package]] @@ -365,48 +388,26 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.5.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ - "async-lock 2.7.0", "async-task", "concurrent-queue", - "fastrand 1.9.0", - "futures-lite 1.13.0", + "fastrand 2.1.1", + "futures-lite", "slab", ] [[package]] name = "async-fs" -version = "1.6.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" dependencies = [ - "async-lock 2.7.0", - "autocfg 1.1.0", + "async-lock", "blocking", - "futures-lite 1.13.0", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.7.0", - "autocfg 1.1.0", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.20", - "slab", - "socket2 0.4.9", - "waker-fn", + "futures-lite", ] [[package]] @@ -415,71 +416,58 @@ version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ - "async-lock 3.4.0", + "async-lock", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite", "parking", - "polling 3.7.3", + "polling", "rustix 0.38.37", "slab", "tracing", "windows-sys 0.59.0", ] -[[package]] -name = "async-lock" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" -dependencies = [ - "event-listener 2.5.3", -] - [[package]] name = "async-lock" version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 5.3.1", + "event-listener", "event-listener-strategy", "pin-project-lite", ] -[[package]] -name = "async-once-cell" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9338790e78aa95a416786ec8389546c4b6a1dfc3dc36071ed9518a9413a542eb" - [[package]] name = "async-process" -version = "1.8.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" dependencies = [ - "async-io 1.13.0", - "async-lock 2.7.0", + "async-channel", + "async-io", + "async-lock", "async-signal", + "async-task", "blocking", "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", + "event-listener", + "futures-lite", "rustix 0.38.37", - "windows-sys 0.48.0", + "tracing", ] [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -488,8 +476,8 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ - "async-io 2.3.4", - "async-lock 3.4.0", + "async-io", + "async-lock", "atomic-waker", "cfg-if", "futures-core", @@ -502,19 +490,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.4.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -548,9 +536,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atspi" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6059f350ab6f593ea00727b334265c4dfc7fd442ee32d264794bd9bdc68e87ca" +checksum = "be534b16650e35237bb1ed189ba2aab86ce65e88cc84c66f4935ba38575cecbf" dependencies = [ "atspi-common", "atspi-connection", @@ -559,39 +547,42 @@ dependencies = [ [[package]] name = "atspi-common" -version = "0.3.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92af95f966d2431f962bc632c2e68eda7777330158bf640c4af4249349b2cdf5" +checksum = "1909ed2dc01d0a17505d89311d192518507e8a056a48148e3598fef5e7bb6ba7" dependencies = [ "enumflags2", - "serde 1.0.210", + "serde 1.0.217", "static_assertions", "zbus", + "zbus-lockstep", + "zbus-lockstep-macros", "zbus_names", "zvariant", ] [[package]] name = "atspi-connection" -version = "0.3.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c65e7d70f86d4c0e3b2d585d9bf3f979f0b19d635a336725a88d279f76b939" +checksum = "430c5960624a4baaa511c9c0fcc2218e3b58f5dbcc47e6190cafee344b873333" dependencies = [ "atspi-common", "atspi-proxies", - "futures-lite 1.13.0", + "futures-lite", "zbus", ] [[package]] name = "atspi-proxies" -version = "0.3.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6495661273703e7a229356dcbe8c8f38223d697aacfaf0e13590a9ac9977bb52" +checksum = "a5e6c5de3e524cf967569722446bcd458d5032348554d9a17d7d72b041ab7496" dependencies = [ "atspi-common", - "serde 1.0.210", + "serde 1.0.217", "zbus", + "zvariant", ] [[package]] @@ -636,9 +627,9 @@ dependencies = [ [[package]] name = "avif-serialize" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2" +checksum = "e335041290c43101ca215eed6f43ec437eb5a42125573f600fc3fa42b9bddd62" dependencies = [ "arrayvec", ] @@ -712,24 +703,24 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.77", + "syn 2.0.87", "which", ] [[package]] name = "bit-set" -version = "0.5.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.6.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bit_field" @@ -749,7 +740,7 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ - "serde 1.0.210", + "serde 1.0.217", ] [[package]] @@ -773,51 +764,13 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-sys" -version = "0.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" -dependencies = [ - "objc-sys 0.2.0-beta.2", -] - -[[package]] -name = "block-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" -dependencies = [ - "objc-sys 0.3.5", -] - -[[package]] -name = "block2" -version = "0.2.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" -dependencies = [ - "block-sys 0.1.0-beta.1", - "objc2-encode 2.0.0-pre.2", -] - -[[package]] -name = "block2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" -dependencies = [ - "block-sys 0.2.1", - "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]] @@ -829,7 +782,7 @@ dependencies = [ "async-channel", "async-task", "futures-io", - "futures-lite 2.3.0", + "futures-lite", "piper", ] @@ -847,9 +800,9 @@ checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "bytemuck" -version = "1.18.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" dependencies = [ "bytemuck_derive", ] @@ -862,7 +815,7 @@ checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -883,7 +836,7 @@ version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ - "serde 1.0.210", + "serde 1.0.217", ] [[package]] @@ -911,20 +864,6 @@ dependencies = [ "system-deps 6.1.1", ] -[[package]] -name = "calloop" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" -dependencies = [ - "bitflags 2.6.0", - "log", - "polling 3.7.3", - "rustix 0.38.37", - "slab", - "thiserror", -] - [[package]] name = "calloop" version = "0.13.0" @@ -933,31 +872,19 @@ checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ "bitflags 2.6.0", "log", - "polling 3.7.3", + "polling", "rustix 0.38.37", "slab", "thiserror", ] -[[package]] -name = "calloop-wayland-source" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" -dependencies = [ - "calloop 0.12.4", - "rustix 0.38.37", - "wayland-backend", - "wayland-client", -] - [[package]] name = "calloop-wayland-source" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ - "calloop 0.13.0", + "calloop", "rustix 0.38.37", "wayland-backend", "wayland-client", @@ -1010,6 +937,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "cgl" version = "0.3.2" @@ -1062,9 +995,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.17" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" dependencies = [ "clap_builder", "clap_derive", @@ -1072,9 +1005,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.17" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" dependencies = [ "anstream", "anstyle", @@ -1084,21 +1017,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "clipboard-win" @@ -1167,37 +1100,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" -[[package]] -name = "com" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" -dependencies = [ - "com_macros", -] - -[[package]] -name = "com_macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" -dependencies = [ - "com_macros_support", - "proc-macro2 1.0.86", - "syn 1.0.109", -] - -[[package]] -name = "com_macros_support" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" -dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.37", - "syn 1.0.109", -] - [[package]] name = "combine" version = "4.6.6" @@ -1223,7 +1125,7 @@ version = "0.4.0-2" source = "git+https://github.com/rustdesk-org/confy#83db9ec19a2f97e9718aef69e4fc5611bb382479" dependencies = [ "directories-next", - "serde 1.0.210", + "serde 1.0.217", "thiserror", "toml 0.5.11", ] @@ -1331,9 +1233,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] @@ -1426,17 +1328,6 @@ dependencies = [ "powerfmt", ] -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.37", - "syn 1.0.109", -] - [[package]] name = "device_query" version = "2.1.0" @@ -1581,9 +1472,9 @@ checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" [[package]] name = "ecolor" -version = "0.28.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e6b451ff1143f6de0f33fc7f1b68fecfd2c7de06e104de96c4514de3f5396f8" +checksum = "7d72e9c39f6e11a2e922d04a34ec5e7ef522ea3f5a1acfca7a19d16ad5fe50f5" dependencies = [ "bytemuck", "emath", @@ -1600,9 +1491,9 @@ dependencies = [ [[package]] name = "eframe" -version = "0.28.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6490ef800b2e41ee129b1f32f9ac15f713233fe3bc18e241a1afe1e4fb6811e0" +checksum = "b2f2d9e7ea2d11ec9e98a8683b6eb99f9d7d0448394ef6e0d6d91bd4eb817220" dependencies = [ "ahash 0.8.11", "bytemuck", @@ -1611,33 +1502,34 @@ dependencies = [ "egui-wgpu", "egui-winit", "egui_glow", - "glow", + "glow 0.16.0", "glutin", "glutin-winit", - "image 0.25.2", + "image 0.25.5", "js-sys", "log", - "objc2 0.5.2", + "objc2", "objc2-app-kit", "objc2-foundation", "parking_lot", "percent-encoding", - "raw-window-handle 0.5.2", - "raw-window-handle 0.6.2", + "profiling", + "raw-window-handle", "static_assertions", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", "web-time", "winapi", + "windows-sys 0.59.0", "winit", ] [[package]] name = "egui" -version = "0.28.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c97e70a2768de630f161bb5392cbd3874fcf72868f14df0e002e82e06cb798" +checksum = "252d52224d35be1535d7fd1d6139ce071fb42c9097773e79f7665604f5596b5e" dependencies = [ "accesskit", "ahash 0.8.11", @@ -1645,31 +1537,32 @@ dependencies = [ "epaint", "log", "nohash-hasher", + "profiling", ] [[package]] name = "egui-modal" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3bc636d5ddc0c4a90d7a24c7d84db10fb2f789298e9c50cdddd28832e83f1e" +checksum = "3915089109907acf93b79d613b908d5c006d9c17a1bc2664606d3f4eb84e031c" dependencies = [ "egui", ] [[package]] name = "egui-notify" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c6c49d9c02771e28f3b40289c16b4473308807b1ed09a878713d7f11e3dcad" +checksum = "b4bc3995feb2e3f2ab66c9ccbf0e6df8df7c00c612bd8ac5af16b6c8db44146c" dependencies = [ "egui", ] [[package]] name = "egui-wgpu" -version = "0.28.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c7a7c707877c3362a321ebb4f32be811c0b91f7aebf345fb162405c0218b4c" +checksum = "26c1e821d2d8921ef6ce98b258c7e24d9d6aab2ca1f9cdf374eca997e7f67f59" dependencies = [ "ahash 0.8.11", "bytemuck", @@ -1677,6 +1570,7 @@ dependencies = [ "egui", "epaint", "log", + "profiling", "thiserror", "type-map", "web-time", @@ -1686,16 +1580,17 @@ dependencies = [ [[package]] name = "egui-winit" -version = "0.28.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fac4e066af341bf92559f60dbdf2020b2a03c963415349af5f3f8d79ff7a4926" +checksum = "1e84c2919cd9f3a38a91e8f84ac6a245c19251fd95226ed9fae61d5ea564fce3" dependencies = [ "accesskit_winit", "ahash 0.8.11", "arboard", "egui", "log", - "raw-window-handle 0.6.2", + "profiling", + "raw-window-handle", "smithay-clipboard", "web-time", "webbrowser", @@ -1704,25 +1599,26 @@ dependencies = [ [[package]] name = "egui_file" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60f345a124846bdfe3b35a43b74bb2a485c5494c106cb646748edcd6c10bc24d" +checksum = "f85395d17419a23ea2d133394b3a44c50e464d50fd68b1afa36a832105d4668b" dependencies = [ "egui", ] [[package]] name = "egui_glow" -version = "0.28.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2bdc8b38cfa17cc712c4ae079e30c71c00cd4c2763c9e16dc7860a02769103" +checksum = "3eaf6264cc7608e3e69a7d57a6175f438275f1b3889c1a551b418277721c95e6" dependencies = [ "ahash 0.8.11", "bytemuck", "egui", - "glow", + "glow 0.16.0", "log", "memoffset 0.9.0", + "profiling", "wasm-bindgen", "web-sys", "winit", @@ -1736,32 +1632,38 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "emath" -version = "0.28.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6a21708405ea88f63d8309650b4d77431f4bc28fb9d8e6f77d3963b51249e6" +checksum = "c4fe73c1207b864ee40aa0b0c038d6092af1030744678c60188a05c28553515d" dependencies = [ "bytemuck", ] +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" dependencies = [ "enumflags2_derive", - "serde 1.0.210", + "serde 1.0.217", ] [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -1792,20 +1694,28 @@ dependencies = [ [[package]] name = "epaint" -version = "0.28.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f0dcc0a0771e7500e94cd1cb797bd13c9f23b9409bdc3c824e2cbc562b7fa01" +checksum = "5666f8d25236293c966fbb3635eac18b04ad1914e3bab55bc7d44b9980cafcac" dependencies = [ "ab_glyph", "ahash 0.8.11", "bytemuck", "ecolor", "emath", + "epaint_default_fonts", "log", "nohash-hasher", "parking_lot", + "profiling", ] +[[package]] +name = "epaint_default_fonts" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66f6ddac3e6ac6fd4c3d48bb8b1943472f8da0f43a4303bcd8a18aa594401c80" + [[package]] name = "equivalent" version = "1.0.1" @@ -1838,23 +1748,6 @@ dependencies = [ "rustc_version", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - [[package]] name = "event-listener" version = "5.3.1" @@ -1872,7 +1765,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.1", + "event-listener", "pin-project-lite", ] @@ -1904,9 +1797,9 @@ dependencies = [ [[package]] name = "fast_image_resize" -version = "4.2.1" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca4b58827213977eabab8ee8d8258db8441338f3a1832a1c0f2de3372175531" +checksum = "ec7890c03bc18abd95e18d972f6f8f19ecc792cc01f208f060b3764a672de9e2" dependencies = [ "cfg-if", "document-features", @@ -2010,6 +1903,12 @@ dependencies = [ "spin", ] +[[package]] +name = "foldhash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + [[package]] name = "foreign-types" version = "0.3.2" @@ -2037,7 +1936,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -2084,9 +1983,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -2094,9 +1993,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" @@ -2111,24 +2010,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" - -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -2136,38 +2020,41 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ + "fastrand 2.1.1", "futures-core", + "futures-io", + "parking", "pin-project-lite", ] [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -2407,11 +2294,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ "heck 0.4.1", - "proc-macro-crate 2.0.2", + "proc-macro-crate 2.0.0", "proc-macro-error", "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -2442,9 +2329,21 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "glow" -version = "0.13.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glow" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" dependencies = [ "js-sys", "slotmap", @@ -2454,55 +2353,56 @@ dependencies = [ [[package]] name = "glutin" -version = "0.31.3" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fcd4ae4e86d991ad1300b8f57166e5be0c95ef1f63f3f5b827f8a164548746" +checksum = "ec69412a0bf07ea7607e638b415447857a808846c2b685a43c8aa18bc6d5e499" dependencies = [ "bitflags 2.6.0", - "cfg_aliases", + "cfg_aliases 0.2.1", "cgl", "core-foundation 0.9.4", "dispatch", "glutin_egl_sys", "glutin_glx_sys", "glutin_wgl_sys", - "icrate", "libloading 0.8.0", - "objc2 0.4.1", + "objc2", + "objc2-app-kit", + "objc2-foundation", "once_cell", - "raw-window-handle 0.5.2", + "raw-window-handle", "wayland-sys", - "windows-sys 0.48.0", + "windows-sys 0.52.0", "x11-dl", ] [[package]] name = "glutin-winit" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebcdfba24f73b8412c5181e56f092b5eff16671c514ce896b258a0a64bd7735" +checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" dependencies = [ - "cfg_aliases", + "cfg_aliases 0.2.1", "glutin", - "raw-window-handle 0.5.2", + "raw-window-handle", "winit", ] [[package]] name = "glutin_egl_sys" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77cc5623f5309ef433c3dd4ca1223195347fe62c413da8e2fdd0eb76db2d9bcd" +checksum = "cae99fff4d2850dbe6fb8c1fa8e4fead5525bab715beaacfccf3fb994e01c827" dependencies = [ "gl_generator", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "glutin_glx_sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a165fd686c10dcc2d45380b35796e577eacfd43d4660ee741ec8ebe2201b3b4f" +checksum = "9c2b2d3918e76e18e08796b55eb64e8fe6ec67d5a6b2e2a7e2edce224ad24c63" dependencies = [ "gl_generator", "x11-dl", @@ -2510,9 +2410,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" dependencies = [ "gl_generator", ] @@ -2558,19 +2458,6 @@ dependencies = [ "bitflags 2.6.0", ] -[[package]] -name = "gpu-allocator" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" -dependencies = [ - "log", - "presser", - "thiserror", - "winapi", - "windows 0.52.0", -] - [[package]] name = "gpu-descriptor" version = "0.3.0" @@ -2773,7 +2660,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -2805,18 +2692,12 @@ dependencies = [ ] [[package]] -name = "hassle-rs" -version = "0.11.0" +name = "hashbrown" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ - "bitflags 2.6.0", - "com", - "libc", - "libloading 0.8.0", - "thiserror", - "widestring 1.1.0", - "winapi", + "foldhash", ] [[package]] @@ -2851,7 +2732,7 @@ dependencies = [ "regex", "rustls-pki-types", "rustls-platform-verifier", - "serde 1.0.210", + "serde 1.0.217", "serde_derive", "serde_json 1.0.128", "socket2 0.3.19", @@ -2990,17 +2871,6 @@ dependencies = [ "cc", ] -[[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.4.0" @@ -3029,9 +2899,9 @@ dependencies = [ [[package]] name = "image" -version = "0.25.2" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" +checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" dependencies = [ "bytemuck", "byteorder-lite", @@ -3052,9 +2922,9 @@ dependencies = [ [[package]] name = "image-webp" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79afb8cbee2ef20f59ccd477a218c12a93943d075b492015ecb1bb81f8ee904" +checksum = "e031e8e3d94711a9ccb5d6ea357439ef3dcbed361798bd4071dc4d9793fbe22f" dependencies = [ "byteorder-lite", "quick-error", @@ -3083,6 +2953,15 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" +[[package]] +name = "immutable-chunkmap" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f97096f508d54f8f8ab8957862eee2ccd628847b6217af1a335e1c44dee578" +dependencies = [ + "arrayvec", +] + [[package]] name = "indenter" version = "0.3.3" @@ -3126,7 +3005,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -3269,10 +3148,11 @@ checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -3283,7 +3163,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ "bitflags 2.6.0", - "serde 1.0.210", + "serde 1.0.217", "unicode-segmentation", ] @@ -3324,9 +3204,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "legion-kb-rgb" -version = "0.19.6" +version = "0.20.0" dependencies = [ - "clap 4.5.17", + "clap 4.5.23", "color-eyre", "crossbeam-channel", "device_query", @@ -3337,18 +3217,18 @@ dependencies = [ "error-stack", "fast_image_resize", "gtk", - "image 0.25.2", + "image 0.25.5", "legion-rgb-driver", "open", "photon-rs", "rand 0.8.5", "scrap", - "serde 1.0.210", + "serde 1.0.217", "serde_json 1.0.128", "single-instance", "strum 0.26.3", "strum_macros 0.26.4", - "sysinfo 0.31.4", + "sysinfo 0.33.1", "thiserror", "tray-icon", "winapi", @@ -3388,9 +3268,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.158" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libdbus-sys" @@ -3432,6 +3312,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[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", + "redox_syscall 0.5.8", +] + [[package]] name = "libsodium-sys" version = "0.2.7" @@ -3562,6 +3453,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" dependencies = [ "cfg-if", + "rayon", ] [[package]] @@ -3588,15 +3480,6 @@ dependencies = [ "autocfg 1.1.0", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg 1.1.0", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -3608,9 +3491,9 @@ dependencies = [ [[package]] name = "metal" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5637e166ea14be6063a3f8ba5ccb9a4159df7d8f6d61c02fc3d480b1f90dcfcb" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" dependencies = [ "bitflags 2.6.0", "block", @@ -3669,7 +3552,7 @@ dependencies = [ "gtk", "keyboard-types", "libxdo", - "objc2 0.5.2", + "objc2", "objc2-app-kit", "objc2-foundation", "once_cell", @@ -3686,18 +3569,18 @@ checksum = "0419348c027fa7be448d2ae7ea0e4e04c2334c31dc4e74ab29f00a2a7ca69204" [[package]] name = "naga" -version = "0.20.0" +version = "23.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e536ae46fcab0876853bd4a632ede5df4b1c2527a58f6c5a4150fe86be858231" +checksum = "364f94bc34f61332abebe8cad6f6cd82a5b65cff22c828d05d0968911462ca4f" dependencies = [ "arrayvec", "bit-set", "bitflags 2.6.0", + "cfg_aliases 0.1.1", "codespan-reporting", "hexf-parse", "indexmap 2.5.0", "log", - "num-traits 0.2.19", "rustc-hash", "spirv", "termcolor", @@ -3748,17 +3631,16 @@ 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 0.5.2", - "raw-window-handle 0.6.2", + "raw-window-handle", "thiserror", ] @@ -3777,6 +3659,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 = "new_debug_unreachable" version = "1.0.6" @@ -3798,14 +3689,15 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.4" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "cfg-if", + "cfg_aliases 0.2.1", "libc", - "memoffset 0.7.1", + "memoffset 0.9.0", ] [[package]] @@ -3896,7 +3788,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -3986,10 +3878,10 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 2.0.2", + "proc-macro-crate 3.2.0", "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -4001,12 +3893,6 @@ dependencies = [ "malloc_buf", ] -[[package]] -name = "objc-sys" -version = "0.2.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" - [[package]] name = "objc-sys" version = "0.3.5" @@ -4015,49 +3901,52 @@ checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" [[package]] name = "objc2" -version = "0.3.0-beta.3.patch-leaks.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ - "block2 0.2.0-alpha.6", - "objc-sys 0.2.0-beta.2", - "objc2-encode 2.0.0-pre.2", + "objc-sys", + "objc2-encode", ] [[package]] -name = "objc2" -version = "0.4.1" +name = "objc2-app-kit" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "objc-sys 0.3.5", - "objc2-encode 3.0.0", + "bitflags 2.6.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", ] [[package]] -name = "objc2" -version = "0.5.2" +name = "objc2-cloud-kit" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "objc-sys 0.3.5", - "objc2-encode 4.0.3", + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", ] [[package]] -name = "objc2-app-kit" +name = "objc2-contacts" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" dependencies = [ - "bitflags 2.6.0", - "block2 0.5.1", - "libc", - "objc2 0.5.2", - "objc2-core-data", - "objc2-core-image", + "block2", + "objc2", "objc2-foundation", - "objc2-quartz-core", ] [[package]] @@ -4067,8 +3956,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", ] @@ -4078,27 +3967,24 @@ 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 = "2.0.0-pre.2" +name = "objc2-core-location" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" dependencies = [ - "objc-sys 0.2.0-beta.2", + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", ] -[[package]] -name = "objc2-encode" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" - [[package]] name = "objc2-encode" version = "4.0.3" @@ -4112,9 +3998,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]] @@ -4124,8 +4023,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", ] @@ -4136,10 +4035,65 @@ 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", - "objc2-metal", ] [[package]] @@ -4153,15 +4107,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "open" -version = "5.3.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" +checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c" dependencies = [ "is-wsl", "libc", @@ -4191,7 +4145,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -4220,11 +4174,11 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orbclient" -version = "0.3.45" +version = "0.3.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "221d488cd70617f1bd599ed8ceb659df2147d9393717954d82a0f5e8032a6ab1" +checksum = "ba0b26cec2e24f08ed8bb31519a9333140a6599b867dac464bb150bdb796fd43" dependencies = [ - "redox_syscall 0.3.5", + "libredox", ] [[package]] @@ -4243,7 +4197,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38731fa859ef679f1aec66ca9562165926b442f298467f76f5990f431efe87dc" dependencies = [ - "serde 1.0.210", + "serde 1.0.217", "serde_derive", "serde_json 1.0.128", ] @@ -4323,9 +4277,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -4439,7 +4393,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -4473,7 +4427,7 @@ dependencies = [ "perlin2d", "rand 0.7.3", "rusttype", - "serde 1.0.210", + "serde 1.0.217", "thiserror", "time 0.3.36", ] @@ -4495,7 +4449,7 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -4540,22 +4494,6 @@ dependencies = [ "miniz_oxide 0.7.1", ] -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg 1.1.0", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - [[package]] name = "polling" version = "3.7.3" @@ -4583,12 +4521,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "presser" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" - [[package]] name = "pretty-hex" version = "0.2.1" @@ -4602,7 +4534,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9825a04601d60621feed79c4e6b56d65db77cdca55cef43b46b0de1096d1c282" dependencies = [ "proc-macro2 1.0.86", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -4626,14 +4558,22 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime", "toml_edit 0.20.2", ] +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit 0.22.22", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -4678,21 +4618,21 @@ dependencies = [ [[package]] name = "profiling" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" +checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d" dependencies = [ "profiling-procmacros", ] [[package]] name = "profiling-procmacros" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" +checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30" dependencies = [ "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -4762,6 +4702,16 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" +[[package]] +name = "quick-xml" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +dependencies = [ + "memchr", + "serde 1.0.217", +] + [[package]] name = "quick-xml" version = "0.36.1" @@ -5012,24 +4962,19 @@ dependencies = [ [[package]] name = "ravif" -version = "0.11.10" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f0bfd976333248de2078d350bfdf182ff96e168a24d23d2436cef320dd4bdd" +checksum = "2413fd96bd0ea5cdeeb37eaf446a22e6ed7b981d792828721e74ded1980a45c6" dependencies = [ "avif-serialize", "imgref", "loop9", "quick-error", "rav1e", + "rayon", "rgb", ] -[[package]] -name = "raw-window-handle" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" - [[package]] name = "raw-window-handle" version = "0.6.2" @@ -5101,6 +5046,24 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -5140,9 +5103,6 @@ name = "rgb" version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" -dependencies = [ - "bytemuck", -] [[package]] name = "ring" @@ -5370,7 +5330,7 @@ dependencies = [ "ndk-context", "num_cpus", "pkg-config", - "serde 1.0.210", + "serde 1.0.217", "serde_json 1.0.128", "target_build_utils", "tracing", @@ -5380,14 +5340,14 @@ dependencies = [ [[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", - "smithay-client-toolkit 0.18.1", + "smithay-client-toolkit", "tiny-skia", ] @@ -5429,22 +5389,22 @@ checksum = "34b623917345a631dc9608d5194cc206b3fe6c3554cd1c75b937e55e285254af" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -5468,18 +5428,18 @@ dependencies = [ "itoa 1.0.6", "memchr", "ryu", - "serde 1.0.210", + "serde 1.0.217", ] [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -5488,14 +5448,14 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" dependencies = [ - "serde 1.0.210", + "serde 1.0.217", ] [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -5569,7 +5529,7 @@ dependencies = [ "libc", "nix 0.23.2", "thiserror", - "widestring 0.4.3", + "widestring", "winapi", ] @@ -5609,31 +5569,6 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" -[[package]] -name = "smithay-client-toolkit" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" -dependencies = [ - "bitflags 2.6.0", - "calloop 0.12.4", - "calloop-wayland-source 0.2.0", - "cursor-icon", - "libc", - "log", - "memmap2", - "rustix 0.38.37", - "thiserror", - "wayland-backend", - "wayland-client", - "wayland-csd-frame", - "wayland-cursor", - "wayland-protocols 0.31.2", - "wayland-protocols-wlr 0.2.0", - "wayland-scanner", - "xkeysym", -] - [[package]] name = "smithay-client-toolkit" version = "0.19.2" @@ -5641,8 +5576,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ "bitflags 2.6.0", - "calloop 0.13.0", - "calloop-wayland-source 0.3.0", + "calloop", + "calloop-wayland-source", "cursor-icon", "libc", "log", @@ -5653,8 +5588,8 @@ dependencies = [ "wayland-client", "wayland-csd-frame", "wayland-cursor", - "wayland-protocols 0.32.4", - "wayland-protocols-wlr 0.3.4", + "wayland-protocols", + "wayland-protocols-wlr", "wayland-scanner", "xkeysym", ] @@ -5666,7 +5601,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc8216eec463674a0e90f29e0ae41a4db573ec5b56b1c6c1c71615d249b6d846" dependencies = [ "libc", - "smithay-client-toolkit 0.19.2", + "smithay-client-toolkit", "wayland-backend", ] @@ -5676,7 +5611,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" dependencies = [ - "serde 1.0.210", + "serde 1.0.217", ] [[package]] @@ -5690,16 +5625,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.7" @@ -5719,7 +5644,7 @@ dependencies = [ "ed25519", "libc", "libsodium-sys", - "serde 1.0.210", + "serde 1.0.217", ] [[package]] @@ -5798,7 +5723,7 @@ dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", "rustversion", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -5831,9 +5756,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", @@ -5856,9 +5781,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.31.4" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be" +checksum = "4fc858248ea01b66f19d8e8a6d55f41deaf91e9d495246fd01368d99935c6c01" dependencies = [ "core-foundation-sys", "libc", @@ -5947,22 +5872,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -6006,7 +5931,7 @@ dependencies = [ "deranged", "num-conv", "powerfmt", - "serde 1.0.210", + "serde 1.0.217", "time-core", ] @@ -6058,9 +5983,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.1" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -6082,7 +6007,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -6146,7 +6071,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "serde 1.0.210", + "serde 1.0.217", ] [[package]] @@ -6155,7 +6080,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" dependencies = [ - "serde 1.0.210", + "serde 1.0.217", "serde_spanned", "toml_datetime", "toml_edit 0.19.10", @@ -6163,11 +6088,11 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ - "serde 1.0.210", + "serde 1.0.217", ] [[package]] @@ -6177,7 +6102,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" dependencies = [ "indexmap 1.9.3", - "serde 1.0.210", + "serde 1.0.217", "serde_spanned", "toml_datetime", "winnow 0.4.7", @@ -6194,13 +6119,23 @@ dependencies = [ "winnow 0.5.40", ] +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap 2.5.0", + "toml_datetime", + "winnow 0.6.21", +] + [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -6208,20 +6143,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.25" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8803eee176538f94ae9a14b55b2804eb7e1441f8210b1c31290b3bccdccff73b" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -6259,7 +6194,7 @@ dependencies = [ "dirs", "libappindicator", "muda", - "objc2 0.5.2", + "objc2", "objc2-app-kit", "objc2-foundation", "once_cell", @@ -6297,10 +6232,11 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uds_windows" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ + "memoffset 0.9.0", "tempfile", "winapi", ] @@ -6429,12 +6365,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - [[package]] name = "walkdir" version = "2.3.3" @@ -6465,9 +6395,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", "once_cell", @@ -6476,36 +6406,36 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote 1.0.37", "wasm-bindgen-macro-support", @@ -6513,22 +6443,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wayland-backend" @@ -6578,18 +6508,6 @@ dependencies = [ "xcursor", ] -[[package]] -name = "wayland-protocols" -version = "0.31.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" -dependencies = [ - "bitflags 2.6.0", - "wayland-backend", - "wayland-client", - "wayland-scanner", -] - [[package]] name = "wayland-protocols" version = "0.32.4" @@ -6604,27 +6522,14 @@ dependencies = [ [[package]] name = "wayland-protocols-plasma" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" -dependencies = [ - "bitflags 2.6.0", - "wayland-backend", - "wayland-client", - "wayland-protocols 0.31.2", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-wlr" -version = "0.2.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +checksum = "8a0a41a6875e585172495f7a96dfa42ca7e0213868f4f15c313f7c33221a7eff" dependencies = [ "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols 0.31.2", + "wayland-protocols", "wayland-scanner", ] @@ -6637,7 +6542,7 @@ dependencies = [ "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols 0.32.4", + "wayland-protocols", "wayland-scanner", ] @@ -6648,7 +6553,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ "proc-macro2 1.0.86", - "quick-xml", + "quick-xml 0.36.1", "quote 1.0.37", ] @@ -6666,9 +6571,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", @@ -6676,9 +6581,9 @@ dependencies = [ [[package]] name = "web-time" -version = "0.2.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8208e3fdbc243c8fd30805721869242a7f6de3e2e9f3b057652ab36e52ae1e87" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -6690,13 +6595,13 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e5f07fb9bc8de2ddfe6b24a71a75430673fd679e568c48b52716cef1cfae923" dependencies = [ - "block2 0.5.1", + "block2", "core-foundation 0.10.0", "home", "jni 0.21.1", "log", "ndk-context", - "objc2 0.5.2", + "objc2", "objc2-foundation", "url", "web-sys", @@ -6735,19 +6640,18 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "wgpu" -version = "0.20.1" +version = "23.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e37c7b9921b75dfd26dd973fdcbce36f13dfa6e2dc82aece584e0ed48c355c" +checksum = "80f70000db37c469ea9d67defdc13024ddf9a5f1b89cb2941b812ad7cde1735a" dependencies = [ "arrayvec", - "cfg-if", - "cfg_aliases", + "cfg_aliases 0.1.1", "document-features", "js-sys", "log", "parking_lot", "profiling", - "raw-window-handle 0.6.2", + "raw-window-handle", "smallvec", "static_assertions", "wasm-bindgen", @@ -6760,15 +6664,14 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.21.1" +version = "23.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50819ab545b867d8a454d1d756b90cd5f15da1f2943334ca314af10583c9d39" +checksum = "d63c3c478de8e7e01786479919c8769f62a22eec16788d8c2ac77ce2c132778a" dependencies = [ "arrayvec", "bit-vec", "bitflags 2.6.0", - "cfg_aliases", - "codespan-reporting", + "cfg_aliases 0.1.1", "document-features", "indexmap 2.5.0", "log", @@ -6776,33 +6679,31 @@ dependencies = [ "once_cell", "parking_lot", "profiling", - "raw-window-handle 0.6.2", + "raw-window-handle", "rustc-hash", "smallvec", "thiserror", - "web-sys", "wgpu-hal", "wgpu-types", ] [[package]] name = "wgpu-hal" -version = "0.21.1" +version = "23.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "172e490a87295564f3fcc0f165798d87386f6231b04d4548bca458cbbfd63222" +checksum = "89364b8a0b211adc7b16aeaf1bd5ad4a919c1154b44c9ce27838213ba05fd821" dependencies = [ "android_system_properties", "arrayvec", "ash", "bitflags 2.6.0", - "cfg_aliases", + "bytemuck", + "cfg_aliases 0.1.1", "core-graphics-types 0.1.3", - "glow", + "glow 0.14.2", "glutin_wgl_sys", "gpu-alloc", - "gpu-allocator", "gpu-descriptor", - "hassle-rs", "js-sys", "khronos-egl", "libc", @@ -6810,12 +6711,12 @@ dependencies = [ "log", "metal", "naga", - "ndk-sys", + "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", "parking_lot", "profiling", - "raw-window-handle 0.6.2", + "raw-window-handle", "renderdoc-sys", "rustc-hash", "smallvec", @@ -6823,14 +6724,14 @@ dependencies = [ "wasm-bindgen", "web-sys", "wgpu-types", - "winapi", + "windows 0.58.0", ] [[package]] name = "wgpu-types" -version = "0.20.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1353d9a46bff7f955a680577f34c69122628cc2076e1d6f3a9be6ef00ae793ef" +checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068" dependencies = [ "bitflags 2.6.0", "js-sys", @@ -6864,12 +6765,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" -[[package]] -name = "widestring" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" - [[package]] name = "winapi" version = "0.3.9" @@ -6907,8 +6802,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-implement 0.48.0", - "windows-interface 0.48.0", "windows-targets 0.48.5", ] @@ -6924,21 +6817,21 @@ dependencies = [ [[package]] name = "windows" -version = "0.52.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" dependencies = [ - "windows-core 0.52.0", + "windows-core 0.57.0", "windows-targets 0.52.6", ] [[package]] name = "windows" -version = "0.57.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ - "windows-core 0.57.0", + "windows-core 0.58.0", "windows-targets 0.52.6", ] @@ -6953,67 +6846,71 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.52.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" dependencies = [ + "windows-implement 0.57.0", + "windows-interface 0.57.0", + "windows-result 0.1.2", "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.57.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "windows-implement 0.57.0", - "windows-interface 0.57.0", - "windows-result", + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings", "windows-targets 0.52.6", ] [[package]] name = "windows-implement" -version = "0.48.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" +checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 1.0.109", + "syn 2.0.87", ] [[package]] name = "windows-implement" -version = "0.57.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] name = "windows-interface" -version = "0.48.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" +checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 1.0.109", + "syn 2.0.87", ] [[package]] name = "windows-interface" -version = "0.57.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -7025,6 +6922,25 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -7241,48 +7157,51 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" -version = "0.29.15" +version = "0.30.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca" +checksum = "dba50bc8ef4b6f1a75c9274fb95aa9a8f63fbc66c56f391bd85cf68d51e7b1a3" dependencies = [ "ahash 0.8.11", "android-activity", "atomic-waker", "bitflags 2.6.0", + "block2", "bytemuck", - "calloop 0.12.4", - "cfg_aliases", + "calloop", + "cfg_aliases 0.2.1", + "concurrent-queue", "core-foundation 0.9.4", "core-graphics 0.23.2", "cursor-icon", - "icrate", + "dpi", "js-sys", "libc", - "log", "memmap2", "ndk", - "ndk-sys", - "objc2 0.4.1", - "once_cell", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", "orbclient", "percent-encoding", - "raw-window-handle 0.5.2", - "raw-window-handle 0.6.2", - "redox_syscall 0.3.5", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", "rustix 0.38.37", "sctk-adwaita", - "smithay-client-toolkit 0.18.1", + "smithay-client-toolkit", "smol_str", + "tracing", "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", "wayland-backend", "wayland-client", - "wayland-protocols 0.31.2", + "wayland-protocols", "wayland-protocols-plasma", "web-sys", "web-time", - "windows-sys 0.48.0", + "windows-sys 0.52.0", "x11-dl", "x11rb", "xkbcommon-dl", @@ -7306,6 +7225,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6f5bb5257f2407a5425c6e749bfd9692192a73e70a6060516ac04f889087d68" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.11.0" @@ -7404,67 +7332,100 @@ checksum = "52839dc911083a8ef63efa4d039d1f58b5e409f923e44c80828f206f66e5541c" [[package]] name = "zbus" -version = "3.15.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" +checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" dependencies = [ "async-broadcast", "async-executor", "async-fs", - "async-io 1.13.0", - "async-lock 2.7.0", + "async-io", + "async-lock", "async-process", "async-recursion", "async-task", "async-trait", "blocking", - "byteorder", - "derivative", "enumflags2", - "event-listener 2.5.3", + "event-listener", "futures-core", "futures-sink", "futures-util", "hex", - "nix 0.26.4", - "once_cell", + "nix 0.29.0", "ordered-stream", "rand 0.8.5", - "serde 1.0.210", + "serde 1.0.217", "serde_repr", "sha1", "static_assertions", "tracing", "uds_windows", - "winapi", + "windows-sys 0.52.0", "xdg-home", "zbus_macros", "zbus_names", "zvariant", ] +[[package]] +name = "zbus-lockstep" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca2c5dceb099bddaade154055c926bb8ae507a18756ba1d8963fd7b51d8ed1d" +dependencies = [ + "zbus_xml", + "zvariant", +] + +[[package]] +name = "zbus-lockstep-macros" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709ab20fc57cb22af85be7b360239563209258430bccf38d8b979c5a2ae3ecce" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.87", + "zbus-lockstep", + "zbus_xml", + "zvariant", +] + [[package]] name = "zbus_macros" -version = "3.15.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" +checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.2.0", "proc-macro2 1.0.86", "quote 1.0.37", - "regex", - "syn 1.0.109", + "syn 2.0.87", "zvariant_utils", ] [[package]] name = "zbus_names" -version = "2.6.1" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +dependencies = [ + "serde 1.0.217", + "static_assertions", + "zvariant", +] + +[[package]] +name = "zbus_xml" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" +checksum = "ab3f374552b954f6abb4bd6ce979e6c9b38fb9d0cd7cc68a7d796e70c9f3a233" dependencies = [ - "serde 1.0.210", + "quick-xml 0.30.0", + "serde 1.0.217", "static_assertions", + "zbus_names", "zvariant", ] @@ -7485,7 +7446,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -7548,38 +7509,37 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.15.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" +checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" dependencies = [ - "byteorder", + "endi", "enumflags2", - "libc", - "serde 1.0.210", + "serde 1.0.217", "static_assertions", "zvariant_derive", ] [[package]] name = "zvariant_derive" -version = "3.15.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" +checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.2.0", "proc-macro2 1.0.86", "quote 1.0.37", - "syn 1.0.109", + "syn 2.0.87", "zvariant_utils", ] [[package]] name = "zvariant_utils" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", - "syn 1.0.109", + "syn 2.0.87", ] diff --git a/app/Cargo.toml b/app/Cargo.toml index 2d261b3..6e750c4 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "legion-kb-rgb" -version = "0.19.6" +version = "0.20.0" authors = ["4JX"] edition = "2021" homepage = "https://github.com/4JX/L5P-Keyboard-RGB" @@ -13,26 +13,26 @@ license = "GPL-3.0" legion-rgb-driver = { path = "../driver" } # Cli -clap = { version = "4.5.17", features = ["color", "cargo", "derive"] } +clap = { version = "4.5.23", features = ["color", "cargo", "derive"] } # Ui -eframe = "0.28.1" +eframe = { version = "0.30.0", features = ["x11", "wayland"] } # tokio = { version = "1.41.1" } -egui-modal = "0.4.0" +egui-modal = "0.6.0" # egui-modal = { git = "https://github.com/n00kii/egui-modal", rev = "8443238" } -egui_file = "0.18.0" -egui-notify = "0.15.0" +egui_file = "0.20.0" +egui-notify = "0.18.0" # egui-notify = { git = "https://github.com/ItsEthra/egui-notify", rev = "bc5eb67" } # App window, taskbar and tray icon loading -image = "0.25.2" +image = "0.25.5" # AmbientLight effect scrap = { git = "https://github.com/rustdesk/rustdesk", rev = "40af9dc", features = [ "wayland", # "linux-pkg-config", ] } -fast_image_resize = "4.2.1" +fast_image_resize = "5.1.0" # default-features = false just removes the use_wasm feature that removes a lot of unecessary slack # since this app wont ever use the web # photon-rs = { version = "0.3.2", default-features = false } @@ -45,14 +45,14 @@ device_query = "2.1.0" rand = "0.8.5" strum = "0.26.3" strum_macros = "0.26.4" -serde = { version = "1.0.210", features = ["derive"] } +serde = { version = "1.0.217", features = ["derive"] } serde_json = "1.0.128" color-eyre = "0.6.3" -sysinfo = "0.31.4" -crossbeam-channel = "0.5.13" +sysinfo = "0.33.1" +crossbeam-channel = "0.5.14" thiserror = "1.0.63" single-instance = "0.3.3" -open = "5.3.0" +open = "5.3.1" error-stack = "0.5.0" winapi = { version = "0.3.9", features = ["consoleapi", "wincon"] } diff --git a/app/src/gui/menu_bar.rs b/app/src/gui/menu_bar.rs index 48b4daf..f9caf3e 100644 --- a/app/src/gui/menu_bar.rs +++ b/app/src/gui/menu_bar.rs @@ -49,7 +49,7 @@ impl MenuBarState { *changed = true; } Err(_) => { - toasts.error("Could not load profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); + toasts.error("Could not load profile.").duration(Some(Duration::from_millis(5000))).closable(true); } } self.update_paths(path); @@ -61,7 +61,7 @@ impl MenuBarState { if self.save_profile_dialog.show(ctx).selected() { if let Some(path) = self.save_profile_dialog.path().map(|p| p.to_path_buf()) { if current_profile.save_profile(&path).is_err() { - toasts.error("Could not save profile.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); + toasts.error("Could not save profile.").duration(Some(Duration::from_millis(5000))).closable(true); } self.update_paths(path); } @@ -77,7 +77,7 @@ impl MenuBarState { *changed = true; } Err(_) => { - toasts.error("Could not load custom effect.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); + toasts.error("Could not load custom effect.").duration(Some(Duration::from_millis(5000))).closable(true); } } self.update_paths(path); @@ -143,7 +143,7 @@ impl MenuBarState { ui.with_layout(Layout::right_to_left(Align::Center), |ui| { if ui.button("📜").clicked() { if !console::alloc_with_color_support() { - toasts.error("Could not allocate debug terminal.").set_duration(Some(Duration::from_millis(5000))).set_closable(true); + toasts.error("Could not allocate debug terminal.").duration(Some(Duration::from_millis(5000))).closable(true); } println!("Debug terminal enabled."); } diff --git a/app/src/gui/mod.rs b/app/src/gui/mod.rs index 61695b7..512a8eb 100644 --- a/app/src/gui/mod.rs +++ b/app/src/gui/mod.rs @@ -223,7 +223,7 @@ impl eframe::App for App { self.visible.store(true, Ordering::SeqCst); self.toasts .warning("Window hiding is currently not supported.\nSee https://github.com/4JX/L5P-Keyboard-RGB/issues/181") - .set_duration(None); + .duration(None); } if self.instance_not_unique && modals::unique_instance(ctx) { @@ -283,6 +283,7 @@ impl App { show_resize: false, show_interactive_widgets: false, show_widget_hits: false, + show_unaligned: false, }, ..Style::default() }; diff --git a/app/src/manager/effects/temperature.rs b/app/src/manager/effects/temperature.rs index a1b4426..0d1d8bb 100644 --- a/app/src/manager/effects/temperature.rs +++ b/app/src/manager/effects/temperature.rs @@ -24,17 +24,20 @@ pub fn play(manager: &mut Inner) { if component.label().contains("Tctl") { while !manager.stop_signals.manager_stop_signal.load(Ordering::SeqCst) { component.refresh(); - let mut adjusted_temp = component.temperature() - safe_temp; - if adjusted_temp < 0.0 { - adjusted_temp = 0.0; + let temp = component.temperature(); + if let Some(temperature) = temp { + let mut adjusted_temp = temperature - safe_temp; + if adjusted_temp < 0.0 { + adjusted_temp = 0.0; + } + let temp_percent = (adjusted_temp / 100.0) * ramp_boost; + + let mut target = [0.0; 12]; + for index in 0..12 { + target[index] = color_differences[index].mul_add(temp_percent, temp_cool[index]); + } + manager.keyboard.transition_colors_to(&target.map(|val| val as u8), 5, 1).unwrap(); } - let temp_percent = (adjusted_temp / 100.0) * ramp_boost; - - let mut target = [0.0; 12]; - for index in 0..12 { - target[index] = color_differences[index].mul_add(temp_percent, temp_cool[index]); - } - manager.keyboard.transition_colors_to(&target.map(|val| val as u8), 5, 1).unwrap(); thread::sleep(Duration::from_millis(200)); } } diff --git a/flake.lock b/flake.lock index 21d8970..bef2d28 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "crane": { "locked": { - "lastModified": 1731098351, - "narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=", + "lastModified": 1734808813, + "narHash": "sha256-3aH/0Y6ajIlfy7j52FGZ+s4icVX0oHhqBzRdlOeztqg=", "owner": "ipetkov", "repo": "crane", - "rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28", + "rev": "72e2d02dbac80c8c86bf6bf3e785536acf8ee926", "type": "github" }, "original": { @@ -20,11 +20,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -35,11 +35,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730958623, - "narHash": "sha256-JwQZIGSYnRNOgDDoIgqKITrPVil+RMWHsZH1eE1VGN0=", + "lastModified": 1735617354, + "narHash": "sha256-5zJyv66q68QZJZsXtmjDBazGnF0id593VSy+8eSckoo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "85f7e662eda4fa3a995556527c87b2524b691933", + "rev": "69b9a8c860bdbb977adfa9c5e817ccb717884182", "type": "github" }, "original": { @@ -64,11 +64,11 @@ ] }, "locked": { - "lastModified": 1731119076, - "narHash": "sha256-2eVhmocCZHJlFAz6Mt3EwPdFFVAtGgIySJc1EHQVxcc=", + "lastModified": 1735698720, + "narHash": "sha256-+skLL6mq/T7s6J5YmSp89ivQOHBPQ40GEU2n8yqp6bs=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "23c4b3ba5f806fcf25d5a3b6b54fa0d07854c032", + "rev": "a00807363a8a6cae6c3fa84ff494bf9d96333674", "type": "github" }, "original": {