feat: stubbing widget creation logic for easier migration
This commit is contained in:
524
Cargo.lock
generated
524
Cargo.lock
generated
@@ -170,20 +170,6 @@ version = "1.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3"
|
||||
|
||||
[[package]]
|
||||
name = "cairo-rs"
|
||||
version = "0.18.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"
|
||||
dependencies = [
|
||||
"bitflags 2.9.4",
|
||||
"cairo-sys-rs 0.18.2",
|
||||
"glib 0.18.5",
|
||||
"libc",
|
||||
"once_cell",
|
||||
"thiserror 1.0.64",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cairo-rs"
|
||||
version = "0.21.2"
|
||||
@@ -191,41 +177,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dfe4354df4da648870e363387679081f8f9fc538ec8b55901e3740c6a0ef81b1"
|
||||
dependencies = [
|
||||
"bitflags 2.9.4",
|
||||
"cairo-sys-rs 0.21.2",
|
||||
"glib 0.21.3",
|
||||
"cairo-sys-rs",
|
||||
"glib",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cairo-sys-rs"
|
||||
version = "0.18.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51"
|
||||
dependencies = [
|
||||
"glib-sys 0.18.1",
|
||||
"libc",
|
||||
"system-deps 6.2.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cairo-sys-rs"
|
||||
version = "0.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47d6c3300c7103eb8e4de07591003511aa25664438f8c6fc317a3a9902c103f8"
|
||||
dependencies = [
|
||||
"glib-sys 0.21.2",
|
||||
"glib-sys",
|
||||
"libc",
|
||||
"system-deps 7.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-expr"
|
||||
version = "0.15.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
|
||||
dependencies = [
|
||||
"smallvec",
|
||||
"target-lexicon",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -287,10 +252,10 @@ version = "4.5.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -402,7 +367,7 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -413,7 +378,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
|
||||
dependencies = [
|
||||
"darling_core",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -434,7 +399,7 @@ dependencies = [
|
||||
"darling",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -444,7 +409,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"
|
||||
dependencies = [
|
||||
"derive_builder_core",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -464,7 +429,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
@@ -531,7 +496,7 @@ dependencies = [
|
||||
"derive_more",
|
||||
"extend",
|
||||
"futures",
|
||||
"gdkx11",
|
||||
"gdk4-x11",
|
||||
"grass",
|
||||
"gtk4",
|
||||
"gtk4-layer-shell",
|
||||
@@ -566,7 +531,7 @@ checksum = "311a6d2f1f9d60bff73d2c78a0af97ed27f79672f15c238192a5bbb64db56d00"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -662,7 +627,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -695,87 +660,29 @@ dependencies = [
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gdk"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646"
|
||||
dependencies = [
|
||||
"cairo-rs 0.18.5",
|
||||
"gdk-pixbuf 0.18.5",
|
||||
"gdk-sys",
|
||||
"gio 0.18.4",
|
||||
"glib 0.18.5",
|
||||
"libc",
|
||||
"pango 0.18.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gdk-pixbuf"
|
||||
version = "0.18.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec"
|
||||
dependencies = [
|
||||
"gdk-pixbuf-sys 0.18.0",
|
||||
"gio 0.18.4",
|
||||
"glib 0.18.5",
|
||||
"libc",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gdk-pixbuf"
|
||||
version = "0.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a3c64459f569154f37616fc28923bfac490d4aaa134aaf5eca58a2c0c13050f"
|
||||
dependencies = [
|
||||
"gdk-pixbuf-sys 0.21.2",
|
||||
"gio 0.21.2",
|
||||
"glib 0.21.3",
|
||||
"gdk-pixbuf-sys",
|
||||
"gio",
|
||||
"glib",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gdk-pixbuf-sys"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7"
|
||||
dependencies = [
|
||||
"gio-sys 0.18.1",
|
||||
"glib-sys 0.18.1",
|
||||
"gobject-sys 0.18.0",
|
||||
"libc",
|
||||
"system-deps 6.2.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gdk-pixbuf-sys"
|
||||
version = "0.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3854ef7a6a8b8f3b4013a01d5f9cb0d1794ec4e810c6cb4e2cc6d980f1baf724"
|
||||
dependencies = [
|
||||
"gio-sys 0.21.2",
|
||||
"glib-sys 0.21.2",
|
||||
"gobject-sys 0.21.2",
|
||||
"gio-sys",
|
||||
"glib-sys",
|
||||
"gobject-sys",
|
||||
"libc",
|
||||
"system-deps 7.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gdk-sys"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2"
|
||||
dependencies = [
|
||||
"cairo-sys-rs 0.18.2",
|
||||
"gdk-pixbuf-sys 0.18.0",
|
||||
"gio-sys 0.18.1",
|
||||
"glib-sys 0.18.1",
|
||||
"gobject-sys 0.18.0",
|
||||
"libc",
|
||||
"pango-sys 0.18.0",
|
||||
"pkg-config",
|
||||
"system-deps 6.2.2",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -784,14 +691,14 @@ version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7e292649dc26e3440c508a00f42ab39156008320dd6e962d63eaf626ba4d7f0"
|
||||
dependencies = [
|
||||
"cairo-rs 0.21.2",
|
||||
"gdk-pixbuf 0.21.2",
|
||||
"cairo-rs",
|
||||
"gdk-pixbuf",
|
||||
"gdk4-sys",
|
||||
"gio 0.21.2",
|
||||
"gio",
|
||||
"gl",
|
||||
"glib 0.21.3",
|
||||
"glib",
|
||||
"libc",
|
||||
"pango 0.21.3",
|
||||
"pango",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -800,42 +707,40 @@ version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4f3174fa4f1e0bf2a7e04469b65db8f4d1db89a6f5cdc57727b14e97ce438cf"
|
||||
dependencies = [
|
||||
"cairo-sys-rs 0.21.2",
|
||||
"gdk-pixbuf-sys 0.21.2",
|
||||
"gio-sys 0.21.2",
|
||||
"glib-sys 0.21.2",
|
||||
"gobject-sys 0.21.2",
|
||||
"cairo-sys-rs",
|
||||
"gdk-pixbuf-sys",
|
||||
"gio-sys",
|
||||
"glib-sys",
|
||||
"gobject-sys",
|
||||
"libc",
|
||||
"pango-sys 0.21.2",
|
||||
"pango-sys",
|
||||
"pkg-config",
|
||||
"system-deps 7.0.3",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gdkx11"
|
||||
version = "0.18.0"
|
||||
name = "gdk4-x11"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce"
|
||||
checksum = "b8c1726186e4737a488ed2e431cce499af613edbf2332ede11cff6a98e3c7131"
|
||||
dependencies = [
|
||||
"gdk",
|
||||
"gdkx11-sys",
|
||||
"gio 0.18.4",
|
||||
"glib 0.18.5",
|
||||
"gdk4",
|
||||
"gdk4-x11-sys",
|
||||
"gio",
|
||||
"glib",
|
||||
"libc",
|
||||
"x11",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gdkx11-sys"
|
||||
version = "0.18.0"
|
||||
name = "gdk4-x11-sys"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043"
|
||||
checksum = "18801bb9230acdaa7d0aeaf39bc55a8f21eb5526a0a193a8e6de2c54075ad4f2"
|
||||
dependencies = [
|
||||
"gdk-sys",
|
||||
"glib-sys 0.18.1",
|
||||
"gdk4-sys",
|
||||
"glib-sys",
|
||||
"libc",
|
||||
"system-deps 6.2.2",
|
||||
"x11",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -898,25 +803,6 @@ version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64"
|
||||
|
||||
[[package]]
|
||||
name = "gio"
|
||||
version = "0.18.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"futures-util",
|
||||
"gio-sys 0.18.1",
|
||||
"glib 0.18.5",
|
||||
"libc",
|
||||
"once_cell",
|
||||
"pin-project-lite",
|
||||
"smallvec",
|
||||
"thiserror 1.0.64",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gio"
|
||||
version = "0.21.2"
|
||||
@@ -927,36 +813,23 @@ dependencies = [
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"futures-util",
|
||||
"gio-sys 0.21.2",
|
||||
"glib 0.21.3",
|
||||
"gio-sys",
|
||||
"glib",
|
||||
"libc",
|
||||
"pin-project-lite",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gio-sys"
|
||||
version = "0.18.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2"
|
||||
dependencies = [
|
||||
"glib-sys 0.18.1",
|
||||
"gobject-sys 0.18.0",
|
||||
"libc",
|
||||
"system-deps 6.2.2",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gio-sys"
|
||||
version = "0.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "171ed2f6dd927abbe108cfd9eebff2052c335013f5879d55bab0dc1dee19b706"
|
||||
dependencies = [
|
||||
"glib-sys 0.21.2",
|
||||
"gobject-sys 0.21.2",
|
||||
"glib-sys",
|
||||
"gobject-sys",
|
||||
"libc",
|
||||
"system-deps 7.0.3",
|
||||
"system-deps",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
@@ -980,29 +853,6 @@ dependencies = [
|
||||
"xml-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glib"
|
||||
version = "0.18.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"
|
||||
dependencies = [
|
||||
"bitflags 2.9.4",
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"futures-executor",
|
||||
"futures-task",
|
||||
"futures-util",
|
||||
"gio-sys 0.18.1",
|
||||
"glib-macros 0.18.5",
|
||||
"glib-sys 0.18.1",
|
||||
"gobject-sys 0.18.0",
|
||||
"libc",
|
||||
"memchr",
|
||||
"once_cell",
|
||||
"smallvec",
|
||||
"thiserror 1.0.64",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glib"
|
||||
version = "0.21.3"
|
||||
@@ -1015,50 +865,26 @@ dependencies = [
|
||||
"futures-executor",
|
||||
"futures-task",
|
||||
"futures-util",
|
||||
"gio-sys 0.21.2",
|
||||
"glib-macros 0.21.2",
|
||||
"glib-sys 0.21.2",
|
||||
"gobject-sys 0.21.2",
|
||||
"gio-sys",
|
||||
"glib-macros",
|
||||
"glib-sys",
|
||||
"gobject-sys",
|
||||
"libc",
|
||||
"memchr",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glib-macros"
|
||||
version = "0.18.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"
|
||||
dependencies = [
|
||||
"heck 0.4.1",
|
||||
"proc-macro-crate 2.0.0",
|
||||
"proc-macro-error",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glib-macros"
|
||||
version = "0.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "55eda916eecdae426d78d274a17b48137acdca6fba89621bd3705f2835bc719f"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"proc-macro-crate 3.4.0",
|
||||
"heck",
|
||||
"proc-macro-crate",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glib-sys"
|
||||
version = "0.18.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"system-deps 6.2.2",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1068,18 +894,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d09d3d0fddf7239521674e57b0465dfbd844632fec54f059f7f56112e3f927e1"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"system-deps 7.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gobject-sys"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44"
|
||||
dependencies = [
|
||||
"glib-sys 0.18.1",
|
||||
"libc",
|
||||
"system-deps 6.2.2",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1088,9 +903,9 @@ version = "0.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "538e41d8776173ec107e7b0f2aceced60abc368d7e1d81c1f0e2ecd35f59080d"
|
||||
dependencies = [
|
||||
"glib-sys 0.21.2",
|
||||
"glib-sys",
|
||||
"libc",
|
||||
"system-deps 7.0.3",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1099,7 +914,7 @@ version = "0.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7749aaf5d3b955bf3bfce39e3423705878a666b561384134da0e7786a45ddc3"
|
||||
dependencies = [
|
||||
"glib 0.21.3",
|
||||
"glib",
|
||||
"graphene-sys",
|
||||
"libc",
|
||||
]
|
||||
@@ -1110,10 +925,10 @@ version = "0.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "250abaee850a90a276509890a78029c356173f9573412bded5f155b0e41fa568"
|
||||
dependencies = [
|
||||
"glib-sys 0.21.2",
|
||||
"glib-sys",
|
||||
"libc",
|
||||
"pkg-config",
|
||||
"system-deps 7.0.3",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1147,13 +962,13 @@ version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b6687e9f92ca89c000c376400cfaf7914d099413d72fdf4f84a25775a0b1fb2d"
|
||||
dependencies = [
|
||||
"cairo-rs 0.21.2",
|
||||
"cairo-rs",
|
||||
"gdk4",
|
||||
"glib 0.21.3",
|
||||
"glib",
|
||||
"graphene-rs",
|
||||
"gsk4-sys",
|
||||
"libc",
|
||||
"pango 0.21.3",
|
||||
"pango",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1162,14 +977,14 @@ version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5e76bcf64d9c4846f19651f45b400cc0c9c4c17b651849da520f3d77c6988c52"
|
||||
dependencies = [
|
||||
"cairo-sys-rs 0.21.2",
|
||||
"cairo-sys-rs",
|
||||
"gdk4-sys",
|
||||
"glib-sys 0.21.2",
|
||||
"gobject-sys 0.21.2",
|
||||
"glib-sys",
|
||||
"gobject-sys",
|
||||
"graphene-sys",
|
||||
"libc",
|
||||
"pango-sys 0.21.2",
|
||||
"system-deps 7.0.3",
|
||||
"pango-sys",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1178,19 +993,19 @@ version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f7887ee0ceeffedb25a418810a2c61497dacad51767fc13f9d60859b4023b8a"
|
||||
dependencies = [
|
||||
"cairo-rs 0.21.2",
|
||||
"cairo-rs",
|
||||
"field-offset",
|
||||
"futures-channel",
|
||||
"gdk-pixbuf 0.21.2",
|
||||
"gdk-pixbuf",
|
||||
"gdk4",
|
||||
"gio 0.21.2",
|
||||
"glib 0.21.3",
|
||||
"gio",
|
||||
"glib",
|
||||
"graphene-rs",
|
||||
"gsk4",
|
||||
"gtk4-macros",
|
||||
"gtk4-sys",
|
||||
"libc",
|
||||
"pango 0.21.3",
|
||||
"pango",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1201,8 +1016,8 @@ checksum = "17d5ba7dda5e307469217249a980136e393d13063d4d97dd34ef30ebe1955dd2"
|
||||
dependencies = [
|
||||
"bitflags 2.9.4",
|
||||
"gdk4",
|
||||
"glib 0.21.3",
|
||||
"glib-sys 0.21.2",
|
||||
"glib",
|
||||
"glib-sys",
|
||||
"gtk4",
|
||||
"gtk4-layer-shell-sys",
|
||||
"libc",
|
||||
@@ -1215,10 +1030,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "89e5228548ca4610a3406ddd97eb1b3ad366de04d02ae6a8fa80eaad85be1931"
|
||||
dependencies = [
|
||||
"gdk4-sys",
|
||||
"glib-sys 0.21.2",
|
||||
"glib-sys",
|
||||
"gtk4-sys",
|
||||
"libc",
|
||||
"system-deps 7.0.3",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1227,10 +1042,10 @@ version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "821160b4f17e7e4ed748818c23682d0a46bed04c287dbaac54dd4869d2c5e06a"
|
||||
dependencies = [
|
||||
"proc-macro-crate 3.4.0",
|
||||
"proc-macro-crate",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1239,17 +1054,17 @@ version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d274cbaf7d9aa55b7aff78cb21b43299d64e514e1300671469b66f691cc5a011"
|
||||
dependencies = [
|
||||
"cairo-sys-rs 0.21.2",
|
||||
"gdk-pixbuf-sys 0.21.2",
|
||||
"cairo-sys-rs",
|
||||
"gdk-pixbuf-sys",
|
||||
"gdk4-sys",
|
||||
"gio-sys 0.21.2",
|
||||
"glib-sys 0.21.2",
|
||||
"gobject-sys 0.21.2",
|
||||
"gio-sys",
|
||||
"glib-sys",
|
||||
"gobject-sys",
|
||||
"graphene-sys",
|
||||
"gsk4-sys",
|
||||
"libc",
|
||||
"pango-sys 0.21.2",
|
||||
"system-deps 7.0.3",
|
||||
"pango-sys",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1284,12 +1099,6 @@ version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.5.0"
|
||||
@@ -1601,41 +1410,16 @@ dependencies = [
|
||||
"portable-atomic",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pango"
|
||||
version = "0.18.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4"
|
||||
dependencies = [
|
||||
"gio 0.18.4",
|
||||
"glib 0.18.5",
|
||||
"libc",
|
||||
"once_cell",
|
||||
"pango-sys 0.18.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pango"
|
||||
version = "0.21.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e37b7a678e18c2e9f2485f7e39b7b2dac99590d5ddef08a7f56eae38a145402e"
|
||||
dependencies = [
|
||||
"gio 0.21.2",
|
||||
"glib 0.21.3",
|
||||
"gio",
|
||||
"glib",
|
||||
"libc",
|
||||
"pango-sys 0.21.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pango-sys"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5"
|
||||
dependencies = [
|
||||
"glib-sys 0.18.1",
|
||||
"gobject-sys 0.18.0",
|
||||
"libc",
|
||||
"system-deps 6.2.2",
|
||||
"pango-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1644,10 +1428,10 @@ version = "0.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4f5daf21da43fba9f2a0092da0eebeb77637c23552bccaf58f791c518009c94"
|
||||
dependencies = [
|
||||
"glib-sys 0.21.2",
|
||||
"gobject-sys 0.21.2",
|
||||
"glib-sys",
|
||||
"gobject-sys",
|
||||
"libc",
|
||||
"system-deps 7.0.3",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1704,7 +1488,7 @@ dependencies = [
|
||||
"pest_meta",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1747,7 +1531,7 @@ dependencies = [
|
||||
"phf_shared",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1812,15 +1596,6 @@ dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
||||
[[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.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-crate"
|
||||
version = "3.4.0"
|
||||
@@ -1830,30 +1605,6 @@ dependencies = [
|
||||
"toml_edit 0.23.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-error"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
|
||||
dependencies = [
|
||||
"proc-macro-error-attr",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-error-attr"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.101"
|
||||
@@ -1985,7 +1736,7 @@ checksum = "a5a11a05ee1ce44058fa3d5961d05194fdbe3ad6b40f904af764d81b86450e6b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2098,7 +1849,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2193,7 +1944,7 @@ checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2230,16 +1981,6 @@ version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.109"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.106"
|
||||
@@ -2251,27 +1992,14 @@ dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "system-deps"
|
||||
version = "6.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
|
||||
dependencies = [
|
||||
"cfg-expr 0.15.8",
|
||||
"heck 0.5.0",
|
||||
"pkg-config",
|
||||
"toml",
|
||||
"version-compare",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "system-deps"
|
||||
version = "7.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66d23aaf9f331227789a99e8de4c91bf46703add012bdfd45fdecdfb2975a005"
|
||||
dependencies = [
|
||||
"cfg-expr 0.17.0",
|
||||
"heck 0.5.0",
|
||||
"cfg-expr",
|
||||
"heck",
|
||||
"pkg-config",
|
||||
"toml",
|
||||
"version-compare",
|
||||
@@ -2327,7 +2055,7 @@ checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2338,7 +2066,7 @@ checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2376,7 +2104,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2553,7 +2281,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
@@ -2575,7 +2303,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
@@ -2586,22 +2314,6 @@ version = "0.2.93"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.9"
|
||||
@@ -2611,12 +2323,6 @@ dependencies = [
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[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-sys"
|
||||
version = "0.48.0"
|
||||
@@ -2792,16 +2498,6 @@ dependencies = [
|
||||
"bitflags 2.9.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11"
|
||||
version = "2.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11rb"
|
||||
version = "0.13.1"
|
||||
@@ -2858,7 +2554,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2869,5 +2565,5 @@ checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
"syn",
|
||||
]
|
||||
|
||||
@@ -11,7 +11,7 @@ edition = "2021"
|
||||
|
||||
[features]
|
||||
default = ["x11", "wayland"]
|
||||
x11 = ["gdkx11", "x11rb"]
|
||||
x11 = ["gdk4-x11", "x11rb"]
|
||||
wayland = ["gtk4-layer-shell"]
|
||||
|
||||
[dependencies]
|
||||
@@ -19,7 +19,7 @@ shared_utils.workspace = true
|
||||
rhai_impl.workspace = true
|
||||
|
||||
gtk4-layer-shell = { version = "0.6.3", optional = true }
|
||||
gdkx11 = { version = "0.18", optional = true }
|
||||
gdk4-x11 = { version = "0.10.1", optional = true }
|
||||
x11rb = { version = "0.13.1", features = ["randr"], optional = true }
|
||||
|
||||
grass.workspace = true
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use crate::diag_error::DiagError;
|
||||
use crate::{
|
||||
daemon_response::DaemonResponseSender,
|
||||
display_backend::DisplayBackend,
|
||||
error_handling_ctx,
|
||||
gtk4::prelude::{
|
||||
ContainerExt, CssProviderExt, GtkWindowExt, MonitorExt, StyleContextExt, WidgetExt, ObjectExt, ApplicationExt, CellAreaExt, GskRendererExt
|
||||
ApplicationExt, CellAreaExt, GskRendererExt, GtkWindowExt, MonitorExt, ObjectExt,
|
||||
StyleContextExt, WidgetExt,
|
||||
},
|
||||
paths::EwwiiPaths,
|
||||
widgets::window::Window,
|
||||
@@ -24,14 +24,11 @@ use crate::{
|
||||
};
|
||||
use anyhow::{anyhow, bail};
|
||||
use gdk::Monitor;
|
||||
use glib::ObjectExt;
|
||||
use gtk4::{gdk, glib};
|
||||
use itertools::Itertools;
|
||||
use once_cell::sync::Lazy;
|
||||
use rhai::Dynamic;
|
||||
use rhai_impl::ast::WidgetNode;
|
||||
use serde::{de::Error as SerdeError, Deserialize, Deserializer};
|
||||
use shared_utils::Span;
|
||||
use std::{
|
||||
cell::{Cell, RefCell},
|
||||
collections::{HashMap, HashSet},
|
||||
@@ -953,9 +950,10 @@ fn apply_window_position(
|
||||
window: &Window,
|
||||
) -> Result<()> {
|
||||
let gdk_window = window.surface().context("Failed to get gdk surface from gtk window")?;
|
||||
|
||||
if let Some(x11_surface) = surface.downcast_ref::<gdkx11::X11Surface>() {
|
||||
window_geometry.size = crate::window::window_geometry::Coords::from_pixels(window.default_size());
|
||||
|
||||
if let Some(x11_surface) = surface.downcast_ref::<gdk4x11::X11Surface>() {
|
||||
window_geometry.size =
|
||||
crate::window::window_geometry::Coords::from_pixels(window.default_size());
|
||||
let actual_window_rect = get_window_rectangle(window_geometry, monitor_geometry);
|
||||
|
||||
let (origin_x, origin_y) = x11_surface.position();
|
||||
|
||||
@@ -35,11 +35,7 @@ impl DisplayBackend for NoBackend {
|
||||
x: i32,
|
||||
y: i32,
|
||||
) -> Option<Window> {
|
||||
// top level
|
||||
let window = Window::new();
|
||||
window.move_(x, y);
|
||||
|
||||
Some(window)
|
||||
Some(Window::new(gtk4::WindowType::Toplevel, x, y))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,9 +62,7 @@ mod platform_wayland {
|
||||
x: i32,
|
||||
y: i32,
|
||||
) -> Option<Window> {
|
||||
// top level
|
||||
let window = Window::new();
|
||||
window.move_(x, y);
|
||||
let window = Window::new(gtk4::WindowType::Toplevel, x, y);
|
||||
|
||||
// Sets the keyboard interactivity
|
||||
match window_init.backend_options.wayland.focusable {
|
||||
@@ -86,7 +80,7 @@ mod platform_wayland {
|
||||
if let Some(ident) = window_init.monitor.clone() {
|
||||
let display = gdk::Display::default().expect("could not get default display");
|
||||
if let Some(monitor) = crate::app::get_monitor_from_display(&display, &ident) {
|
||||
window.set_monitor(&monitor);
|
||||
window.set_monitor(Some(&monitor));
|
||||
} else {
|
||||
return None;
|
||||
}
|
||||
@@ -103,7 +97,7 @@ mod platform_wayland {
|
||||
}
|
||||
|
||||
if let Some(namespace) = &window_init.backend_options.wayland.namespace {
|
||||
window.set_namespace(namespace);
|
||||
window.set_namespace(Some(namespace));
|
||||
}
|
||||
|
||||
if let Some(geometry) = window_init.geometry {
|
||||
@@ -124,23 +118,23 @@ mod platform_wayland {
|
||||
AnchorAlignment::END => bottom = true,
|
||||
}
|
||||
|
||||
window.set_anchor(gtk4_layer_shell::Edge::Left, left);
|
||||
window.set_anchor(gtk4_layer_shell::Edge::Right, right);
|
||||
window.set_anchor(gtk4_layer_shell::Edge::Top, top);
|
||||
window.set_anchor(gtk4_layer_shell::Edge::Bottom, bottom);
|
||||
window.set_anchor(gtk_layer_shell::Edge::Left, left);
|
||||
window.set_anchor(gtk_layer_shell::Edge::Right, right);
|
||||
window.set_anchor(gtk_layer_shell::Edge::Top, top);
|
||||
window.set_anchor(gtk_layer_shell::Edge::Bottom, bottom);
|
||||
|
||||
let xoffset = geometry.offset.x.pixels_relative_to(monitor.width());
|
||||
let yoffset = geometry.offset.y.pixels_relative_to(monitor.height());
|
||||
|
||||
if left {
|
||||
window.set_layer_shell_margin(gtk4_layer_shell::Edge::Left, xoffset);
|
||||
window.set_layer_shell_margin(gtk_layer_shell::Edge::Left, xoffset);
|
||||
} else {
|
||||
window.set_layer_shell_margin(gtk4_layer_shell::Edge::Right, xoffset);
|
||||
window.set_margin(gtk4_layer_shell::Edge::Right, xoffset);
|
||||
}
|
||||
if bottom {
|
||||
window.set_layer_shell_margin(gtk4_layer_shell::Edge::Bottom, yoffset);
|
||||
window.set_margin(gtk4_layer_shell::Edge::Bottom, yoffset);
|
||||
} else {
|
||||
window.set_layer_shell_margin(gtk4_layer_shell::Edge::Top, yoffset);
|
||||
window.set_margin(gtk4_layer_shell::Edge::Top, yoffset);
|
||||
}
|
||||
// https://github.com/elkowar/eww/issues/296
|
||||
if window_init.backend_options.wayland.exclusive
|
||||
@@ -192,20 +186,23 @@ mod platform_x11 {
|
||||
x: i32,
|
||||
y: i32,
|
||||
) -> Option<Window> {
|
||||
let window = Window::new();
|
||||
window.move_(x, y);
|
||||
|
||||
let window_type = if window_init.backend_options.x11.wm_ignore {
|
||||
window.modal(true);
|
||||
}; // else: normal, which is toplevel
|
||||
|
||||
gtk4::WindowType::Popup
|
||||
} else {
|
||||
gtk4::WindowType::Toplevel
|
||||
};
|
||||
let window = Window::new(window_type, x, y);
|
||||
window.set_resizable(window_init.resizable);
|
||||
window.set_keep_above(window_init.stacking == WindowStacking::Foreground);
|
||||
window.set_keep_below(window_init.stacking == WindowStacking::Background);
|
||||
if window_init.backend_options.x11.sticky {
|
||||
window.stick();
|
||||
} else {
|
||||
window.unstick();
|
||||
if let Some(gdk_x11_window) =
|
||||
gtk_window.window().and_then(|w| w.downcast::<gdk4_x11::X11Window>().ok())
|
||||
{
|
||||
if window_init.backend_options.x11.sticky {
|
||||
gdk_x11_window.stick();
|
||||
} else {
|
||||
gdk_x11_window.unstick();
|
||||
}
|
||||
}
|
||||
Some(window)
|
||||
}
|
||||
@@ -245,7 +242,7 @@ mod platform_x11 {
|
||||
let scale_factor = monitor.scale_factor() as u32;
|
||||
let gdk_window = window.window().context("Couldn't get gdk window from gtk window")?;
|
||||
let win_id = gdk_window
|
||||
.downcast_ref::<gdkx11::X11Window>()
|
||||
.downcast_ref::<gdk4x11::X11Window>()
|
||||
.context("Failed to get x11 window for gtk window")?
|
||||
.xid() as u32;
|
||||
let strut_def = window_init.backend_options.x11.struts;
|
||||
|
||||
@@ -5,7 +5,7 @@ use crate::{
|
||||
error_handling_ctx, ipc_server, EwwiiPaths,
|
||||
};
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
use gtk4::prelude::{ApplicationExt, ApplicationExtManual};
|
||||
use std::{
|
||||
// cell::RefCell,
|
||||
collections::{HashMap, HashSet},
|
||||
@@ -76,10 +76,8 @@ pub fn initialize_server<B: DisplayBackend>(
|
||||
if B::IS_WAYLAND {
|
||||
std::env::set_var("GDK_BACKEND", "wayland")
|
||||
}
|
||||
|
||||
let gtk_app = gtk4::Application::builder()
|
||||
.application_id("com.widgetsystem.ewwii")
|
||||
.build();
|
||||
|
||||
let gtk_app = gtk4::Application::builder().application_id("com.widgetsystem.ewwii").build();
|
||||
|
||||
connect_monitor_added(ui_send.clone());
|
||||
|
||||
@@ -114,7 +112,8 @@ pub fn initialize_server<B: DisplayBackend>(
|
||||
);
|
||||
}
|
||||
|
||||
if let Ok((file_id, css)) = config::scss::parse_scss_from_config(app.paths.get_config_dir()) {
|
||||
if let Ok((file_id, css)) = config::scss::parse_scss_from_config(app.paths.get_config_dir())
|
||||
{
|
||||
if let Err(e) = app.load_css(file_id, &css) {
|
||||
error_handling_ctx::print_error(e);
|
||||
}
|
||||
@@ -141,7 +140,7 @@ pub fn initialize_server<B: DisplayBackend>(
|
||||
});
|
||||
|
||||
let exit_status = gtk_app.run();
|
||||
log::info!("main application thread finished with exit status: {}", exit_status);
|
||||
log::info!("main application thread finished with exit status: {:#?}", exit_status);
|
||||
|
||||
Ok(ForkResult::Child)
|
||||
}
|
||||
|
||||
@@ -38,54 +38,54 @@ fn build_gtk_widget_from_node(
|
||||
dynamic update system in ewwii.
|
||||
*/
|
||||
|
||||
let gtk_widget = match root_node {
|
||||
WidgetNode::Box { props, children } => build_gtk_box(props, children, widget_reg)?.upcast(),
|
||||
WidgetNode::CenterBox { props, children } => {
|
||||
build_center_box(props, children, widget_reg)?.upcast()
|
||||
}
|
||||
WidgetNode::EventBox { props, children } => {
|
||||
build_event_box(props, children, widget_reg)?.upcast()
|
||||
}
|
||||
WidgetNode::ToolTip { props, children } => {
|
||||
build_tooltip(props, children, widget_reg)?.upcast()
|
||||
}
|
||||
WidgetNode::CircularProgress { props } => {
|
||||
build_circular_progress_bar(props, widget_reg)?.upcast()
|
||||
}
|
||||
WidgetNode::Graph { props } => build_graph(props, widget_reg)?.upcast(),
|
||||
WidgetNode::Transform { props } => build_transform(props, widget_reg)?.upcast(),
|
||||
WidgetNode::Slider { props } => build_gtk_scale(props, widget_reg)?.upcast(),
|
||||
WidgetNode::Progress { props } => build_gtk_progress(props, widget_reg)?.upcast(),
|
||||
WidgetNode::Image { props } => build_gtk_image(props, widget_reg)?.upcast(),
|
||||
WidgetNode::Button { props } => build_gtk_button(props, widget_reg)?.upcast(),
|
||||
WidgetNode::Label { props } => build_gtk_label(props, widget_reg)?.upcast(),
|
||||
// WIDGET_NAME_LITERAL => build_gtk_literal(node)?.upcast(),
|
||||
WidgetNode::Input { props } => build_gtk_input(props, widget_reg)?.upcast(),
|
||||
WidgetNode::Calendar { props } => build_gtk_calendar(props, widget_reg)?.upcast(),
|
||||
WidgetNode::ColorButton { props } => build_gtk_color_button(props, widget_reg)?.upcast(),
|
||||
WidgetNode::Expander { props, children } => {
|
||||
build_gtk_expander(props, children, widget_reg)?.upcast()
|
||||
}
|
||||
WidgetNode::ColorChooser { props } => build_gtk_color_chooser(props, widget_reg)?.upcast(),
|
||||
WidgetNode::ComboBoxText { props } => build_gtk_combo_box_text(props, widget_reg)?.upcast(),
|
||||
WidgetNode::Checkbox { props } => build_gtk_checkbox(props, widget_reg)?.upcast(),
|
||||
WidgetNode::Revealer { props, children } => {
|
||||
build_gtk_revealer(props, children, widget_reg)?.upcast()
|
||||
}
|
||||
WidgetNode::Scroll { props, children } => {
|
||||
build_gtk_scrolledwindow(props, children, widget_reg)?.upcast()
|
||||
}
|
||||
WidgetNode::OverLay { props, children } => {
|
||||
build_gtk_overlay(props, children, widget_reg)?.upcast()
|
||||
}
|
||||
WidgetNode::Stack { props, children } => {
|
||||
build_gtk_stack(props, children, widget_reg)?.upcast()
|
||||
}
|
||||
// WIDGET_NAME_SYSTRAY => build_systray(node)?.upcast(),
|
||||
unknown => {
|
||||
return Err(anyhow::anyhow!("Cannot build GTK widget from node: {:?}", unknown));
|
||||
}
|
||||
};
|
||||
// let gtk_widget = match root_node {
|
||||
// WidgetNode::Box { props, children } => build_gtk_box(props, children, widget_reg)?.upcast(),
|
||||
// WidgetNode::CenterBox { props, children } => {
|
||||
// build_center_box(props, children, widget_reg)?.upcast()
|
||||
// }
|
||||
// WidgetNode::EventBox { props, children } => {
|
||||
// build_event_box(props, children, widget_reg)?.upcast()
|
||||
// }
|
||||
// WidgetNode::ToolTip { props, children } => {
|
||||
// build_tooltip(props, children, widget_reg)?.upcast()
|
||||
// }
|
||||
// WidgetNode::CircularProgress { props } => {
|
||||
// build_circular_progress_bar(props, widget_reg)?.upcast()
|
||||
// }
|
||||
// WidgetNode::Graph { props } => build_graph(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::Transform { props } => build_transform(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::Slider { props } => build_gtk_scale(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::Progress { props } => build_gtk_progress(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::Image { props } => build_gtk_image(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::Button { props } => build_gtk_button(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::Label { props } => build_gtk_label(props, widget_reg)?.upcast(),
|
||||
// // WIDGET_NAME_LITERAL => build_gtk_literal(node)?.upcast(),
|
||||
// WidgetNode::Input { props } => build_gtk_input(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::Calendar { props } => build_gtk_calendar(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::ColorButton { props } => build_gtk_color_button(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::Expander { props, children } => {
|
||||
// build_gtk_expander(props, children, widget_reg)?.upcast()
|
||||
// }
|
||||
// WidgetNode::ColorChooser { props } => build_gtk_color_chooser(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::ComboBoxText { props } => build_gtk_combo_box_text(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::Checkbox { props } => build_gtk_checkbox(props, widget_reg)?.upcast(),
|
||||
// WidgetNode::Revealer { props, children } => {
|
||||
// build_gtk_revealer(props, children, widget_reg)?.upcast()
|
||||
// }
|
||||
// WidgetNode::Scroll { props, children } => {
|
||||
// build_gtk_scrolledwindow(props, children, widget_reg)?.upcast()
|
||||
// }
|
||||
// WidgetNode::OverLay { props, children } => {
|
||||
// build_gtk_overlay(props, children, widget_reg)?.upcast()
|
||||
// }
|
||||
// WidgetNode::Stack { props, children } => {
|
||||
// build_gtk_stack(props, children, widget_reg)?.upcast()
|
||||
// }
|
||||
// // WIDGET_NAME_SYSTRAY => build_systray(node)?.upcast(),
|
||||
// unknown => {
|
||||
// return Err(anyhow::anyhow!("Cannot build GTK widget from node: {:?}", unknown));
|
||||
// }
|
||||
// };
|
||||
|
||||
Ok(gtk_widget)
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@ pub mod build_widget;
|
||||
pub mod circular_progressbar;
|
||||
pub mod graph;
|
||||
pub mod transform;
|
||||
pub mod widget_definitions;
|
||||
pub mod widget_definitions_helper;
|
||||
// pub mod widget_definitions;
|
||||
// pub mod widget_definitions_helper;
|
||||
pub mod window;
|
||||
|
||||
@@ -8,7 +8,7 @@ use gtk4::glib::translate::FromGlib;
|
||||
use gtk4::prelude::LabelExt;
|
||||
use gtk4::{self, prelude::*, DestDefaults, TargetEntry, TargetList};
|
||||
use gtk4::{gdk, glib, pango};
|
||||
use gtk4::GestureClick;
|
||||
use gtk4::{GestureClick, EventControllerScroll, EventControllerHover};
|
||||
use rhai::Map;
|
||||
use rhai_impl::ast::{get_id_to_widget_info, hash_props_and_type, WidgetNode};
|
||||
|
||||
@@ -443,7 +443,7 @@ pub(super) fn build_event_box(
|
||||
|
||||
let hover_controller = EventControllerHover::new();
|
||||
let gesture_controller = GestureClick::new();
|
||||
let scroll_controller = EventControllerScroll::new(gtk::Orientation::Both, Some(20.0));
|
||||
let scroll_controller = EventControllerScroll::new(gtk4::Orientation::Both, Some(20.0));
|
||||
|
||||
// Support :hover selector
|
||||
hover_controller.connect_enter(|gtk_widget, evt| {
|
||||
@@ -466,10 +466,9 @@ pub(super) fn build_event_box(
|
||||
gesture_controller.connect_released(|gtk_widget, _, _, _| {
|
||||
gtk_widget.unset_state_flags(gtk4::StateFlags::ACTIVE);
|
||||
});
|
||||
gtk_widget.add_controller(&gesture_controller);
|
||||
|
||||
// onscroll - event to execute when the user scrolls with the mouse over the widget. The placeholder `{}` used in the command will be replaced with either `up` or `down`.
|
||||
let apply_props = |props: &Map, widget: >k4::EventBox| -> Result<()> {
|
||||
let apply_props = |props: &Map, widget: >k4::Box| -> Result<()> {
|
||||
// timeout - timeout of the command. Default: "200ms"
|
||||
let timeout = get_duration_prop(&props, "timeout", Some(Duration::from_millis(200)))?;
|
||||
|
||||
@@ -629,7 +628,7 @@ pub(super) fn build_event_box(
|
||||
|
||||
connect_signal_handler!(
|
||||
widget,
|
||||
gesture_click.connect_released(move |_, evt| {
|
||||
gesture_controller.connect_released(move |_, evt| {
|
||||
match evt.button() {
|
||||
1 => run_command(timeout, &onclick, &[] as &[&str]),
|
||||
2 => run_command(timeout, &onmiddleclick, &[] as &[&str]),
|
||||
@@ -643,8 +642,9 @@ pub(super) fn build_event_box(
|
||||
Ok(())
|
||||
};
|
||||
|
||||
widget.add_controller(hover_controller);
|
||||
widget.add_controller(scroll_controller);
|
||||
gtk_widget.add_controller(&gesture_controller);
|
||||
gtk_widget.add_controller(hover_controller);
|
||||
gtk_widget.add_controller(scroll_controller);
|
||||
|
||||
apply_props(&props, >k_widget)?;
|
||||
|
||||
|
||||
@@ -38,26 +38,30 @@ impl Default for Window {
|
||||
}
|
||||
}
|
||||
|
||||
// impl Window {
|
||||
// pub fn new(type_: gtk4::WindowType, x_: i32, y_: i32) -> Self {
|
||||
// let w: Self = glib::Object::builder().property("type", type_).build();
|
||||
// let priv_ = w.imp();
|
||||
// priv_.x.replace(x_);
|
||||
// priv_.y.replace(y_);
|
||||
// w
|
||||
// }
|
||||
// }
|
||||
|
||||
impl ObjectImpl for WindowPriv {
|
||||
fn properties() -> &'static [glib::ParamSpec] {
|
||||
Self::derived_properties()
|
||||
}
|
||||
|
||||
fn property(&self, id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||
self.derived_property(id, pspec)
|
||||
impl Window {
|
||||
pub fn new(type_: gtk4::WindowType, x_: i32, y_: i32) -> Self {
|
||||
let w: Self = glib::Object::builder().property("type", type_).build();
|
||||
let priv_ = w.imp();
|
||||
priv_.x.replace(x_);
|
||||
priv_.y.replace(y_);
|
||||
w
|
||||
}
|
||||
}
|
||||
|
||||
// impl ObjectImpl for WindowPriv {
|
||||
// fn properties() -> &'static [glib::ParamSpec] {
|
||||
// Self::derived_properties()
|
||||
// }
|
||||
|
||||
// fn property(&self, id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||
// self.derived_property(id, pspec)
|
||||
// }
|
||||
// }
|
||||
// impl WindowImpl for WindowPriv {}
|
||||
// impl BinImpl for WindowPriv {}
|
||||
// impl ContainerImpl for WindowPriv {}
|
||||
// impl WidgetImpl for WindowPriv {}
|
||||
|
||||
impl ObjectImpl for WindowPriv {}
|
||||
impl WidgetImpl for WindowPriv {}
|
||||
impl WindowImpl for WindowPriv {}
|
||||
|
||||
@@ -7,9 +7,7 @@ use rhai::exported_module;
|
||||
use rhai::module_resolvers::StaticModuleResolver;
|
||||
|
||||
pub fn register_stdlib(resolver: &mut StaticModuleResolver) {
|
||||
use crate::providers::stdlib::{
|
||||
command::command, env::env, regex::regex_lib, text::text,
|
||||
};
|
||||
use crate::providers::stdlib::{command::command, env::env, regex::regex_lib, text::text};
|
||||
|
||||
// adding modules
|
||||
let text_mod = exported_module!(text);
|
||||
|
||||
Reference in New Issue
Block a user