From 33f29f4796b82c2019062d2e7e80ec549b8b92fb Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 20 Oct 2023 14:21:23 -0600 Subject: [PATCH] Update to vi-editor branch of cosmic-text --- Cargo.lock | 966 ++++++++++++++++++++++++++++++++++++++++++++++++---- Cargo.toml | 11 +- src/main.rs | 64 ++-- 3 files changed, 950 insertions(+), 91 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 793cd12..852ecba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,22 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ab_glyph" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1061f3ff92c2f65800df1f12fc7b4ff44ee14783104187dd04dfee6f11b0fd2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + [[package]] name = "accesskit" version = "0.11.0" @@ -15,6 +31,17 @@ dependencies = [ "accesskit", ] +[[package]] +name = "accesskit_macos" +version = "0.7.0" +source = "git+https://github.com/wash2/accesskit.git?tag=v0.11.0#2dee3df0a525d727df9f54ae71cfe8b47d7c2751" +dependencies = [ + "accesskit", + "accesskit_consumer", + "objc2", + "once_cell", +] + [[package]] name = "accesskit_unix" version = "0.4.0" @@ -30,6 +57,31 @@ dependencies = [ "zbus", ] +[[package]] +name = "accesskit_windows" +version = "0.14.0" +source = "git+https://github.com/wash2/accesskit.git?tag=v0.11.0#2dee3df0a525d727df9f54ae71cfe8b47d7c2751" +dependencies = [ + "accesskit", + "accesskit_consumer", + "arrayvec 0.7.4", + "once_cell", + "paste", + "windows", +] + +[[package]] +name = "accesskit_winit" +version = "0.13.0" +source = "git+https://github.com/wash2/accesskit.git?tag=v0.11.0#2dee3df0a525d727df9f54ae71cfe8b47d7c2751" +dependencies = [ + "accesskit", + "accesskit_macos", + "accesskit_unix", + "accesskit_windows", + "winit 0.27.2", +] + [[package]] name = "addr2line" version = "0.21.0" @@ -94,6 +146,30 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3aa2999eb46af81abb65c2d30d446778d7e613b60bbf4e174a027e80f90a3c14" +[[package]] +name = "android-activity" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0" +dependencies = [ + "android-properties", + "bitflags 1.3.2", + "cc", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum 0.6.1", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -124,6 +200,12 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + [[package]] name = "arrayvec" version = "0.7.4" @@ -441,6 +523,25 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-sys" +version = "0.1.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "block2" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +dependencies = [ + "block-sys", + "objc2-encode", +] + [[package]] name = "blocking" version = "1.4.1" @@ -499,6 +600,20 @@ dependencies = [ "system-deps", ] +[[package]] +name = "calloop" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" +dependencies = [ + "bitflags 1.3.2", + "log", + "nix 0.25.1", + "slotmap", + "thiserror", + "vec_map", +] + [[package]] name = "calloop" version = "0.12.3" @@ -519,7 +634,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ - "calloop", + "calloop 0.12.3", "rustix 0.38.20", "wayland-backend 0.3.2", "wayland-client 0.31.1", @@ -531,6 +646,7 @@ version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ + "jobserver", "libc", ] @@ -556,6 +672,56 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "clipboard-win" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +dependencies = [ + "error-code", + "str-buf", + "winapi", +] + +[[package]] +name = "clipboard_macos" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "145a7f9e9b89453bc0a5e32d166456405d389cea5b578f57f1274b1397588a95" +dependencies = [ + "objc", + "objc-foundation", + "objc_id", +] + +[[package]] +name = "clipboard_wayland" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f6364a9f7a66f2ac1a1a098aa1c7f6b686f2496c6ac5e5c0d773445df912747" +dependencies = [ + "smithay-clipboard", +] + +[[package]] +name = "clipboard_x11" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "983a7010836ecd04dde2c6d27a0cb56ec5d21572177e782bdcb24a600124e921" +dependencies = [ + "thiserror", + "x11rb 0.9.0", +] + +[[package]] +name = "cmake" +version = "0.1.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +dependencies = [ + "cc", +] + [[package]] name = "cocoa" version = "0.24.1" @@ -567,7 +733,7 @@ dependencies = [ "cocoa-foundation", "core-foundation", "core-graphics", - "foreign-types", + "foreign-types 0.3.2", "libc", "objc", ] @@ -642,7 +808,7 @@ dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types", + "foreign-types 0.3.2", "libc", ] @@ -657,10 +823,22 @@ dependencies = [ "libc", ] +[[package]] +name = "core-text" +version = "19.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" +dependencies = [ + "core-foundation", + "core-graphics", + "foreign-types 0.3.2", + "libc", +] + [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -674,7 +852,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "quote", "syn 1.0.109", @@ -703,7 +881,7 @@ dependencies = [ [[package]] name = "cosmic-text" version = "0.10.0" -source = "git+https://github.com/pop-os/cosmic-text#163d8ef26e0eb1049f13e211071f7da5775cba1f" +source = "git+https://github.com/pop-os/cosmic-text?branch=vi-editor#c1e40363ab576c90edb7b78f1f257b3845558b1a" dependencies = [ "fontdb 0.15.0", "libm", @@ -737,7 +915,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "almost", "cosmic-config", @@ -750,9 +928,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4" dependencies = [ "libc", ] @@ -809,6 +987,29 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossfont" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" +dependencies = [ + "cocoa", + "core-foundation", + "core-foundation-sys", + "core-graphics", + "core-text", + "dwrote", + "foreign-types 0.5.0", + "freetype-rs", + "libc", + "log", + "objc", + "once_cell", + "pkg-config", + "servo-fontconfig", + "winapi", +] + [[package]] name = "crunchy" version = "0.2.2" @@ -841,6 +1042,12 @@ dependencies = [ "serde", ] +[[package]] +name = "cty" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" + [[package]] name = "cursor-icon" version = "1.0.0" @@ -858,14 +1065,38 @@ dependencies = [ "winapi", ] +[[package]] +name = "darling" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +dependencies = [ + "darling_core 0.13.4", + "darling_macro 0.13.4", +] + [[package]] name = "darling" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.20.3", + "darling_macro 0.20.3", +] + +[[package]] +name = "darling_core" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", ] [[package]] @@ -882,13 +1113,24 @@ dependencies = [ "syn 2.0.38", ] +[[package]] +name = "darling_macro" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +dependencies = [ + "darling_core 0.13.4", + "quote", + "syn 1.0.109", +] + [[package]] name = "darling_macro" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core", + "darling_core 0.20.3", "quote", "syn 2.0.38", ] @@ -925,7 +1167,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e8ef033054e131169b8f0f9a7af8f5533a9436fadf3c500ed547f730f07090d" dependencies = [ - "darling", + "darling 0.20.3", "proc-macro2", "quote", "syn 2.0.38", @@ -1009,6 +1251,20 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +[[package]] +name = "dwrote" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" +dependencies = [ + "lazy_static", + "libc", + "serde", + "serde_derive", + "winapi", + "wio", +] + [[package]] name = "either" version = "1.9.0" @@ -1076,6 +1332,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "error-code" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" +dependencies = [ + "libc", + "str-buf", +] + [[package]] name = "etagere" version = "0.2.8" @@ -1112,6 +1378,16 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "expat-sys" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" +dependencies = [ + "cmake", + "pkg-config", +] + [[package]] name = "exr" version = "1.6.4" @@ -1260,7 +1536,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] @@ -1269,6 +1566,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.0" @@ -1301,6 +1604,28 @@ dependencies = [ "xdg", ] +[[package]] +name = "freetype-rs" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" +dependencies = [ + "bitflags 1.3.2", + "freetype-sys", + "libc", +] + +[[package]] +name = "freetype-sys" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" +dependencies = [ + "cmake", + "libc", + "pkg-config", +] + [[package]] name = "fsevent-sys" version = "4.1.0" @@ -1598,7 +1923,7 @@ checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ "bitflags 2.4.1", "gpu-descriptor-types", - "hashbrown 0.14.1", + "hashbrown 0.14.2", ] [[package]] @@ -1665,9 +1990,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" dependencies = [ "ahash 0.8.3", "allocator-api2", @@ -1721,7 +2046,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iced" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "iced_accessibility", "iced_core", @@ -1729,6 +2054,7 @@ dependencies = [ "iced_renderer", "iced_sctk", "iced_widget", + "iced_winit", "image", "thiserror", ] @@ -1736,16 +2062,17 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "accesskit", "accesskit_unix", + "accesskit_winit", ] [[package]] name = "iced_core" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "bitflags 1.3.2", "iced_accessibility", @@ -1760,7 +2087,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "futures", "iced_core", @@ -1772,7 +2099,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -1783,27 +2110,27 @@ dependencies = [ "kamadak-exif", "log", "lyon_path", - "raw-window-handle", + "raw-window-handle 0.5.2", "thiserror", ] [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "iced_graphics", "iced_tiny_skia", "iced_wgpu", "log", - "raw-window-handle", + "raw-window-handle 0.5.2", "thiserror", ] [[package]] name = "iced_runtime" version = "0.1.1" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "iced_accessibility", "iced_core", @@ -1815,7 +2142,7 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "enum-repr", "float-cmp", @@ -1826,7 +2153,7 @@ dependencies = [ "iced_style", "itertools", "lazy_static", - "raw-window-handle", + "raw-window-handle 0.5.2", "smithay-client-toolkit 0.17.0", "smithay-clipboard", "thiserror", @@ -1839,7 +2166,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "iced_core", "once_cell", @@ -1849,25 +2176,25 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "bytemuck", "cosmic-text 0.9.0", "iced_graphics", "kurbo", "log", - "raw-window-handle", + "raw-window-handle 0.5.2", "resvg", "rustc-hash", "softbuffer", - "tiny-skia", + "tiny-skia 0.10.0", "twox-hash", ] [[package]] name = "iced_wgpu" version = "0.11.1" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -1879,7 +2206,7 @@ dependencies = [ "log", "lyon", "once_cell", - "raw-window-handle", + "raw-window-handle 0.5.2", "resvg", "rustc-hash", "twox-hash", @@ -1889,7 +2216,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "iced_renderer", "iced_runtime", @@ -1901,6 +2228,23 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "iced_winit" +version = "0.10.0" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" +dependencies = [ + "iced_graphics", + "iced_runtime", + "iced_style", + "log", + "raw-window-handle 0.5.2", + "thiserror", + "web-sys", + "winapi", + "window_clipboard", + "winit 0.28.6", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1959,7 +2303,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.1", + "hashbrown 0.14.2", ] [[package]] @@ -1989,6 +2333,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -2028,6 +2375,21 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + [[package]] name = "jpeg-decoder" version = "0.3.0" @@ -2092,7 +2454,7 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", ] [[package]] @@ -2116,7 +2478,7 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#a2bda491520093c3343018204bfc8c4169b5e3b9" dependencies = [ "apply", "ashpd", @@ -2135,6 +2497,7 @@ dependencies = [ "iced_style", "iced_tiny_skia", "iced_widget", + "iced_winit", "lazy_static", "palette", "slotmap", @@ -2221,7 +2584,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" dependencies = [ - "hashbrown 0.14.1", + "hashbrown 0.14.2", ] [[package]] @@ -2250,7 +2613,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74df1ff0a0147282eb10699537a03baa7d31972b58984a1d44ce0624043fe8ad" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "euclid", "num-traits", ] @@ -2363,7 +2726,7 @@ dependencies = [ "bitflags 1.3.2", "block", "core-graphics-types", - "foreign-types", + "foreign-types 0.3.2", "log", "objc", ] @@ -2431,6 +2794,77 @@ dependencies = [ "getrandom", ] +[[package]] +name = "ndk" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +dependencies = [ + "bitflags 1.3.2", + "jni-sys", + "ndk-sys", + "num_enum 0.5.11", + "raw-window-handle 0.5.2", + "thiserror", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-glue" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" +dependencies = [ + "libc", + "log", + "ndk", + "ndk-context", + "ndk-macro", + "ndk-sys", + "once_cell", + "parking_lot 0.12.1", +] + +[[package]] +name = "ndk-macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" +dependencies = [ + "darling 0.13.4", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ndk-sys" +version = "0.4.1+23.1.7779620" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "nix" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" +dependencies = [ + "bitflags 1.3.2", + "cc", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + [[package]] name = "nix" version = "0.24.3" @@ -2585,6 +3019,48 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +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", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +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-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "objc" version = "0.2.7" @@ -2606,6 +3082,32 @@ dependencies = [ "objc_id", ] +[[package]] +name = "objc-sys" +version = "0.2.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" + +[[package]] +name = "objc2" +version = "0.3.0-beta.3.patch-leaks.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" +dependencies = [ + "block2", + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "2.0.0-pre.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +dependencies = [ + "objc-sys", +] + [[package]] name = "objc_exception" version = "0.1.2" @@ -2667,6 +3169,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "orbclient" +version = "0.3.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8378ac0dfbd4e7895f2d2c1f1345cab3836910baf3a300b000d04250f0c8428f" +dependencies = [ + "redox_syscall 0.3.5", +] + [[package]] name = "ordered-multimap" version = "0.4.3" @@ -2711,6 +3222,15 @@ dependencies = [ "syn 2.0.38", ] +[[package]] +name = "owned_ttf_parser" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "706de7e2214113d63a8238d1910463cfce781129a6f263d13fdb09ff64355ba4" +dependencies = [ + "ttf-parser 0.19.2", +] + [[package]] name = "palette" version = "0.7.3" @@ -2801,6 +3321,12 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + [[package]] name = "percent-encoding" version = "2.3.0" @@ -3109,6 +3635,15 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "977b1e897f9d764566891689e642653e5ed90c6895106acd005eb4c1d0203991" +[[package]] +name = "raw-window-handle" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" +dependencies = [ + "cty", +] + [[package]] name = "raw-window-handle" version = "0.5.2" @@ -3233,15 +3768,15 @@ dependencies = [ "png", "rgb", "svgtypes", - "tiny-skia", + "tiny-skia 0.10.0", "usvg", ] [[package]] name = "rfd" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241a0deb168c88050d872294f7b3106c1dfa8740942bcc97bc91b98e97b5c501" +checksum = "3c9e7b57df6e8472152674607f6cc68aa14a748a3157a857a94f516e11aeacc2" dependencies = [ "block", "dispatch", @@ -3253,7 +3788,7 @@ dependencies = [ "objc", "objc-foundation", "objc_id", - "raw-window-handle", + "raw-window-handle 0.5.2", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3395,6 +3930,15 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +[[package]] +name = "safe_arch" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" +dependencies = [ + "bytemuck", +] + [[package]] name = "safemem" version = "0.3.3" @@ -3422,6 +3966,31 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sctk-adwaita" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" +dependencies = [ + "crossfont", + "log", + "smithay-client-toolkit 0.16.1", + "tiny-skia 0.7.0", +] + +[[package]] +name = "sctk-adwaita" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" +dependencies = [ + "ab_glyph", + "log", + "memmap2 0.5.10", + "smithay-client-toolkit 0.16.1", + "tiny-skia 0.8.4", +] + [[package]] name = "self_cell" version = "1.0.1" @@ -3479,6 +4048,27 @@ dependencies = [ "serde", ] +[[package]] +name = "servo-fontconfig" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" +dependencies = [ + "libc", + "servo-fontconfig-sys", +] + +[[package]] +name = "servo-fontconfig-sys" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" +dependencies = [ + "expat-sys", + "freetype-sys", + "pkg-config", +] + [[package]] name = "sha1" version = "0.10.6" @@ -3551,6 +4141,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" dependencies = [ "bitflags 1.3.2", + "calloop 0.10.6", "dlib", "lazy_static", "log", @@ -3569,7 +4160,7 @@ source = "git+https://github.com/smithay/client-toolkit?rev=dc8c4a0#dc8c4a035128 dependencies = [ "bitflags 2.4.1", "bytemuck", - "calloop", + "calloop 0.12.3", "calloop-wayland-source", "cursor-icon", "dlib", @@ -3601,9 +4192,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -3619,11 +4210,11 @@ dependencies = [ "cocoa", "core-graphics", "fastrand 1.9.0", - "foreign-types", + "foreign-types 0.3.2", "log", "nix 0.26.4", "objc", - "raw-window-handle", + "raw-window-handle 0.5.2", "redox_syscall 0.3.5", "thiserror", "wasm-bindgen", @@ -3633,7 +4224,7 @@ dependencies = [ "web-sys", "windows-sys 0.42.0", "x11-dl", - "x11rb", + "x11rb 0.11.1", ] [[package]] @@ -3661,6 +4252,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "str-buf" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" + [[package]] name = "strict-num" version = "0.1.1" @@ -3772,7 +4369,7 @@ name = "taffy" version = "0.3.11" source = "git+https://github.com/DioxusLabs/taffy#23ff477566b0239f04d3b89a2b3a4da2495e9577" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "grid", "num-traits", "slotmap", @@ -3780,9 +4377,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tempfile" @@ -3808,18 +4405,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.49" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.49" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", @@ -3866,6 +4463,35 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-skia" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "bytemuck", + "cfg-if", + "png", + "safe_arch", + "tiny-skia-path 0.7.0", +] + +[[package]] +name = "tiny-skia" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "bytemuck", + "cfg-if", + "png", + "tiny-skia-path 0.8.4", +] + [[package]] name = "tiny-skia" version = "0.10.0" @@ -3873,12 +4499,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7db11798945fa5c3e5490c794ccca7c6de86d3afdd54b4eb324109939c6f37bc" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.7.4", "bytemuck", "cfg-if", "log", "png", - "tiny-skia-path", + "tiny-skia-path 0.10.0", +] + +[[package]] +name = "tiny-skia-path" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" +dependencies = [ + "arrayref", + "bytemuck", +] + +[[package]] +name = "tiny-skia-path" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", ] [[package]] @@ -4179,9 +4826,15 @@ dependencies = [ "rctree", "strict-num", "svgtypes", - "tiny-skia-path", + "tiny-skia-path 0.10.0", ] +[[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" @@ -4549,14 +5202,14 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "480c965c9306872eb6255fa55e4b4953be55a8b64d57e61d7ff840d3dcc051cd" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "cfg-if", "js-sys", "log", "naga", "parking_lot 0.12.1", "profiling", - "raw-window-handle", + "raw-window-handle 0.5.2", "smallvec", "static_assertions", "wasm-bindgen", @@ -4573,7 +5226,7 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "bit-vec", "bitflags 2.4.1", "codespan-reporting", @@ -4581,7 +5234,7 @@ dependencies = [ "naga", "parking_lot 0.12.1", "profiling", - "raw-window-handle", + "raw-window-handle 0.5.2", "rustc-hash", "smallvec", "thiserror", @@ -4597,14 +5250,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ecb3258078e936deee14fd4e0febe1cfe9bbb5ffef165cb60218d2ee5eb4448" dependencies = [ "android_system_properties", - "arrayvec", + "arrayvec 0.7.4", "ash", "bit-set", "bitflags 2.4.1", "block", "core-graphics-types", "d3d12", - "foreign-types", + "foreign-types 0.3.2", "glow", "gpu-alloc", "gpu-allocator", @@ -4621,7 +5274,7 @@ dependencies = [ "parking_lot 0.12.1", "profiling", "range-alloc", - "raw-window-handle", + "raw-window-handle 0.5.2", "renderdoc-sys", "rustc-hash", "smallvec", @@ -4689,15 +5342,66 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "window_clipboard" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63287c9c4396ccf5346d035a9b0fcaead9e18377637f5eaa78b7ac65c873ff7d" +dependencies = [ + "clipboard-win", + "clipboard_macos", + "clipboard_wayland", + "clipboard_x11", + "raw-window-handle 0.5.2", + "thiserror", +] + [[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-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", +] + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", +] + [[package]] name = "windows-sys" version = "0.42.0" @@ -4713,6 +5417,15 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -4764,6 +5477,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -4776,6 +5495,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -4788,6 +5513,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -4800,6 +5531,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -4824,6 +5561,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -4836,6 +5579,72 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "winit" +version = "0.27.2" +source = "git+https://github.com/pop-os/winit.git?branch=iced#d35712bba65eb1dad8f6f546af49b96fdad9467e" +dependencies = [ + "bitflags 1.3.2", + "cocoa", + "core-foundation", + "core-graphics", + "dispatch", + "instant", + "libc", + "log", + "mio", + "ndk", + "ndk-glue", + "objc", + "once_cell", + "parking_lot 0.12.1", + "percent-encoding", + "raw-window-handle 0.4.3", + "raw-window-handle 0.5.2", + "sctk-adwaita 0.4.3", + "smithay-client-toolkit 0.16.1", + "wasm-bindgen", + "wayland-client 0.29.5", + "wayland-protocols 0.29.5", + "web-sys", + "windows-sys 0.36.1", + "x11-dl", +] + +[[package]] +name = "winit" +version = "0.28.6" +source = "git+https://github.com/pop-os/winit.git?branch=master#c52db2045d0a2f1b8d9923870de1d4ab1994146e" +dependencies = [ + "android-activity", + "bitflags 1.3.2", + "cfg_aliases", + "core-foundation", + "core-graphics", + "dispatch", + "instant", + "libc", + "log", + "mio", + "ndk", + "objc2", + "once_cell", + "orbclient", + "percent-encoding", + "raw-window-handle 0.5.2", + "redox_syscall 0.3.5", + "sctk-adwaita 0.5.4", + "smithay-client-toolkit 0.16.1", + "wasm-bindgen", + "wayland-client 0.29.5", + "wayland-commons", + "wayland-protocols 0.29.5", + "wayland-scanner 0.29.5", + "web-sys", + "windows-sys 0.45.0", + "x11-dl", +] + [[package]] name = "winnow" version = "0.5.17" @@ -4845,6 +5654,15 @@ 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-dl" version = "2.21.0" @@ -4856,6 +5674,18 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "x11rb" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e99be55648b3ae2a52342f9a870c0e138709a3493261ce9b469afe6e4df6d8a" +dependencies = [ + "gethostname", + "nix 0.22.3", + "winapi", + "winapi-wsapoll", +] + [[package]] name = "x11rb" version = "0.11.1" diff --git a/Cargo.toml b/Cargo.toml index 98d2f78..0f85624 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,12 +14,15 @@ rfd = "0.12.0" [dependencies.cosmic-text] git = "https://github.com/pop-os/cosmic-text" -features = ["syntect"] +branch = "vi-editor" +features = ["syntect", "vi"] +#path = "../cosmic-text" [dependencies.libcosmic] git = "https://github.com/pop-os/libcosmic" -features = ["wayland"] +default-features = false [features] -default = [] -vi = ["cosmic-text/vi"] +default = ["wayland"] +wayland = ["libcosmic/wayland"] +winit = ["libcosmic/winit"] diff --git a/src/main.rs b/src/main.rs index 63f5fc4..dc1c54a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,10 +7,12 @@ use cosmic::{ widget::{column, row, text}, Alignment, Length, Limits, }, - widget::{icon, segmented_button, view_switcher}, + widget::{self, icon, segmented_button, view_switcher}, ApplicationExt, Element, }; -use cosmic_text::{Attrs, Buffer, Edit, FontSystem, Metrics, SyntaxEditor, SyntaxSystem}; +use cosmic_text::{ + Attrs, Buffer, Edit, FontSystem, Metrics, SyntaxEditor, SyntaxSystem, ViEditor, ViMode, +}; use std::{env, fs, path::PathBuf, sync::Mutex}; use self::menu_list::MenuList; @@ -36,8 +38,7 @@ static FONT_SIZES: &'static [Metrics] = &[ fn main() -> Result<(), Box> { env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init(); - let settings = Settings::default() - .size_limits(Limits::NONE.min_width(400.0).min_height(200.0)); + let settings = Settings::default().size_limits(Limits::NONE.min_width(400.0).min_height(200.0)); let flags = (); cosmic::app::run::(settings, flags)?; @@ -47,10 +48,7 @@ fn main() -> Result<(), Box> { pub struct Tab { path_opt: Option, attrs: Attrs<'static>, - #[cfg(not(feature = "vi"))] - editor: Mutex>, - #[cfg(feature = "vi")] - editor: Mutex>, + editor: Mutex>, } impl Tab { @@ -64,8 +62,8 @@ impl Tab { ) .unwrap(); - #[cfg(feature = "vi")] - let editor = cosmic_text::ViEditor::new(editor); + let mut editor = ViEditor::new(editor); + editor.set_passthrough(false); Self { path_opt: None, @@ -297,21 +295,49 @@ impl cosmic::Application for App { .padding(4) .spacing(16); - let tab_bar = view_switcher::horizontal(&self.tab_model) - .on_activate(Message::TabActivate) - .on_close(Message::TabClose) - .width(Length::Shrink); + let mut tab_column = widget::column::with_capacity(3).padding([0, 16]); - let active_tab: Element<_> = match self.active_tab() { - Some(tab) => text_box(&tab.editor).padding(8).into(), + tab_column = tab_column.push( + view_switcher::horizontal(&self.tab_model) + .on_activate(Message::TabActivate) + .on_close(Message::TabClose) + .width(Length::Shrink), + ); + + match self.active_tab() { + Some(tab) => { + tab_column = tab_column.push(text_box(&tab.editor).padding(8)); + let status = match tab.editor.lock().unwrap().mode() { + ViMode::Passthrough => { + //TODO: status line + String::new() + } + ViMode::Normal => { + //TODO: status line + String::new() + } + ViMode::Insert => { + format!("-- INSERT --") + } + ViMode::Command { value } => { + format!(":{value}|") + } + ViMode::Search { value, forwards } => { + if *forwards { + format!("/{value}|") + } else { + format!("?{value}|") + } + } + }; + tab_column = tab_column.push(text(status).font(cosmic::font::Font::MONOSPACE)); + } None => { log::warn!("TODO: No tab open"); - text("no tab active").into() } }; - let content: Element<_> = - column![menu_bar, column![tab_bar, active_tab,].padding([0, 16])].into(); + let content: Element<_> = column![menu_bar, tab_column].into(); // Uncomment to debug layout: //content.explain(Color::WHITE)