From 8e4b7d53f42ce7730210fe9c665a53fcc49a1d8e Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Thu, 22 Feb 2024 23:49:35 +1300 Subject: [PATCH] More updating to zbus 4.0.1 --- Cargo.lock | 2628 ++++++++++++----- Cargo.toml | 39 +- asusctl/Cargo.toml | 3 +- asusd-user/src/ctrl_anime.rs | 4 +- asusd-user/src/zbus_anime.rs | 4 +- asusd/src/ctrl_anime/trait_impls.rs | 34 +- asusd/src/ctrl_aura/trait_impls.rs | 30 +- asusd/src/ctrl_fancurves.rs | 4 +- asusd/src/ctrl_platform.rs | 84 +- asusd/src/daemon.rs | 2 +- rog-control-center/Cargo.toml | 25 +- rog-control-center/build.rs | 39 + rog-control-center/src/app.rs | 178 -- rog-control-center/src/error.rs | 8 - rog-control-center/src/lib.rs | 13 +- rog-control-center/src/main.rs | 196 +- rog-control-center/src/pages/anime_page.rs | 9 - rog-control-center/src/pages/app_settings.rs | 24 - rog-control-center/src/pages/aura_page.rs | 83 - .../src/pages/fan_curve_page.rs | 92 - rog-control-center/src/pages/mod.rs | 5 - rog-control-center/src/pages/system_page.rs | 50 - rog-control-center/src/startup_error.rs | 38 - rog-control-center/src/system_state.rs | 45 +- rog-control-center/src/tray.rs | 2 +- rog-control-center/src/update_and_notify.rs | 5 +- rog-control-center/src/widgets/anime_power.rs | 83 - .../src/widgets/app_settings.rs | 117 - rog-control-center/src/widgets/aura_modes.rs | 237 -- rog-control-center/src/widgets/aura_power.rs | 266 -- rog-control-center/src/widgets/fan_graph.rs | 208 -- .../src/widgets/keyboard_layout.rs | 220 -- rog-control-center/src/widgets/mod.rs | 17 - rog-control-center/src/widgets/rog_bios.rs | 153 - rog-control-center/src/widgets/side_panel.rs | 72 - rog-control-center/src/widgets/top_bar.rs | 77 - rog-control-center/ui/common_widgets.slint | 246 ++ rog-control-center/ui/globals.slint | 39 + rog-control-center/ui/main_window.slint | 120 + rog-control-center/ui/pages/about.slint | 18 + rog-control-center/ui/pages/anime.slint | 50 + rog-control-center/ui/pages/aura.slint | 50 + rog-control-center/ui/pages/fans.slint | 50 + rog-control-center/ui/pages/gpu.slint | 50 + rog-control-center/ui/pages/system.slint | 113 + rog-control-center/ui/widgets/sidebar.slint | 125 + rog-dbus/src/zbus_anime.rs | 34 +- rog-dbus/src/zbus_aura.rs | 30 +- rog-dbus/src/zbus_fan_curves.rs | 4 +- rog-dbus/src/zbus_platform.rs | 60 +- 50 files changed, 3151 insertions(+), 2932 deletions(-) create mode 100644 rog-control-center/build.rs delete mode 100644 rog-control-center/src/app.rs delete mode 100644 rog-control-center/src/pages/anime_page.rs delete mode 100644 rog-control-center/src/pages/app_settings.rs delete mode 100644 rog-control-center/src/pages/aura_page.rs delete mode 100644 rog-control-center/src/pages/fan_curve_page.rs delete mode 100644 rog-control-center/src/pages/mod.rs delete mode 100644 rog-control-center/src/pages/system_page.rs delete mode 100644 rog-control-center/src/startup_error.rs delete mode 100644 rog-control-center/src/widgets/anime_power.rs delete mode 100644 rog-control-center/src/widgets/app_settings.rs delete mode 100644 rog-control-center/src/widgets/aura_modes.rs delete mode 100644 rog-control-center/src/widgets/aura_power.rs delete mode 100644 rog-control-center/src/widgets/fan_graph.rs delete mode 100644 rog-control-center/src/widgets/keyboard_layout.rs delete mode 100644 rog-control-center/src/widgets/mod.rs delete mode 100644 rog-control-center/src/widgets/rog_bios.rs delete mode 100644 rog-control-center/src/widgets/side_panel.rs delete mode 100644 rog-control-center/src/widgets/top_bar.rs create mode 100644 rog-control-center/ui/common_widgets.slint create mode 100644 rog-control-center/ui/globals.slint create mode 100644 rog-control-center/ui/main_window.slint create mode 100644 rog-control-center/ui/pages/about.slint create mode 100644 rog-control-center/ui/pages/anime.slint create mode 100644 rog-control-center/ui/pages/aura.slint create mode 100644 rog-control-center/ui/pages/fans.slint create mode 100644 rog-control-center/ui/pages/gpu.slint create mode 100644 rog-control-center/ui/pages/system.slint create mode 100644 rog-control-center/ui/widgets/sidebar.slint diff --git a/Cargo.lock b/Cargo.lock index 8cddf5cd..b8412684 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,75 +18,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" -[[package]] -name = "accesskit" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704d532b1cd3d912bb37499c55a81ac748cc1afa737eedd100ba441acdd47d38" - -[[package]] -name = "accesskit_consumer" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba8b23cfca3944012ee2e5c71c02077a400e034c720eed6bd927cb6b4d1fd9" -dependencies = [ - "accesskit", -] - -[[package]] -name = "accesskit_macos" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58d062544d6cc36f4213323b7cb3a0d74ddff4b0d2311ab5e7596f4278bb2cc9" -dependencies = [ - "accesskit", - "accesskit_consumer", - "objc2", - "once_cell", -] - -[[package]] -name = "accesskit_unix" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f8df4021f31969877b295fa80c4b07fcc7eb83f1985b0d3aa4f889c3427c3d5" -dependencies = [ - "accesskit", - "accesskit_consumer", - "async-channel 1.9.0", - "atspi", - "futures-lite 1.13.0", - "serde", - "zbus 3.10.0", -] - -[[package]] -name = "accesskit_windows" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf5b3c3828397ee832ba4a72fb1a4ace10f781e31885f774cbd531014059115" -dependencies = [ - "accesskit", - "accesskit_consumer", - "arrayvec", - "once_cell", - "paste", - "windows 0.44.0", -] - -[[package]] -name = "accesskit_winit" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbcb615217efc79c4bed3094c4ca76c4bc554751d1da16f3ed4ba0459b1e8f31" -dependencies = [ - "accesskit", - "accesskit_macos", - "accesskit_unix", - "accesskit_windows", - "winit", -] - [[package]] name = "addr2line" version = "0.21.0" @@ -109,6 +40,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d713b3834d76b85304d4d525563c1276e2e30dc97cc67bfb4585a4a29fc2c89f" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -124,21 +56,30 @@ dependencies = [ ] [[package]] -name = "android-activity" -version = "0.4.3" +name = "allocator-api2" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-activity" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" dependencies = [ "android-properties", - "bitflags 1.3.2", + "bitflags 2.4.2", "cc", + "cesu8", + "jni", "jni-sys", "libc", "log", "ndk", "ndk-context", "ndk-sys", - "num_enum 0.6.1", + "num_enum", + "thiserror", ] [[package]] @@ -162,28 +103,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anyhow" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" - -[[package]] -name = "arboard" -version = "3.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1faa3c733d9a3dd6fbaf85da5d162a2e03b2e0033a90dceb0e2a90fdd1e5380a" -dependencies = [ - "clipboard-win", - "log", - "objc", - "objc-foundation", - "objc_id", - "parking_lot", - "thiserror", - "x11rb", -] - [[package]] name = "arrayref" version = "0.3.7" @@ -196,6 +115,12 @@ 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 = "asusctl" version = "5.0.8" @@ -214,6 +139,7 @@ dependencies = [ "tinybmp", "tokio", "toml 0.5.11", + "zbus", ] [[package]] @@ -238,7 +164,7 @@ dependencies = [ "systemd-zbus", "tokio", "udev 0.7.0", - "zbus 4.0.1", + "zbus", ] [[package]] @@ -258,17 +184,7 @@ dependencies = [ "serde_derive", "serde_json", "smol", - "zbus 4.0.1", -] - -[[package]] -name = "async-broadcast" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" -dependencies = [ - "event-listener 2.5.3", - "futures-core", + "zbus", ] [[package]] @@ -309,18 +225,16 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.9.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601848938f6e24595d8f63bd4c4e98ed905a3bfa832743c7b8298a73d1b0517b" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" dependencies = [ "async-lock 3.3.0", "async-task", - "atomic-waker", "concurrent-queue", "fastrand 2.0.1", "futures-lite 2.2.0", "slab", - "thread_local", ] [[package]] @@ -499,21 +413,20 @@ dependencies = [ [[package]] name = "atk" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39991bc421ddf72f70159011b323ff49b0f783cc676a7287c59453da2e2531cf" +checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" dependencies = [ "atk-sys", - "bitflags 1.3.2", "glib", "libc", ] [[package]] name = "atk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ad703eb64dc058024f0e57ccfa069e15a413b98dbd50a1a950e743b7f11148" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" dependencies = [ "glib-sys", "gobject-sys", @@ -528,36 +441,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] -name = "atomic_refcell" -version = "0.1.13" +name = "auto_enums" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41e67cd8309bbd06cd603a9e693a784ac2e5d1e955f11286e355089fcab3047c" - -[[package]] -name = "atspi" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674e7a3376837b2e7d12d34d58ac47073c491dc3bf6f71a7adaf687d4d817faa" -dependencies = [ - "async-recursion", - "async-trait", - "atspi-macros", - "enumflags2", - "futures-lite 1.13.0", - "serde", - "tracing", - "zbus 3.10.0", - "zbus_names 2.6.0", -] - -[[package]] -name = "atspi-macros" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb4870a32c0eaa17e35bca0e6b16020635157121fb7d45593d242c295bc768" +checksum = "1899bfcfd9340ceea3533ea157360ba8fa864354eccbceab58e1006ecab35393" dependencies = [ + "derive_utils", + "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.50", ] [[package]] @@ -605,14 +497,23 @@ dependencies = [ "itertools 0.12.1", "lazy_static", "lazycell", + "log", + "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", "syn 2.0.50", + "which", ] +[[package]] +name = "bit_field" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" + [[package]] name = "bitflags" version = "1.3.2" @@ -645,21 +546,21 @@ dependencies = [ [[package]] name = "block-sys" -version = "0.1.0-beta.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" dependencies = [ "objc-sys", ] [[package]] name = "block2" -version = "0.2.0-alpha.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" dependencies = [ "block-sys", - "objc2-encode", + "objc2", ] [[package]] @@ -680,9 +581,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.2" +version = "3.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b1be7772ee4501dba05acbe66bb1e8760f6a6c474a36035631638e4415f130" +checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" + +[[package]] +name = "by_address" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf8dba2868114ed769a1f2590fc9ae5eb331175b44313b6c9b922f8f7ca813d0" [[package]] name = "bytemuck" @@ -718,11 +625,11 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cairo-rs" -version = "0.16.7" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3125b15ec28b84c238f6f476c6034016a5f6cc0221cb514ca46c532139fc97d" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "cairo-sys-rs", "glib", "libc", @@ -732,9 +639,9 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.16.3" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48f4af05fabdcfa9658178e1326efa061853f040ce7d72e33af6885196f421" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" dependencies = [ "glib-sys", "libc", @@ -743,16 +650,28 @@ dependencies = [ [[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 1.3.2", + "bitflags 2.4.2", "log", - "nix 0.25.1", - "slotmap", + "polling 3.5.0", + "rustix 0.38.31", + "slab", "thiserror", - "vec_map", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" +dependencies = [ + "calloop", + "rustix 0.38.31", + "wayland-backend", + "wayland-client", ] [[package]] @@ -807,6 +726,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f" + [[package]] name = "cgl" version = "0.3.2" @@ -827,7 +752,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.0", + "windows-targets 0.52.3", ] [[package]] @@ -838,15 +763,69 @@ checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", + "libloading 0.8.1", ] [[package]] name = "clipboard-win" -version = "5.2.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f9a0700e0127ba15d1d52dd742097f821cd9c65939303a44d970465040a297" +checksum = "9fdf5e01086b6be750428ba4a40619f847eb2e95756eee84b18e06e5f0b50342" dependencies = [ - "error-code", + "lazy-bytes-cast", + "winapi", +] + +[[package]] +name = "clru" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8191fa7302e03607ff0e237d4246cc043ff5b3cb9409d995172ba3bea16b807" + +[[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", + "core-graphics", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" +dependencies = [ + "bitflags 1.3.2", + "block", + "core-foundation", + "core-graphics-types", + "libc", + "objc", +] + +[[package]] +name = "codemap" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e769b5c8c8283982a987c6e948e540254f1058d5a74b8794914d4ef5fc2a24" + +[[package]] +name = "codemap-diagnostic" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc20770be05b566a963bf91505e60412c4a2d016d1ef95c5512823bb085a8122" +dependencies = [ + "codemap", + "termcolor", ] [[package]] @@ -897,6 +876,45 @@ dependencies = [ "toml 0.5.11", ] +[[package]] +name = "const-field-offset" +version = "0.1.4" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "const-field-offset-macro", + "field-offset", +] + +[[package]] +name = "const-field-offset-macro" +version = "0.1.4" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "copypasta" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb85422867ca93da58b7f95fb5c0c10f6183ed6e1ef8841568968a896d3a858" +dependencies = [ + "clipboard-win", + "objc", + "objc-foundation", + "objc_id", + "smithay-clipboard", + "x11-clipboard", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -915,9 +933,9 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -937,6 +955,24 @@ dependencies = [ "libc", ] +[[package]] +name = "core-text" +version = "20.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d2790b5c08465d49f8dc05c8bcae9fea467855947db39b0f8145c091aaced5" +dependencies = [ + "core-foundation", + "core-graphics", + "foreign-types", + "libc", +] + +[[package]] +name = "countme" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636" + [[package]] name = "cpuctl" version = "5.0.8" @@ -959,12 +995,43 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "critical-section" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-common" version = "0.1.6" @@ -975,6 +1042,37 @@ dependencies = [ "typenum", ] +[[package]] +name = "css-color-parser2" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8ed1639f4b56ec6f31d007ff66ce4a13099dce5a9995d48368a30d62bf04bd" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "ctor" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" +dependencies = [ + "quote", + "syn 2.0.50", +] + +[[package]] +name = "cursor-icon" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" + +[[package]] +name = "data-url" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" + [[package]] name = "deranged" version = "0.3.11" @@ -995,6 +1093,30 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", +] + +[[package]] +name = "derive_utils" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61bb5a1014ce6dfc2a378578509abe775a5aa06bff584a547555d9efdb81b926" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + [[package]] name = "digest" version = "0.10.7" @@ -1076,75 +1198,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] -name = "ecolor" -version = "0.21.0" -source = "git+https://github.com/emilk/egui?rev=b8e798777de519de3a1878798097ab2ab0bd4def#b8e798777de519de3a1878798097ab2ab0bd4def" +name = "drm" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edf9159ef4bcecd0c5e4cbeb573b8d0037493403d542780dba5d840bbf9df56f" dependencies = [ + "bitflags 1.3.2", "bytemuck", + "drm-ffi", + "drm-fourcc", + "nix 0.26.4", ] [[package]] -name = "eframe" -version = "0.21.3" -source = "git+https://github.com/emilk/egui?rev=b8e798777de519de3a1878798097ab2ab0bd4def#b8e798777de519de3a1878798097ab2ab0bd4def" +name = "drm-ffi" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1352481b7b90e27a8a1bf8ef6b33cf18b98dba7c410e75c24bb3eef2f0d8d525" dependencies = [ - "bytemuck", - "egui", - "egui-winit", - "egui_glow", - "glow", - "glutin", - "glutin-winit", - "js-sys", - "log", - "percent-encoding", - "raw-window-handle", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winit", + "drm-sys", + "nix 0.26.4", ] [[package]] -name = "egui" -version = "0.21.0" -source = "git+https://github.com/emilk/egui?rev=b8e798777de519de3a1878798097ab2ab0bd4def#b8e798777de519de3a1878798097ab2ab0bd4def" +name = "drm-fourcc" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" + +[[package]] +name = "drm-sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1369f1679d6b706d234c4c1e0613c415c2c74b598a09ad28080ba2474b72e42d" dependencies = [ - "accesskit", - "ahash", - "epaint", - "log", - "nohash-hasher", + "libc", ] [[package]] -name = "egui-winit" -version = "0.21.1" -source = "git+https://github.com/emilk/egui?rev=b8e798777de519de3a1878798097ab2ab0bd4def#b8e798777de519de3a1878798097ab2ab0bd4def" +name = "dwrote" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" dependencies = [ - "accesskit_winit", - "arboard", - "egui", - "instant", - "log", - "smithay-clipboard", - "webbrowser", - "winit", -] - -[[package]] -name = "egui_glow" -version = "0.21.0" -source = "git+https://github.com/emilk/egui?rev=b8e798777de519de3a1878798097ab2ab0bd4def#b8e798777de519de3a1878798097ab2ab0bd4def" -dependencies = [ - "bytemuck", - "egui", - "glow", - "log", - "memoffset 0.6.5", - "wasm-bindgen", - "web-sys", + "lazy_static", + "libc", + "serde", + "serde_derive", + "winapi", + "wio", ] [[package]] @@ -1153,14 +1255,6 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" -[[package]] -name = "emath" -version = "0.21.0" -source = "git+https://github.com/emilk/egui?rev=b8e798777de519de3a1878798097ab2ab0bd4def#b8e798777de519de3a1878798097ab2ab0bd4def" -dependencies = [ - "bytemuck", -] - [[package]] name = "embedded-graphics" version = "0.7.1" @@ -1170,7 +1264,7 @@ dependencies = [ "az", "byteorder", "embedded-graphics-core", - "float-cmp", + "float-cmp 0.8.0", "micromath", ] @@ -1224,22 +1318,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "epaint" -version = "0.21.0" -source = "git+https://github.com/emilk/egui?rev=b8e798777de519de3a1878798097ab2ab0bd4def#b8e798777de519de3a1878798097ab2ab0bd4def" -dependencies = [ - "ab_glyph", - "ahash", - "atomic_refcell", - "bytemuck", - "ecolor", - "emath", - "log", - "nohash-hasher", - "parking_lot", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -1257,10 +1335,13 @@ dependencies = [ ] [[package]] -name = "error-code" -version = "3.0.0" +name = "euclid" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "281e452d3bad4005426416cdba5ccfd4f5c1280e10099e21db27f7c1c28347fc" +checksum = "87f253bc5c813ca05792837a0ff4b3a580336b224512d48f7eda1d7dd9210787" +dependencies = [ + "num-traits", +] [[package]] name = "event-listener" @@ -1321,6 +1402,22 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "exr" +version = "1.72.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" +dependencies = [ + "bit_field", + "flume", + "half", + "lebe", + "miniz_oxide 0.7.2", + "rayon-core", + "smallvec", + "zune-inflate", +] + [[package]] name = "fastrand" version = "1.9.0" @@ -1345,6 +1442,28 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "femtovg" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18ab822e58e8bc2b89840dc5dde49afe39302e129c60d39c8520200c085404a7" +dependencies = [ + "bitflags 2.4.2", + "fnv", + "generational-arena", + "glow", + "image", + "imgref", + "log", + "lru", + "rgb", + "rustybuzz 0.11.0", + "unicode-bidi", + "unicode-segmentation", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "field-offset" version = "0.3.6" @@ -1355,6 +1474,18 @@ dependencies = [ "rustc_version", ] +[[package]] +name = "filetime" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", +] + [[package]] name = "flate2" version = "1.0.28" @@ -1375,19 +1506,85 @@ dependencies = [ ] [[package]] -name = "foreign-types" -version = "0.3.2" +name = "float-cmp" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" + +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ + "spin", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "fontconfig-parser" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a595cb550439a117696039dfc69830492058211b771a2a165379f2a1a53d84d" +dependencies = [ + "roxmltree", +] + +[[package]] +name = "fontdb" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2 0.9.4", + "slotmap", + "tinyvec", + "ttf-parser", +] + +[[package]] +name = "fontdue" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9099a2f86b8e674b75d03ff154b3fe4c5208ed249ced8d69cc313a9fa40bb488" +dependencies = [ + "hashbrown", + "ttf-parser", +] + +[[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", ] [[package]] -name = "foreign-types-shared" -version = "0.1.1" +name = "foreign-types-macros" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[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" @@ -1499,12 +1696,33 @@ dependencies = [ ] [[package]] -name = "gdk" -version = "0.16.2" +name = "gbm" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9cb33da481c6c040404a11f8212d193889e9b435db2c14fd86987f630d3ce1" +checksum = "f2ec389cda876966cf824111bf6e533fb934c711d473498279964a990853b3c6" dependencies = [ "bitflags 1.3.2", + "drm", + "drm-fourcc", + "gbm-sys", + "libc", +] + +[[package]] +name = "gbm-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63eba9b9b7a231514482deb08759301c9f9f049ac6869403f381834ebfeaf67" +dependencies = [ + "libc", +] + +[[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", @@ -1516,22 +1734,22 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.16.7" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3578c60dee9d029ad86593ed88cb40f35c1b83360e12498d055022385dd9a05" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" dependencies = [ - "bitflags 1.3.2", "gdk-pixbuf-sys", "gio", "glib", "libc", + "once_cell", ] [[package]] name = "gdk-pixbuf-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3092cf797a5f1210479ea38070d9ae8a5b8e9f8f1be9f32f4643c529c7d70016" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ "gio-sys", "glib-sys", @@ -1542,9 +1760,9 @@ dependencies = [ [[package]] name = "gdk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76354f97a913e55b984759a997b693aa7dc71068c9e98bcce51aa167a0a5c5a" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1557,6 +1775,15 @@ dependencies = [ "system-deps", ] +[[package]] +name = "generational-arena" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877e94aff08e743b651baaea359664321055749b398adff8740a7399af7796e7" +dependencies = [ + "cfg-if", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1567,6 +1794,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "gethostname" version = "0.4.3" @@ -1606,11 +1843,10 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gio" -version = "0.16.7" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1c84b4534a290a29160ef5c6eff2a9c95833111472e824fc5cb78b513dd092" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" dependencies = [ - "bitflags 1.3.2", "futures-channel", "futures-core", "futures-io", @@ -1626,9 +1862,9 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.16.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b693b8e39d042a95547fc258a7b07349b1f0b48f4b2fa3108ba3c51c0b5229" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ "glib-sys", "gobject-sys", @@ -1659,11 +1895,11 @@ dependencies = [ [[package]] name = "glib" -version = "0.16.9" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16aa2475c9debed5a32832cb5ff2af5a3f9e1ab9e69df58eaadc1ab2004d6eba" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "futures-channel", "futures-core", "futures-executor", @@ -1674,6 +1910,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", + "memchr", "once_cell", "smallvec", "thiserror", @@ -1681,24 +1918,23 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.16.8" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb1a9325847aa46f1e96ffea37611b9d51fc4827e67f79e7de502a297560a67b" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ - "anyhow", "heck", - "proc-macro-crate", + "proc-macro-crate 2.0.0", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.50", ] [[package]] name = "glib-sys" -version = "0.16.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61a4f46316d06bfa33a7ac22df6f0524c8be58e3db2d9ca99ccb1f357b62a65" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" dependencies = [ "libc", "system-deps", @@ -1712,9 +1948,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "glow" -version = "0.12.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" dependencies = [ "js-sys", "slotmap", @@ -1724,54 +1960,55 @@ dependencies = [ [[package]] name = "glutin" -version = "0.30.10" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc93b03242719b8ad39fb26ed2b01737144ce7bd4bfc7adadcef806596760fe" +checksum = "18fcd4ae4e86d991ad1300b8f57166e5be0c95ef1f63f3f5b827f8a164548746" dependencies = [ - "bitflags 1.3.2", - "cfg_aliases", + "bitflags 2.4.2", + "cfg_aliases 0.1.1", "cgl", "core-foundation", "dispatch", "glutin_egl_sys", "glutin_glx_sys", "glutin_wgl_sys", - "libloading 0.7.4", + "icrate", + "libloading 0.8.1", "objc2", "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", + "cfg_aliases 0.1.1", "glutin", - "raw-window-handle", + "raw-window-handle 0.5.2", "winit", ] [[package]] name = "glutin_egl_sys" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af784eb26c5a68ec85391268e074f0aa618c096eadb5d6330b0911cf34fe57c5" +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", @@ -1779,18 +2016,18 @@ 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", ] [[package]] name = "gobject-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ "glib-sys", "libc", @@ -1799,12 +2036,11 @@ dependencies = [ [[package]] name = "gtk" -version = "0.16.2" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4d3507d43908c866c805f74c9dd593c0ce7ba5c38e576e41846639cdcd4bee6" +checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c" dependencies = [ "atk", - "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", @@ -1815,16 +2051,15 @@ dependencies = [ "gtk-sys", "gtk3-macros", "libc", - "once_cell", "pango", "pkg-config", ] [[package]] name = "gtk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b5f8946685d5fe44497007786600c2f368ff6b1e61a16251c89f72a97520a3" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" dependencies = [ "atk-sys", "cairo-sys-rs", @@ -1840,16 +2075,15 @@ dependencies = [ [[package]] name = "gtk3-macros" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "096eb63c6fedf03bafe65e5924595785eaf1bcb7200dac0f2cbe9c9738f05ad8" +checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e" dependencies = [ - "anyhow", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.50", ] [[package]] @@ -1872,11 +2106,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "half" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +dependencies = [ + "cfg-if", + "crunchy", +] + [[package]] name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash", + "allocator-api2", +] [[package]] name = "heck" @@ -1911,6 +2159,241 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[package]] +name = "i-slint-backend-linuxkms" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "calloop", + "drm", + "gbm", + "glutin", + "i-slint-common", + "i-slint-core", + "i-slint-renderer-femtovg", + "input", + "libseat", + "nix 0.27.1", + "raw-window-handle 0.5.2", + "xkbcommon", +] + +[[package]] +name = "i-slint-backend-qt" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "const-field-offset", + "i-slint-common", + "i-slint-core", + "i-slint-core-macros", + "vtable", +] + +[[package]] +name = "i-slint-backend-selector" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "cfg-if", + "i-slint-backend-linuxkms", + "i-slint-backend-qt", + "i-slint-backend-winit", + "i-slint-common", + "i-slint-core", +] + +[[package]] +name = "i-slint-backend-winit" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "bytemuck", + "cfg-if", + "cfg_aliases 0.2.0", + "cocoa", + "const-field-offset", + "copypasta", + "derive_more", + "glutin", + "glutin-winit", + "i-slint-common", + "i-slint-core", + "i-slint-core-macros", + "i-slint-renderer-femtovg", + "i-slint-renderer-skia", + "imgref", + "lyon_path", + "once_cell", + "pin-weak", + "raw-window-handle 0.5.2", + "rgb", + "scoped-tls-hkt", + "scopeguard", + "softbuffer", + "vtable", + "wasm-bindgen", + "web-sys", + "winit", +] + +[[package]] +name = "i-slint-common" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "cfg-if", + "derive_more", + "fontdb", + "libloading 0.8.1", +] + +[[package]] +name = "i-slint-compiler" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "by_address", + "codemap", + "codemap-diagnostic", + "css-color-parser2", + "derive_more", + "fontdue", + "i-slint-common", + "image", + "itertools 0.12.1", + "linked_hash_set", + "lyon_extra", + "lyon_path", + "num_enum", + "once_cell", + "proc-macro2", + "quote", + "resvg", + "rowan", + "smol_str", + "strum", + "thiserror", + "url", +] + +[[package]] +name = "i-slint-core" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "auto_enums", + "bytemuck", + "cfg-if", + "clru", + "const-field-offset", + "derive_more", + "euclid", + "fontdue", + "i-slint-common", + "i-slint-core-macros", + "image", + "integer-sqrt", + "lyon_algorithms", + "lyon_extra", + "lyon_geom", + "lyon_path", + "num-traits", + "once_cell", + "pin-project", + "pin-weak", + "portable-atomic", + "resvg", + "rgb", + "rustybuzz 0.13.0", + "scoped-tls-hkt", + "scopeguard", + "slab", + "static_assertions", + "strum", + "unicode-linebreak", + "unicode-script", + "unicode-segmentation", + "vtable", + "wasm-bindgen", + "web-sys", + "web-time 1.0.0", +] + +[[package]] +name = "i-slint-core-macros" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "quote", + "syn 2.0.50", +] + +[[package]] +name = "i-slint-renderer-femtovg" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "cfg-if", + "const-field-offset", + "core-foundation", + "core-text", + "derive_more", + "dwrote", + "femtovg", + "glow", + "i-slint-common", + "i-slint-core", + "i-slint-core-macros", + "imgref", + "lyon_path", + "once_cell", + "pin-weak", + "raw-window-handle 0.5.2", + "rgb", + "scoped-tls-hkt", + "ttf-parser", + "unicode-script", + "unicode-segmentation", + "vtable", + "wasm-bindgen", + "web-sys", + "winapi", +] + +[[package]] +name = "i-slint-renderer-skia" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "bytemuck", + "cfg-if", + "cfg_aliases 0.2.0", + "cocoa", + "const-field-offset", + "core-foundation", + "core-graphics-types", + "derive_more", + "foreign-types", + "glow", + "glutin", + "i-slint-common", + "i-slint-core", + "i-slint-core-macros", + "lyon_path", + "metal", + "objc", + "once_cell", + "pin-weak", + "raw-window-handle 0.5.2", + "scoped-tls-hkt", + "skia-safe", + "softbuffer", + "unicode-segmentation", + "vtable", + "windows 0.52.0", +] + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -1934,6 +2417,17 @@ dependencies = [ "cc", ] +[[package]] +name = "icrate" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" +dependencies = [ + "block2", + "dispatch", + "objc2", +] + [[package]] name = "idna" version = "0.5.0" @@ -1944,6 +2438,36 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "image" +version = "0.24.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034bbe799d1909622a74d1193aa50147769440040ff36cb2baa947609b0a4e23" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "exr", + "gif", + "jpeg-decoder", + "num-traits", + "png", + "qoi", + "tiff", +] + +[[package]] +name = "imagesize" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" + +[[package]] +name = "imgref" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" + [[package]] name = "indexmap" version = "2.2.3" @@ -1976,6 +2500,26 @@ dependencies = [ "libc", ] +[[package]] +name = "input" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e74cd82cedcd66db78742a8337bdc48f188c4d2c12742cbc5cd85113f0b059" +dependencies = [ + "bitflags 1.3.2", + "input-sys", + "io-lifetimes", + "libc", + "log", + "udev 0.7.0", +] + +[[package]] +name = "input-sys" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd4f5b4d1c00331c5245163aacfe5f20be75b564c7112d45893d4ae038119eb0" + [[package]] name = "instant" version = "0.1.12" @@ -1983,9 +2527,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", +] + +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +dependencies = [ + "num-traits", ] [[package]] @@ -2057,10 +2607,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] -name = "js-sys" -version = "0.3.61" +name = "jpeg-decoder" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" +dependencies = [ + "rayon", +] + +[[package]] +name = "js-sys" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -2071,6 +2630,31 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" +[[package]] +name = "kurbo" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "kurbo" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1618d4ebd923e97d67e7cd363d80aef35fe961005cbbbb3d2dad8bdd1bc63440" +dependencies = [ + "arrayvec", + "smallvec", +] + +[[package]] +name = "lazy-bytes-cast" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10257499f089cd156ad82d0a9cd57d9501fa2c989068992a97eb3c27836f206b" + [[package]] name = "lazy_static" version = "1.4.0" @@ -2084,10 +2668,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] -name = "libappindicator" -version = "0.8.0" +name = "lebe" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e1edfdc9b0853358306c6dfb4b77c79c779174256fe93d80c0b5ebca451a2f" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" dependencies = [ "glib", "gtk", @@ -2098,9 +2688,9 @@ dependencies = [ [[package]] name = "libappindicator-sys" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08fcb2bea89cee9613982501ec83eaa2d09256b24540ae463c52a28906163918" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" dependencies = [ "gtk-sys", "libloading 0.7.4", @@ -2133,6 +2723,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "libredox" version = "0.0.1" @@ -2155,6 +2751,26 @@ dependencies = [ "redox_syscall 0.4.1", ] +[[package]] +name = "libseat" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a0adf8d8607a73a5b74cbe4132f57cb349e4bf860103cd089461bbcbc9907e" +dependencies = [ + "errno", + "libseat-sys", + "log", +] + +[[package]] +name = "libseat-sys" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3671cb5e03871f1d6bf0b3b5daa9275549e348fa6359e0f9adb910ca163d4c34" +dependencies = [ + "pkg-config", +] + [[package]] name = "libudev-sys" version = "0.1.4" @@ -2177,6 +2793,21 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linked_hash_set" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -2212,7 +2843,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4afde78d03ee08949efb760d0cd7ad9599379d91207de5c6e778fe9f8f98eae2" dependencies = [ "serde", - "zbus 4.0.1", + "zbus", +] + +[[package]] +name = "lru" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2c024b41519440580066ba82aab04092b333e09066a5eb86c7c4890df31f22" + +[[package]] +name = "lyon_algorithms" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3bca95f9a4955b3e4a821fbbcd5edfbd9be2a9a50bb5758173e5358bfb4c623" +dependencies = [ + "lyon_path", + "num-traits", +] + +[[package]] +name = "lyon_extra" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ce2ae38f2480094ec1f0d5df51a75581fa84f0e8f32a0edb1d264630c99f3b" +dependencies = [ + "lyon_path", +] + +[[package]] +name = "lyon_geom" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edecfb8d234a2b0be031ab02ebcdd9f3b9ee418fb35e265f7a540a48d197bff9" +dependencies = [ + "arrayvec", + "euclid", + "num-traits", +] + +[[package]] +name = "lyon_path" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca507745ba7ccbc76e5c44e7b63b1a29d2b0d6126f375806a5bbaf657c7d6c45" +dependencies = [ + "lyon_geom", + "num-traits", ] [[package]] @@ -2245,20 +2922,20 @@ checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memmap2" -version = "0.5.10" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" dependencies = [ "libc", ] [[package]] -name = "memoffset" -version = "0.6.5" +name = "memmap2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ - "autocfg", + "libc", ] [[package]] @@ -2279,6 +2956,21 @@ dependencies = [ "autocfg", ] +[[package]] +name = "metal" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" +dependencies = [ + "bitflags 2.4.2", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", + "paste", +] + [[package]] name = "micromath" version = "1.1.1" @@ -2318,22 +3010,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", - "log", "wasi", "windows-sys 0.48.0", ] [[package]] name = "ndk" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "jni-sys", + "log", "ndk-sys", - "num_enum 0.5.11", - "raw-window-handle", + "num_enum", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "thiserror", ] @@ -2345,39 +3038,13 @@ 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.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.6.5", -] - -[[package]] -name = "nix" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.6.5", - "pin-utils", -] - [[package]] name = "nix" version = "0.26.4" @@ -2403,12 +3070,6 @@ dependencies = [ "memoffset 0.9.0", ] -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - [[package]] name = "nom" version = "7.1.3" @@ -2427,7 +3088,7 @@ dependencies = [ "mac-notification-sys", "serde", "tauri-winrt-notification", - "zbus 4.0.1", + "zbus", ] [[package]] @@ -2443,6 +3104,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -2457,41 +3119,20 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.11" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ - "num_enum_derive 0.5.11", -] - -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", + "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.11" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.50", @@ -2504,6 +3145,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", + "objc_exception", ] [[package]] @@ -2519,28 +3161,33 @@ dependencies = [ [[package]] name = "objc-sys" -version = "0.2.0-beta.2" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" +checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459" [[package]] name = "objc2" -version = "0.3.0-beta.3.patch-leaks.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" +checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" dependencies = [ - "block2", "objc-sys", "objc2-encode", ] [[package]] name = "objc2-encode" -version = "2.0.0-pre.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" dependencies = [ - "objc-sys", + "cc", ] [[package]] @@ -2566,6 +3213,10 @@ name = "once_cell" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +dependencies = [ + "critical-section", + "portable-atomic", +] [[package]] name = "orbclient" @@ -2597,11 +3248,10 @@ dependencies = [ [[package]] name = "pango" -version = "0.16.5" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdff66b271861037b89d028656184059e03b0b6ccb36003820be19f7200b1e94" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" dependencies = [ - "bitflags 1.3.2", "gio", "glib", "libc", @@ -2611,9 +3261,9 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e134909a9a293e04d2cc31928aa95679c5e4df954d0b85483159bd20d8f047f" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ "glib-sys", "gobject-sys", @@ -2627,29 +3277,6 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "smallvec", - "windows-targets 0.48.5", -] - [[package]] name = "paste" version = "1.0.14" @@ -2662,6 +3289,32 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + +[[package]] +name = "pin-project" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -2674,6 +3327,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pin-weak" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b330c9d1b92dfe68442ca20b009c717d5f0b1e3cf4965e62f704c3c6e95a1305" + [[package]] name = "piper" version = "0.2.1" @@ -2750,6 +3409,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +dependencies = [ + "critical-section", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -2762,6 +3430,16 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "prettyplease" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +dependencies = [ + "proc-macro2", + "syn 2.0.50", +] + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -2772,6 +3450,15 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2805,6 +3492,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + [[package]] name = "quick-xml" version = "0.30.0" @@ -2814,6 +3510,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "quick-xml" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.35" @@ -2859,6 +3564,32 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +[[package]] +name = "raw-window-handle" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" + +[[package]] +name = "rayon" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "redox_syscall" version = "0.3.5" @@ -2917,6 +3648,29 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "resvg" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "024e40e1ba7313fc315b1720298988c0cd6f8bfe3754b52838aafecebd11355a" +dependencies = [ + "log", + "pico-args", + "rgb", + "svgtypes", + "tiny-skia", + "usvg", +] + +[[package]] +name = "rgb" +version = "0.8.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8" +dependencies = [ + "bytemuck", +] + [[package]] name = "rog-control-center" version = "5.0.8" @@ -2924,11 +3678,12 @@ dependencies = [ "asusd", "cargo-husky", "dirs", - "eframe", - "egui", "env_logger", "gtk", "gumdrop", + "i-slint-backend-selector", + "i-slint-backend-winit", + "i-slint-core", "libappindicator", "log", "nix 0.26.4", @@ -2942,12 +3697,15 @@ dependencies = [ "serde", "serde_derive", "serde_json", + "slint", + "slint-build", "supergfxctl", "tempfile", "tokio", "toml 0.5.11", "versions", - "zbus 4.0.1", + "winit", + "zbus", ] [[package]] @@ -2964,7 +3722,7 @@ dependencies = [ "serde", "serde_derive", "typeshare", - "zbus 4.0.1", + "zbus", ] [[package]] @@ -2978,7 +3736,7 @@ dependencies = [ "serde", "serde_derive", "typeshare", - "zbus 4.0.1", + "zbus", ] [[package]] @@ -2991,7 +3749,7 @@ dependencies = [ "rog_aura", "rog_platform", "rog_profiles", - "zbus 4.0.1", + "zbus", ] [[package]] @@ -3008,7 +3766,7 @@ dependencies = [ "serde_derive", "typeshare", "udev 0.7.0", - "zbus 4.0.1", + "zbus", ] [[package]] @@ -3022,7 +3780,7 @@ dependencies = [ "serde_derive", "typeshare", "udev 0.7.0", - "zbus 4.0.1", + "zbus", ] [[package]] @@ -3048,6 +3806,25 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "rowan" +version = "0.15.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49" +dependencies = [ + "countme", + "hashbrown", + "memoffset 0.9.0", + "rustc-hash", + "text-size", +] + +[[package]] +name = "roxmltree" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" + [[package]] name = "rusb" version = "0.9.3" @@ -3106,6 +3883,60 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "rustybuzz" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee8fe2a8461a0854a37101fe7a1b13998d0cfa987e43248e81d2a5f4570f6fa" +dependencies = [ + "bitflags 1.3.2", + "bytemuck", + "smallvec", + "ttf-parser", + "unicode-bidi-mirroring 0.1.0", + "unicode-ccc 0.1.2", + "unicode-properties", + "unicode-script", +] + +[[package]] +name = "rustybuzz" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0ae5692c5beaad6a9e22830deeed7874eae8a4e3ba4076fb48e12c56856222c" +dependencies = [ + "bitflags 2.4.2", + "bytemuck", + "smallvec", + "ttf-parser", + "unicode-bidi-mirroring 0.1.0", + "unicode-ccc 0.1.2", + "unicode-properties", + "unicode-script", +] + +[[package]] +name = "rustybuzz" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88117946aa1bfb53c2ae0643ceac6506337f44887f8c9fbfb43587b1cc52ba49" +dependencies = [ + "bitflags 2.4.2", + "bytemuck", + "smallvec", + "ttf-parser", + "unicode-bidi-mirroring 0.2.0", + "unicode-ccc 0.2.0", + "unicode-properties", + "unicode-script", +] + [[package]] name = "ryu" version = "1.0.17" @@ -3127,6 +3958,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" +[[package]] +name = "scoped-tls-hkt" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ddc765d3410d9f6c6ca071bf0b67f6b01e3ec4595dc3892f02677e75819dddc" + [[package]] name = "scopeguard" version = "1.2.0" @@ -3135,13 +3972,13 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" -version = "0.5.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" +checksum = "82b2eaf3a5b264a521b988b2e73042e742df700c4f962cde845d1541adb46550" dependencies = [ "ab_glyph", "log", - "memmap2", + "memmap2 0.9.4", "smithay-client-toolkit", "tiny-skia", ] @@ -3258,6 +4095,50 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "simplecss" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a11be7c62927d9427e9f40f3444d5499d868648e2edbc4e2116de69e7ec0e89d" +dependencies = [ + "log", +] + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "skia-bindings" +version = "0.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bc61a106126a429bb4775ce5fbe23b2bcaa74d1a9c484997f4700de31480b44" +dependencies = [ + "bindgen", + "cc", + "flate2", + "heck", + "lazy_static", + "regex", + "serde_json", + "tar", + "toml 0.8.10", +] + +[[package]] +name = "skia-safe" +version = "0.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3201eba92bca1f83864f5c3a48309bcfee7e0590bebd7826e7ab0a49aa24a750" +dependencies = [ + "bitflags 2.4.2", + "lazy_static", + "skia-bindings", + "windows 0.52.0", +] + [[package]] name = "slab" version = "0.4.9" @@ -3267,6 +4148,44 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slint" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "const-field-offset", + "i-slint-backend-selector", + "i-slint-core", + "i-slint-renderer-femtovg", + "num-traits", + "once_cell", + "pin-weak", + "slint-macros", + "vtable", +] + +[[package]] +name = "slint-build" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "i-slint-compiler", + "spin_on", + "thiserror", + "toml_edit 0.22.6", +] + +[[package]] +name = "slint-macros" +version = "1.5.0" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "i-slint-compiler", + "proc-macro2", + "quote", + "spin_on", +] + [[package]] name = "slotmap" version = "1.0.7" @@ -3284,31 +4203,38 @@ checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smithay-client-toolkit" -version = "0.16.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" +checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "calloop", - "dlib", - "lazy_static", + "calloop-wayland-source", + "cursor-icon", + "libc", "log", - "memmap2", - "nix 0.24.3", - "pkg-config", + "memmap2 0.9.4", + "rustix 0.38.31", + "thiserror", + "wayland-backend", "wayland-client", + "wayland-csd-frame", "wayland-cursor", "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", ] [[package]] name = "smithay-clipboard" -version = "0.6.6" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" +checksum = "c091e7354ea8059d6ad99eace06dd13ddeedbb0ac72d40a9a6e7ff790525882d" dependencies = [ + "libc", "smithay-client-toolkit", - "wayland-client", + "wayland-backend", ] [[package]] @@ -3328,6 +4254,15 @@ dependencies = [ "futures-lite 1.13.0", ] +[[package]] +name = "smol_str" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49" +dependencies = [ + "serde", +] + [[package]] name = "socket2" version = "0.4.10" @@ -3348,6 +4283,60 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "softbuffer" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f266ce2aa23eaaaa4e758ed44495d505d00fb79f359d46f6c1900cb053123b62" +dependencies = [ + "as-raw-xcb-connection", + "bytemuck", + "cfg_aliases 0.1.1", + "cocoa", + "core-graphics", + "fastrand 2.0.1", + "foreign-types", + "js-sys", + "log", + "memmap2 0.9.4", + "objc", + "raw-window-handle 0.5.2", + "redox_syscall 0.4.1", + "rustix 0.38.31", + "tiny-xlib", + "wasm-bindgen", + "wayland-backend", + "wayland-client", + "wayland-sys", + "web-sys", + "windows-sys 0.48.0", + "x11rb 0.12.0", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spin_on" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076e103ed41b9864aa838287efe5f4e3a7a0362dd00671ae62a212e5e4612da2" +dependencies = [ + "pin-utils", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -3359,6 +4348,31 @@ name = "strict-num" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +dependencies = [ + "float-cmp 0.9.0", +] + +[[package]] +name = "strum" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.50", +] [[package]] name = "supergfxctl" @@ -3372,7 +4386,17 @@ dependencies = [ "serde_json", "tokio", "udev 0.8.0", - "zbus 4.0.1", + "zbus", +] + +[[package]] +name = "svgtypes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59d7618f12b51be8171a7cfdda1e7a93f79cbc57c4e7adf89a749cf671125241" +dependencies = [ + "kurbo 0.10.4", + "siphasher", ] [[package]] @@ -3417,7 +4441,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7402f02e82714cc736e1c37449344ae06a181f9b8318d81a65af76d85868d51" dependencies = [ "serde", - "zbus 4.0.1", + "zbus", +] + +[[package]] +name = "tar" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +dependencies = [ + "filetime", + "libc", + "xattr", ] [[package]] @@ -3432,7 +4467,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "006851c9ccefa3c38a7646b8cec804bb429def3da10497bfa977179869c3e8e2" dependencies = [ - "quick-xml", + "quick-xml 0.30.0", "windows 0.51.1", ] @@ -3457,6 +4492,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "text-size" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233" + [[package]] name = "thiserror" version = "1.0.57" @@ -3478,13 +4519,14 @@ dependencies = [ ] [[package]] -name = "thread_local" -version = "1.1.8" +name = "tiff" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" dependencies = [ - "cfg-if", - "once_cell", + "flate2", + "jpeg-decoder", + "weezl", ] [[package]] @@ -3508,29 +4550,42 @@ 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", + "log", "png", "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", "strict-num", ] +[[package]] +name = "tiny-xlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4098d49269baa034a8d1eae9bd63e9fa532148d772121dace3bcd6a6c98eb6d" +dependencies = [ + "as-raw-xcb-connection", + "ctor", + "libloading 0.8.1", + "tracing", +] + [[package]] name = "tinybmp" version = "0.4.0" @@ -3623,6 +4678,17 @@ dependencies = [ "winnow 0.5.40", ] +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow 0.5.40", +] + [[package]] name = "toml_edit" version = "0.22.6" @@ -3761,12 +4827,42 @@ version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +[[package]] +name = "unicode-bidi-mirroring" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56d12260fb92d52f9008be7e4bca09f584780eb2266dc8fecc6a192bec561694" + +[[package]] +name = "unicode-bidi-mirroring" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" + +[[package]] +name = "unicode-ccc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" + +[[package]] +name = "unicode-ccc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" + [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + [[package]] name = "unicode-normalization" version = "0.1.23" @@ -3776,6 +4872,30 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" + +[[package]] +name = "unicode-script" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8d71f5726e5f285a935e9fe8edfd53f0491eb6e9a5774097fdabee7cd8c9cd" + +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + +[[package]] +name = "unicode-vo" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" + [[package]] name = "url" version = "2.5.0" @@ -3787,18 +4907,39 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "usvg" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c04150a94f0bfc3b2c15d4e151524d14cd06765fc6641d8b1c59a248360d4474" +dependencies = [ + "base64", + "data-url", + "flate2", + "fontdb", + "imagesize", + "kurbo 0.9.5", + "log", + "pico-args", + "roxmltree", + "rustybuzz 0.12.1", + "simplecss", + "siphasher", + "strict-num", + "svgtypes", + "tiny-skia-path", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "xmlwriter", +] + [[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version-compare" version = "0.1.1" @@ -3821,6 +4962,27 @@ dependencies = [ "nom", ] +[[package]] +name = "vtable" +version = "0.1.11" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "const-field-offset", + "portable-atomic", + "stable_deref_trait", + "vtable-macro", +] + +[[package]] +name = "vtable-macro" +version = "0.1.10" +source = "git+https://github.com/slint-ui/slint.git#fa2cf8c28aec3d15e8ba542cb603ef188e01ee94" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + [[package]] name = "waker-fn" version = "1.1.1" @@ -3845,9 +5007,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3855,24 +5017,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.50", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" dependencies = [ "cfg-if", "js-sys", @@ -3882,9 +5044,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3892,133 +5054,160 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.50", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] -name = "wayland-client" -version = "0.29.5" +name = "wayland-backend" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" dependencies = [ - "bitflags 1.3.2", + "cc", "downcast-rs", - "libc", - "nix 0.24.3", + "rustix 0.38.31", "scoped-tls", - "wayland-commons", - "wayland-scanner", - "wayland-sys 0.29.5", + "smallvec", + "wayland-sys", ] [[package]] -name = "wayland-commons" -version = "0.29.5" +name = "wayland-client" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" dependencies = [ - "nix 0.24.3", - "once_cell", - "smallvec", - "wayland-sys 0.29.5", + "bitflags 2.4.2", + "rustix 0.38.31", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.4.2", + "cursor-icon", + "wayland-backend", ] [[package]] name = "wayland-cursor" -version = "0.29.5" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +checksum = "71ce5fa868dd13d11a0d04c5e2e65726d0897be8de247c0c5a65886e283231ba" dependencies = [ - "nix 0.24.3", + "rustix 0.38.31", "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 1.3.2", + "bitflags 2.4.2", + "wayland-backend", "wayland-client", - "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" +dependencies = [ + "bitflags 2.4.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "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.4.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.29.5" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" dependencies = [ "proc-macro2", + "quick-xml 0.31.0", "quote", - "xml-rs", ] [[package]] name = "wayland-sys" -version = "0.29.5" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" dependencies = [ "dlib", - "lazy_static", - "pkg-config", -] - -[[package]] -name = "wayland-sys" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" -dependencies = [ - "dlib", - "lazy_static", "log", + "once_cell", "pkg-config", ] [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "webbrowser" -version = "0.8.12" +name = "web-time" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b2391658b02c27719fc5a0a73d6e696285138e8b12fba9d4baa70451023c71" +checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" dependencies = [ - "core-foundation", - "home", - "jni", - "log", - "ndk-context", - "objc", - "raw-window-handle", - "url", - "web-sys", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee269d72cc29bf77a2c4bc689cc750fb39f5cbd493d2205bbb3f5c7779cf7b0" +dependencies = [ + "js-sys", + "wasm-bindgen", ] [[package]] @@ -4027,6 +5216,18 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.31", +] + [[package]] name = "winapi" version = "0.3.9" @@ -4052,23 +5253,21 @@ dependencies = [ "winapi", ] +[[package]] +name = "winapi-wsapoll" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +dependencies = [ + "winapi", +] + [[package]] 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.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-targets 0.42.2", -] - [[package]] name = "windows" version = "0.51.1" @@ -4079,6 +5278,16 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core 0.52.0", + "windows-targets 0.52.3", +] + [[package]] name = "windows-core" version = "0.51.1" @@ -4094,29 +5303,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-implement" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce87ca8e3417b02dc2a8a22769306658670ec92d78f1bd420d6310a67c245c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "windows-interface" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853f69a591ecd4f810d29f17e902d40e349fb05b0b11fff63b08b826bfe39c7f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "windows-targets 0.52.3", ] [[package]] @@ -4143,7 +5330,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.3", ] [[package]] @@ -4178,17 +5365,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.3", + "windows_aarch64_msvc 0.52.3", + "windows_i686_gnu 0.52.3", + "windows_i686_msvc 0.52.3", + "windows_x86_64_gnu 0.52.3", + "windows_x86_64_gnullvm 0.52.3", + "windows_x86_64_msvc 0.52.3", ] [[package]] @@ -4205,9 +5392,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" [[package]] name = "windows_aarch64_msvc" @@ -4223,9 +5410,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" [[package]] name = "windows_i686_gnu" @@ -4241,9 +5428,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" [[package]] name = "windows_i686_msvc" @@ -4259,9 +5446,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" [[package]] name = "windows_x86_64_gnu" @@ -4277,9 +5464,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" [[package]] name = "windows_x86_64_gnullvm" @@ -4295,9 +5482,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" [[package]] name = "windows_x86_64_msvc" @@ -4313,43 +5500,57 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" [[package]] name = "winit" -version = "0.28.7" +version = "0.29.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9596d90b45384f5281384ab204224876e8e8bf7d58366d9b795ad99aa9894b94" +checksum = "4c824f11941eeae66ec71111cc2674373c772f482b58939bb4066b642aa2ffcf" dependencies = [ + "ahash", "android-activity", - "bitflags 1.3.2", - "cfg_aliases", + "atomic-waker", + "bitflags 2.4.2", + "bytemuck", + "calloop", + "cfg_aliases 0.1.1", "core-foundation", "core-graphics", - "dispatch", - "instant", + "cursor-icon", + "icrate", + "js-sys", "libc", "log", - "mio", + "memmap2 0.9.4", "ndk", + "ndk-sys", "objc2", "once_cell", "orbclient", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "redox_syscall 0.3.5", + "rustix 0.38.31", "sctk-adwaita", "smithay-client-toolkit", + "smol_str", + "unicode-segmentation", "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", "wayland-client", - "wayland-commons", "wayland-protocols", - "wayland-scanner", + "wayland-protocols-plasma", "web-sys", - "windows-sys 0.45.0", + "web-time 0.2.4", + "windows-sys 0.48.0", "x11-dl", + "x11rb 0.13.0", + "xkbcommon-dl", ] [[package]] @@ -4370,6 +5571,25 @@ dependencies = [ "memchr", ] +[[package]] +name = "wio" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" +dependencies = [ + "winapi", +] + +[[package]] +name = "x11-clipboard" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613c2be3e772af2bbb57c5a94413675f5ec668bac00a71ada2ced28c420ef087" +dependencies = [ + "libc", + "x11rb 0.13.0", +] + [[package]] name = "x11-dl" version = "2.21.0" @@ -4381,15 +5601,45 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "x11rb" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" +dependencies = [ + "as-raw-xcb-connection", + "gethostname 0.3.0", + "libc", + "libloading 0.7.4", + "nix 0.26.4", + "once_cell", + "winapi", + "winapi-wsapoll", + "x11rb-protocol 0.12.0", +] + [[package]] name = "x11rb" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" dependencies = [ - "gethostname", + "as-raw-xcb-connection", + "gethostname 0.4.3", + "libc", + "libloading 0.8.1", + "once_cell", "rustix 0.38.31", - "x11rb-protocol", + "x11rb-protocol 0.13.0", +] + +[[package]] +name = "x11rb-protocol" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc" +dependencies = [ + "nix 0.26.4", ] [[package]] @@ -4398,6 +5648,17 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34" +[[package]] +name = "xattr" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +dependencies = [ + "libc", + "linux-raw-sys 0.4.13", + "rustix 0.38.31", +] + [[package]] name = "xcursor" version = "0.3.5" @@ -4414,6 +5675,36 @@ dependencies = [ "winapi", ] +[[package]] +name = "xkbcommon" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13867d259930edc7091a6c41b4ce6eee464328c6ff9659b7e4c668ca20d4c91e" +dependencies = [ + "libc", + "memmap2 0.8.0", + "xkeysym", +] + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.4.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" + [[package]] name = "xml-rs" version = "0.8.19" @@ -4421,42 +5712,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" [[package]] -name = "zbus" -version = "3.10.0" +name = "xmlwriter" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f770930448dd412a4a7131dd968a8e6df0064db4d7916fbbd2d6c3f26b566938" -dependencies = [ - "async-broadcast 0.5.1", - "async-executor", - "async-io 1.13.0", - "async-lock 2.8.0", - "async-recursion", - "async-task", - "async-trait", - "byteorder", - "derivative", - "dirs", - "enumflags2", - "event-listener 2.5.3", - "futures-core", - "futures-sink", - "futures-util", - "hex", - "nix 0.25.1", - "once_cell", - "ordered-stream", - "rand", - "serde", - "serde_repr", - "sha1", - "static_assertions", - "tracing", - "uds_windows", - "winapi", - "zbus_macros 3.10.0", - "zbus_names 2.6.0", - "zvariant 3.11.0", -] +checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" [[package]] name = "zbus" @@ -4464,7 +5723,7 @@ version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030" dependencies = [ - "async-broadcast 0.7.0", + "async-broadcast", "async-executor", "async-fs 2.1.1", "async-io 2.3.1", @@ -4492,22 +5751,9 @@ dependencies = [ "uds_windows", "windows-sys 0.52.0", "xdg-home", - "zbus_macros 4.0.1", - "zbus_names 3.0.0", - "zvariant 4.0.0", -] - -[[package]] -name = "zbus_macros" -version = "3.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4832059b438689017db7340580ebabba07f114eab91bf990c6e55052408b40d8" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", + "zbus_macros", + "zbus_names", + "zvariant", ] [[package]] @@ -4516,7 +5762,7 @@ version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "regex", @@ -4524,17 +5770,6 @@ dependencies = [ "zvariant_utils", ] -[[package]] -name = "zbus_names" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" -dependencies = [ - "serde", - "static_assertions", - "zvariant 3.11.0", -] - [[package]] name = "zbus_names" version = "3.0.0" @@ -4543,7 +5778,7 @@ checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", - "zvariant 4.0.0", + "zvariant", ] [[package]] @@ -4567,17 +5802,12 @@ dependencies = [ ] [[package]] -name = "zvariant" -version = "3.11.0" +name = "zune-inflate" +version = "0.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903169c05b9ab948ee93fefc9127d08930df4ce031d46c980784274439803e51" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" dependencies = [ - "byteorder", - "enumflags2", - "libc", - "serde", - "static_assertions", - "zvariant_derive 3.11.0", + "simd-adler32", ] [[package]] @@ -4590,19 +5820,7 @@ dependencies = [ "enumflags2", "serde", "static_assertions", - "zvariant_derive 4.0.0", -] - -[[package]] -name = "zvariant_derive" -version = "3.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce76636e8fab7911be67211cf378c252b115ee7f2bae14b18b84821b39260b5" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", + "zvariant_derive", ] [[package]] @@ -4611,7 +5829,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", diff --git a/Cargo.toml b/Cargo.toml index df835e5c..f2ee178b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,39 @@ [workspace] -members = ["asusctl", "asusd", "asusd-user", "config-traits", "cpuctl", "dmi-id", "rog-platform", "rog-dbus", "rog-anime", "rog-aura", "rog-profiles", "rog-control-center", "simulators"] -default-members = ["asusctl", "asusd", "asusd-user", "cpuctl", "rog-control-center"] +members = [ + "asusctl", + "asusd", + "asusd-user", + "config-traits", + "cpuctl", + "dmi-id", + "rog-platform", + "rog-dbus", + "rog-anime", + "rog-aura", + "rog-profiles", + "rog-control-center", + "simulators", +] +default-members = [ + "asusctl", + "asusd", + "asusd-user", + "cpuctl", + "rog-control-center", +] resolver = "2" [workspace.package] version = "5.0.8" -rust-version = "1.75" +rust-version = "1.76" [workspace.dependencies] -tokio = { version = "^1.23.0", default-features = false, features = ["macros", "sync"]} +tokio = { version = "^1.23.0", default-features = false, features = [ + "macros", + "sync", + "time", + "rt", +] } concat-idents = "^1.1" dirs = "^4.0" smol = "^1.3" @@ -39,7 +64,9 @@ gif = "^0.12.0" versions = "4.1" -notify-rust = { git = "https://github.com/flukejones/notify-rust.git", rev = "54176413b81189a3e4edbdc20a0b4f7e2e35c063", default-features = false, features = ["z"] } +notify-rust = { git = "https://github.com/flukejones/notify-rust.git", rev = "54176413b81189a3e4edbdc20a0b4f7e2e35c063", default-features = false, features = [ + "z", +] } [profile.release] # thin = 57s, asusd = 9.0M @@ -61,4 +88,4 @@ opt-level = 3 [workspace.dependencies.cargo-husky] version = "1" default-features = false -features = ["user-hooks"] \ No newline at end of file +features = ["user-hooks"] diff --git a/asusctl/Cargo.toml b/asusctl/Cargo.toml index 79db9b66..9b26db3e 100644 --- a/asusctl/Cargo.toml +++ b/asusctl/Cargo.toml @@ -16,12 +16,13 @@ dmi_id = { path = "../dmi-id" } gumdrop.workspace = true toml.workspace = true +zbus.workspace = true [dev-dependencies] gif.workspace = true tinybmp.workspace = true glam.workspace = true rog_dbus = { path = "../rog-dbus" } -tokio = { version = "^1.23.0", default-features = false, features = ["macros", "sync", "rt", "time"]} +tokio.workspace = true cargo-husky.workspace = true \ No newline at end of file diff --git a/asusd-user/src/ctrl_anime.rs b/asusd-user/src/ctrl_anime.rs index 6cdb006a..7966b396 100644 --- a/asusd-user/src/ctrl_anime.rs +++ b/asusd-user/src/ctrl_anime.rs @@ -9,7 +9,7 @@ use rog_anime::error::AnimeError; use rog_anime::{ActionData, ActionLoader, AnimTime, Fade, Sequences, Vec2}; use rog_dbus::RogDbusClientBlocking; use serde_derive::{Deserialize, Serialize}; -use zbus::dbus_interface; +use zbus::interface; use zbus::zvariant::{ObjectPath, Type}; use crate::config::ConfigAnime; @@ -175,7 +175,7 @@ impl CtrlAnime<'static> { // - Do actions // - Write config if required // - Unset inner_early_return -#[dbus_interface(name = "org.asuslinux.Daemon")] +#[interface(name = "org.asuslinux.Daemon")] impl CtrlAnime<'static> { pub fn insert_asus_gif( &mut self, diff --git a/asusd-user/src/zbus_anime.rs b/asusd-user/src/zbus_anime.rs index dce9be0e..f3734656 100644 --- a/asusd-user/src/zbus_anime.rs +++ b/asusd-user/src/zbus_anime.rs @@ -21,9 +21,9 @@ //! …consequently `zbus-xmlgen` did not generate code for the above interfaces. #![allow(clippy::too_many_arguments)] -use zbus::dbus_proxy; +use zbus::proxy; -#[dbus_proxy( +#[proxy( interface = "org.asuslinux.Daemon", default_path = "/org/asuslinux/Anime" )] diff --git a/asusd/src/ctrl_anime/trait_impls.rs b/asusd/src/ctrl_anime/trait_impls.rs index 229b7cb0..9686537d 100644 --- a/asusd/src/ctrl_anime/trait_impls.rs +++ b/asusd/src/ctrl_anime/trait_impls.rs @@ -10,7 +10,7 @@ use rog_anime::usb::{ }; use rog_anime::{Animations, AnimeDataBuffer, DeviceState}; use zbus::export::futures_util::lock::Mutex; -use zbus::{dbus_interface, CacheProperties, Connection, SignalContext}; +use zbus::{interface, CacheProperties, Connection, SignalContext}; use super::CtrlAnime; use crate::error::RogError; @@ -43,7 +43,7 @@ impl crate::ZbusRun for CtrlAnimeZbus { // None of these calls can be guarnateed to succeed unless we loop until okay // If the try_lock *does* succeed then any other thread trying to lock will not // grab it until we finish. -#[dbus_interface(name = "org.asuslinux.Daemon")] +#[interface(name = "org.asuslinux.Daemon")] impl CtrlAnimeZbus { /// Writes a data stream of length. Will force system thread to exit until /// it is restarted @@ -58,14 +58,14 @@ impl CtrlAnimeZbus { } /// Set base brightness level - #[dbus_interface(property)] + #[zbus(property)] async fn brightness(&self) -> Brightness { let lock = self.0.lock().await; lock.config.display_brightness } /// Set base brightness level - #[dbus_interface(property)] + #[zbus(property)] async fn set_brightness(&self, brightness: Brightness) { let mut lock = self.0.lock().await; lock.node @@ -86,7 +86,7 @@ impl CtrlAnimeZbus { lock.config.write(); } - #[dbus_interface(property)] + #[zbus(property)] async fn builtins_enabled(&self) -> bool { let lock = self.0.lock().await; lock.config.builtin_anims_enabled @@ -94,7 +94,7 @@ impl CtrlAnimeZbus { /// Enable the builtin animations or not. This is quivalent to "Powersave /// animations" in Armory crate - #[dbus_interface(property)] + #[zbus(property)] async fn set_builtins_enabled(&self, enabled: bool) { let mut lock = self.0.lock().await; lock.node @@ -125,14 +125,14 @@ impl CtrlAnimeZbus { } } - #[dbus_interface(property)] + #[zbus(property)] async fn builtin_animations(&self) -> Animations { let lock = self.0.lock().await; lock.config.builtin_anims } /// Set which builtin animation is used for each stage - #[dbus_interface(property)] + #[zbus(property)] async fn set_builtin_animations(&self, settings: Animations) { let mut lock = self.0.lock().await; lock.node @@ -157,14 +157,14 @@ impl CtrlAnimeZbus { lock.config.write(); } - #[dbus_interface(property)] + #[zbus(property)] async fn enable_display(&self) -> bool { let lock = self.0.lock().await; lock.config.display_enabled } /// Set whether the AniMe is enabled at all - #[dbus_interface(property)] + #[zbus(property)] async fn set_enable_display(&self, enabled: bool) { let mut lock = self.0.lock().await; lock.node @@ -177,14 +177,14 @@ impl CtrlAnimeZbus { lock.config.write(); } - #[dbus_interface(property)] + #[zbus(property)] async fn off_when_unplugged(&self) -> bool { let lock = self.0.lock().await; lock.config.off_when_unplugged } /// Set if to turn the AniMe Matrix off when external power is unplugged - #[dbus_interface(property)] + #[zbus(property)] async fn set_off_when_unplugged(&self, enabled: bool) { let mut lock = self.0.lock().await; let manager = get_logind_manager().await; @@ -201,28 +201,28 @@ impl CtrlAnimeZbus { lock.config.write(); } - #[dbus_interface(property)] + #[zbus(property)] async fn off_when_suspended(&self) -> bool { let lock = self.0.lock().await; lock.config.off_when_suspended } /// Set if to turn the AniMe Matrix off when the laptop is suspended - #[dbus_interface(property)] + #[zbus(property)] async fn set_off_when_suspended(&self, enabled: bool) { let mut lock = self.0.lock().await; lock.config.off_when_suspended = enabled; lock.config.write(); } - #[dbus_interface(property)] + #[zbus(property)] async fn off_when_lid_closed(&self) -> bool { let lock = self.0.lock().await; lock.config.off_when_lid_closed } /// Set if to turn the AniMe Matrix off when the lid is closed - #[dbus_interface(property)] + #[zbus(property)] async fn set_off_when_lid_closed(&self, enabled: bool) { let mut lock = self.0.lock().await; let manager = get_logind_manager().await; @@ -250,7 +250,7 @@ impl CtrlAnimeZbus { } /// Get the device state as stored by asusd - // #[dbus_interface(property)] + // #[zbus(property)] async fn device_state(&self) -> DeviceState { let lock = self.0.lock().await; DeviceState::from(&lock.config) diff --git a/asusd/src/ctrl_aura/trait_impls.rs b/asusd/src/ctrl_aura/trait_impls.rs index 3523c050..164a0332 100644 --- a/asusd/src/ctrl_aura/trait_impls.rs +++ b/asusd/src/ctrl_aura/trait_impls.rs @@ -10,7 +10,7 @@ use rog_aura::{AuraEffect, AuraModeNum, AuraZone, LedBrightness}; use zbus::export::futures_util::lock::{Mutex, MutexGuard}; use zbus::export::futures_util::StreamExt; use zbus::fdo::Error as ZbErr; -use zbus::{dbus_interface, Connection, SignalContext}; +use zbus::{interface, Connection, SignalContext}; use super::controller::CtrlKbdLed; use crate::error::RogError; @@ -41,31 +41,31 @@ impl crate::ZbusRun for CtrlAuraZbus { /// The main interface for changing, reading, or notfying signals /// /// LED commands are split between Brightness, Modes, Per-Key -#[dbus_interface(name = "org.asuslinux.Daemon")] +#[interface(name = "org.asuslinux.Daemon")] impl CtrlAuraZbus { /// Return the device type for this Aura keyboard - #[dbus_interface(property)] + #[zbus(property)] async fn device_type(&self) -> AuraDevice { let ctrl = self.0.lock().await; ctrl.led_prod } /// Return the current LED brightness - #[dbus_interface(property)] + #[zbus(property)] async fn brightness(&self) -> Result { let ctrl = self.0.lock().await; Ok(ctrl.sysfs_node.get_brightness().map(|n| n.into())?) } /// Set the keyboard brightness level (0-3) - #[dbus_interface(property)] + #[zbus(property)] async fn set_brightness(&mut self, brightness: LedBrightness) -> Result<(), ZbErr> { let ctrl = self.0.lock().await; Ok(ctrl.sysfs_node.set_brightness(brightness.into())?) } /// Total levels of brightness available - #[dbus_interface(property)] + #[zbus(property)] async fn supported_brightness(&self) -> Vec { vec![ LedBrightness::Off, @@ -76,26 +76,26 @@ impl CtrlAuraZbus { } /// The total available modes - #[dbus_interface(property)] + #[zbus(property)] async fn supported_basic_modes(&self) -> Result, ZbErr> { let ctrl = self.0.lock().await; Ok(ctrl.config.builtins.keys().cloned().collect()) } - #[dbus_interface(property)] + #[zbus(property)] async fn supported_basic_zones(&self) -> Result, ZbErr> { let ctrl = self.0.lock().await; Ok(ctrl.supported_data.basic_zones.clone()) } - #[dbus_interface(property)] + #[zbus(property)] async fn supported_power_zones(&self) -> Result, ZbErr> { let ctrl = self.0.lock().await; Ok(ctrl.supported_data.power_zones.clone()) } /// The current mode data - #[dbus_interface(property)] + #[zbus(property)] async fn led_mode(&self) -> Result { let ctrl = self.0.lock().await; Ok(ctrl.config.current_mode) @@ -105,7 +105,7 @@ impl CtrlAuraZbus { /// /// On success the aura config file is read to refresh cached values, then /// the effect is stored and config written to disk. - #[dbus_interface(property)] + #[zbus(property)] async fn set_led_mode(&mut self, num: AuraModeNum) -> Result<(), ZbErr> { let mut ctrl = self.0.lock().await; ctrl.config.current_mode = num; @@ -120,7 +120,7 @@ impl CtrlAuraZbus { } /// The current mode data - #[dbus_interface(property)] + #[zbus(property)] async fn led_mode_data(&self) -> Result { let ctrl = self.0.lock().await; let mode = ctrl.config.current_mode; @@ -134,7 +134,7 @@ impl CtrlAuraZbus { /// /// On success the aura config file is read to refresh cached values, then /// the effect is stored and config written to disk. - #[dbus_interface(property)] + #[zbus(property)] async fn set_led_mode_data(&mut self, effect: AuraEffect) -> Result<(), ZbErr> { let mut ctrl = self.0.lock().await; if !ctrl.supported_data.basic_modes.contains(&effect.mode) @@ -164,7 +164,7 @@ impl CtrlAuraZbus { } // As property doesn't work for AuraPowerDev (complexity of serialization?) - #[dbus_interface(property)] + #[zbus(property)] async fn led_power(&self) -> AuraPowerDev { let ctrl = self.0.lock().await; AuraPowerDev::from(&ctrl.config.enabled) @@ -174,7 +174,7 @@ impl CtrlAuraZbus { /// `enabled` sets if the sent array should be disabled or enabled /// /// For Modern ROG devices the "enabled" flag is ignored. - #[dbus_interface(property)] + #[zbus(property)] async fn set_led_power(&mut self, options: (AuraPowerDev, bool)) -> Result<(), ZbErr> { let enabled = options.1; let options = options.0; diff --git a/asusd/src/ctrl_fancurves.rs b/asusd/src/ctrl_fancurves.rs index 0dc19e0d..fda1ae72 100644 --- a/asusd/src/ctrl_fancurves.rs +++ b/asusd/src/ctrl_fancurves.rs @@ -10,7 +10,7 @@ use rog_profiles::fan_curve_set::CurveData; use rog_profiles::{find_fan_curve_node, FanCurvePU, FanCurveProfiles}; use serde_derive::{Deserialize, Serialize}; use tokio::sync::Mutex; -use zbus::{dbus_interface, Connection, SignalContext}; +use zbus::{interface, Connection, SignalContext}; use crate::error::RogError; use crate::{CtrlTask, CONFIG_PATH_BASE}; @@ -123,7 +123,7 @@ impl CtrlFanCurveZbus { } } -#[dbus_interface(name = "org.asuslinux.Daemon")] +#[interface(name = "org.asuslinux.Daemon")] impl CtrlFanCurveZbus { /// Set all fan curves for a profile to enabled status. Will also activate a /// fan curve if in the same profile mode diff --git a/asusd/src/ctrl_platform.rs b/asusd/src/ctrl_platform.rs index 3606a7ba..0d26756b 100644 --- a/asusd/src/ctrl_platform.rs +++ b/asusd/src/ctrl_platform.rs @@ -9,7 +9,7 @@ use rog_platform::platform::{GpuMode, Properties, RogPlatform, ThrottlePolicy}; use rog_platform::power::AsusPower; use zbus::export::futures_util::lock::Mutex; use zbus::fdo::Error as FdoErr; -use zbus::{dbus_interface, Connection, ObjectServer, SignalContext}; +use zbus::{interface, Connection, ObjectServer, SignalContext}; use crate::config::Config; use crate::ctrl_anime::trait_impls::{CtrlAnimeZbus, ANIME_ZBUS_NAME, ANIME_ZBUS_PATH}; @@ -285,7 +285,7 @@ impl CtrlPlatform { } } -#[dbus_interface(name = "org.asuslinux.Daemon")] +#[interface(name = "org.asuslinux.Daemon")] impl CtrlPlatform { /// Returns a list of property names that this system supports async fn supported_properties(&self) -> Vec { @@ -372,13 +372,13 @@ impl CtrlPlatform { interfaces } - #[dbus_interface(property)] + #[zbus(property)] fn charge_control_end_threshold(&self) -> Result { let limit = self.power.get_charge_control_end_threshold()?; Ok(limit) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_charge_control_end_threshold(&mut self, limit: u8) -> Result<(), FdoErr> { if !(20..=100).contains(&limit) { return Err(RogError::ChargeLimit(limit))?; @@ -388,7 +388,7 @@ impl CtrlPlatform { Ok(()) } - #[dbus_interface(property)] + #[zbus(property)] fn gpu_mux_mode(&self) -> Result { self.platform.get_gpu_mux_mode().map_err(|err| { warn!("RogPlatform: set_gpu_mux_mode {err}"); @@ -396,7 +396,7 @@ impl CtrlPlatform { }) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_gpu_mux_mode(&mut self, mode: u8) -> Result<(), FdoErr> { if self.platform.has_gpu_mux_mode() { self.set_gfx_mode(mode.into()).map_err(|err| { @@ -439,13 +439,13 @@ impl CtrlPlatform { } } - #[dbus_interface(property)] + #[zbus(property)] fn throttle_thermal_policy(&self) -> Result { platform_get_value!(self, throttle_thermal_policy, "throttle_thermal_policy") .map(|n| n.into()) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_throttle_thermal_policy(&mut self, policy: ThrottlePolicy) -> Result<(), FdoErr> { // TODO: watch for external changes if self.platform.has_throttle_thermal_policy() { @@ -465,23 +465,23 @@ impl CtrlPlatform { } } - #[dbus_interface(property)] + #[zbus(property)] async fn throttle_policy_linked_epp(&self) -> Result { Ok(self.config.lock().await.throttle_policy_linked_epp) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_throttle_policy_linked_epp(&self, linked: bool) -> Result<(), zbus::Error> { self.config.lock().await.throttle_policy_linked_epp = linked; Ok(()) } - #[dbus_interface(property)] + #[zbus(property)] async fn throttle_policy_on_battery(&self) -> Result { Ok(self.config.lock().await.throttle_policy_on_battery) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_throttle_policy_on_battery( &mut self, policy: ThrottlePolicy, @@ -491,12 +491,12 @@ impl CtrlPlatform { Ok(()) } - #[dbus_interface(property)] + #[zbus(property)] async fn throttle_policy_on_ac(&self) -> Result { Ok(self.config.lock().await.throttle_policy_on_ac) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_throttle_policy_on_ac(&mut self, policy: ThrottlePolicy) -> Result<(), FdoErr> { self.config.lock().await.throttle_policy_on_ac = policy; self.set_throttle_thermal_policy(policy).await?; @@ -505,12 +505,12 @@ impl CtrlPlatform { /// The energy_performance_preference for the quiet throttle/platform /// profile - #[dbus_interface(property)] + #[zbus(property)] async fn throttle_quiet_epp(&self) -> Result { Ok(self.config.lock().await.throttle_quiet_epp) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_throttle_quiet_epp(&mut self, epp: CPUEPP) -> Result<(), FdoErr> { let change_pp = self.config.lock().await.throttle_policy_linked_epp; self.config.lock().await.throttle_quiet_epp = epp; @@ -520,12 +520,12 @@ impl CtrlPlatform { /// The energy_performance_preference for the balanced throttle/platform /// profile - #[dbus_interface(property)] + #[zbus(property)] async fn throttle_balanced_epp(&self) -> Result { Ok(self.config.lock().await.throttle_balanced_epp) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_throttle_balanced_epp(&mut self, epp: CPUEPP) -> Result<(), FdoErr> { let change_pp = self.config.lock().await.throttle_policy_linked_epp; self.config.lock().await.throttle_balanced_epp = epp; @@ -535,12 +535,12 @@ impl CtrlPlatform { /// The energy_performance_preference for the performance throttle/platform /// profile - #[dbus_interface(property)] + #[zbus(property)] async fn throttle_performance_epp(&self) -> Result { Ok(self.config.lock().await.throttle_performance_epp) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_throttle_performance_epp(&mut self, epp: CPUEPP) -> Result<(), FdoErr> { let change_pp = self.config.lock().await.throttle_policy_linked_epp; self.config.lock().await.throttle_performance_epp = epp; @@ -550,12 +550,12 @@ impl CtrlPlatform { /// *********************************************************************** - #[dbus_interface(property)] + #[zbus(property)] fn post_animation_sound(&self) -> Result { platform_get_value!(self, post_animation_sound, "post_animation_sound") } - #[dbus_interface(property)] + #[zbus(property)] async fn set_post_animation_sound(&mut self, on: bool) -> Result<(), FdoErr> { if self.platform.has_post_animation_sound() { self.platform.set_post_animation_sound(on).map_err(|err| { @@ -571,34 +571,34 @@ impl CtrlPlatform { /// Get the `panel_od` value from platform. Updates the stored value in /// internal config also. - #[dbus_interface(property)] + #[zbus(property)] fn panel_od(&self) -> Result { platform_get_value!(self, panel_od, "panel_od") } - #[dbus_interface(property)] + #[zbus(property)] async fn set_panel_od(&mut self, overdrive: bool) -> Result<(), FdoErr> { platform_set_bool!(self, panel_od, "panel_od", overdrive) } /// Get the `panel_od` value from platform. Updates the stored value in /// internal config also. - #[dbus_interface(property)] + #[zbus(property)] fn mini_led_mode(&self) -> Result { platform_get_value!(self, mini_led_mode, "mini_led_mode") } - #[dbus_interface(property)] + #[zbus(property)] async fn set_mini_led_mode(&mut self, on: bool) -> Result<(), FdoErr> { platform_set_bool!(self, mini_led_mode, "mini_led_mode", on) } - #[dbus_interface(property)] + #[zbus(property)] fn dgpu_disable(&self) -> Result { platform_get_value!(self, dgpu_disable, "dgpu_disable") } - #[dbus_interface(property)] + #[zbus(property)] fn egpu_enable(&self) -> Result { platform_get_value!(self, egpu_enable, "egpu_enable") } @@ -607,12 +607,12 @@ impl CtrlPlatform { /// Set the Package Power Target total of CPU: PL1 on Intel, SPL on AMD. /// Shown on Intel+Nvidia or AMD+Nvidia based systems: /// * min=5, max=250 - #[dbus_interface(property)] + #[zbus(property)] async fn ppt_pl1_spl(&self) -> Result { platform_get_value_if_some!(self, ppt_pl1_spl, "ppt_pl1_spl", 5) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_ppt_pl1_spl(&mut self, value: u8) -> Result<(), FdoErr> { platform_set_with_min_max!(self, ppt_pl1_spl, "ppt_pl1_spl", value, 5, 250) } @@ -620,72 +620,72 @@ impl CtrlPlatform { /// Set the Slow Package Power Tracking Limit of CPU: PL2 on Intel, SPPT, /// on AMD. Shown on Intel+Nvidia or AMD+Nvidia based systems: /// * min=5, max=250 - #[dbus_interface(property)] + #[zbus(property)] async fn ppt_pl2_sppt(&self) -> Result { platform_get_value_if_some!(self, ppt_pl2_sppt, "ppt_pl2_sppt", 5) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_ppt_pl2_sppt(&mut self, value: u8) -> Result<(), FdoErr> { platform_set_with_min_max!(self, ppt_pl2_sppt, "ppt_pl2_sppt", value, 5, 250) } /// Set the Fast Package Power Tracking Limit of CPU. AMD+Nvidia only: /// * min=5, max=250 - #[dbus_interface(property)] + #[zbus(property)] async fn ppt_fppt(&self) -> Result { platform_get_value_if_some!(self, ppt_fppt, "ppt_fppt", 5) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_ppt_fppt(&mut self, value: u8) -> Result<(), FdoErr> { platform_set_with_min_max!(self, ppt_fppt, "ppt_fppt", value, 5, 250) } /// Set the APU SPPT limit. Shown on full AMD systems only: /// * min=5, max=130 - #[dbus_interface(property)] + #[zbus(property)] async fn ppt_apu_sppt(&self) -> Result { platform_get_value_if_some!(self, ppt_apu_sppt, "ppt_apu_sppt", 5) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_ppt_apu_sppt(&mut self, value: u8) -> Result<(), FdoErr> { platform_set_with_min_max!(self, ppt_apu_sppt, "ppt_apu_sppt", value, 5, 130) } /// Set the platform SPPT limit. Shown on full AMD systems only: /// * min=5, max=130 - #[dbus_interface(property)] + #[zbus(property)] async fn ppt_platform_sppt(&self) -> Result { platform_get_value_if_some!(self, ppt_platform_sppt, "ppt_platform_sppt", 5) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_ppt_platform_sppt(&mut self, value: u8) -> Result<(), FdoErr> { platform_set_with_min_max!(self, ppt_platform_sppt, "ppt_platform_sppt", value, 5, 130) } /// Set the dynamic boost limit of the Nvidia dGPU: /// * min=5, max=25 - #[dbus_interface(property)] + #[zbus(property)] async fn nv_dynamic_boost(&self) -> Result { platform_get_value_if_some!(self, nv_dynamic_boost, "nv_dynamic_boost", 5) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_nv_dynamic_boost(&mut self, value: u8) -> Result<(), FdoErr> { platform_set_with_min_max!(self, nv_dynamic_boost, "nv_dynamic_boost", value, 5, 25) } /// Set the target temperature limit of the Nvidia dGPU: /// * min=75, max=87 - #[dbus_interface(property)] + #[zbus(property)] async fn nv_temp_target(&self) -> Result { platform_get_value_if_some!(self, nv_temp_target, "nv_temp_target", 5) } - #[dbus_interface(property)] + #[zbus(property)] async fn set_nv_temp_target(&mut self, value: u8) -> Result<(), FdoErr> { platform_set_with_min_max!(self, nv_temp_target, "nv_temp_target", value, 5, 87) } diff --git a/asusd/src/daemon.rs b/asusd/src/daemon.rs index 2ef09350..f7885f53 100644 --- a/asusd/src/daemon.rs +++ b/asusd/src/daemon.rs @@ -123,7 +123,7 @@ async fn start_daemon() -> Result<(), Box> { loop { // This is just a blocker to idle and ensure the reator reacts - sleep(Duration::from_millis(1000)).await; + connection.executor().tick().await; } } diff --git a/rog-control-center/Cargo.toml b/rog-control-center/Cargo.toml index e5cfea93..f4c9410a 100644 --- a/rog-control-center/Cargo.toml +++ b/rog-control-center/Cargo.toml @@ -10,15 +10,9 @@ edition = "2021" #mocking = [] [dependencies] -# egui = "0.24.1" -# eframe = "0.24.1" -# egui_plot = "0.24.1" -# Stuck on this revision due to crash issues on app close -egui = { git = "https://github.com/emilk/egui", rev = "b8e798777de519de3a1878798097ab2ab0bd4def"} -eframe = { git = "https://github.com/emilk/egui", rev = "b8e798777de519de3a1878798097ab2ab0bd4def"} -libappindicator = "0.8" # Tray icon -gtk = "0.16" +libappindicator = "0.9" # Tray icon +gtk = "0.18" asusd = { path = "../asusd" } rog_anime = { path = "../rog-anime" } @@ -48,9 +42,18 @@ versions.workspace = true nix = "^0.26.1" tempfile = "3.3.0" -# [patch.crates-io] -# egui = { git = "https://github.com/flukejones/egui" } -# eframe = { git = "https://github.com/flukejones/egui" } +i-slint-backend-selector = { git = "https://github.com/slint-ui/slint.git" } +i-slint-core = { git = "https://github.com/slint-ui/slint.git" } +i-slint-backend-winit = { git = "https://github.com/slint-ui/slint.git" } +winit = "*" + +[dependencies.slint] +git = "https://github.com/slint-ui/slint.git" +default-features = false +features = ["std", "compat-1-0", "backend-winit-wayland", "backend-linuxkms", "renderer-femtovg"] + +[build-dependencies.slint-build] +git = "https://github.com/slint-ui/slint.git" [dev-dependencies] cargo-husky.workspace = true \ No newline at end of file diff --git a/rog-control-center/build.rs b/rog-control-center/build.rs new file mode 100644 index 00000000..b994e340 --- /dev/null +++ b/rog-control-center/build.rs @@ -0,0 +1,39 @@ +use std::path::PathBuf; +use std::str::FromStr; +// use std::fs::OpenOptions; +// use std::io::Write; +// use diter_protocol::ParameterDefinitions; +// use ron::ser::PrettyConfig; + +// const LOCALE_EN: &str = +// include_str!("../data/localization/en/parameters.json"); const LOCALE_IT: +// &str = include_str!("../data/localization/it/parameters.json"); +// const LOCALE_ZH: &str = +// include_str!("../data/localization/zh/parameters.json"); + +// fn write_locales() { +// let root = env!("CARGO_MANIFEST_DIR"); +// let mut path = PathBuf::from_str(root).unwrap(); +// path.push("src/locales.ron"); +// let mut file = OpenOptions::new(); +// file.truncate(true).create(true).write(true); + +// let en: ParameterDefinitions = serde_json::from_str(LOCALE_EN).unwrap(); +// let mut writer = file.open(path).unwrap(); + +// let en = ron::ser::to_string_pretty(&en, +// PrettyConfig::new().depth_limit(4)).unwrap(); writer.write_all(en. +// to_string().as_bytes()).unwrap(); + +// // let it: ParameterDefinitions = +// serde_json::from_str(LOCALE_IT).unwrap(); // let zh: ParameterDefinitions +// = serde_json::from_str(LOCALE_ZH).unwrap(); } + +fn main() { + // write_locales(); + + let root = env!("CARGO_MANIFEST_DIR"); + let mut path = PathBuf::from_str(root).unwrap(); + path.push("ui/main_window.slint"); + slint_build::compile(path).unwrap(); +} diff --git a/rog-control-center/src/app.rs b/rog-control-center/src/app.rs deleted file mode 100644 index 4539ff45..00000000 --- a/rog-control-center/src/app.rs +++ /dev/null @@ -1,178 +0,0 @@ -use std::f64::consts::PI; -use std::sync::atomic::{AtomicBool, AtomicU8, Ordering}; -use std::sync::{Arc, Mutex}; -use std::time::{Duration, Instant}; - -use egui::{Button, RichText}; -use rog_aura::layouts::KeyLayout; -use rog_platform::platform::Properties; - -use crate::config::Config; -use crate::error::Result; -use crate::system_state::SystemState; -use crate::{Page, RogDbusClientBlocking}; - -pub struct RogApp { - pub page: Page, - pub states: Arc>, - // TODO: can probably just open and read whenever - pub config: Config, - /// Oscillator in percentage - pub oscillator1: Arc, - pub oscillator2: Arc, - pub oscillator3: Arc, - /// Frequency of oscillation - pub oscillator_freq: Arc, - /// A toggle that toggles true/false when the oscillator reaches 0 - pub oscillator_toggle: Arc, - pub supported_interfaces: Vec, - pub supported_properties: Vec, -} - -impl RogApp { - /// Called once before the first frame. - pub fn new( - config: Config, - states: Arc>, - _cc: &eframe::CreationContext<'_>, - ) -> Result { - let (dbus, _) = RogDbusClientBlocking::new()?; - let supported_interfaces = dbus.proxies().platform().supported_interfaces()?; - let supported_properties = dbus.proxies().platform().supported_properties()?; - - // Set up an oscillator to run on a thread. - // Helpful for visual effects like colour pulse. - let oscillator1 = Arc::new(AtomicU8::new(0)); - let oscillator2 = Arc::new(AtomicU8::new(0)); - let oscillator3 = Arc::new(AtomicU8::new(0)); - - let oscillator1_1 = oscillator1.clone(); - let oscillator1_2 = oscillator2.clone(); - let oscillator1_3 = oscillator3.clone(); - - let oscillator_freq = Arc::new(AtomicU8::new(5)); - let oscillator_freq1 = oscillator_freq.clone(); - let oscillator_toggle = Arc::new(AtomicBool::new(false)); - let oscillator_toggle1 = oscillator_toggle.clone(); - - std::thread::spawn(move || { - let started = Instant::now(); - let mut toggled = false; - loop { - let time = started.elapsed(); - // 32 = slow, 16 = med, 8 = fast - let scale = oscillator_freq1.load(Ordering::SeqCst) as f64; - let elapsed1 = (time.as_millis() as f64 + 333.0) / 10000.0; - let elapsed2 = (time.as_millis() as f64 + 666.0) / 10000.0; - let elapsed3 = (time.as_millis() as f64 + 999.0) / 10000.0; - let tmp1 = ((scale * elapsed1 * PI).cos()).abs(); - let tmp2 = ((scale * 0.85 * elapsed2 * PI).cos()).abs(); - let tmp3 = ((scale * 0.7 * elapsed3 * PI).cos()).abs(); - if tmp1 <= 0.1 && !toggled { - let s = oscillator_toggle1.load(Ordering::SeqCst); - oscillator_toggle1.store(!s, Ordering::SeqCst); - toggled = true; - } else if tmp1 > 0.9 { - toggled = false; - } - - let tmp1 = (255.0 * tmp1 * 100.0 / 255.0) as u8; - let tmp2 = (255.0 * tmp2 * 100.0 / 255.0) as u8; - let tmp3 = (255.0 * tmp3 * 100.0 / 255.0) as u8; - - oscillator1_1.store(tmp1, Ordering::SeqCst); - oscillator1_2.store(tmp2, Ordering::SeqCst); - oscillator1_3.store(tmp3, Ordering::SeqCst); - - std::thread::sleep(Duration::from_millis(33)); - } - }); - - Ok(Self { - supported_interfaces, - supported_properties, - states, - page: Page::System, - config, - oscillator1, - oscillator2, - oscillator3, - oscillator_toggle, - oscillator_freq, - }) - } -} - -impl eframe::App for RogApp { - /// Called each time the UI needs repainting, which may be many times per - /// second. Put your widgets into a `SidePanel`, `TopPanel`, - /// `CentralPanel`, `Window` or `Area`. - fn update(&mut self, ctx: &eframe::egui::Context, frame: &mut eframe::Frame) { - let states = self.states.clone(); - - if let Ok(mut states) = states.try_lock() { - if states.app_should_update { - states.app_should_update = false; - ctx.request_repaint(); - } - } - - // Shortcut typical display stuff - if let Ok(mut states) = states.try_lock() { - let layout_testing = states.aura_creation.layout_testing.clone(); - if let Some(path) = &layout_testing { - let modified = path.metadata().unwrap().modified().unwrap(); - if states.aura_creation.layout_last_modified < modified { - states.aura_creation.layout_last_modified = modified; - // time to reload the config - states.aura_creation.keyboard_layout = KeyLayout::from_file(path).unwrap(); - } - self.aura_page(&mut states, ctx); - return; - } - - self.top_bar(ctx, frame); - self.side_panel(ctx); - } - let page = self.page; - - let mut was_error = false; - - if let Ok(mut states) = states.try_lock() { - if let Some(err) = states.error.clone() { - was_error = true; - egui::CentralPanel::default().show(ctx, |ui| { - ui.heading(RichText::new("Error!").size(28.0)); - - ui.centered_and_justified(|ui| { - ui.label(RichText::new(format!("The error was: {:?}", err)).size(22.0)); - }); - }); - egui::TopBottomPanel::bottom("error_bar") - .default_height(26.0) - .show(ctx, |ui| { - ui.with_layout(egui::Layout::right_to_left(egui::Align::TOP), |ui| { - if ui - .add(Button::new(RichText::new("Okay").size(20.0))) - .clicked() - { - states.error = None; - } - }); - }); - } - } - - if !was_error { - if let Ok(mut states) = states.try_lock() { - match page { - Page::AppSettings => self.app_settings_page(&mut states, ctx), - Page::System => self.system_page(&mut states, ctx), - Page::AuraEffects => self.aura_page(&mut states, ctx), - Page::AnimeMatrix => self.anime_page(ctx), - Page::FanCurves => self.fan_curve_page(&mut states, ctx), - }; - } - } - } -} diff --git a/rog-control-center/src/error.rs b/rog-control-center/src/error.rs index 3e0effeb..b1310d21 100644 --- a/rog-control-center/src/error.rs +++ b/rog-control-center/src/error.rs @@ -11,7 +11,6 @@ pub enum Error { XdgVars, Zbus(zbus::Error), Notification(notify_rust::error::Error), - Eframe(eframe::Error), } impl fmt::Display for Error { @@ -25,7 +24,6 @@ impl fmt::Display for Error { Error::XdgVars => write!(f, "XDG environment vars appear unset"), Error::Zbus(err) => write!(f, "Error: {}", err), Error::Notification(err) => write!(f, "Notification Error: {}", err), - Error::Eframe(err) => write!(f, "Eframe Error: {}", err), } } } @@ -55,9 +53,3 @@ impl From for Error { Error::Notification(err) } } - -impl From for Error { - fn from(err: eframe::Error) -> Self { - Error::Eframe(err) - } -} diff --git a/rog-control-center/src/lib.rs b/rog-control-center/src/lib.rs index 7b91ddbc..9e65cec0 100644 --- a/rog-control-center/src/lib.rs +++ b/rog-control-center/src/lib.rs @@ -1,23 +1,25 @@ -pub mod app; +// These lints need to be allowed due to the generated sources +#![allow(clippy::redundant_clone, clippy::cmp_owned)] +slint::include_modules!(); + +// Intentionally reexport slint so that GUI consumers don't need to add to +// `Cargo.toml` use std::fs::{remove_dir_all, File, OpenOptions}; use std::io::{Read, Write}; use std::process::exit; use std::thread::sleep; use std::time::Duration; -pub use app::RogApp; +pub use slint; pub mod cli_options; pub mod config; pub mod error; #[cfg(feature = "mocking")] pub mod mocking; -pub mod pages; -pub mod startup_error; pub mod system_state; pub mod tray; pub mod update_and_notify; -pub mod widgets; #[cfg(feature = "mocking")] pub use mocking::RogDbusClientBlocking; @@ -44,6 +46,7 @@ pub fn print_versions() { pub const SHOWING_GUI: u8 = 1; pub const SHOW_GUI: u8 = 2; +pub const QUIT_APP: u8 = 3; #[derive(PartialEq, Eq, Clone, Copy)] pub enum Page { diff --git a/rog-control-center/src/main.rs b/rog-control-center/src/main.rs index fbea5fb7..9125cb07 100644 --- a/rog-control-center/src/main.rs +++ b/rog-control-center/src/main.rs @@ -1,30 +1,29 @@ +use std::borrow::BorrowMut; use std::env::args; use std::io::{Read, Write}; use std::path::{Path, PathBuf}; -use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Mutex}; -use std::thread; +use std::thread::{self, sleep, spawn}; use std::time::Duration; -use eframe::HardwareAcceleration; use gumdrop::Options; -use log::{debug, error, warn, LevelFilter}; +use log::{warn, LevelFilter}; use rog_aura::aura_detection::{LaptopLedData, LedSupportFile}; use rog_aura::layouts::KeyLayout; use rog_control_center::cli_options::CliStart; use rog_control_center::config::Config; use rog_control_center::error::Result; -use rog_control_center::startup_error::AppErrorShow; +use rog_control_center::slint::ComponentHandle; use rog_control_center::system_state::SystemState; use rog_control_center::tray::init_tray; use rog_control_center::update_and_notify::{start_notifications, EnabledNotifications}; use rog_control_center::{ - get_ipc_file, on_tmp_dir_exists, print_versions, RogApp, RogDbusClientBlocking, SHOWING_GUI, - SHOW_GUI, + get_ipc_file, on_tmp_dir_exists, print_versions, MainWindow, RogDbusClientBlocking, QUIT_APP, + SHOWING_GUI, SHOW_GUI, }; -#[cfg(not(feature = "mocking"))] -use supergfxctl::zbus_proxy::DaemonProxyBlocking as GfxProxyBlocking; use tokio::runtime::Runtime; +// use winit::monitor::VideoMode; +// use winit::window::{Fullscreen, WindowLevel}; #[cfg(not(feature = "mocking"))] const DATA_DIR: &str = "/usr/share/rog-gui/"; @@ -61,44 +60,22 @@ fn main() -> Result<()> { // Enter the runtime so that `tokio::spawn` is available immediately. let _enter = rt.enter(); - let native_options = eframe::NativeOptions { - vsync: true, - hardware_acceleration: HardwareAcceleration::Preferred, - min_window_size: Some(egui::vec2(980.0, 670.0)), - max_window_size: Some(egui::vec2(980.0, 670.0)), - run_and_return: true, - ..Default::default() - }; - let (dbus, _) = RogDbusClientBlocking::new() - .map_err(|e| { - eframe::run_native( - "ROG Control Center", - native_options.clone(), - Box::new(move |_| Box::new(AppErrorShow::new(e.to_string()))), - ) - .map_err(|e| error!("{e}")) - .ok(); + .map_err(|_| { + // TODO: show an error window }) .unwrap(); let supported_properties = match dbus.proxies().platform().supported_properties() { Ok(s) => s, - Err(e) => { - eframe::run_native( - "ROG Control Center", - native_options.clone(), - Box::new(move |_| Box::new(AppErrorShow::new(e.to_string()))), - ) - .map_err(|e| error!("{e}")) - .ok(); - vec![] + Err(_e) => { + // TODO: show an error window + Vec::default() } }; // Startup let mut config = Config::load()?; - let running_in_bg = Arc::new(AtomicBool::new(config.startup_in_background)); if config.startup_in_background { config.run_in_background = true; @@ -179,6 +156,7 @@ fn main() -> Result<()> { Ok(tmp) => tmp, Err(_) => on_tmp_dir_exists().unwrap(), }; + dbg!(); let states = setup_page_state_and_notifs( layout_name, @@ -188,77 +166,107 @@ fn main() -> Result<()> { &config, )?; - if cli_parsed.board_name.is_some() || cli_parsed.layout_viewing { - if let Ok(mut lock) = states.lock() { - lock.run_in_bg = false; - running_in_bg.store(false, Ordering::Release); - } - } - if config.enable_tray_icon { init_tray(supported_properties, states.clone()); } + dbg!(); - if let Ok(mut states) = states.lock() { - // For some reason the gui is causing a broke pipe error on dbus send, so - // replace it. - let (asus_dbus, conn) = - rog_dbus::RogDbusClientBlocking::new().expect("Couldn't connect to asusd"); - states.asus_dbus = asus_dbus; - let gfx_dbus = GfxProxyBlocking::new(&conn).expect("Couldn't connect to supergfxd"); - states.gfx_dbus = gfx_dbus; - } + thread_local! { pub static UI: std::cell::RefCell> = Default::default()}; + i_slint_backend_selector::with_platform(|_| Ok(())).unwrap(); - let mut bg_check_spawned = false; - loop { - if !running_in_bg.load(Ordering::Relaxed) { - // blocks until window is closed - let states = states.clone(); - let mut ipc_file = get_ipc_file()?; - ipc_file.write_all(&[SHOWING_GUI])?; - eframe::run_native( - "ROG Control Center", - native_options.clone(), - Box::new(move |cc| { - let cfg = Config::load().unwrap(); - let app = RogApp::new(cfg, states, cc); - Box::new(app.unwrap()) - }), - )?; + dbg!(); + thread::spawn(move || { + let mut buf = [0u8; 2]; + // blocks until it is read, typically the read will happen after a second + // process writes to the IPC (so there is data to actually read) + loop { + get_ipc_file().unwrap().read_exact(&mut buf).unwrap(); + if buf[0] == SHOW_GUI { + println!("Should show window {buf:?}"); + let mut ipc_file = get_ipc_file().unwrap(); + ipc_file.write_all(&[SHOWING_GUI, 0]).unwrap(); - running_in_bg.store(true, Ordering::SeqCst); - bg_check_spawned = false; - } - - if let Ok(lock) = states.try_lock() { - if !lock.run_in_bg { - break; - } - - if lock.run_in_bg && running_in_bg.load(Ordering::Acquire) && !bg_check_spawned { - let running_in_bg = running_in_bg.clone(); - thread::spawn(move || { - let mut buf = [0u8; 4]; - // blocks until it is read, typically the read will happen after a second - // process writes to the IPC (so there is data to actually read) - loop { - if get_ipc_file().unwrap().read(&mut buf).is_ok() && buf[0] == SHOW_GUI { - running_in_bg.store(false, Ordering::Release); - debug!("Wait thread got from tray {buf:#?}"); - break; + let states = states.clone(); + i_slint_core::api::invoke_from_event_loop(move || { + UI.with(|ui| { + let mut ui = ui.borrow_mut(); + if let Some(ui) = ui.as_mut() { + ui.window().show().unwrap(); + ui.window().on_close_requested(|| { + let mut ipc_file = get_ipc_file().unwrap(); + ipc_file.write_all(&[0, 0]).unwrap(); + slint::CloseRequestResponse::HideWindow + }); + } else { + let newui = setup_window(states.clone()); + newui.window().show().unwrap(); + println!("New window should be showing now"); // but it isn't + newui.window().on_close_requested(|| { + let mut ipc_file = get_ipc_file().unwrap(); + ipc_file.write_all(&[0, 0]).unwrap(); + slint::CloseRequestResponse::HideWindow + }); + ui.replace(newui); } - } - }); - bg_check_spawned = true; + }); + }) + .unwrap(); + } else if buf[1] == QUIT_APP { + slint::quit_event_loop().unwrap(); + } else if buf[0] != SHOWING_GUI { + println!("Should hide window {buf:?}"); + i_slint_core::api::invoke_from_event_loop(move || { + UI.with(|ui| { + let mut ui = ui.take(); + if let Some(ui) = ui.borrow_mut() { + ui.window().hide().unwrap(); + } + }); + }) + .unwrap(); } } + }); - // Prevent hogging CPU - thread::sleep(Duration::from_millis(500)); - } + slint::run_event_loop_until_quit().unwrap(); Ok(()) } +fn setup_window(_states: Arc>) -> MainWindow { + // slint::platform::set_platform(Box::new(i_slint_backend_winit::Backend::new(). + // unwrap())).unwrap(); + let ui = MainWindow::new().unwrap(); + // Example of how to do work in another thread. + // The thread itself can keep its own state, and then update vars in the UI + // when required. + let ui_handle = ui.as_weak(); + spawn(move || loop { + sleep(Duration::from_secs(1)); + // This is where the actual update happens + ui_handle + .upgrade_in_event_loop(move |handle| { + // handle.set_counter(handle.get_counter() + 1); + use i_slint_backend_winit::WinitWindowAccessor; + handle + .window() + .with_winit_window(|winit_window: &winit::window::Window| { + // winit_window.set_fullscreen(Some(Fullscreen::Borderless(None))); + if !winit_window.has_focus() { + // slint::quit_event_loop().unwrap(); + // handle.hide().unwrap(); + } + }); + }) + .ok(); + }); + + ui.on_exit_app(move || { + slint::quit_event_loop().unwrap(); + }); + + ui +} + fn setup_page_state_and_notifs( layout_testing: Option, keyboard_layout: KeyLayout, diff --git a/rog-control-center/src/pages/anime_page.rs b/rog-control-center/src/pages/anime_page.rs deleted file mode 100644 index b3d18627..00000000 --- a/rog-control-center/src/pages/anime_page.rs +++ /dev/null @@ -1,9 +0,0 @@ -use crate::RogApp; - -impl RogApp { - pub fn anime_page(&mut self, ctx: &eframe::egui::Context) { - egui::CentralPanel::default().show(ctx, |ui| { - ui.label("In progress"); - }); - } -} diff --git a/rog-control-center/src/pages/app_settings.rs b/rog-control-center/src/pages/app_settings.rs deleted file mode 100644 index 4352a662..00000000 --- a/rog-control-center/src/pages/app_settings.rs +++ /dev/null @@ -1,24 +0,0 @@ -use crate::system_state::SystemState; -use crate::widgets::app_settings; -use crate::RogApp; - -impl RogApp { - pub fn app_settings_page(&mut self, states: &mut SystemState, ctx: &eframe::egui::Context) { - let Self { config, .. } = self; - - egui::CentralPanel::default().show(ctx, |ui| { - egui::ScrollArea::vertical().show(ui, |ui| { - ui.spacing_mut().item_spacing = egui::vec2(8.0, 10.0); - let rect = ui.available_rect_before_wrap(); - egui::Grid::new("grid_of_bits") - .min_col_width(rect.width() / 2.0) - .show(ui, |ui| { - ui.vertical(|ui| { - ui.separator(); - app_settings(config, states, ui); - }); - }); - }) - }); - } -} diff --git a/rog-control-center/src/pages/aura_page.rs b/rog-control-center/src/pages/aura_page.rs deleted file mode 100644 index d2864a74..00000000 --- a/rog-control-center/src/pages/aura_page.rs +++ /dev/null @@ -1,83 +0,0 @@ -use std::sync::atomic::Ordering; -use std::time::Duration; - -use egui::Color32; -use rog_aura::{AuraEffect, AuraModeNum}; - -use crate::system_state::SystemState; -use crate::widgets::{aura_modes_group, keyboard}; -use crate::RogApp; - -impl RogApp { - pub fn aura_page(&mut self, states: &mut SystemState, ctx: &eframe::egui::Context) { - let Self { - oscillator1, - oscillator2, - oscillator3, - oscillator_freq, - .. - } = self; - - let red = oscillator1.load(Ordering::SeqCst) as u32; - let green = oscillator2.load(Ordering::SeqCst) as u32; - let blue = oscillator3.load(Ordering::SeqCst) as u32; - states.aura.nudge_wave(red as u8, green as u8, blue as u8); - // let osc = c.r * 255 / osc; - let c1 = states - .aura - .modes - .get(&states.aura.current_mode) - .unwrap_or(&AuraEffect::default()) - .colour1; - - let c2 = states - .aura - .modes - .get(&states.aura.current_mode) - .unwrap_or(&AuraEffect::default()) - .colour2; - - let mut colour = Color32::from_rgb(c1.r, c1.g, c1.b); - if states.aura.current_mode == AuraModeNum::Pulse { - colour = Color32::from_rgb( - (red * c1.r as u32 / 100) as u8, - (red * c1.g as u32 / 100) as u8, - (red * c1.b as u32 / 100) as u8, - ); - } else if states.aura.current_mode == AuraModeNum::Breathe { - if self.oscillator_toggle.load(Ordering::SeqCst) { - colour = Color32::from_rgb( - (red * c2.r as u32 / 100) as u8, - (red * c2.g as u32 / 100) as u8, - (red * c2.b as u32 / 100) as u8, - ); - } else { - colour = Color32::from_rgb( - (red * c1.r as u32 / 100) as u8, - (red * c1.g as u32 / 100) as u8, - (red * c1.b as u32 / 100) as u8, - ); - } - } else if states.aura.current_mode == AuraModeNum::Strobe { - colour = Color32::from_rgb( - (red * 255 / 100) as u8, - (green * 255 / 100) as u8, - (blue * 255 / 100) as u8, - ); - } - - // TODO: animation of colour changes/periods/blending - egui::CentralPanel::default().show(ctx, |ui| { - aura_modes_group(states, oscillator_freq, ui); - keyboard( - ui, - &states.aura_creation.keyboard_layout, - &mut states.aura, - colour, - ); - }); - - // Only do repaint request if on this page - ctx.request_repaint_after(Duration::from_millis(33)); - } -} diff --git a/rog-control-center/src/pages/fan_curve_page.rs b/rog-control-center/src/pages/fan_curve_page.rs deleted file mode 100644 index c2b24655..00000000 --- a/rog-control-center/src/pages/fan_curve_page.rs +++ /dev/null @@ -1,92 +0,0 @@ -use egui::{RichText, Ui}; -use rog_platform::platform::ThrottlePolicy; - -use crate::system_state::{FanCurvesState, SystemState}; -use crate::widgets::fan_graphs; -use crate::{RogApp, RogDbusClientBlocking}; - -impl RogApp { - pub fn fan_curve_page(&mut self, states: &mut SystemState, ctx: &eframe::egui::Context) { - if let Some(mut throttle) = states.bios.throttle { - egui::CentralPanel::default().show(ctx, |ui| { - ui.heading("Custom fan curves"); - Self::fan_curve( - &mut throttle, - &mut states.fan_curves, - &states.asus_dbus, - &mut states.error, - ui, - ); - - fan_graphs( - &mut states.fan_curves, - &states.asus_dbus, - &mut states.error, - ui, - ); - }); - } - } - - fn fan_curve( - current: &mut ThrottlePolicy, - curves: &mut FanCurvesState, - dbus: &RogDbusClientBlocking<'_>, - do_error: &mut Option, - ui: &mut Ui, - ) { - ui.separator(); - - let mut changed = false; - ui.horizontal(|ui| { - ui.label("Current profile: "); - ui.label(RichText::new(format!("{}", current)).strong()); - }); - - ui.horizontal(|ui| { - ui.label("Enabled fan-curves: "); - let mut checked = false; - let mut label = String::default(); - if let Some(curves) = curves.curves.get_mut(current) { - for curve in curves.iter() { - label.push_str(&<&str>::from(curve.fan).to_ascii_uppercase()); - label.push(' '); - if curve.enabled { - // TODO: it's possible to set just one fan to active - checked = true; - } - } - } - - if ui - .add(egui::Checkbox::new( - &mut checked, - RichText::new(label).strong(), - )) - .changed() - { - dbus.proxies() - .fan_curves() - .set_fan_curves_enabled(*current, checked) - .map_err(|err| { - *do_error = Some(err.to_string()); - }) - .ok(); - changed = true; - } - }); - - if changed { - let selected_profile = curves.show_curve; - let selected_pu = curves.show_graph; - - match FanCurvesState::new(dbus) { - Ok(f) => *curves = f, - Err(e) => *do_error = Some(e.to_string()), - } - - curves.show_curve = selected_profile; - curves.show_graph = selected_pu; - } - } -} diff --git a/rog-control-center/src/pages/mod.rs b/rog-control-center/src/pages/mod.rs deleted file mode 100644 index fb0aac82..00000000 --- a/rog-control-center/src/pages/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -mod anime_page; -mod app_settings; -mod aura_page; -mod fan_curve_page; -mod system_page; diff --git a/rog-control-center/src/pages/system_page.rs b/rog-control-center/src/pages/system_page.rs deleted file mode 100644 index 5cab7950..00000000 --- a/rog-control-center/src/pages/system_page.rs +++ /dev/null @@ -1,50 +0,0 @@ -use crate::system_state::SystemState; -use crate::widgets::{anime_power_group, aura_power_group, platform_profile, rog_bios_group}; -use crate::RogApp; - -impl RogApp { - pub fn system_page(&mut self, states: &mut SystemState, ctx: &eframe::egui::Context) { - egui::CentralPanel::default().show(ctx, |ui| { - ui.heading("Laptop settings"); - - egui::ScrollArea::vertical().show(ui, |ui| { - ui.spacing_mut().item_spacing = egui::vec2(8.0, 10.0); - let rect = ui.available_rect_before_wrap(); - egui::Grid::new("grid_of_bits") - .min_col_width(rect.width() / 2.0) - .show(ui, |ui| { - ui.vertical(|ui| { - ui.separator(); - // if self.supported_interfaces { - platform_profile(states, ui); - // } - }); - ui.vertical(|ui| { - ui.separator(); - if self.supported_interfaces.contains(&"Aura".to_string()) { - aura_power_group(states, ui); - } - }); - ui.end_row(); - - ui.vertical(|ui| { - ui.separator(); - rog_bios_group(states, ui); - }); - ui.end_row(); - - ui.vertical(|ui| { - ui.separator(); - if self.supported_interfaces.contains(&"Anime".to_string()) { - anime_power_group(states, ui); - } - }); - ui.vertical(|ui| { - ui.separator(); - }); - ui.end_row(); - }); - }); - }); - } -} diff --git a/rog-control-center/src/startup_error.rs b/rog-control-center/src/startup_error.rs deleted file mode 100644 index 2b50de33..00000000 --- a/rog-control-center/src/startup_error.rs +++ /dev/null @@ -1,38 +0,0 @@ -use egui::RichText; - -pub struct AppErrorShow { - error: String, -} - -impl AppErrorShow { - pub fn new(error: String) -> Self { - Self { error } - } -} - -impl eframe::App for AppErrorShow { - fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { - egui::CentralPanel::default().show(ctx, |ui| { - ui.heading("ROG ERROR"); - - ui.centered_and_justified(|ui| { - ui.label(RichText::new(format!("The error was: {:?}", self.error)).size(22.0)); - }); - - // egui::TopBottomPanel::bottom("error_bar_2") - // .default_height(26.0) - // .show(ctx, |ui| { - // ui. - // with_layout(egui::Layout::right_to_left(egui::Align::TOP), |ui| { - // if ui - // .add(Button::new(RichText::new("Okay").size(20.0))) - // .clicked() - // { - // // frame.close(); - // // ui.close_menu(); - // } - // }); - // }); - }); - } -} diff --git a/rog-control-center/src/system_state.rs b/rog-control-center/src/system_state.rs index 9b9f8683..a85a9a7c 100644 --- a/rog-control-center/src/system_state.rs +++ b/rog-control-center/src/system_state.rs @@ -3,13 +3,11 @@ use std::path::PathBuf; use std::sync::{Arc, Mutex}; use std::time::SystemTime; -use egui::Vec2; use log::error; use rog_anime::{Animations, DeviceState}; -use rog_aura::aura_detection::PowerZones; use rog_aura::layouts::KeyLayout; -use rog_aura::usb::{AuraDevice, AuraPowerDev}; -use rog_aura::{AuraEffect, AuraModeNum, AuraZone, LedBrightness}; +use rog_aura::usb::AuraPowerDev; +use rog_aura::{AuraEffect, AuraModeNum, LedBrightness}; use rog_platform::platform::{GpuMode, ThrottlePolicy}; use rog_profiles::fan_curve_set::CurveData; use rog_profiles::FanCurvePU; @@ -69,7 +67,7 @@ pub struct FanCurvesState { pub show_graph: FanCurvePU, pub curves: BTreeMap>, pub available_fans: HashSet, - pub drag_delta: Vec2, + // pub drag_delta: Vec2, } impl FanCurvesState { @@ -102,7 +100,7 @@ impl FanCurvesState { show_graph: FanCurvePU::CPU, curves, available_fans, - drag_delta: Vec2::default(), + // drag_delta: Vec2::default(), }) } } @@ -112,9 +110,6 @@ pub struct AuraState { pub current_mode: AuraModeNum, pub modes: BTreeMap, pub enabled: AuraPowerDev, - pub dev_type: AuraDevice, - pub supported_basic_zones: Vec, - pub supported_power_zones: Vec, /// Brightness from 0-3 pub bright: LedBrightness, pub wave_red: [u8; 22], @@ -126,7 +121,10 @@ impl AuraState { pub fn new(layout: &KeyLayout, dbus: &RogDbusClientBlocking<'_>) -> Result { Ok(Self { current_mode: if !layout.basic_modes().is_empty() { - dbus.proxies().aura().led_mode().unwrap_or_default() + dbg!(); + let x = dbus.proxies().aura().led_mode().unwrap_or_default(); + dbg!(); + x } else { AuraModeNum::Static }, @@ -137,18 +135,7 @@ impl AuraState { BTreeMap::new() }, enabled: dbus.proxies().aura().led_power().unwrap_or_default(), - supported_basic_zones: dbus - .proxies() - .aura() - .supported_basic_zones() - .unwrap_or_default(), - supported_power_zones: dbus - .proxies() - .aura() - .supported_power_zones() - .unwrap_or_default(), - dev_type: dbus.proxies().aura().device_type().unwrap_or_default(), - bright: dbus.proxies().aura().brightness().unwrap_or_default(), + bright: Default::default(), wave_red: [0u8; 22], wave_green: [0u8; 22], wave_blue: [0u8; 22], @@ -291,9 +278,9 @@ impl SystemState { tray_enabled: bool, run_in_bg: bool, ) -> Result { + dbg!(); let (asus_dbus, conn) = RogDbusClientBlocking::new()?; - let gfx_dbus = GfxProxyBlocking::new(&conn).expect("Couldn't connect to supergfxd"); - + dbg!(); let aura = AuraState::new(&keyboard_layout, &asus_dbus) .map_err(|e| { let e = format!("Could not get AuraState state: {e}"); @@ -301,6 +288,12 @@ impl SystemState { }) .unwrap_or_default(); + dbg!(); + let gfx_dbus = GfxProxyBlocking::builder(&conn) + .destination(":org.supergfxctl.Daemon")? + .build() + .expect("Couldn't connect to supergfxd"); + dbg!(); Ok(Self { aura_creation: AuraCreation::new(layout_testing, keyboard_layout, keyboard_layouts), enabled_notifications, @@ -348,7 +341,9 @@ impl SystemState { impl Default for SystemState { fn default() -> Self { let (asus_dbus, conn) = RogDbusClientBlocking::new().expect("Couldn't connect to asusd"); - let gfx_dbus = GfxProxyBlocking::new(&conn).expect("Couldn't connect to supergfxd"); + let gfx_dbus = GfxProxyBlocking::builder(&conn) + .build() + .expect("Couldn't connect to supergfxd"); Self { aura_creation: AuraCreation { diff --git a/rog-control-center/src/tray.rs b/rog-control-center/src/tray.rs index c0ecf286..c3e3c0d2 100644 --- a/rog-control-center/src/tray.rs +++ b/rog-control-center/src/tray.rs @@ -86,7 +86,7 @@ impl ROGTray { e })?; - let gfx_proxy = GfxProxyBlocking::new(&conn).map_err(|e| { + let gfx_proxy = GfxProxyBlocking::builder(&conn).build().map_err(|e| { error!("ROGTray: {e}"); e })?; diff --git a/rog-control-center/src/update_and_notify.rs b/rog-control-center/src/update_and_notify.rs index 9384e796..61bafffd 100644 --- a/rog-control-center/src/update_and_notify.rs +++ b/rog-control-center/src/update_and_notify.rs @@ -98,7 +98,7 @@ macro_rules! recv_notif { log::error!("zbus signal: {}: {e}", stringify!($signal)); e }).unwrap(); - let proxy = $proxy::new(&conn).await.map_err(|e| { + let proxy = $proxy::builder(&conn).build().await.map_err(|e| { log::error!("zbus signal: {}: {e}", stringify!($signal)); e }).unwrap(); @@ -446,7 +446,8 @@ pub fn start_notifications( e }) .unwrap(); - let proxy = SuperProxy::new(&conn) + let proxy = SuperProxy::builder(&conn) + .build() .await .map_err(|e| { error!("zbus signal: receive_notify_action: {e}"); diff --git a/rog-control-center/src/widgets/anime_power.rs b/rog-control-center/src/widgets/anime_power.rs deleted file mode 100644 index a217c411..00000000 --- a/rog-control-center/src/widgets/anime_power.rs +++ /dev/null @@ -1,83 +0,0 @@ -use egui::{RichText, Ui}; -use rog_anime::usb::Brightness; - -use crate::system_state::SystemState; - -pub fn anime_power_group(states: &mut SystemState, ui: &mut Ui) { - ui.heading("AniMe Matrix Settings"); - ui.label("Options are incomplete. Awake + Boot should work"); - - ui.horizontal_wrapped(|ui| { - ui.vertical(|ui| { - let h = 16.0; - ui.set_row_height(22.0); - ui.horizontal_wrapped(|ui| { - ui.label(RichText::new("Display brightness").size(h)); - }); - ui.horizontal_wrapped(|ui| { - ui.label(RichText::new("Display enabled").size(h)); - }); - ui.horizontal_wrapped(|ui| { - ui.label(RichText::new("Animations enabled").size(h)); - }); - // ui.horizontal_wrapped(|ui| { - // ui.label(RichText::new("Sleep").size(h)); - // }); - }); - ui.vertical(|ui| { - ui.set_row_height(22.0); - ui.horizontal_wrapped(|ui| { - let slider = - egui::Slider::new(&mut states.anime.display_brightness, 0..=3).step_by(1.0); - if ui.add(slider).drag_released() { - states - .asus_dbus - .proxies() - .anime() - .set_brightness(Brightness::from(states.anime.display_brightness)) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - } - }); - ui.horizontal_wrapped(|ui| { - if ui - .checkbox(&mut states.anime.display_enabled, "Enable") - .changed() - { - states - .asus_dbus - .proxies() - .anime() - .set_enable_display(states.anime.display_enabled) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - } - }); - ui.horizontal_wrapped(|ui| { - if ui - .checkbox(&mut states.anime.builtin_anims_enabled, "Enable") - .changed() - { - states - .asus_dbus - .proxies() - .anime() - .set_builtins_enabled(states.anime.builtin_anims_enabled) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - } - }); - // ui.horizontal_wrapped(|ui| { - // if ui.checkbox(&mut states.anime.sleep, "Enable").changed() { - // changed = true; - // } - // }); - }); - }); -} diff --git a/rog-control-center/src/widgets/app_settings.rs b/rog-control-center/src/widgets/app_settings.rs deleted file mode 100644 index 3b81d705..00000000 --- a/rog-control-center/src/widgets/app_settings.rs +++ /dev/null @@ -1,117 +0,0 @@ -use egui::Ui; - -use crate::config::Config; -use crate::system_state::SystemState; - -pub fn app_settings(config: &mut Config, states: &mut SystemState, ui: &mut Ui) { - ui.heading("App Settings"); - - let mut enabled_notifications = if let Ok(lock) = states.enabled_notifications.lock() { - lock.clone() - } else { - Default::default() - }; - - ui.label("Application settings"); - let app_changed = ui - .checkbox( - &mut config.enable_tray_icon, - "Enable Tray Icon (restart required)", - ) - .clicked() - || ui - .checkbox(&mut config.run_in_background, "Run in Background") - .clicked() - || ui - .checkbox(&mut config.startup_in_background, "Startup Hidden") - .clicked() - || ui - .checkbox( - &mut enabled_notifications.all_enabled, - "Enable Notifications", - ) - .clicked(); - - // if ui.button("Quit").clicked() { - // states.run_in_bg = false; - // } - - ui.label("Notification settings"); - let notif_changed = ui - .checkbox( - &mut enabled_notifications.receive_notify_gfx_status, - "Enable dGPU status notification", - ) - .clicked() - || ui - .checkbox( - &mut enabled_notifications.receive_led_mode_data_changed, - "Enable LED mode change notification", - ) - .clicked() - || ui - .checkbox( - &mut enabled_notifications.receive_dgpu_disable_changed, - "Enable dGPU disablement notification", - ) - .clicked() - || ui - .checkbox( - &mut enabled_notifications.receive_egpu_enable_changed, - "Enable eGPU enablement notification", - ) - .clicked() - || ui - .checkbox( - &mut enabled_notifications.receive_notify_mains_online, - "Enable mains (AC) power notification", - ) - .clicked() - || ui - .checkbox( - &mut enabled_notifications.receive_charge_control_end_threshold_changed, - "Enable charge threshold notification", - ) - .clicked() - || ui - .checkbox( - &mut enabled_notifications.receive_throttle_thermal_policy_changed, - "Enable profile change notification", - ) - .clicked() - || ui - .checkbox( - &mut enabled_notifications.receive_panel_od_changed, - "Enable panel overdrive notification", - ) - .clicked() - || ui - .checkbox( - &mut enabled_notifications.receive_mini_led_mode_changed, - "Enable MiniLED mode notification", - ) - .clicked() - || ui - .checkbox( - &mut enabled_notifications.receive_post_animation_sound_changed, - "Enable BIOS post sound notification", - ) - .clicked(); - - if app_changed || notif_changed { - if let Ok(mut lock) = states.enabled_notifications.lock() { - // Replace inner content before save - *lock = enabled_notifications; - - config - .save(&lock) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - - states.tray_enabled = config.enable_tray_icon; - states.run_in_bg = config.run_in_background; - } - } -} diff --git a/rog-control-center/src/widgets/aura_modes.rs b/rog-control-center/src/widgets/aura_modes.rs deleted file mode 100644 index fe018bd7..00000000 --- a/rog-control-center/src/widgets/aura_modes.rs +++ /dev/null @@ -1,237 +0,0 @@ -use std::sync::atomic::{AtomicU8, Ordering}; -use std::sync::Arc; - -use egui::{RichText, Ui}; -use rog_aura::layouts::KeyLayout; -use rog_aura::{AuraEffect, AuraModeNum, AuraZone, Colour, Speed}; - -use crate::system_state::SystemState; - -pub fn aura_modes_group(states: &mut SystemState, freq: &mut Arc, ui: &mut Ui) { - let mut changed = false; - let mut selected = states.aura.current_mode; - let allowed = AuraEffect::allowed_parameters(selected); - - let SystemState { aura_creation, .. } = states; - - let has_keyzones = aura_creation - .keyboard_layout - .basic_zones() - .contains(&AuraZone::Key2); - let has_logo = aura_creation - .keyboard_layout - .basic_zones() - .contains(&AuraZone::Logo); - let has_lightbar = aura_creation - .keyboard_layout - .basic_zones() - .contains(&AuraZone::BarLeft) - || aura_creation - .keyboard_layout - .basic_zones() - .contains(&AuraZone::BarRight); - - if let Some(p) = aura_creation.layout_testing.as_ref() { - ui.heading(format!("{p:?}")); - } else { - ui.heading("Aura modes"); - ui.label( - "Please note that this section is incomplete and the displayed effects won't match \ - actual effect", - ); - } - let mut item = |a: AuraModeNum, ui: &mut Ui| { - if ui - .selectable_value(&mut selected, a, format!("{:?}", a)) - .clicked() - { - changed = true; - } - }; - - ui.horizontal_wrapped(|ui| { - for a in states.aura.modes.keys() { - item(*a, ui); - } - }); - - if let Some(effect) = states.aura.modes.get_mut(&selected) { - let mut zone_button = |a: AuraZone, ui: &mut Ui| { - ui.selectable_value(&mut effect.zone, a, format!("{:?}", a)); - }; - let mut speed_button = |a: Speed, ui: &mut Ui| -> bool { - if ui - .selectable_value(&mut effect.speed, a, format!("{:?}", a)) - .clicked() - { - let val = match effect.speed { - Speed::Low => 6, - Speed::Med => 8, - Speed::High => 10, - }; - freq.store(val, Ordering::SeqCst); - return true; - } - false - }; - let mut dir_button = |a: rog_aura::Direction, ui: &mut Ui| -> bool { - ui.selectable_value(&mut effect.direction, a, format!("{:?}", a)) - .clicked() - }; - - let mut c1: [u8; 3] = effect.colour1.into(); - let mut c2: [u8; 3] = effect.colour2.into(); - - ui.separator(); - ui.horizontal_wrapped(|ui| { - ui.vertical(|ui| { - let h = 16.0; - ui.set_row_height(22.0); - ui.add_enabled_ui(allowed.zone, |ui| { - if has_keyzones || has_lightbar || has_logo { - ui.horizontal_wrapped(|ui| { - ui.label(RichText::new("Zone").size(h)); - }); - } - }); - ui.add_enabled_ui(allowed.colour1, |ui| { - ui.horizontal_wrapped(|ui| { - ui.label(RichText::new("Colour 1").size(h)); - }); - }); - ui.add_enabled_ui(allowed.colour2, |ui| { - ui.horizontal_wrapped(|ui| { - ui.label(RichText::new("Colour 2").size(h)); - }); - }); - ui.add_enabled_ui(allowed.speed, |ui| { - ui.horizontal_wrapped(|ui| { - ui.set_enabled(allowed.speed); - ui.label(RichText::new("Speed").size(h)); - }); - }); - ui.add_enabled_ui(allowed.direction, |ui| { - ui.horizontal_wrapped(|ui| { - ui.set_enabled(allowed.direction); - ui.label(RichText::new("Direction").size(h)); - }); - }); - ui.set_enabled(true); - }); - ui.vertical(|ui| { - ui.set_row_height(22.0); - ui.add_enabled_ui(allowed.zone, |ui| { - if has_keyzones || has_lightbar || has_logo { - ui.horizontal_wrapped(|ui| { - zone_button(AuraZone::None, ui); - if has_keyzones { - zone_button(AuraZone::Key1, ui); - zone_button(AuraZone::Key2, ui); - zone_button(AuraZone::Key3, ui); - zone_button(AuraZone::Key4, ui); - } - if has_logo { - zone_button(AuraZone::Logo, ui); - } - if has_lightbar { - zone_button(AuraZone::BarLeft, ui); - zone_button(AuraZone::BarRight, ui); - } - }); - } - }); - - ui.add_enabled_ui(allowed.colour1, |ui| { - if egui::color_picker::color_edit_button_srgb(ui, &mut c1).changed() { - changed = true; - } - }); - - ui.add_enabled_ui(allowed.colour2, |ui| { - if egui::color_picker::color_edit_button_srgb(ui, &mut c2).changed() { - changed = true; - } - }); - - ui.add_enabled_ui(allowed.speed, |ui| { - ui.horizontal_wrapped(|ui| { - if speed_button(Speed::Low, ui) - || speed_button(Speed::Med, ui) - || speed_button(Speed::High, ui) - { - changed = true; - } - }); - }); - - ui.add_enabled_ui(allowed.direction, |ui| { - ui.horizontal_wrapped(|ui| { - if dir_button(rog_aura::Direction::Left, ui) - || dir_button(rog_aura::Direction::Down, ui) - || dir_button(rog_aura::Direction::Right, ui) - || dir_button(rog_aura::Direction::Up, ui) - { - changed = true; - } - }); - }); - }); - }); - - effect.colour1 = Colour::from(&c1); - effect.colour2 = Colour::from(&c2); - } - - ui.separator(); - ui.with_layout(egui::Layout::right_to_left(egui::Align::TOP), |ui| { - // if ui.add(egui::Button::new("Cancel")).clicked() { - // match AuraState::new(&aura_creation.keyboard_layout, &states.asus_dbus) { - // Ok(a) => states.aura.modes = a.modes, - // Err(e) => states.error = Some(e.to_string()), - // } - // } - - // if ui.add(egui::Button::new("Apply")).clicked() { - // changed = true; - // } - - if aura_creation.layout_testing.is_some() { - if ui.add(egui::Button::new("Next layout")).clicked() { - if aura_creation.keyboard_layout_index < aura_creation.keyboard_layouts.len() - 1 { - aura_creation.keyboard_layout_index += 1; - } - aura_creation.layout_testing = Some( - aura_creation.keyboard_layouts[aura_creation.keyboard_layout_index].clone(), - ); - aura_creation.keyboard_layout = - KeyLayout::from_file(aura_creation.layout_testing.as_ref().unwrap().as_path()) - .unwrap(); - } - - if ui.add(egui::Button::new("Prev layout")).clicked() { - if aura_creation.keyboard_layout_index > 0 { - aura_creation.keyboard_layout_index -= 1; - } - aura_creation.layout_testing = Some( - aura_creation.keyboard_layouts[aura_creation.keyboard_layout_index].clone(), - ); - aura_creation.keyboard_layout = - KeyLayout::from_file(aura_creation.layout_testing.as_ref().unwrap().as_path()) - .unwrap(); - } - } - }); - - if changed { - states.aura.current_mode = selected; - states - .asus_dbus - .proxies() - .aura() - .set_led_mode_data(states.aura.modes.get(&selected).unwrap().clone()) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - } -} diff --git a/rog-control-center/src/widgets/aura_power.rs b/rog-control-center/src/widgets/aura_power.rs deleted file mode 100644 index a2374041..00000000 --- a/rog-control-center/src/widgets/aura_power.rs +++ /dev/null @@ -1,266 +0,0 @@ -use egui::{RichText, Ui}; -use rog_aura::power::{AuraPower, KbAuraPowerState}; -use rog_aura::usb::{AuraDevRog1, AuraDevTuf, AuraDevice, AuraPowerDev}; - -use crate::system_state::SystemState; - -pub fn aura_power_group(states: &mut SystemState, ui: &mut Ui) { - ui.heading("Keyboard LED power settings"); - - if states.aura.dev_type.is_old_style() || states.aura.dev_type.is_tuf_style() { - aura_power1(states, ui); - } else if states.aura.dev_type.is_new_style() { - aura_power2(states, ui); - } -} - -fn aura_power1(states: &mut SystemState, ui: &mut Ui) { - let enabled_states = &mut states.aura.enabled; - let mut boot = enabled_states.old_rog.contains(&AuraDevRog1::Boot); - let mut sleep = enabled_states.old_rog.contains(&AuraDevRog1::Sleep); - let mut keyboard = enabled_states.old_rog.contains(&AuraDevRog1::Keyboard); - let mut lightbar = enabled_states.old_rog.contains(&AuraDevRog1::Lightbar); - if states.aura.dev_type == AuraDevice::Tuf { - boot = enabled_states.tuf.contains(&AuraDevTuf::Boot); - sleep = enabled_states.tuf.contains(&AuraDevTuf::Sleep); - keyboard = enabled_states.tuf.contains(&AuraDevTuf::Awake); - } - let mut changed = false; - - ui.horizontal_wrapped(|ui| { - ui.vertical(|ui| { - let h = 16.0; - ui.set_row_height(22.0); - ui.horizontal_wrapped(|ui| { - ui.label(RichText::new("Boot").size(h)); - }); - ui.horizontal_wrapped(|ui| { - ui.label(RichText::new("Awake").size(h)); - }); - ui.horizontal_wrapped(|ui| { - ui.label(RichText::new("Sleep").size(h)); - }); - // if supported.keyboard_led.brightness_set { - // ui.horizontal_wrapped(|ui| { - // ui.label(RichText::new("Brightness").size(h)); - // }); - // } - }); - ui.vertical(|ui| { - ui.set_row_height(22.0); - ui.horizontal_wrapped(|ui| { - if ui.checkbox(&mut boot, "Enable").changed() { - changed = true; - } - }); - ui.horizontal_wrapped(|ui| { - if ui.toggle_value(&mut keyboard, "Keyboard").changed() { - changed = true; - } - if !states.aura.supported_basic_zones.is_empty() - && ui.toggle_value(&mut lightbar, "Lightbar").changed() - { - changed = true; - } - }); - ui.horizontal_wrapped(|ui| { - if ui.checkbox(&mut sleep, "Enable").changed() { - changed = true; - } - }); - - // We currently don't have a watch for system changes here - // if supported.keyboard_led.brightness_set { - // if ui - // .add(egui::Slider::new( - // &mut states.aura.bright, - // 0..=3, - // )) - // .changed() - // { - // let bright = LedBrightness::from(states.aura.bright as - // u32); dbus.proxies() - // .led() - // .set_brightness(bright) - // .map_err(|err| { - // states.error = Some(err.to_string()); - // }) - // .ok(); - // } - // } - }); - }); - - if changed { - if states.aura.dev_type == AuraDevice::Tuf { - let mut enabled = Vec::new(); - let mut disabled = Vec::new(); - - let mut modify_tuf = |b: bool, a: AuraDevTuf| { - if b { - enabled.push(a); - if !enabled_states.tuf.contains(&a) { - enabled_states.tuf.push(a); - } - } else { - disabled.push(a); - // This would be so much better as a hashset - if enabled_states.tuf.contains(&a) { - let mut idx = 0; - for (i, n) in enabled_states.tuf.iter().enumerate() { - if *n == a { - idx = i; - break; - } - } - enabled_states.tuf.remove(idx); - } - } - }; - modify_tuf(boot, AuraDevTuf::Boot); - modify_tuf(sleep, AuraDevTuf::Sleep); - modify_tuf(keyboard, AuraDevTuf::Awake); - - let mut send = |enable: bool, data: Vec| { - let options = AuraPowerDev { - tuf: data, - ..Default::default() - }; - // build data to send - states - .asus_dbus - .proxies() - .aura() - .set_led_power((options, enable)) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - }; - send(true, enabled); - send(false, disabled); - } else { - let mut enabled = Vec::new(); - let mut disabled = Vec::new(); - - let mut modify_x1866 = |b: bool, a: AuraDevRog1| { - if b { - enabled.push(a); - if !enabled_states.old_rog.contains(&a) { - enabled_states.old_rog.push(a); - } - } else { - disabled.push(a); - // This would be so much better as a hashset - if enabled_states.old_rog.contains(&a) { - let mut idx = 0; - for (i, n) in enabled_states.old_rog.iter().enumerate() { - if *n == a { - idx = i; - break; - } - } - enabled_states.old_rog.remove(idx); - } - } - }; - modify_x1866(boot, AuraDevRog1::Boot); - modify_x1866(sleep, AuraDevRog1::Sleep); - modify_x1866(keyboard, AuraDevRog1::Keyboard); - if !states.aura.supported_basic_zones.is_empty() { - modify_x1866(lightbar, AuraDevRog1::Lightbar); - } - - let mut send = |enable: bool, data: Vec| { - let options = AuraPowerDev { - old_rog: data, - ..Default::default() - }; - // build data to send - states - .asus_dbus - .proxies() - .aura() - .set_led_power((options, enable)) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - }; - send(true, enabled); - send(false, disabled); - } - } -} - -fn aura_power2(states: &mut SystemState, ui: &mut Ui) { - let AuraPower { - keyboard, - logo, - lightbar, - lid, - rear_glow, - } = &mut states.aura.enabled.rog; - - const LABELS: [&str; 4] = ["Boot", "Awake", "Sleep", "Shutdown"]; - - let mut changed = false; - let mut item = |power: &mut KbAuraPowerState, ui: &mut Ui| { - ui.vertical(|ui| { - if states.aura.supported_power_zones.contains(&power.zone) { - ui.horizontal_wrapped(|ui| { - ui.label(RichText::new(format!("{:?}", power.zone)).size(14.0)); - }); - if ui.checkbox(&mut power.boot, LABELS[0]).changed() { - changed = true; - } - if ui.checkbox(&mut power.awake, LABELS[1]).changed() { - changed = true; - } - if ui.checkbox(&mut power.sleep, LABELS[2]).changed() { - changed = true; - } - if ui.checkbox(&mut power.shutdown, LABELS[3]).changed() { - changed = true; - } - } - }); - }; - - ui.horizontal_wrapped(|ui| { - item(lid, ui); - item(logo, ui); - item(keyboard, ui); - item(lightbar, ui); - item(rear_glow, ui); - }); - - if changed { - let mut send = |enable: bool, data: AuraPower| { - let options = AuraPowerDev { - rog: data, - ..Default::default() - }; - // build data to send - states - .asus_dbus - .proxies() - .aura() - .set_led_power((options, enable)) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - }; - send( - true, - AuraPower { - keyboard: *keyboard, - logo: *logo, - lightbar: *lightbar, - lid: *lid, - rear_glow: *rear_glow, - }, - ); - } -} diff --git a/rog-control-center/src/widgets/fan_graph.rs b/rog-control-center/src/widgets/fan_graph.rs deleted file mode 100644 index ccdbbf64..00000000 --- a/rog-control-center/src/widgets/fan_graph.rs +++ /dev/null @@ -1,208 +0,0 @@ -use egui::plot::{Line, Plot, Points}; -use egui::Ui; -use rog_platform::platform::ThrottlePolicy; -use rog_profiles::fan_curve_set::CurveData; -use rog_profiles::FanCurvePU; - -use crate::system_state::FanCurvesState; -use crate::RogDbusClientBlocking; - -pub fn fan_graphs( - curves: &mut FanCurvesState, - dbus: &RogDbusClientBlocking<'_>, - do_error: &mut Option, - ui: &mut Ui, -) { - if curves.available_fans.is_empty() { - return; // TODO: - } - - ui.separator(); - - let mut item = |profile: ThrottlePolicy, ui: &mut Ui| { - ui.group(|ui| { - if ui - .selectable_value(&mut curves.show_curve, profile, format!("{profile:?}")) - .clicked() - { - dbus.proxies() - .platform() - .set_throttle_thermal_policy(profile) - .ok(); - } - ui.add_enabled_ui(curves.show_curve == profile, |ui| { - if curves.available_fans.contains(&FanCurvePU::CPU) { - ui.selectable_value( - &mut curves.show_graph, - FanCurvePU::CPU, - format!("{:?}", FanCurvePU::CPU), - ); - } - if curves.available_fans.contains(&FanCurvePU::GPU) { - ui.selectable_value( - &mut curves.show_graph, - FanCurvePU::GPU, - format!("{:?}", FanCurvePU::GPU), - ); - } - if curves.available_fans.contains(&FanCurvePU::MID) { - ui.selectable_value( - &mut curves.show_graph, - FanCurvePU::MID, - format!("{:?}", FanCurvePU::MID), - ); - } - }); - }); - }; - - ui.horizontal_wrapped(|ui| { - for a in &curves.curves { - item(*a.0, ui); - } - }); - - let curve = curves.curves.get_mut(&curves.show_curve).unwrap(); - - let mut data = &mut CurveData::default(); - for c in curve { - if c.fan == curves.show_graph { - data = c; - break; - } - } - - let mut points: Vec<[f64; 2]> = data - .temp - .iter() - .enumerate() - .map(|(idx, x)| { - let x = *x as f64; - let y = ((data.pwm[idx] as u32) * 100 / 255) as f64; - [x, y] - }) - .collect(); - - for i in 0..points.len() - 1 { - if i > 0 && i < points.len() - 1 { - if points[i][0] < points[i - 1][0] { - points[i][0] = points[i - 1][0] + 1.0; - data.temp[i] = points[i - 1][0] as u8; - } - if points[i][0] >= points[i + 1][0] { - points[i + 1][0] = points[i][0] + 1.0; - data.temp[i + 1] = points[i][0] as u8; - } - if points[i][1] < points[i - 1][1] { - points[i][1] = points[i - 1][1] + 1.0; - data.pwm[i] = (points[i - 1][1] * 255.0 / 100.0 + 1.0).floor() as u8; - } - if points[i][1] >= points[i + 1][1] { - points[i + 1][1] = points[i][1] + 1.0; - data.pwm[i + 1] = (points[i][1] * 255.0 / 100.0 + 1.0).floor() as u8; - } - } - } - - let line = Line::new(points.clone()).width(2.0); - let points = Points::new(points).radius(3.0); - - Plot::new("fan_curves") - .view_aspect(1.666) - // .center_x_axis(true) - // .center_y_axis(true) - .include_x(0.0) - .include_x(104.0) - .include_y(0.0) - .include_y(106.0) - .allow_scroll(false) - .allow_drag(false) - .allow_boxed_zoom(false) - // .x_axis_formatter(|d, _r| format!("{}", d)) - // .y_axis_formatter(|d, _r| format!("{:.*}%", 1, d)) - .label_formatter(|name, value| { - if !name.is_empty() { - format!("{}: {:.*}%", name, 1, value.y) - } else { - format!("Temp {}c\nFan {:.*}%", value.x as u8, 1, value.y) - } - }) - .show(ui, |plot_ui| { - if plot_ui.plot_hovered() { - let mut idx = 0; - - if let Some(point) = plot_ui.pointer_coordinate() { - let mut x: i32 = point.x as i32; - for (i, n) in data.temp.iter().enumerate() { - let tmp = x.min((point.x as i32 - *n as i32).abs()); - if tmp < x { - x = tmp; - idx = i; - } - } - - if plot_ui.plot_clicked() { - data.temp[idx] = point.x as u8; - data.pwm[idx] = (point.y * 255.0 / 100.0) as u8; - } else { - let drag = plot_ui.pointer_coordinate_drag_delta(); - if drag.length_sq() != 0.0 { - data.temp[idx] = (point.x as f32 + drag.x) as u8; - data.pwm[idx] = ((point.y as f32 + drag.y) * 255.0 / 100.0) as u8; - } - } - } - } - plot_ui.line(line); - plot_ui.points(points); - }); - - let mut set = false; - let mut clear = false; - let mut reset = false; - ui.with_layout(egui::Layout::right_to_left(egui::Align::TOP), |ui| { - set = ui.add(egui::Button::new("Apply Profile")).clicked(); - clear = ui.add(egui::Button::new("Clear Profile Changes")).clicked(); - reset = ui.add(egui::Button::new("Factory Reset Profile")).clicked(); - }); - - if set { - dbus.proxies() - .fan_curves() - .set_fan_curve(curves.show_curve, data.clone()) - .map_err(|err| { - *do_error = Some(err.to_string()); - }) - .ok(); - } - - if clear { - if let Ok(curve) = dbus - .proxies() - .fan_curves() - .fan_curve_data(curves.show_curve) - .map_err(|err| { - *do_error = Some(err.to_string()); - }) - { - if let Some(value) = curves.curves.get_mut(&curves.show_curve) { - *value = curve; - } - } - } - - if reset { - dbus.proxies() - .fan_curves() - .reset_profile_curves(curves.show_curve) - .map_err(|err| { - *do_error = Some(err.to_string()); - }) - .ok(); - - match FanCurvesState::new(dbus) { - Ok(f) => *curves = f, - Err(e) => *do_error = Some(e.to_string()), - } - } -} diff --git a/rog-control-center/src/widgets/keyboard_layout.rs b/rog-control-center/src/widgets/keyboard_layout.rs deleted file mode 100644 index 8dd5c2e6..00000000 --- a/rog-control-center/src/widgets/keyboard_layout.rs +++ /dev/null @@ -1,220 +0,0 @@ -use egui::{Color32, Pos2}; -use rog_aura::advanced::LedCode; -use rog_aura::layouts::{KeyLayout, KeyShape}; -use rog_aura::{AdvancedAuraType, AuraModeNum}; - -use crate::system_state::AuraState; - -const SCALE: f32 = 2.0; - -// TODO: -// - Multizone: draw regions? While iterating keys check if located in one of -// the 4 regions and mark -// - Tab for advanced effects -// - Keys need to select colour themselves - -pub fn keyboard( - ui: &mut egui::Ui, - keyboard_layout: &KeyLayout, - states: &mut AuraState, - colour: Color32, -) { - let (keyboard_is_multizoned, keyboard_width, keyboard_is_per_key) = - match keyboard_layout.advanced_type() { - AdvancedAuraType::PerKey => (false, 0.0, true), - AdvancedAuraType::None => (false, keyboard_layout.max_width(), false), - AdvancedAuraType::Zoned(zones) => { - let width = if let Some(row) = keyboard_layout.rows_ref().get(2) { - row.width() - } else { - 0.0 - }; - (!zones.contains(&LedCode::SingleZone), width, false) - } - }; - let mut start_pos = None; - - let y = ui.spacing().interact_size.y; - let this_size = ui.available_size(); - let keys_width = keyboard_layout.max_width() * SCALE * y; - let keys_height = keyboard_layout.max_height() * SCALE * y; - let keyboard_height = keyboard_layout.keyboard_height() * SCALE; - let x_start = (this_size.x - keys_width) / SCALE; - let y_start = (this_size.y - keys_height) / SCALE; - - // Initial colour states - let mut input_colour = colour; - let mut key_colour = colour; - if states.current_mode == AuraModeNum::Rainbow && !keyboard_is_per_key { - key_colour = Color32::from_rgb( - (states.wave_red[0] as u32 * 255 / 100) as u8, - (states.wave_green[0] as u32 * 255 / 100) as u8, - (states.wave_blue[0] as u32 * 255 / 100) as u8, - ); - } - - ui.spacing_mut().item_spacing = egui::vec2(0.0, 0.0); - blank(ui, 0.0, y_start / y); - - for row in keyboard_layout.rows() { - ui.horizontal_top(|ui| { - blank(ui, x_start / y, 0.0); - for (i, key) in row.row().enumerate() { - // For per-key rainbow which cascades across - if states.current_mode == AuraModeNum::Rainbow && keyboard_is_per_key - || key.0.is_lightbar_zone() - { - key_colour = Color32::from_rgb( - (states.wave_red[i] as u32 * 255 / 100) as u8, - (states.wave_green[i] as u32 * 255 / 100) as u8, - (states.wave_blue[i] as u32 * 255 / 100) as u8, - ); - } - - if (keyboard_is_multizoned && !key.0.is_lightbar_zone()) - && states.current_mode == AuraModeNum::Rainbow - { - input_colour = key_colour; - key_colour = Color32::TRANSPARENT; - } - - let label = <&str>::from(key.0); - let mut shape = key.1.clone(); - shape.scale(SCALE); - - match shape { - KeyShape::Led { - width, - height, - pad_left, - pad_right, - pad_top, - pad_bottom, - } => { - let (pos, response) = key_shape( - ui, key_colour, width, height, pad_left, pad_right, pad_top, pad_bottom, - ); - if start_pos.is_none() { - start_pos = Some(pos); - } else if let Some(old_pos) = start_pos.as_mut() { - if !key.0.is_lightbar_zone() { - if pos.x < old_pos.x { - old_pos.x = pos.x; - } - if pos.y < old_pos.y { - old_pos.y = pos.y; - } - } - } - if response.on_hover_text(label).clicked() && keyboard_is_per_key { - // TODO: set an effect on the LedCode - } - } - KeyShape::Blank { width, height } => { - blank(ui, width, height); - } - } - } - }); - } - - if keyboard_is_multizoned { - let zone_width = keyboard_width * SCALE / 4.0 - 0.1; - for n in 0..4 { - if states.current_mode == AuraModeNum::Rainbow { - input_colour = Color32::from_rgba_unmultiplied( - (states.wave_red[n] as u32 * 255 / 100) as u8, - (states.wave_green[n] as u32 * 255 / 100) as u8, - (states.wave_blue[n] as u32 * 255 / 100) as u8, - 70, - ); - } - if let Some(mut pos) = start_pos { - pos.x += n as f32 * zone_width * y; - let response = zone_shape(ui, input_colour, pos, zone_width, keyboard_height); - let label = format!("Zone {}", 1 + n); - if response.on_hover_text(label).clicked() { - // TODO: set an effect on the zone - } - } - } - } -} - -#[allow(clippy::too_many_arguments)] -fn key_shape( - ui: &mut egui::Ui, - colour: Color32, - width: f32, - height: f32, - pad_left: f32, - pad_right: f32, - pad_top: f32, - pad_bottom: f32, -) -> (egui::Pos2, egui::Response) { - // First, get some space - let y = ui.spacing().interact_size.y; - let desired_size = y * egui::vec2(width + pad_left + pad_right, height + pad_top + pad_bottom); - let (mut rect, mut response) = ui.allocate_exact_size(desired_size, egui::Sense::click()); - // rect = rect.shrink(3.0); - if response.clicked() { - response.mark_changed(); - } - response.widget_info(|| { - egui::WidgetInfo::selected(egui::WidgetType::Checkbox, response.clicked(), "") - }); - - if ui.is_rect_visible(rect) { - // Now set the actual visible rect - let visuals = ui.style().interact_selectable(&response, true); - let size = y * egui::vec2(width, height); - rect.set_width(size.x); - rect.set_height(size.y); - let center = Pos2::new( - rect.center().x + pad_left * y, - rect.center().y + pad_top * y, - ); - rect.set_center(center); - // let rect = rect.expand(visuals.expansion); - ui.painter().rect(rect, 0.1, colour, visuals.fg_stroke); - } - - (rect.left_top(), response) -} - -#[allow(clippy::too_many_arguments)] -fn zone_shape( - ui: &mut egui::Ui, - mut colour: Color32, - pos: Pos2, - width: f32, - height: f32, -) -> egui::Response { - // First, get some space - let y = ui.spacing().interact_size.y; - let desired_size = y * egui::vec2(width, height); - let rect = egui::Rect::from_min_size(pos, desired_size); - let mut response = ui.allocate_rect(rect, egui::Sense::click()); - // rect = rect.shrink(3.0); - if response.clicked() { - response.mark_changed(); - } - response.widget_info(|| { - egui::WidgetInfo::selected(egui::WidgetType::Checkbox, response.clicked(), "") - }); - - if ui.is_rect_visible(rect) { - // Now set the actual visible rect - let visuals = ui.style().interact_selectable(&response, true); - // let rect = rect.expand(visuals.expansion); - colour[3] = 20; - ui.painter().rect(rect, 0.1, colour, visuals.fg_stroke); - } - - response -} - -fn blank(ui: &mut egui::Ui, ux: f32, uy: f32) { - let desired_size = ui.spacing().interact_size.y * egui::vec2(ux, uy); - ui.allocate_exact_size(desired_size, egui::Sense::click()); -} diff --git a/rog-control-center/src/widgets/mod.rs b/rog-control-center/src/widgets/mod.rs deleted file mode 100644 index 70dc643c..00000000 --- a/rog-control-center/src/widgets/mod.rs +++ /dev/null @@ -1,17 +0,0 @@ -mod anime_power; -mod app_settings; -mod aura_modes; -mod aura_power; -mod fan_graph; -mod keyboard_layout; -mod rog_bios; -mod side_panel; -mod top_bar; - -pub use anime_power::*; -pub use app_settings::*; -pub use aura_modes::*; -pub use aura_power::*; -pub use fan_graph::*; -pub use keyboard_layout::*; -pub use rog_bios::*; diff --git a/rog-control-center/src/widgets/rog_bios.rs b/rog-control-center/src/widgets/rog_bios.rs deleted file mode 100644 index 32153a14..00000000 --- a/rog-control-center/src/widgets/rog_bios.rs +++ /dev/null @@ -1,153 +0,0 @@ -use egui::Ui; -use rog_platform::platform::{GpuMode, ThrottlePolicy}; - -use crate::system_state::SystemState; - -pub fn platform_profile(states: &mut SystemState, ui: &mut Ui) { - if let Some(mut throttle) = states.bios.throttle { - ui.heading("Platform profile"); - - let mut item = |p: ThrottlePolicy, ui: &mut Ui| { - if ui - .selectable_value(&mut throttle, p, format!("{p:?}")) - .clicked() - { - states - .asus_dbus - .proxies() - .platform() - .set_throttle_thermal_policy(throttle) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - } - }; - - ui.horizontal_wrapped(|ui| { - for a in ThrottlePolicy::list() { - item(a, ui); - } - }); - } -} - -pub fn rog_bios_group(states: &mut SystemState, ui: &mut Ui) { - ui.heading("Bios options"); - - if let Some(mut limit) = states.bios.charge_limit { - let slider = egui::Slider::new(&mut limit, 20..=100) - .text("Charging limit") - .step_by(1.0); - if ui.add(slider).drag_released() { - states - .asus_dbus - .proxies() - .platform() - .set_charge_control_end_threshold(limit) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - } - } - - if let Some(mut sound) = states.bios.post_sound { - if ui - .add(egui::Checkbox::new(&mut sound, "POST sound")) - .changed() - { - states - .asus_dbus - .proxies() - .platform() - .set_post_animation_sound(sound) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - } - } - - if let Some(mut overdrive) = states.bios.panel_overdrive { - if ui - .add(egui::Checkbox::new(&mut overdrive, "Panel overdrive")) - .changed() - { - states - .asus_dbus - .proxies() - .platform() - .set_panel_od(overdrive) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - } - } - - if let Some(mut mini_led_mode) = states.bios.mini_led_mode { - if ui - .add(egui::Checkbox::new(&mut mini_led_mode, "MiniLED backlight")) - .changed() - { - states - .asus_dbus - .proxies() - .platform() - .set_mini_led_mode(mini_led_mode) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - } - } - - if let Some(mut gpu_mux_mode) = states.bios.gpu_mux_mode { - let mut changed = false; - - let mut reboot_required = false; - if let Ok(mode) = states.asus_dbus.proxies().platform().gpu_mux_mode() { - reboot_required = GpuMode::from(mode) != gpu_mux_mode; - } - - ui.group(|ui| { - ui.vertical(|ui| { - ui.horizontal_wrapped(|ui| ui.label("GPU MUX mode")); - ui.horizontal_wrapped(|ui| ui.label("NOTE: Value does not change until rebooted")); - ui.horizontal_wrapped(|ui| { - changed = ui - .selectable_value( - &mut gpu_mux_mode, - GpuMode::Discrete, - "Dedicated (Ultimate)", - ) - .clicked() - || ui - .selectable_value( - &mut gpu_mux_mode, - GpuMode::Optimus, - "Optimus (Hybrid)", - ) - .clicked(); - }); - - if reboot_required { - ui.horizontal_wrapped(|ui| ui.heading("REBOOT REQUIRED")); - } - }); - }); - - if changed { - states - .asus_dbus - .proxies() - .platform() - .set_gpu_mux_mode(gpu_mux_mode) - .map_err(|err| { - states.error = Some(err.to_string()); - }) - .ok(); - } - } -} diff --git a/rog-control-center/src/widgets/side_panel.rs b/rog-control-center/src/widgets/side_panel.rs deleted file mode 100644 index d5f8e614..00000000 --- a/rog-control-center/src/widgets/side_panel.rs +++ /dev/null @@ -1,72 +0,0 @@ -use crate::{Page, RogApp}; - -impl RogApp { - pub fn side_panel(&mut self, ctx: &eframe::egui::Context) { - egui::SidePanel::left("side_panel") - .resizable(false) - .default_width(60.0) // TODO: set size to match icon buttons when done - .show(ctx, |ui| { - let Self { page, .. } = self; - - ui.heading("Functions"); - - ui.separator(); - if ui - .selectable_value(page, Page::System, "System Settings") - .clicked() - { - *page = Page::System; - } - - if self.supported_interfaces.contains(&"FanCurves".to_owned()) { - ui.separator(); - if ui - .selectable_value(page, Page::FanCurves, "Fan Curves") - .clicked() - { - *page = Page::FanCurves; - } - } - - if self.supported_interfaces.contains(&"Aura".to_owned()) { - ui.separator(); - if ui - .selectable_value(page, Page::AuraEffects, "Keyboard Aura") - .clicked() - { - *page = Page::AuraEffects; - } - } - - // TODO: Anime page is not complete - if self.supported_interfaces.contains(&"Anime".to_owned()) { - ui.separator(); - if ui - .selectable_value(page, Page::AnimeMatrix, "AniMe Matrix") - .clicked() - { - *page = Page::AnimeMatrix; - } - } - - ui.separator(); - if ui - .selectable_value(page, Page::AppSettings, "App Settings") - .clicked() - { - *page = Page::AppSettings; - } - - ui.with_layout(egui::Layout::bottom_up(egui::Align::LEFT), |ui| { - ui.horizontal(|ui| { - ui.spacing_mut().item_spacing.x = 0.0; - ui.label("Source code "); - ui.hyperlink_to( - "rog-gui.", - "https://gitlab.com/asus-linux/asusctl/-/tree/main/rog-control-center", - ); - }); - }); - }); - } -} diff --git a/rog-control-center/src/widgets/top_bar.rs b/rog-control-center/src/widgets/top_bar.rs deleted file mode 100644 index 344942cf..00000000 --- a/rog-control-center/src/widgets/top_bar.rs +++ /dev/null @@ -1,77 +0,0 @@ -use egui::{vec2, Align2, Button, FontId, Id, Rect, RichText, Sense, Vec2}; - -use crate::{RogApp, VERSION}; - -impl RogApp { - pub fn top_bar(&mut self, ctx: &eframe::egui::Context, frame: &mut eframe::Frame) { - egui::TopBottomPanel::top("top_panel").show(ctx, |ui| { - // The top panel is often a good place for a menu bar: - egui::menu::bar(ui, |ui| { - ui.horizontal(|ui| { - self.dark_light_mode_buttons(ui); - egui::warn_if_debug_build(ui); - }); - - // Drag area - let text_color = ctx.style().visuals.text_color(); - let mut titlebar_rect = ui.available_rect_before_wrap(); - titlebar_rect.max.x -= titlebar_rect.height(); - if ui - .interact(titlebar_rect, Id::new("title_bar"), Sense::drag()) - .drag_started() - { - frame.drag_window(); - } - - let height = titlebar_rect.height(); - - // Paint the title: - ui.painter().text( - titlebar_rect.right_top() + vec2(0.0, height / 2.0), - Align2::RIGHT_CENTER, - format!("v{}", VERSION), - FontId::proportional(height - 2.0), - text_color, - ); - // Add the close button: - let close_response = ui.put( - Rect::from_min_size(titlebar_rect.right_top(), Vec2::splat(height)), - Button::new(RichText::new("❌").size(height - 4.0)).frame(false), - ); - if close_response.clicked() { - frame.close(); - } - }); - }); - } - - fn dark_light_mode_buttons(&mut self, ui: &mut egui::Ui) { - let load_from_cfg = self.config.dark_mode != ui.ctx().style().visuals.dark_mode; - - if ui - .add(egui::SelectableLabel::new( - !self.config.dark_mode, - "☀ Light", - )) - .clicked() - || (load_from_cfg && !self.config.dark_mode) - { - ui.ctx().set_visuals(egui::Visuals::light()); - } - if ui - .add(egui::SelectableLabel::new(self.config.dark_mode, "🌙 Dark")) - .clicked() - || (load_from_cfg && self.config.dark_mode) - { - ui.ctx().set_visuals(egui::Visuals::dark()); - } - - let applied_dark_mode = ui.ctx().style().visuals.dark_mode; - - if self.config.dark_mode != applied_dark_mode { - self.config.dark_mode = applied_dark_mode; - let tmp = self.config.enabled_notifications.clone(); - self.config.save(&tmp).ok(); - } - } -} diff --git a/rog-control-center/ui/common_widgets.slint b/rog-control-center/ui/common_widgets.slint new file mode 100644 index 00000000..9df4279a --- /dev/null +++ b/rog-control-center/ui/common_widgets.slint @@ -0,0 +1,246 @@ +import { VerticalBox , StandardButton, Button} from "std-widgets.slint"; +import { Theme } from "globals.slint"; + +export component SquareImageButton inherits Rectangle { + // if (AppConsts.sdfsdf.length < 0): Rectangle { background: red; } + + callback clicked; + in-out property img; + border-radius: 7px; + border-width: 2px; + border-color: Theme.control-outline; + background: Theme.image-button-background; + touch := TouchArea { + clicked => { + root.clicked(); + + } + } + + Image { + height: 90%; + width: 90%; + x: (parent.width - self.width) / 2; + y: (parent.height - self.height) / 2; + source <=> root.img; + image-fit: contain; + // colorize: Theme.control-secondary; + } +} + +export component RoundImageButton inherits Rectangle { + callback clicked; + in-out property img; + in property size; + width: self.size; + height: self.size; + border-radius: root.width / 2; + border-width: 6px; + border-color: Theme.control-outline; + background: Theme.image-button-background; + touch := TouchArea { + clicked => { + root.clicked(); + + } + } + + Image { + height: 60%; + width: 60%; + x: (parent.width - self.width) / 2; + y: (parent.height - self.height) / 2; + source <=> root.img; + image-fit: contain; + // colorize: Theme.control-secondary; + } +} + +export component SquareCharButton inherits Rectangle { + callback clicked; + in-out property char; + border-radius: 7px; + border-width: 2px; + border-color: Theme.control-outline; + background: Theme.image-button-background; + touch := TouchArea { + clicked => { + root.clicked(); + + } + } + + Text { + // height: 90%; + // width: 90%; + x: (parent.width - self.width) / 2; + y: (parent.height - self.height) / 2; + text: char; + font-size: 28px; + font-weight: 900; + horizontal-alignment: center; + vertical-alignment: center; + color: Theme.control-foreground; + } +} + +// A variable bar that can be single or double ended +export component ValueBar inherits Rectangle { + in property value: 0.0; + in property min: 0.0; + in property max: 1.0; + function percentage(min: float, max: float, value: float) -> float{ + if (min < 0.0 && max > 0.0) { + // do a percentage of each half as 0-50% + if (value >= max + min) { + return (value - (max + min) / 2) / (max - min); + + } + return 0.50 - (value - (min - max) / 2) / (max - min); + + } + return (value - min) / (max - min); + + } + + function set_x(min: float, max: float, value: float, width: length) -> length{ + if (min < 0.0 && max > 0.0) { + if (value < max + min) { + return width / 2 - width * (percentage(min, max, value)); + + } + return width / 2; + + } + return 0; + + } + + Rectangle { + border-radius: 3px; + background: Theme.neutral-box; + Rectangle { + x: set_x(root.min, root.max, root.value, root.width); + width: parent.x + parent.width * percentage(root.min, root.max, root.value); + border-radius: parent.border-radius; + background: Theme.control-secondary; + } + + Text { + vertical-alignment: center; + horizontal-alignment: center; + text: root.value; + font-size: root.height; + font-weight: 900; + color: Theme.control-foreground; + } + } +} + +// Single direction spinbox +export component SpinBoxUni inherits Rectangle { + in-out property value; + in property minimum; + in property maximum: 100; + height: 32px; + HorizontalLayout { + spacing: 12px; + padding: 0; + SquareCharButton { + width: root.height - parent.padding * 2; + char: "-"; + clicked => { + if (root.value > root.minimum) { + root.value -= 1; + + } + } + } + + Rectangle { + border-radius: 3px; + border-width: 2px; + border-color: Theme.control-outline; + // TODO: replace with visual min/max drawing + Text { + width: 100%; + height: 100%; + vertical-alignment: center; + horizontal-alignment: center; + text: root.value; + color: Theme.control-foreground; + } + } + + SquareCharButton { + width: root.height - parent.padding * 2; + char: "+"; + clicked => { + if (root.value < root.maximum) { + root.value += 1; + + } + } + } + } +} + +export component PopupNotification { + in property heading; + in property content; + _p := PopupWindow { + x: root.x; + y: root.y; + width: root.width; + height: root.height; + // TODO: add properties to display + Rectangle { + border-width: 2px; + border-color: Theme.control-outline; + background: Theme.notification-background; + // TODO: drop shadows slow + // drop-shadow-offset-x: 7px; + // drop-shadow-offset-y: 7px; + // drop-shadow-color: black; + // drop-shadow-blur: 30px; + VerticalLayout { + Dialog { + VerticalLayout { + alignment: start; + Text { + text: heading; + color: Theme.text-foreground-color; + font-size: 32px; + font-weight: 900; + } + + Text { + text: content; + color: Theme.text-foreground-color; + font-size: 18px; + } + } + + StandardButton { + kind: ok; + } + + StandardButton { + kind: cancel; + } + + Button { + text: "More Info"; + dialog-button-role: action; + } + } + } + } + } + + public function show() { + _p.show(); + + } + +} diff --git a/rog-control-center/ui/globals.slint b/rog-control-center/ui/globals.slint new file mode 100644 index 00000000..09f0d325 --- /dev/null +++ b/rog-control-center/ui/globals.slint @@ -0,0 +1,39 @@ +struct ButtonColours { + base: color, + pressed: color, + hovered: color, +} + +export global AppSize { + out property width: 800px; + out property height: 480px; +} + +export global Theme { + out property window-background: #000000; + out property neutral-box: #BDC0D1; + // The background colour of pages and bars + out property background-color: root.dark-mode ? #12387b : white; + out property text-foreground-color: root.dark-mode ? #F4F6FF : black; + out property secondary-foreground-color: root.dark-mode ? #C1C3CA : #6C6E7A; + out property image-button-background: root.dark-mode ? root.window-background : white; + out property toolbar-background: root.background-color; + out property notification-border: root.background-color; + out property notification-background: root.background-color; + out property control-outline: #FFBF63; + out property control-secondary: #6284FF; + out property control-foreground: root.dark-mode ? white : #122F7B; + out property push-button-base: #FFBF63; + out property push-button: { + base: root.push-button-base, + pressed: root.push-button-base.darker(40%), + hovered: root.push-button-base.darker(20%), + }; + out property push-button-text-color: white; + out property base-font-size: 16px; + in property dark-mode: true; +} + +export global IconImages { + //out property two_t: @image-url("images/parameters/2t.png"); +} diff --git a/rog-control-center/ui/main_window.slint b/rog-control-center/ui/main_window.slint new file mode 100644 index 00000000..954daa8a --- /dev/null +++ b/rog-control-center/ui/main_window.slint @@ -0,0 +1,120 @@ +import { Button, VerticalBox } from "std-widgets.slint"; +import { SpinBoxUni, ValueBar, SquareImageButton, RoundImageButton } from "common_widgets.slint"; +import { Theme, AppSize } from "globals.slint"; +import { PageSystem } from "pages/system.slint"; +import { SideBar } from "widgets/sidebar.slint"; +import { PageAbout } from "pages/about.slint"; +import { PageGpu } from "pages/gpu.slint"; +import { PageFans } from "pages/fans.slint"; +import { PageAnime } from "pages/anime.slint"; +import { PageAura } from "pages/aura.slint"; + +export { AppSize, Theme } + +export component MainWindow inherits Window { + default-font-family: "DejaVu Sans"; + private property show-notif; + private property fade-cover; + callback exit-app(); + callback request-increase-value(); + callback show-notification(bool); + show-notification(yes) => { + show-notif = yes; + fade-cover = yes; + + } + height: AppSize.height; + width: AppSize.width; + background: Colors.orange; + HorizontalLayout { + padding: 0px; + side-bar := SideBar { + title: @tr("ROG"); + model: [ + @tr("Menu" => "System Control"), + @tr("Menu" => "Keyboard Aura"), + @tr("Menu" => "AniMe Matrix"), + @tr("Menu" => "Fan Curves"), + @tr("Menu" => "GPU Control"), + @tr("Menu" => "About"), + ]; + } + + Rectangle { + background: Colors.purple; + if(side-bar.current-item == 0): PageSystem { + width: root.width - side-bar.width; + height: root.height + 12px; + } + + if(side-bar.current-item == 1): PageAura { + width: root.width - side-bar.width; + } + + if(side-bar.current-item == 2): PageAnime { + width: root.width - side-bar.width; + } + + if(side-bar.current-item == 3): PageFans { + width: root.width - side-bar.width; + } + + if(side-bar.current-item == 4): PageGpu { + width: root.width - side-bar.width; + } + + if(side-bar.current-item == 5): PageAbout { + width: root.width - side-bar.width; + } + } + } + + if fade-cover: Rectangle { + x: 0px; + y: 0px; + width: root.width; + height: root.height; + background: Colors.rgba(25,33,23,20); + opacity: 0.7; + TouchArea { + height: 100%; + width: 100%; + clicked => { + // toolbar-dropdown.close(); + if (show-notif) { + show-notif = false; + + } + fade-cover = false; + + } + } + } + + // // TODO: or use Dialogue + if show-notif: Rectangle { + x: root.width / 8; + y: root.height / 8; + height: (root.height / 8) * 6; + width: (root.width / 8) * 6; + TouchArea { + height: 100%; + width: 100%; + clicked => { + show-notif = false; + exit-app(); + + } + } + + // TODO: add properties to display + Rectangle { + height: 100%; + width: 100%; + background: Theme.neutral-box; + Text { + text: "Click here to exit"; + } + } + } +} diff --git a/rog-control-center/ui/pages/about.slint b/rog-control-center/ui/pages/about.slint new file mode 100644 index 00000000..f985673a --- /dev/null +++ b/rog-control-center/ui/pages/about.slint @@ -0,0 +1,18 @@ +import { ValueBar } from "../common_widgets.slint"; +import { Theme } from "../globals.slint"; +import { AboutSlint } from "std-widgets.slint"; + +export component PageAbout inherits VerticalLayout { + Rectangle { + clip: true; + // TODO: slow with border-radius + padding: 8px; + // height: parent.height - infobar.height - mainview.padding - self.padding * 2; + // TODO: border-radius: 8px; + mainview := VerticalLayout { + padding: 10px; + spacing: 10px; + AboutSlint {} + } + } +} diff --git a/rog-control-center/ui/pages/anime.slint b/rog-control-center/ui/pages/anime.slint new file mode 100644 index 00000000..5f2421cc --- /dev/null +++ b/rog-control-center/ui/pages/anime.slint @@ -0,0 +1,50 @@ +import { ValueBar } from "../common_widgets.slint"; +import { Theme } from "../globals.slint"; + +export component PageAnime inherits VerticalLayout { + Rectangle { + clip: true; + // TODO: slow with border-radius + padding: 8px; + // height: parent.height - infobar.height - mainview.padding - self.padding * 2; + // TODO: border-radius: 8px; + mainview := VerticalLayout { + padding: 10px; + spacing: 10px; + ValueBar { + height: 40px; + value: 10.5; + min: 0.0; + max: 100.0; + } + + ValueBar { + height: 40px; + value: -70; + min: -100; + max: 0; + } + + ValueBar { + height: 80px; + value: 40; + min: -50; + max: 50; + } + + ValueBar { + height: 80px; + value: -40; + min: -50; + max: 50; + } + + ValueBar { + height: 80px; + value: -40; + min: -50; + max: 50; + } + } + } +} diff --git a/rog-control-center/ui/pages/aura.slint b/rog-control-center/ui/pages/aura.slint new file mode 100644 index 00000000..95b84143 --- /dev/null +++ b/rog-control-center/ui/pages/aura.slint @@ -0,0 +1,50 @@ +import { ValueBar } from "../common_widgets.slint"; +import { Theme } from "../globals.slint"; + +export component PageAura inherits VerticalLayout { + Rectangle { + clip: true; + // TODO: slow with border-radius + padding: 8px; + // height: parent.height - infobar.height - mainview.padding - self.padding * 2; + // TODO: border-radius: 8px; + mainview := VerticalLayout { + padding: 10px; + spacing: 10px; + ValueBar { + height: 40px; + value: 10.5; + min: 0.0; + max: 100.0; + } + + ValueBar { + height: 40px; + value: -70; + min: -100; + max: 0; + } + + ValueBar { + height: 80px; + value: 40; + min: -50; + max: 50; + } + + ValueBar { + height: 80px; + value: -40; + min: -50; + max: 50; + } + + ValueBar { + height: 80px; + value: -40; + min: -50; + max: 50; + } + } + } +} diff --git a/rog-control-center/ui/pages/fans.slint b/rog-control-center/ui/pages/fans.slint new file mode 100644 index 00000000..d8401b20 --- /dev/null +++ b/rog-control-center/ui/pages/fans.slint @@ -0,0 +1,50 @@ +import { ValueBar } from "../common_widgets.slint"; +import { Theme } from "../globals.slint"; + +export component PageFans inherits VerticalLayout { + Rectangle { + clip: true; + // TODO: slow with border-radius + padding: 8px; + // height: parent.height - infobar.height - mainview.padding - self.padding * 2; + // TODO: border-radius: 8px; + mainview := VerticalLayout { + padding: 10px; + spacing: 10px; + ValueBar { + height: 40px; + value: 10.5; + min: 0.0; + max: 100.0; + } + + ValueBar { + height: 40px; + value: -70; + min: -100; + max: 0; + } + + ValueBar { + height: 80px; + value: 40; + min: -50; + max: 50; + } + + ValueBar { + height: 80px; + value: -40; + min: -50; + max: 50; + } + + ValueBar { + height: 80px; + value: -40; + min: -50; + max: 50; + } + } + } +} diff --git a/rog-control-center/ui/pages/gpu.slint b/rog-control-center/ui/pages/gpu.slint new file mode 100644 index 00000000..caffcef3 --- /dev/null +++ b/rog-control-center/ui/pages/gpu.slint @@ -0,0 +1,50 @@ +import { ValueBar } from "../common_widgets.slint"; +import { Theme } from "../globals.slint"; + +export component PageGpu inherits VerticalLayout { + Rectangle { + clip: true; + // TODO: slow with border-radius + padding: 8px; + // height: parent.height - infobar.height - mainview.padding - self.padding * 2; + // TODO: border-radius: 8px; + mainview := VerticalLayout { + padding: 10px; + spacing: 10px; + ValueBar { + height: 40px; + value: 10.5; + min: 0.0; + max: 100.0; + } + + ValueBar { + height: 40px; + value: -70; + min: -100; + max: 0; + } + + ValueBar { + height: 80px; + value: 40; + min: -50; + max: 50; + } + + ValueBar { + height: 80px; + value: -40; + min: -50; + max: 50; + } + + ValueBar { + height: 80px; + value: -40; + min: -50; + max: 50; + } + } + } +} diff --git a/rog-control-center/ui/pages/system.slint b/rog-control-center/ui/pages/system.slint new file mode 100644 index 00000000..352a6807 --- /dev/null +++ b/rog-control-center/ui/pages/system.slint @@ -0,0 +1,113 @@ +import { ValueBar } from "../common_widgets.slint"; +import { Theme } from "../globals.slint"; +import { HorizontalBox , VerticalBox, ScrollView} from "std-widgets.slint"; + +export component PageSystem inherits Rectangle { + background: Theme.background-color; + ScrollView { + VerticalLayout { + // padding: 10px; + spacing: 10px; + min-height: root.height; + Rectangle { + background: Theme.background-color; + VerticalBox { + Text { + color: Theme.text-foreground-color; + text: @tr("ChargeMode" => "Charging mode"); + } + + Text { + color: Theme.text-foreground-color; + text: @tr("ChargeLimit" => "Charge limit"); + } + } + } + + Rectangle { + background: Theme.background-color; + VerticalBox { + Text { + color: Theme.text-foreground-color; + text: @tr("PanelOverdrive" => "Panel Overdrive"); + } + + Text { + color: Theme.text-foreground-color; + text: @tr("PerformanceProfile" => "Performance Profile"); + } + } + } + + Rectangle { + background: Theme.background-color; + VerticalBox { + Text { + color: Theme.text-foreground-color; + text: @tr("nv_dynamic_boost" => "nv_dynamic_boost"); + } + + Text { + color: Theme.text-foreground-color; + text: @tr("nv_temp_target" => "nv_temp_target"); + } + + Text { + color: Theme.text-foreground-color; + text: @tr("ppt_pl1_spl" => "ppt_pl1_spl"); + } + + Text { + color: Theme.text-foreground-color; + text: @tr("ppt_pl2_sppt" => "ppt_pl2_sppt"); + } + } + } + + Rectangle { + background: Theme.background-color; + VerticalBox { + Text { + color: Theme.text-foreground-color; + text: @tr("PanelOverdrive" => "Panel Overdrive"); + } + + Text { + color: Theme.text-foreground-color; + text: @tr("PerformanceProfile" => "Performance Profile"); + } + } + } + + Rectangle { + background: Theme.background-color; + VerticalBox { + Text { + color: Theme.text-foreground-color; + text: @tr("PanelOverdrive" => "Panel Overdrive"); + } + + Text { + color: Theme.text-foreground-color; + text: @tr("PerformanceProfile" => "Performance Profile"); + } + } + } + + Rectangle { + background: Theme.background-color; + VerticalBox { + Text { + color: Theme.text-foreground-color; + text: @tr("PanelOverdrive" => "Panel Overdrive"); + } + + Text { + color: Theme.text-foreground-color; + text: @tr("PerformanceProfile" => "Performance Profile"); + } + } + } + } + } +} diff --git a/rog-control-center/ui/widgets/sidebar.slint b/rog-control-center/ui/widgets/sidebar.slint new file mode 100644 index 00000000..cb80be42 --- /dev/null +++ b/rog-control-center/ui/widgets/sidebar.slint @@ -0,0 +1,125 @@ +// Copyright © SixtyFPS GmbH +// SPDX-License-Identifier: MIT + +import { StyleMetrics } from "std-widgets.slint"; + +component SideBarItem inherits Rectangle { + in property selected; + in property has-focus; + in-out property text<=> label.text; + callback clicked<=>touch.clicked; + min-height: l.preferred-height; + states [ + pressed when touch.pressed: { + state.opacity: 0.8; + } + hover when touch.has-hover: { + state.opacity: 0.6; + } + selected when root.selected: { + state.opacity: 1; + } + focused when root.has-focus: { + state.opacity: 0.8; + } + ] + + state := Rectangle { + opacity: 0; + background: StyleMetrics.window-background; + animate opacity{ duration: 150ms; + } + + } + + l := HorizontalLayout { + y: (parent.height - self.height) / 2; + padding: StyleMetrics.layout-padding; + spacing: 0px; + label := Text { + color: StyleMetrics.default-text-color; + vertical-alignment: center; + } + } + + touch := TouchArea { + width: 100%; + height: 100%; + } +} + +export component SideBar inherits Rectangle { + in property <[string]> model: []; + in property title<=> label.text; + out property current-item: 0; + out property current-focused: fs.has-focus ? fs.focused-tab : -1; + // The currently focused tab + + width: 180px; + forward-focus: fs; + accessible-role: tab; + accessible-delegate-focus: root.current-focused >= 0 ? root.current-focused : root.current-item; + Rectangle { + background: StyleMetrics.window-background.darker(0.2); + fs := FocusScope { + key-pressed(event) => { + if (event.text == "\n") { + root.current-item = root.current-focused; + return accept; + } + if (event.text == Key.UpArrow) { + self.focused-tab = Math.max(self.focused-tab - 1, 0); + return accept; + } + if (event.text == Key.DownArrow) { + self.focused-tab = Math.min(self.focused-tab + 1, root.model.length - 1); + return accept; + } + return reject; + } + key-released(event) => { + if (event.text == " ") { + root.current-item = root.current-focused; + return accept; + } + return reject; + } + property focused-tab: 0; + x: 0; + width: 0; + // Do not react on clicks + } + } + + VerticalLayout { + padding-top: StyleMetrics.layout-padding; + padding-bottom: StyleMetrics.layout-padding; + spacing: StyleMetrics.layout-spacing; + alignment: start; + label := Text { + font-size: 16px; + horizontal-alignment: center; + } + + navigation := VerticalLayout { + alignment: start; + vertical-stretch: 0; + for item [index] in root.model: SideBarItem { + clicked => { + root.current-item = index; + } + has-focus: index == root.current-focused; + text: item; + selected: index == root.current-item; + } + } + + VerticalLayout { + bottom := VerticalLayout { + padding-left: StyleMetrics.layout-padding; + padding-right: StyleMetrics.layout-padding; + @children + } + } + } +} diff --git a/rog-dbus/src/zbus_anime.rs b/rog-dbus/src/zbus_anime.rs index b95b8d53..da91971f 100644 --- a/rog-dbus/src/zbus_anime.rs +++ b/rog-dbus/src/zbus_anime.rs @@ -1,8 +1,8 @@ use rog_anime::usb::Brightness; use rog_anime::{Animations, AnimeDataBuffer, DeviceState as AnimeDeviceState}; -use zbus::dbus_proxy; +use zbus::proxy; -#[dbus_proxy( +#[proxy( interface = "org.asuslinux.Daemon", default_service = "org.asuslinux.Daemon", default_path = "/org/asuslinux/Anime" @@ -18,48 +18,48 @@ trait Anime { fn write(&self, input: AnimeDataBuffer) -> zbus::Result<()>; /// NotifyDeviceState signal - #[dbus_proxy(signal)] + #[zbus(signal)] fn notify_device_state(&self, data: AnimeDeviceState) -> zbus::Result<()>; /// Brightness property - #[dbus_proxy(property)] + #[zbus(property)] fn brightness(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_brightness(&self, value: Brightness) -> zbus::Result<()>; /// BuiltinAnimations property - #[dbus_proxy(property)] + #[zbus(property)] fn builtin_animations(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_builtin_animations(&self, value: Animations) -> zbus::Result<()>; /// BuiltinsEnabled property - #[dbus_proxy(property)] + #[zbus(property)] fn builtins_enabled(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_builtins_enabled(&self, value: bool) -> zbus::Result<()>; /// EnableDisplay property - #[dbus_proxy(property)] + #[zbus(property)] fn enable_display(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_enable_display(&self, value: bool) -> zbus::Result<()>; /// OffWhenLidClosed property - #[dbus_proxy(property)] + #[zbus(property)] fn off_when_lid_closed(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_off_when_lid_closed(&self, value: bool) -> zbus::Result<()>; /// OffWhenSuspended property - #[dbus_proxy(property)] + #[zbus(property)] fn off_when_suspended(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_off_when_suspended(&self, value: bool) -> zbus::Result<()>; /// OffWhenUnplugged property - #[dbus_proxy(property)] + #[zbus(property)] fn off_when_unplugged(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_off_when_unplugged(&self, value: bool) -> zbus::Result<()>; } diff --git a/rog-dbus/src/zbus_aura.rs b/rog-dbus/src/zbus_aura.rs index f53b5a5c..7213f42d 100644 --- a/rog-dbus/src/zbus_aura.rs +++ b/rog-dbus/src/zbus_aura.rs @@ -27,11 +27,11 @@ use rog_aura::aura_detection::PowerZones; use rog_aura::usb::{AuraDevice, AuraPowerDev}; use rog_aura::{AuraEffect, AuraModeNum, AuraZone, LedBrightness}; use zbus::blocking::Connection; -use zbus::{dbus_proxy, Result}; +use zbus::{proxy, Result}; const BLOCKING_TIME: u64 = 33; // 100ms = 10 FPS, max 50ms = 20 FPS, 40ms = 25 FPS -#[dbus_proxy( +#[proxy( interface = "org.asuslinux.Daemon", default_service = "org.asuslinux.Daemon", default_path = "/org/asuslinux/Aura" @@ -44,47 +44,47 @@ trait Aura { fn direct_addressing_raw(&self, data: UsbPackets) -> zbus::Result<()>; /// Brightness property - #[dbus_proxy(property)] + #[zbus(property)] fn brightness(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_brightness(&self, value: LedBrightness) -> zbus::Result<()>; /// DeviceType property - #[dbus_proxy(property)] + #[zbus(property)] fn device_type(&self) -> zbus::Result; /// LedMode property - #[dbus_proxy(property)] + #[zbus(property)] fn led_mode(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_led_mode(&self, value: AuraModeNum) -> zbus::Result<()>; /// LedModeData property - #[dbus_proxy(property)] + #[zbus(property)] fn led_mode_data(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_led_mode_data(&self, value: AuraEffect) -> zbus::Result<()>; /// LedPower property - #[dbus_proxy(property)] + #[zbus(property)] fn led_power(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_led_power(&self, value: (AuraPowerDev, bool)) -> zbus::Result<()>; /// SupportedBrightness property - #[dbus_proxy(property)] + #[zbus(property)] fn supported_brightness(&self) -> zbus::Result>; /// SupportedBasicModes property - #[dbus_proxy(property)] + #[zbus(property)] fn supported_basic_modes(&self) -> zbus::Result>; /// SupportedBasicZones property - #[dbus_proxy(property)] + #[zbus(property)] fn supported_basic_zones(&self) -> zbus::Result>; /// SupportedPowerZones property - #[dbus_proxy(property)] + #[zbus(property)] fn supported_power_zones(&self) -> zbus::Result>; } diff --git a/rog-dbus/src/zbus_fan_curves.rs b/rog-dbus/src/zbus_fan_curves.rs index 0ca79e3a..d6837e8a 100644 --- a/rog-dbus/src/zbus_fan_curves.rs +++ b/rog-dbus/src/zbus_fan_curves.rs @@ -23,9 +23,9 @@ use rog_platform::platform::ThrottlePolicy; use rog_profiles::fan_curve_set::CurveData; use rog_profiles::FanCurvePU; -use zbus::dbus_proxy; +use zbus::proxy; -#[dbus_proxy( +#[proxy( interface = "org.asuslinux.Daemon", default_service = "org.asuslinux.Daemon", default_path = "/org/asuslinux/FanCurves" diff --git a/rog-dbus/src/zbus_platform.rs b/rog-dbus/src/zbus_platform.rs index 7c8cd879..ee26e90d 100644 --- a/rog-dbus/src/zbus_platform.rs +++ b/rog-dbus/src/zbus_platform.rs @@ -21,9 +21,9 @@ //! …consequently `zbus-xmlgen` did not generate code for the above interfaces. use rog_platform::platform::{GpuMode, Properties, ThrottlePolicy}; -use zbus::dbus_proxy; +use zbus::proxy; -#[dbus_proxy( +#[proxy( interface = "org.asuslinux.Daemon", default_service = "org.asuslinux.Daemon", default_path = "/org/asuslinux/Platform" @@ -39,88 +39,88 @@ trait Platform { fn supported_properties(&self) -> zbus::Result>; /// ChargeControlEndThreshold property - #[dbus_proxy(property)] + #[zbus(property)] fn charge_control_end_threshold(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_charge_control_end_threshold(&self, value: u8) -> zbus::Result<()>; /// DgpuDisable property - #[dbus_proxy(property)] + #[zbus(property)] fn dgpu_disable(&self) -> zbus::Result; /// EgpuEnable property - #[dbus_proxy(property)] + #[zbus(property)] fn egpu_enable(&self) -> zbus::Result; /// GpuMuxMode property - #[dbus_proxy(property)] + #[zbus(property)] fn gpu_mux_mode(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_gpu_mux_mode(&self, value: GpuMode) -> zbus::Result<()>; /// MiniLedMode property - #[dbus_proxy(property)] + #[zbus(property)] fn mini_led_mode(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_mini_led_mode(&self, value: bool) -> zbus::Result<()>; /// NvDynamicBoost property - #[dbus_proxy(property)] + #[zbus(property)] fn nv_dynamic_boost(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_nv_dynamic_boost(&self, value: u8) -> zbus::Result<()>; /// NvTempTarget property - #[dbus_proxy(property)] + #[zbus(property)] fn nv_temp_target(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_nv_temp_target(&self, value: u8) -> zbus::Result<()>; /// PanelOd property - #[dbus_proxy(property)] + #[zbus(property)] fn panel_od(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_panel_od(&self, value: bool) -> zbus::Result<()>; /// PostAnimationSound property - #[dbus_proxy(property)] + #[zbus(property)] fn post_animation_sound(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_post_animation_sound(&self, value: bool) -> zbus::Result<()>; /// PptApuSppt property - #[dbus_proxy(property)] + #[zbus(property)] fn ppt_apu_sppt(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_ppt_apu_sppt(&self, value: u8) -> zbus::Result<()>; /// PptFppt property - #[dbus_proxy(property)] + #[zbus(property)] fn ppt_fppt(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_ppt_fppt(&self, value: u8) -> zbus::Result<()>; /// PptPl1Spl property - #[dbus_proxy(property)] + #[zbus(property)] fn ppt_pl1_spl(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_ppt_pl1_spl(&self, value: u8) -> zbus::Result<()>; /// PptPl2Sppt property - #[dbus_proxy(property)] + #[zbus(property)] fn ppt_pl2_sppt(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_ppt_pl2_sppt(&self, value: u8) -> zbus::Result<()>; /// PptPlatformSppt property - #[dbus_proxy(property)] + #[zbus(property)] fn ppt_platform_sppt(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_ppt_platform_sppt(&self, value: u8) -> zbus::Result<()>; /// ThrottlePolicy property - #[dbus_proxy(property)] + #[zbus(property)] fn throttle_thermal_policy(&self) -> zbus::Result; - #[dbus_proxy(property)] + #[zbus(property)] fn set_throttle_thermal_policy(&self, value: ThrottlePolicy) -> zbus::Result<()>; }