gtk4-layer-shell-0.4.0/.cargo_vcs_info.json0000644000000001560000000000100141270ustar { "git": { "sha1": "8e19f2960681cb62ed1d31a7fb7fdcb0c3a2666a" }, "path_in_vcs": "gtk4-layer-shell" }gtk4-layer-shell-0.4.0/Cargo.lock0000644000000706620000000000100121130ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 3 [[package]] name = "addr2line" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] [[package]] name = "adler" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "autocfg" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", ] [[package]] name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bumpalo" version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "cairo-rs" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "797fd5a634dcb0ad0d7d583df794deb0a236d88e759cd34b7da20198c6c9d145" dependencies = [ "bitflags", "cairo-sys-rs", "glib", "libc", "thiserror", ] [[package]] name = "cairo-sys-rs" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "428290f914b9b86089f60f5d8a9f6e440508e1bcff23b25afd51502b0a2da88f" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "cc" version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052" [[package]] name = "cfg-expr" version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", "target-lexicon", ] [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "field-offset" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ "memoffset", "rustc_version", ] [[package]] name = "flume" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ "futures-core", "futures-sink", "nanorand", "spin", ] [[package]] name = "fragile" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "futures" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", "futures-executor", "futures-io", "futures-sink", "futures-task", "futures-util", ] [[package]] name = "futures-channel" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", ] [[package]] name = "futures-core" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", "futures-util", ] [[package]] name = "futures-io" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "futures-sink" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-macro", "futures-sink", "futures-task", "memchr", "pin-project-lite", "pin-utils", "slab", ] [[package]] name = "gdk-pixbuf" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28bb53ecb56857c683c9ec859908e076dd3969c7d67598bd8b1ce095d211304a" dependencies = [ "gdk-pixbuf-sys", "gio", "glib", "libc", ] [[package]] name = "gdk-pixbuf-sys" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f6681a0c1330d1d3968bec1529f7172d62819ef0bdbb0d18022320654158b03" dependencies = [ "gio-sys", "glib-sys", "gobject-sys", "libc", "system-deps", ] [[package]] name = "gdk4" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b7d7237c1487ed4b300aac7744efcbf1319e12d60d7afcd6f505414bd5b5dea" dependencies = [ "cairo-rs", "gdk-pixbuf", "gdk4-sys", "gio", "gl", "glib", "libc", "pango", ] [[package]] name = "gdk4-sys" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a67576c8ec012156d7f680e201a807b4432a77babb3157e0555e990ab6bcd878" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", "gio-sys", "glib-sys", "gobject-sys", "libc", "pango-sys", "pkg-config", "system-deps", ] [[package]] name = "getrandom" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", "libc", "wasi", "wasm-bindgen", ] [[package]] name = "gimli" version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gio" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "398e3da68749fdc32783cbf7521ec3f65c9cf946db8c7774f8460af49e52c6e2" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-util", "gio-sys", "glib", "libc", "pin-project-lite", "smallvec", "thiserror", ] [[package]] name = "gio-sys" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4feb96b31c32730ea3e1e89aecd2e4e37ecb1c473ad8f685e3430a159419f63" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", "windows-sys", ] [[package]] name = "gl" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a94edab108827d67608095e269cf862e60d920f144a5026d3dbcfd8b877fb404" dependencies = [ "gl_generator", ] [[package]] name = "gl_generator" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" dependencies = [ "khronos_api", "log", "xml-rs", ] [[package]] name = "glib" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fee90a615ce05be7a32932cfb8adf2c4bbb4700e80d37713c981fb24c0c56238" dependencies = [ "bitflags", "futures-channel", "futures-core", "futures-executor", "futures-task", "futures-util", "gio-sys", "glib-macros", "glib-sys", "gobject-sys", "libc", "memchr", "smallvec", "thiserror", ] [[package]] name = "glib-macros" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4da558d8177c0c8c54368818b508a4244e1286fce2858cef4e547023f0cfa5ef" dependencies = [ "heck", "proc-macro-crate", "proc-macro2", "quote", "syn", ] [[package]] name = "glib-sys" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4958c26e5a01c9af00dea669a97369eccbec29a8e6d125c24ea2d85ee7467b60" dependencies = [ "libc", "system-deps", ] [[package]] name = "gobject-sys" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6908864f5ffff15b56df7e90346863904f49b949337ed0456b9287af61903b8" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "graphene-rs" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630e940ad5824f90221d6579043a9cd1f8bec86b4a17faaf7827d58eb16e8c1f" dependencies = [ "glib", "graphene-sys", "libc", ] [[package]] name = "graphene-sys" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fb8fade7b754982f47ebbed241fd2680816fdd4598321784da10b9e1168836a" dependencies = [ "glib-sys", "libc", "pkg-config", "system-deps", ] [[package]] name = "gsk4" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3cf2091e1af185b347b3450817d93dea6fe435df7abd4c2cd7fb5bcb4cfda8" dependencies = [ "cairo-rs", "gdk4", "glib", "graphene-rs", "gsk4-sys", "libc", "pango", ] [[package]] name = "gsk4-sys" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aa69614a26d8760c186c3690f1b0fbb917572ca23ef83137445770ceddf8cde" dependencies = [ "cairo-sys-rs", "gdk4-sys", "glib-sys", "gobject-sys", "graphene-sys", "libc", "pango-sys", "system-deps", ] [[package]] name = "gtk4" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaffc6c743c9160514cc9b67eace364e5dc5798369fa809cdb04e035c21c5c5d" dependencies = [ "cairo-rs", "field-offset", "futures-channel", "gdk-pixbuf", "gdk4", "gio", "glib", "graphene-rs", "gsk4", "gtk4-macros", "gtk4-sys", "libc", "pango", ] [[package]] name = "gtk4-layer-shell" version = "0.4.0" dependencies = [ "bitflags", "gdk4", "gio", "glib", "glib-sys", "gtk4", "gtk4-layer-shell-sys", "libadwaita", "libc", "relm4", ] [[package]] name = "gtk4-layer-shell-sys" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3057dc117db2d664a9b45f1956568701914e80cf9f2c8cef0a755af4c1c8105" dependencies = [ "gdk4-sys", "glib-sys", "gtk4-sys", "libc", "system-deps", ] [[package]] name = "gtk4-macros" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "188211f546ce5801f6d0245c37b6249143a2cb4fa040e54829ca1e76796e9f09" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", "syn", ] [[package]] name = "gtk4-sys" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1114a207af8ada02cf4658a76692f4190f06f093380d5be07e3ca8b43aa7c666" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", "gdk4-sys", "gio-sys", "glib-sys", "gobject-sys", "graphene-sys", "gsk4-sys", "libc", "pango-sys", "system-deps", ] [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "indexmap" version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", ] [[package]] name = "js-sys" version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "khronos_api" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "libadwaita" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ff9c222b5c783729de45185f07b2fec2d43a7f9c63961e777d3667e20443878" dependencies = [ "gdk4", "gio", "glib", "gtk4", "libadwaita-sys", "libc", "pango", ] [[package]] name = "libadwaita-sys" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c44d8bdbad31d6639e1f20cc9c1424f1a8e02d751fc28d44659bf743fb9eca6" dependencies = [ "gdk4-sys", "gio-sys", "glib-sys", "gobject-sys", "gtk4-sys", "libc", "pango-sys", "system-deps", ] [[package]] name = "libc" version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "lock_api" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", ] [[package]] name = "log" version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memoffset" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] [[package]] name = "miniz_oxide" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "nanorand" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ "getrandom", ] [[package]] name = "num_cpus" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ "hermit-abi", "libc", ] [[package]] name = "object" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "memchr", ] [[package]] name = "once_cell" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "pango" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54768854025df6903061d0084fd9702a253ddfd60db7d9b751d43b76689a7f0a" dependencies = [ "gio", "glib", "libc", "pango-sys", ] [[package]] name = "pango-sys" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b07cc57d10cee4ec661f718a6902cee18c2f4cfae08e87e5a390525946913390" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", ] [[package]] name = "pin-project-lite" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "proc-macro-crate" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ "toml_edit 0.21.1", ] [[package]] name = "proc-macro2" version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] [[package]] name = "relm4" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf0363f92b6a7eefd985b47f27b7ae168dd2fd5cd4013a338c9b111c33744d1f" dependencies = [ "flume", "fragile", "futures", "gtk4", "once_cell", "relm4-css", "relm4-macros", "tokio", "tracing", ] [[package]] name = "relm4-css" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d3b924557df1cddc687b60b313c4b76620fdbf0e463afa4b29f67193ccf37f9" [[package]] name = "relm4-macros" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5885640821d60062497737dd42fd04248d13c7ecccee620caaa4b210fe9905" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "rustc-demangle" version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ "semver", ] [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_spanned" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] [[package]] name = "slab" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" dependencies = [ "lock_api", ] [[package]] name = "syn" version = "2.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "system-deps" version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c81f13d9a334a6c242465140bd262fae382b752ff2011c4f7419919a9c97922" dependencies = [ "cfg-expr", "heck", "pkg-config", "toml", "version-compare", ] [[package]] name = "target-lexicon" version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2" [[package]] name = "thiserror" version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "tokio" version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "num_cpus", "pin-project-lite", ] [[package]] name = "toml" version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", "toml_datetime", "toml_edit 0.22.15", ] [[package]] name = "toml_datetime" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] [[package]] name = "toml_edit" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" version = "0.22.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", "winnow 0.6.13", ] [[package]] name = "tracing" version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "tracing-core" version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "version-compare" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] [[package]] name = "winnow" version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] [[package]] name = "xml-rs" version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" gtk4-layer-shell-0.4.0/Cargo.toml0000644000000035650000000000100121340ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" rust-version = "1.70" name = "gtk4-layer-shell" version = "0.4.0" authors = ["pentamassiv "] build = false exclude = ["examples"] autobins = false autoexamples = false autotests = false autobenches = false description = "Save gir-generated wrapper for gtk4-layer-shell" documentation = "https://docs.rs/gtk4-layer-shell/" readme = "README.md" keywords = [ "gtk4", "gtk4-layer-shell", "wayland", "gir", "wrapper", ] categories = [ "api-bindings", "gui", ] license = "MIT" repository = "https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-layer-shell" [package.metadata.docs.rs] all-features = true rustc-args = [ "--cfg", "docsrs", ] rustdoc-args = [ "--cfg", "docsrs", "--generate-link-to-definition", ] [lib] name = "gtk4_layer_shell" path = "src/lib.rs" [dependencies.bitflags] version = "2.0" [dependencies.gdk] version = "0.9" package = "gdk4" [dependencies.glib] version = "0.20" [dependencies.glib-sys] version = "0.20" [dependencies.gtk] version = "0.9" package = "gtk4" [dependencies.gtk4-layer-shell-sys] version = "0.3" [dependencies.libc] version = "0.2" [dev-dependencies.gio] version = "0.20" [dev-dependencies.libadwaita] version = "0.7" [dev-dependencies.relm4] version = "0.9" [features] [target."cfg(docsrs)".dependencies.gdk] version = "0.9" features = [ "gl", "v4_16", ] package = "gdk4" gtk4-layer-shell-0.4.0/Cargo.toml.orig000064400000000000000000000020341046102023000156030ustar 00000000000000[package] name = "gtk4-layer-shell" version = "0.4.0" description = "Save gir-generated wrapper for gtk4-layer-shell" repository = "https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-layer-shell" documentation = "https://docs.rs/gtk4-layer-shell/" keywords = ["gtk4", "gtk4-layer-shell", "wayland", "gir", "wrapper"] categories = ["api-bindings", "gui"] exclude = ["examples"] authors.workspace = true rust-version.workspace = true edition.workspace = true license.workspace = true [package.metadata.docs.rs] all-features = true rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] [features] [dependencies] libc.workspace = true bitflags.workspace = true glib.workspace = true glib-sys.workspace = true gdk.workspace = true gtk.workspace = true gtk4-layer-shell-sys.workspace = true [dev-dependencies] gio.workspace = true libadwaita.workspace = true relm4.workspace = true [target.'cfg(docsrs)'.dependencies] gdk = { package = "gdk4", version = "0.9", features = ["gl", "v4_16"] } gtk4-layer-shell-0.4.0/Gir.toml000064400000000000000000000006421046102023000143350ustar 00000000000000[options] library = "Gtk4LayerShell" version = "1.0" target_path = "." min_cfg_version = "1.0" work_mode = "normal" girs_directories = ["../gir-files", ".."] generate_safety_asserts = true deprecate_by_min_version = true single_version_file = true generate = [ "Gtk4LayerShell.Edge", "Gtk4LayerShell.Layer", "Gtk4LayerShell.KeyboardMode", "Gtk4LayerShell.*", ] manual = ["Gtk.Window", "Gdk.Monitor"] gtk4-layer-shell-0.4.0/README.md000064400000000000000000000066671046102023000142130ustar 00000000000000[![maintenance-status: passively-maintained (as of 2022-10-01)](https://img.shields.io/badge/maintenance--status-passively--maintained_%28as_of_2022--10--01%29-forestgreen)](https://gist.github.com/rusty-snake/574a91f1df9f97ec77ca308d6d731e29) ![dependabot status](https://img.shields.io/badge/dependabot-enabled-025e8c?logo=Dependabot) [![Build](https://img.shields.io/github/actions/workflow/status/pentamassiv/gtk4-layer-shell-gir/build.yaml?branch=main)](https://github.com/pentamassiv/gtk4-layer-shell-gir/actions/workflows/build.yaml) gtk4-layer-shell: [![Crate](https://img.shields.io/crates/v/gtk4-layer-shell.svg)](https://crates.io/crates/gtk4-layer-shell) [![docs.rs](https://docs.rs/gtk4-layer-shell/badge.svg)](https://docs.rs/gtk4-layer-shell) [![dependency status](https://deps.rs/crate/gtk4-layer-shell/0.4.0/status.svg)](https://deps.rs/crate/gtk4-layer-shell/0.4.0) # gtk4-layer-shell This is the safe wrapper for [gtk4-layer-shell](https://github.com/wmww/gtk4-layer-shell), automatically generated from its [.gir file](../Gtk4LayerShell-1.0.gir). The unsafe bindings can be found [here](https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-layer-shell-sys). You need to have gtk4-layer-shell installed on your system to use this crate. Because it is new, you probably have to [build it from source](https://github.com/wmww/gtk4-layer-shell#building-from-source). If you did that, you might also have to set the following two environment variables: ```bash export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export LD_LIBRARY_PATH=/usr/local/lib ``` This crate is GTK4 only. Checkout [gtk-layer-shell](https://crates.io/crates/gtk-layer-shell) if you want the GTK3 version. ## Usage Have a look at the [simple example](https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-layer-shell/examples/simple-example.rs) to see how the bindings can be used. It works analogous to the original. ## Generating the wrapper Generating the wrapper yourself is not necessary to be able to use it. You can just use the version published on crates.io. If you want to do it anyways, you need to start by [generating the unsafe bindings](https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-layer-shell-sys/README.md#generating-the-bindings). Follow the guide on how to do that and come back here. Now that you have generated the bindings you will want to generate the safe wrapper. ```bash cd gtk4-layer-shell gir -o . cargo build cargo test ``` There should not have been any errors. To make sure everything you need was created, run the following command. ```bash gir -o . -m not_bound ``` There should not be any output to this command. Let me know if there is so I can fix it. In order to build the documentation, you have to run ``` gir -c Gir.toml --doc-target-path docs.md -m doc cargo install rustdoc-stripper rustdoc-stripper -s -n rustdoc-stripper -g -o docs.md cargo doc ``` Congratulations, you've done it :-) If you want to learn more about gir, have a look at its [repo](https://github.com/gtk-rs/gir) or its [book](https://gtk-rs.org/gir/book/). ## Maintenance status This crate is just a safe wrapper for the C library so it is feature complete and not actively worked on. There are Github Actions keeping the dependencies up-to-date. If you encounter any problems, feel free to open a PR. ## Contributing Pull requests are very welcome but please keep the maintenance status in mind. ## License [MIT](https://choosealicense.com/licenses/mit/) gtk4-layer-shell-0.4.0/src/auto/enums.rs000064400000000000000000000134751046102023000161630ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from .. // from ../gir-files // DO NOT EDIT use crate::{ffi}; use glib::{translate::*}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] #[non_exhaustive] #[doc(alias = "GtkLayerShellEdge")] pub enum Edge { /// The left edge of the screen. #[doc(alias = "GTK_LAYER_SHELL_EDGE_LEFT")] Left, /// The right edge of the screen. #[doc(alias = "GTK_LAYER_SHELL_EDGE_RIGHT")] Right, /// The top edge of the screen. #[doc(alias = "GTK_LAYER_SHELL_EDGE_TOP")] Top, /// The bottom edge of the screen. #[doc(alias = "GTK_LAYER_SHELL_EDGE_BOTTOM")] Bottom, /// Should not be used except to get the number of entries. (NOTE: may change in /// future releases as more entries are added) #[doc(alias = "GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER")] EntryNumber, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for Edge { type GlibType = ffi::GtkLayerShellEdge; #[inline] fn into_glib(self) -> ffi::GtkLayerShellEdge { match self { Self::Left => ffi::GTK_LAYER_SHELL_EDGE_LEFT, Self::Right => ffi::GTK_LAYER_SHELL_EDGE_RIGHT, Self::Top => ffi::GTK_LAYER_SHELL_EDGE_TOP, Self::Bottom => ffi::GTK_LAYER_SHELL_EDGE_BOTTOM, Self::EntryNumber => ffi::GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for Edge { #[inline] unsafe fn from_glib(value: ffi::GtkLayerShellEdge) -> Self { skip_assert_initialized!(); match value { ffi::GTK_LAYER_SHELL_EDGE_LEFT => Self::Left, ffi::GTK_LAYER_SHELL_EDGE_RIGHT => Self::Right, ffi::GTK_LAYER_SHELL_EDGE_TOP => Self::Top, ffi::GTK_LAYER_SHELL_EDGE_BOTTOM => Self::Bottom, ffi::GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER => Self::EntryNumber, value => Self::__Unknown(value), } } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] #[non_exhaustive] #[doc(alias = "GtkLayerShellKeyboardMode")] pub enum KeyboardMode { /// This window should not receive keyboard events. #[doc(alias = "GTK_LAYER_SHELL_KEYBOARD_MODE_NONE")] None, /// This window should have exclusive focus if it is on the top or overlay layer. #[doc(alias = "GTK_LAYER_SHELL_KEYBOARD_MODE_EXCLUSIVE")] Exclusive, /// The user should be able to focus and unfocues this window in an implementation /// defined way. Not supported for protocol version < 4. #[doc(alias = "GTK_LAYER_SHELL_KEYBOARD_MODE_ON_DEMAND")] OnDemand, /// Should not be used except to get the number of entries. (NOTE: may change in /// future releases as more entries are added) #[doc(alias = "GTK_LAYER_SHELL_KEYBOARD_MODE_ENTRY_NUMBER")] EntryNumber, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for KeyboardMode { type GlibType = ffi::GtkLayerShellKeyboardMode; #[inline] fn into_glib(self) -> ffi::GtkLayerShellKeyboardMode { match self { Self::None => ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_NONE, Self::Exclusive => ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_EXCLUSIVE, Self::OnDemand => ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_ON_DEMAND, Self::EntryNumber => ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_ENTRY_NUMBER, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for KeyboardMode { #[inline] unsafe fn from_glib(value: ffi::GtkLayerShellKeyboardMode) -> Self { skip_assert_initialized!(); match value { ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_NONE => Self::None, ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_EXCLUSIVE => Self::Exclusive, ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_ON_DEMAND => Self::OnDemand, ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_ENTRY_NUMBER => Self::EntryNumber, value => Self::__Unknown(value), } } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] #[non_exhaustive] #[doc(alias = "GtkLayerShellLayer")] pub enum Layer { /// The background layer. #[doc(alias = "GTK_LAYER_SHELL_LAYER_BACKGROUND")] Background, /// The bottom layer. #[doc(alias = "GTK_LAYER_SHELL_LAYER_BOTTOM")] Bottom, /// The top layer. #[doc(alias = "GTK_LAYER_SHELL_LAYER_TOP")] Top, /// The overlay layer. #[doc(alias = "GTK_LAYER_SHELL_LAYER_OVERLAY")] Overlay, /// Should not be used except to get the number of entries. (NOTE: may change in /// future releases as more entries are added) #[doc(alias = "GTK_LAYER_SHELL_LAYER_ENTRY_NUMBER")] EntryNumber, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for Layer { type GlibType = ffi::GtkLayerShellLayer; #[inline] fn into_glib(self) -> ffi::GtkLayerShellLayer { match self { Self::Background => ffi::GTK_LAYER_SHELL_LAYER_BACKGROUND, Self::Bottom => ffi::GTK_LAYER_SHELL_LAYER_BOTTOM, Self::Top => ffi::GTK_LAYER_SHELL_LAYER_TOP, Self::Overlay => ffi::GTK_LAYER_SHELL_LAYER_OVERLAY, Self::EntryNumber => ffi::GTK_LAYER_SHELL_LAYER_ENTRY_NUMBER, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for Layer { #[inline] unsafe fn from_glib(value: ffi::GtkLayerShellLayer) -> Self { skip_assert_initialized!(); match value { ffi::GTK_LAYER_SHELL_LAYER_BACKGROUND => Self::Background, ffi::GTK_LAYER_SHELL_LAYER_BOTTOM => Self::Bottom, ffi::GTK_LAYER_SHELL_LAYER_TOP => Self::Top, ffi::GTK_LAYER_SHELL_LAYER_OVERLAY => Self::Overlay, ffi::GTK_LAYER_SHELL_LAYER_ENTRY_NUMBER => Self::EntryNumber, value => Self::__Unknown(value), } } } gtk4-layer-shell-0.4.0/src/auto/functions.rs000064400000000000000000000302301046102023000170300ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from .. // from ../gir-files // DO NOT EDIT use crate::{ffi,Edge,KeyboardMode,Layer}; use glib::{prelude::*,translate::*}; /// When auto exclusive zone is enabled, exclusive zone is automatically set to the /// size of the `window` + relevant margin. To disable auto exclusive zone, just set the /// exclusive zone to 0 or any other fixed value. /// /// NOTE: you can control the auto exclusive zone by changing the margin on the non-anchored /// edge. This behavior is specific to gtk4-layer-shell and not part of the underlying protocol /// ## `window` /// A layer surface. #[doc(alias = "gtk_layer_auto_exclusive_zone_enable")] pub fn auto_exclusive_zone_enable(window: &impl IsA) { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_auto_exclusive_zone_enable(window.as_ref().to_glib_none().0); } } /// ## `window` /// A layer surface. /// /// # Returns /// /// if the surface's exclusive zone is set to change based on the window's size #[doc(alias = "gtk_layer_auto_exclusive_zone_is_enabled")] pub fn auto_exclusive_zone_is_enabled(window: &impl IsA) -> bool { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gtk_layer_auto_exclusive_zone_is_enabled(window.as_ref().to_glib_none().0)) } } /// ## `window` /// A layer surface. /// ## `edge` /// the edge to which the surface may or may not be anchored /// /// # Returns /// /// if this surface is anchored to the given edge. #[doc(alias = "gtk_layer_get_anchor")] #[doc(alias = "get_anchor")] pub fn is_anchor(window: &impl IsA, edge: Edge) -> bool { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gtk_layer_get_anchor(window.as_ref().to_glib_none().0, edge.into_glib())) } } /// ## `window` /// A layer surface. /// /// # Returns /// /// the window's exclusive zone (which may have been set manually or automatically) #[doc(alias = "gtk_layer_get_exclusive_zone")] #[doc(alias = "get_exclusive_zone")] pub fn exclusive_zone(window: &impl IsA) -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_get_exclusive_zone(window.as_ref().to_glib_none().0) } } /// ## `window` /// A layer surface. /// /// # Returns /// /// current keyboard interactivity mode for `window`. #[doc(alias = "gtk_layer_get_keyboard_mode")] #[doc(alias = "get_keyboard_mode")] pub fn keyboard_mode(window: &impl IsA) -> KeyboardMode { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gtk_layer_get_keyboard_mode(window.as_ref().to_glib_none().0)) } } /// ## `window` /// A layer surface. /// /// # Returns /// /// the current layer. #[doc(alias = "gtk_layer_get_layer")] #[doc(alias = "get_layer")] pub fn layer(window: &impl IsA) -> Layer { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gtk_layer_get_layer(window.as_ref().to_glib_none().0)) } } /// /// # Returns /// /// the major version number of the GTK Layer Shell library #[doc(alias = "gtk_layer_get_major_version")] #[doc(alias = "get_major_version")] pub fn major_version() -> u32 { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_get_major_version() } } /// ## `window` /// A layer surface. /// ## `edge` /// the margin edge to get /// /// # Returns /// /// the size of the margin for the given edge. #[doc(alias = "gtk_layer_get_margin")] #[doc(alias = "get_margin")] pub fn margin(window: &impl IsA, edge: Edge) -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_get_margin(window.as_ref().to_glib_none().0, edge.into_glib()) } } /// /// # Returns /// /// the micro/patch version number of the GTK Layer Shell library #[doc(alias = "gtk_layer_get_micro_version")] #[doc(alias = "get_micro_version")] pub fn micro_version() -> u32 { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_get_micro_version() } } /// /// # Returns /// /// the minor version number of the GTK Layer Shell library #[doc(alias = "gtk_layer_get_minor_version")] #[doc(alias = "get_minor_version")] pub fn minor_version() -> u32 { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_get_minor_version() } } /// NOTE: To get which monitor the surface is actually on, use /// `gdk_display_get_monitor_at_window()`. /// ## `window` /// A layer surface. /// /// # Returns /// /// the monitor this surface will/has requested to be on, can be [`None`]. #[doc(alias = "gtk_layer_get_monitor")] #[doc(alias = "get_monitor")] pub fn monitor(window: &impl IsA) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gtk_layer_get_monitor(window.as_ref().to_glib_none().0)) } } /// NOTE: this function does not return ownership of the string. Do not free the returned string. /// Future calls into the library may invalidate the returned string. /// ## `window` /// A layer surface. /// /// # Returns /// /// a reference to the namespace property. If namespace is unset, returns the /// default namespace ("gtk4-layer-shell"). Never returns [`None`]. #[doc(alias = "gtk_layer_get_namespace")] #[doc(alias = "get_namespace")] pub fn namespace(window: &impl IsA) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gtk_layer_get_namespace(window.as_ref().to_glib_none().0)) } } /// May block for a Wayland roundtrip the first time it's called. /// /// # Returns /// /// version of the zwlr_layer_shell_v1 protocol supported by the /// compositor or 0 if the protocol is not supported. #[doc(alias = "gtk_layer_get_protocol_version")] #[doc(alias = "get_protocol_version")] pub fn protocol_version() -> u32 { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_get_protocol_version() } } //#[doc(alias = "gtk_layer_get_zwlr_layer_surface_v1")] //#[doc(alias = "get_zwlr_layer_surface_v1")] //pub fn zwlr_layer_surface_v1(window: &impl IsA) -> /*Unimplemented*/Option { // unsafe { TODO: call ffi:gtk_layer_get_zwlr_layer_surface_v1() } //} /// Set the `window` up to be a layer surface once it is mapped. this must be called before /// the `window` is realized. /// ## `window` /// A [`gtk::Window`][crate::gtk::Window] to be turned into a layer surface. #[doc(alias = "gtk_layer_init_for_window")] pub fn init_for_window(window: &impl IsA) { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_init_for_window(window.as_ref().to_glib_none().0); } } /// ## `window` /// A [`gtk::Window`][crate::gtk::Window] that may or may not have a layer surface. /// /// # Returns /// /// if `window` has been initialized as a layer surface. #[doc(alias = "gtk_layer_is_layer_window")] pub fn is_layer_window(window: &impl IsA) -> bool { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gtk_layer_is_layer_window(window.as_ref().to_glib_none().0)) } } /// May block for a Wayland roundtrip the first time it's called. /// /// # Returns /// /// [`true`] if the platform is Wayland and Wayland compositor supports the /// zwlr_layer_shell_v1 protocol. #[doc(alias = "gtk_layer_is_supported")] pub fn is_supported() -> bool { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gtk_layer_is_supported()) } } /// Set whether `window` should be anchored to `edge`. /// - If two perpendicular edges are anchored, the surface with be anchored to that corner /// - If two opposite edges are anchored, the window will be stretched across the screen in that direction /// /// Default is [`false`] for each [`Edge`][crate::Edge] /// ## `window` /// A layer surface. /// ## `edge` /// A [`Edge`][crate::Edge] this layer surface may be anchored to. /// ## `anchor_to_edge` /// Whether or not to anchor this layer surface to `edge`. #[doc(alias = "gtk_layer_set_anchor")] pub fn set_anchor(window: &impl IsA, edge: Edge, anchor_to_edge: bool) { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_set_anchor(window.as_ref().to_glib_none().0, edge.into_glib(), anchor_to_edge.into_glib()); } } /// Has no effect unless the surface is anchored to an edge. Requests that the compositor /// does not place other surfaces within the given exclusive zone of the anchored edge. /// For example, a panel can request to not be covered by maximized windows. See /// wlr-layer-shell-unstable-v1.xml for details. /// /// Default is 0 /// ## `window` /// A layer surface. /// ## `exclusive_zone` /// The size of the exclusive zone. #[doc(alias = "gtk_layer_set_exclusive_zone")] pub fn set_exclusive_zone(window: &impl IsA, exclusive_zone: i32) { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_set_exclusive_zone(window.as_ref().to_glib_none().0, exclusive_zone); } } /// Sets if/when `window` should receive keyboard events from the compositor, see /// GtkLayerShellKeyboardMode for details. /// /// Default is [`KeyboardMode::None`][crate::KeyboardMode::None] /// ## `window` /// A layer surface. /// ## `mode` /// The type of keyboard interactivity requested. #[doc(alias = "gtk_layer_set_keyboard_mode")] pub fn set_keyboard_mode(window: &impl IsA, mode: KeyboardMode) { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_set_keyboard_mode(window.as_ref().to_glib_none().0, mode.into_glib()); } } /// Set the "layer" on which the surface appears (controls if it is over top of or below other surfaces). The layer may /// be changed on-the-fly in the current version of the layer shell protocol, but on compositors that only support an /// older version the `window` is remapped so the change can take effect. /// /// Default is [`Layer::Top`][crate::Layer::Top] /// ## `window` /// A layer surface. /// ## `layer` /// The layer on which this surface appears. #[doc(alias = "gtk_layer_set_layer")] pub fn set_layer(window: &impl IsA, layer: Layer) { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_set_layer(window.as_ref().to_glib_none().0, layer.into_glib()); } } /// Set the margin for a specific `edge` of a `window`. Effects both surface's distance from /// the edge and its exclusive zone size (if auto exclusive zone enabled). /// /// Default is 0 for each [`Edge`][crate::Edge] /// ## `window` /// A layer surface. /// ## `edge` /// The [`Edge`][crate::Edge] for which to set the margin. /// ## `margin_size` /// The margin for `edge` to be set. #[doc(alias = "gtk_layer_set_margin")] pub fn set_margin(window: &impl IsA, edge: Edge, margin_size: i32) { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_set_margin(window.as_ref().to_glib_none().0, edge.into_glib(), margin_size); } } /// Set the output for the window to be placed on, or [`None`] to let the compositor choose. /// If the window is currently mapped, it will get remapped so the change can take effect. /// /// Default is [`None`] /// ## `window` /// A layer surface. /// ## `monitor` /// The output this layer surface will be placed on ([`None`] to let the compositor decide). #[doc(alias = "gtk_layer_set_monitor")] pub fn set_monitor(window: &impl IsA, monitor: &gdk::Monitor) { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_set_monitor(window.as_ref().to_glib_none().0, monitor.to_glib_none().0); } } /// Set the "namespace" of the surface. /// /// No one is quite sure what this is for, but it probably should be something generic /// ("panel", "osk", etc). The `name_space` string is copied, and caller maintains /// ownership of original. If the window is currently mapped, it will get remapped so /// the change can take effect. /// /// Default is "gtk4-layer-shell" (which will be used if set to [`None`]) /// ## `window` /// A layer surface. /// ## `name_space` /// The namespace of this layer surface. #[doc(alias = "gtk_layer_set_namespace")] pub fn set_namespace(window: &impl IsA, name_space: &str) { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_set_namespace(window.as_ref().to_glib_none().0, name_space.to_glib_none().0); } } gtk4-layer-shell-0.4.0/src/auto/mod.rs000064400000000000000000000003631046102023000156030ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from .. // from ../gir-files // DO NOT EDIT mod enums; pub use self::enums::Edge; pub use self::enums::KeyboardMode; pub use self::enums::Layer; pub(crate) mod functions; gtk4-layer-shell-0.4.0/src/auto/versions.txt000064400000000000000000000001751046102023000170700ustar 00000000000000Generated by gir (https://github.com/gtk-rs/gir @ d7c0763cacbc) from .. (@ cce93db83b00+) from ../gir-files (@ 4d1189172a70) gtk4-layer-shell-0.4.0/src/lib.rs000064400000000000000000000243461046102023000146310ustar 00000000000000#![cfg_attr(docsrs, feature(doc_cfg))] #![deny(warnings)] #![allow(rustdoc::redundant_explicit_links)] #[allow(unused_imports)] #[allow(clippy::single_component_path_imports)] use gtk; // Required for the documentation to build without warnings use gtk::prelude::IsA; use gtk4_layer_shell_sys as ffi; macro_rules! assert_initialized_main_thread { () => { if !::gtk::is_initialized_main_thread() { if ::gtk::is_initialized() { panic!("GTK may only be used from the main thread."); } else { panic!("GTK has not been initialized. Call `gtk::init` first."); } } }; } /// No-op. macro_rules! skip_assert_initialized { () => {}; } mod auto; pub use auto::{ functions::is_supported, functions::major_version, functions::micro_version, functions::minor_version, functions::protocol_version, Edge, KeyboardMode, Layer, }; mod manual; //use manual::*; pub trait LayerShell: IsA { /// When auto exclusive zone is enabled, exclusive zone is automatically set to the /// size of the `window` + relevant margin. To disable auto exclusive zone, just set the /// exclusive zone to 0 or any other fixed value. /// /// NOTE: you can control the auto exclusive zone by changing the margin on the non-anchored /// edge. This behavior is specific to gtk-layer-shell and not part of the underlying protocol /// ## `window` /// A layer surface. #[doc(alias = "gtk_layer_auto_exclusive_zone_enable")] fn auto_exclusive_zone_enable(&self) { crate::auto::functions::auto_exclusive_zone_enable(self); } /// ## `window` /// A layer surface. /// /// # Returns /// /// if the surface's exclusive zone is set to change based on the window's size #[doc(alias = "gtk_layer_auto_exclusive_zone_is_enabled")] fn auto_exclusive_zone_is_enabled(&self) -> bool { crate::auto::functions::auto_exclusive_zone_is_enabled(self) } /// ## `window` /// A layer surface. /// ## `edge` /// the edge to which the surface may or may not be anchored /// /// # Returns /// /// if this surface is anchored to the given edge. #[doc(alias = "gtk_layer_get_anchor")] #[doc(alias = "get_anchor")] fn is_anchor(&self, edge: Edge) -> bool { crate::auto::functions::is_anchor(self, edge) } /// ## `window` /// A layer surface. /// /// # Returns /// /// the window's exclusive zone (which may have been set manually or automatically) #[doc(alias = "gtk_layer_get_exclusive_zone")] #[doc(alias = "get_exclusive_zone")] fn exclusive_zone(&self) -> i32 { crate::auto::functions::exclusive_zone(self) } /// ## `window` /// A layer surface. /// /// # Returns /// /// current keyboard interactivity mode for `window`. #[doc(alias = "gtk_layer_get_keyboard_mode")] #[doc(alias = "get_keyboard_mode")] fn keyboard_mode(&self) -> KeyboardMode { crate::auto::functions::keyboard_mode(self) } /// ## `window` /// A layer surface. /// /// # Returns /// /// the current layer. #[doc(alias = "gtk_layer_get_layer")] #[doc(alias = "get_layer")] fn layer(&self) -> Layer { crate::auto::functions::layer(self) } /// ## `window` /// A layer surface. /// ## `edge` /// the margin edge to get /// /// # Returns /// /// the size of the margin for the given edge. #[doc(alias = "gtk_layer_get_margin")] #[doc(alias = "get_margin")] fn margin(&self, edge: Edge) -> i32 { crate::auto::functions::margin(self, edge) } /// NOTE: To get which monitor the surface is actually on, use /// `gdk_display_get_monitor_at_window()`. /// ## `window` /// A layer surface. /// /// # Returns /// /// the monitor this surface will/has requested to be on, can be [`None`]. #[doc(alias = "gtk_layer_get_monitor")] #[doc(alias = "get_monitor")] fn monitor(&self) -> Option { crate::auto::functions::monitor(self) } /// NOTE: this function does not return ownership of the string. Do not free the returned string. /// Future calls into the library may invalidate the returned string. /// ## `window` /// A layer surface. /// /// # Returns /// /// a reference to the namespace property. If namespace is unset, returns the /// default namespace ("gtk-layer-shell"). Never returns [`None`]. #[doc(alias = "gtk_layer_get_namespace")] #[doc(alias = "get_namespace")] fn namespace(&self) -> Option { crate::auto::functions::namespace(self) } /// Set the `window` up to be a layer surface once it is mapped. this must be called before /// the `window` is realized. /// ## `window` /// A [`gtk::Window`][crate::gtk::Window] to be turned into a layer surface. #[doc(alias = "init_for_window")] #[doc(alias = "gtk_layer_init_for_window")] fn init_layer_shell(&self) { crate::auto::functions::init_for_window(self); } /// ## `window` /// A [`gtk::Window`][crate::gtk::Window] that may or may not have a layer surface. /// /// # Returns /// /// if `window` has been initialized as a layer surface. #[doc(alias = "gtk_layer_is_layer_window")] fn is_layer_window(&self) -> bool { crate::auto::functions::is_layer_window(self) } /// Set whether `window` should be anchored to `edge`. /// - If two perpendicular edges are anchored, the surface with be anchored to that corner /// - If two opposite edges are anchored, the window will be stretched across the screen in that direction /// /// Default is [`false`] for each [`Edge`][crate::Edge] /// ## `window` /// A layer surface. /// ## `edge` /// A [`Edge`][crate::Edge] this layer surface may be anchored to. /// ## `anchor_to_edge` /// Whether or not to anchor this layer surface to `edge`. #[doc(alias = "gtk_layer_set_anchor")] fn set_anchor(&self, edge: Edge, anchor_to_edge: bool) { crate::auto::functions::set_anchor(self, edge, anchor_to_edge); } /// Has no effect unless the surface is anchored to an edge. Requests that the compositor /// does not place other surfaces within the given exclusive zone of the anchored edge. /// For example, a panel can request to not be covered by maximized windows. See /// wlr-layer-shell-unstable-v1.xml for details. /// /// Default is 0 /// ## `window` /// A layer surface. /// ## `exclusive_zone` /// The size of the exclusive zone. #[doc(alias = "gtk_layer_set_exclusive_zone")] fn set_exclusive_zone(&self, exclusive_zone: i32) { crate::auto::functions::set_exclusive_zone(self, exclusive_zone); } /// Sets if/when `window` should receive keyboard events from the compositor, see /// GtkLayerShellKeyboardMode for details. /// /// Default is [`KeyboardMode::None`][crate::KeyboardMode::None] /// ## `window` /// A layer surface. /// ## `mode` /// The type of keyboard interactivity requested. #[doc(alias = "gtk_layer_set_keyboard_mode")] fn set_keyboard_mode(&self, mode: KeyboardMode) { crate::auto::functions::set_keyboard_mode(self, mode); } /// Set the "layer" on which the surface appears (controls if it is over top of or below other surfaces). The layer may /// be changed on-the-fly in the current version of the layer shell protocol, but on compositors that only support an /// older version the `window` is remapped so the change can take effect. /// /// Default is [`Layer::Top`][crate::Layer::Top] /// ## `window` /// A layer surface. /// ## `layer` /// The layer on which this surface appears. #[doc(alias = "gtk_layer_set_layer")] fn set_layer(&self, layer: Layer) { crate::auto::functions::set_layer(self, layer); } /// Set the margin for a specific `edge` of a `window`. Effects both surface's distance from /// the edge and its exclusive zone size (if auto exclusive zone enabled). /// /// Default is 0 for each [`Edge`][crate::Edge] /// ## `window` /// A layer surface. /// ## `edge` /// The [`Edge`][crate::Edge] for which to set the margin. /// ## `margin_size` /// The margin for `edge` to be set. #[doc(alias = "gtk_layer_set_margin")] fn set_margin(&self, edge: Edge, margin_size: i32) { crate::auto::functions::set_margin(self, edge, margin_size); } /// Set the output for the window to be placed on, or [`None`] to let the compositor choose. /// If the window is currently mapped, it will get remapped so the change can take effect. /// /// Default is [`None`] /// ## `window` /// A layer surface. /// ## `monitor` /// The output this layer surface will be placed on ([`None`] to let the compositor decide). #[doc(alias = "gtk_layer_set_monitor")] fn set_monitor(&self, monitor: &gdk::Monitor) { crate::auto::functions::set_monitor(self, monitor); } /// Set the "namespace" of the surface. /// /// No one is quite sure what this is for, but it probably should be something generic /// ("panel", "osk", etc). The `name_space` string is copied, and caller maintains /// ownership of original. If the window is currently mapped, it will get remapped so /// the change can take effect. /// /// Default is "gtk-layer-shell" (which will be used if set to [`None`]) /// ## `window` /// A layer surface. /// ## `name_space` /// The namespace of this layer surface. #[doc(alias = "gtk_layer_set_namespace")] fn set_namespace(&self, name_space: &str) { crate::auto::functions::set_namespace(self, name_space); } /* TODO: Fix this /// ## `window` /// A layer surface. /// /// # Returns /// /// The underlying layer surface Wayland object /// #[doc(alias = "gtk_layer_get_zwlr_layer_surface_v1")] #[doc(alias = "get_zwlr_layer_surface_v1")] fn zwlr_layer_surface_v1( window: &impl glib::object::IsA, ) -> *mut ZwlrLayerSurfaceV1 { zwlr_layer_surface_v1(self) }*/ } // The default implementation is always fine impl> LayerShell for T {} gtk4-layer-shell-0.4.0/src/manual.rs000064400000000000000000000010451046102023000153270ustar 00000000000000/* pub type ZwlrLayerSurfaceV1 = ffi::zwlr_layer_surface_v1; /// ## `window` /// A layer surface. /// /// # Returns /// /// The underlying layer surface Wayland object #[doc(alias = "gtk_layer_get_zwlr_layer_surface_v1")] #[doc(alias = "get_zwlr_layer_surface_v1")] pub fn zwlr_layer_surface_v1( window: &impl glib::object::IsA, ) -> *mut ZwlrLayerSurfaceV1 { use glib::translate::ToGlibPtr; assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_get_zwlr_layer_surface_v1(window.as_ref().to_glib_none().0) } } */