gtk4-layer-shell-0.6.3/.cargo_vcs_info.json0000644000000001560000000000100141340ustar { "git": { "sha1": "fb402b9e6dcc8125fd8f29865ef637b6c40c191d" }, "path_in_vcs": "gtk4-layer-shell" }gtk4-layer-shell-0.6.3/Cargo.lock0000644000000737140000000000100121210ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 3 [[package]] name = "addr2line" version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] name = "adler2" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "autocfg" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", "windows-targets 0.52.6", ] [[package]] name = "bitflags" version = "2.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d" [[package]] name = "bumpalo" version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "cairo-rs" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1158f326d7b755a9ae2b36c5b5391400e3431f3b77418cedb6d7130126628f10" dependencies = [ "bitflags", "cairo-sys-rs", "glib", "libc", ] [[package]] name = "cairo-sys-rs" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b963177900ec8e783927e5ed99e16c0ec1b723f1f125dff8992db28ef35c62c3" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "cfg-expr" version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d458d63f0f0f482c8da9b7c8b76c21bd885a02056cc94c6404d861ca2b8206" dependencies = [ "smallvec", "target-lexicon", ] [[package]] name = "cfg-if" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[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.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", "nanorand", "spin", ] [[package]] name = "fragile" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" [[package]] name = "futures" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", "futures-executor", "futures-io", "futures-sink", "futures-task", "futures-util", ] [[package]] name = "futures-channel" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", ] [[package]] name = "futures-core" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", "futures-util", ] [[package]] name = "futures-io" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "futures-sink" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 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.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c7330cdbbc653df431331ae3d9d59e985a0fecaf33d74c7c1c5d13ab0245f6c" dependencies = [ "gdk-pixbuf-sys", "gio", "glib", "libc", ] [[package]] name = "gdk-pixbuf-sys" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e25899cc931dc28cba912ebec793b730f53d2d419f90a562fcb29b53bd10aa82" dependencies = [ "gio-sys", "glib-sys", "gobject-sys", "libc", "system-deps", ] [[package]] name = "gdk4" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a67b064d2f35e649232455c7724f56f977555d2608c43300eabc530eaa4e359" dependencies = [ "cairo-rs", "gdk-pixbuf", "gdk4-sys", "gio", "gl", "glib", "libc", "pango", ] [[package]] name = "gdk4-sys" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2edbda0d879eb85317bdb49a3da591ed70a804a10776e358ef416be38c6db2c5" 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.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "js-sys", "libc", "wasi", "wasm-bindgen", ] [[package]] name = "gimli" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gio" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52b5e3f390d01b79e30da451dd00e27cd1ac2de81658e3abf6c1fc3229b24c5f" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-util", "gio-sys", "glib", "libc", "pin-project-lite", "smallvec", ] [[package]] name = "gio-sys" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a03f2234671e5a588cfe1f59c2b22c103f5772ea351be9cc824a9ce0d06d99fd" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", "windows-sys 0.60.2", ] [[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.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60bdc26493257b5794ba9301f7cbaf7ab0d69a570bfbefa4d7d360e781cb5205" dependencies = [ "bitflags", "futures-channel", "futures-core", "futures-executor", "futures-task", "futures-util", "gio-sys", "glib-macros", "glib-sys", "gobject-sys", "libc", "memchr", "smallvec", ] [[package]] name = "glib-macros" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e772291ebea14c28eb11bb75741f62f4a4894f25e60ce80100797b6b010ef0f9" dependencies = [ "heck", "proc-macro-crate", "proc-macro2", "quote", "syn", ] [[package]] name = "glib-sys" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc7c43cff6a7dc43821e45ebf172399437acd6716fa2186b6852d2b397bf622d" dependencies = [ "libc", "system-deps", ] [[package]] name = "gobject-sys" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e9a190eef2bce144a6aa8434e306974c6062c398e0a33a146d60238f9062d5c" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "graphene-rs" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d96914394464c04df8279c23976293afd53b2588e03c9d8d9662ef6528654a85" dependencies = [ "glib", "graphene-sys", "libc", ] [[package]] name = "graphene-sys" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8205bb19b7a041cf059be3c94d6b23b3f2c6c96362c44311dcf184e4a9422a" dependencies = [ "glib-sys", "libc", "pkg-config", "system-deps", ] [[package]] name = "gsk4" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5dbe33ceed6fc20def67c03d36e532f5a4a569ae437ae015a7146094f31e10c" dependencies = [ "cairo-rs", "gdk4", "glib", "graphene-rs", "gsk4-sys", "libc", "pango", ] [[package]] name = "gsk4-sys" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d76011d55dd19fde16ffdedee08877ae6ec942818cfa7bc08a91259bc0b9fc9" dependencies = [ "cairo-sys-rs", "gdk4-sys", "glib-sys", "gobject-sys", "graphene-sys", "libc", "pango-sys", "system-deps", ] [[package]] name = "gtk4" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "938d68ad43080ad5ee710c30d467c1bc022ee5947856f593855691d726305b3e" 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.6.3" dependencies = [ "bitflags", "gdk4", "gio", "glib", "glib-sys", "gtk4", "gtk4-layer-shell-sys", "libadwaita", "libc", "relm4", ] [[package]] name = "gtk4-layer-shell-sys" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89e5228548ca4610a3406ddd97eb1b3ad366de04d02ae6a8fa80eaad85be1931" dependencies = [ "gdk4-sys", "glib-sys", "gtk4-sys", "libc", "system-deps", ] [[package]] name = "gtk4-macros" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0912d2068695633002b92c5966edc108b2e4f54b58c509d1eeddd4cbceb7315c" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", "syn", ] [[package]] name = "gtk4-sys" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a923bdcf00e46723801162de24432cbce38a6810e0178a2d0b6dd4ecc26a1c74" 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.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indexmap" version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" dependencies = [ "equivalent", "hashbrown", ] [[package]] name = "io-uring" version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" dependencies = [ "bitflags", "cfg-if", "libc", ] [[package]] name = "js-sys" version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "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.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4df6715d1257bd8c093295b77a276ed129d73543b10304fec5829ced5d5b7c41" dependencies = [ "gdk4", "gio", "glib", "gtk4", "libadwaita-sys", "libc", "pango", ] [[package]] name = "libadwaita-sys" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf8950090cc180250cdb1ff859a39748feeda7a53a9f28ead3a17a14cc37ae2" dependencies = [ "gdk4-sys", "gio-sys", "glib-sys", "gobject-sys", "gtk4-sys", "libc", "pango-sys", "system-deps", ] [[package]] name = "libc" version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "lock_api" version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", ] [[package]] name = "log" version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "memchr" version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[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.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] [[package]] name = "mio" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", "wasi", "windows-sys 0.59.0", ] [[package]] name = "nanorand" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ "getrandom", ] [[package]] name = "object" version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "pango" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab47feb3403aa564edaeb68620c5b9159f8814733a7dd45f0b1a27d19de362fe" dependencies = [ "gio", "glib", "libc", "pango-sys", ] [[package]] name = "pango-sys" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f855bccb447644e149fae79086e1f81514c30fe5e9b8bd257d9d3c941116c86" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", ] [[package]] name = "pin-project-lite" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[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.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "proc-macro-crate" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ "toml_edit", ] [[package]] name = "proc-macro2" version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] [[package]] name = "relm4" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bae902de22fd92e62641f047975abf228573425b9b8de175e8ab5b6cda10379" dependencies = [ "flume", "fragile", "futures", "gtk4", "once_cell", "relm4-css", "relm4-macros", "tokio", "tracing", ] [[package]] name = "relm4-css" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37dbe7a114855a22618f0e13595ce6b3f165478c13c2dfc4f4f99614da105797" [[package]] name = "relm4-macros" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175fce497fc6f11dde7ea56daa30ff7ad29a534bbc209d59d766659c880ba5f1" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "rustc-demangle" version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc_version" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" 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.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" [[package]] name = "serde" version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_spanned" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] [[package]] name = "slab" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[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.106" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "system-deps" version = "7.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4be53aa0cba896d2dc615bd42bbc130acdcffa239e0a2d965ea5b3b2a86ffdb" dependencies = [ "cfg-expr", "heck", "pkg-config", "toml", "version-compare", ] [[package]] name = "target-lexicon" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" [[package]] name = "tokio" version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "io-uring", "libc", "mio", "pin-project-lite", "slab", ] [[package]] name = "toml" version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", "toml_datetime", "toml_edit", ] [[package]] name = "toml_datetime" version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] [[package]] name = "toml_edit" version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", "winnow", ] [[package]] name = "tracing" version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "tracing-core" version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", ] [[package]] name = "unicode-ident" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[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.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasm-bindgen" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" dependencies = [ "unicode-ident", ] [[package]] name = "windows-link" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] name = "windows-sys" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets 0.52.6", ] [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ "windows-targets 0.53.3", ] [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] [[package]] name = "windows-targets" version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", "windows_i686_gnullvm 0.53.0", "windows_i686_msvc 0.53.0", "windows_x86_64_gnu 0.53.0", "windows_x86_64_gnullvm 0.53.0", "windows_x86_64_msvc 0.53.0", ] [[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_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_aarch64_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" [[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_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" [[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_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_i686_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" [[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_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" [[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_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windows_x86_64_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] [[package]] name = "xml-rs" version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fd8403733700263c6eb89f192880191f1b83e332f7a20371ddcf421c4a337c7" gtk4-layer-shell-0.6.3/Cargo.toml0000644000000036110000000000100121310ustar # 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.6.3" authors = ["pentamassiv "] build = false exclude = ["examples"] autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "Safe 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", ] [features] [lib] name = "gtk4_layer_shell" path = "src/lib.rs" [dependencies.bitflags] version = "2.0" [dependencies.gdk] version = "0.10" package = "gdk4" [dependencies.glib] version = "0.21" [dependencies.glib-sys] version = "0.21" [dependencies.gtk] version = "0.10" package = "gtk4" [dependencies.gtk4-layer-shell-sys] version = "0.4" [dependencies.libc] version = "0.2" [dev-dependencies.gio] version = "0.21" [dev-dependencies.libadwaita] version = "0.8" [dev-dependencies.relm4] version = "0.10" [target."cfg(docsrs)".dependencies.gdk] version = "0.10" features = [ "gl", "v4_16", ] package = "gdk4" gtk4-layer-shell-0.6.3/Cargo.toml.orig000064400000000000000000000020131046102023000156050ustar 00000000000000[package] name = "gtk4-layer-shell" version = "0.6.3" description = "Safe 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 = { workspace = true, features = ["gl", "v4_16"] } gtk4-layer-shell-0.6.3/Gir.toml000064400000000000000000000006421046102023000143420ustar 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.6.3/README.md000064400000000000000000000061551046102023000142100ustar 00000000000000[![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.6.3/status.svg)](https://deps.rs/crate/gtk4-layer-shell/0.6.3) [![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 This crate allows building desktop shell components such as panels, notifications and wallpapers with GTK4. It can be used to anchor your windows to a corner or edge of the output, or stretch them across the entire output. To do that, it uses the [Layer Shell](https://wayland.app/protocols/wlr-layer-shell-unstable-v1) Wayland protocol. A list of supported compositors can be found [here](https://wayland.app/protocols/wlr-layer-shell-unstable-v1#compositor-support). ## Dependencies You need to have `gtk4` and `gtk4-layer-shell` (the C library) installed on your system. `gtk4-layer-shell` version 1.1.0 or higher is needed to use `gtk4-session-lock`. If you want to use [gtk4-layer-shell](https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-layer-shell) and [gtk4-session-lock](https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-session-lock) together in a project, make sure to use the same .so file of `gtk4-layer-shell` for both. If your distribution does not provide a current enough version of `gtk4-layer-shell`, you can [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 ``` ## 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 bindings yourself is not necessary to be able to use them. You can just use the version published on crates.io. If you want to do it anyways, you can find a description [here](https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/generate_bindings.md). ## Maintenance status This crate is just a safe wrapper for the C library so the bindings are feature complete and not actively worked on. The C library is actively developed and I keep the bindings up-to-date with it. 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.6.3/src/auto/enums.rs000064400000000000000000000134751046102023000161700ustar 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.6.3/src/auto/functions.rs000064400000000000000000000304341046102023000170430ustar 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_surface()`. /// ## `window` /// A layer surface. /// /// # Returns /// /// the monitor this surface will/has requested to be on. #[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. To control mouse/touch interactivity use input regions, /// see [`61`](https://github.com/wmww/gtk4-layer-shell/issues/61) 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: Option<&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: Option<&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.6.3/src/auto/mod.rs000064400000000000000000000003631046102023000156100ustar 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.6.3/src/auto/versions.txt000064400000000000000000000001751046102023000170750ustar 00000000000000Generated by gir (https://github.com/gtk-rs/gir @ ab56426172f9) from .. (@ 915348947bd0+) from ../gir-files (@ 1490bcc19dc8) gtk4-layer-shell-0.6.3/src/lib.rs000064400000000000000000000254721046102023000146370ustar 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 glib::translate::{FromGlib, TryFromGlib}; use gtk::prelude::IsA; use gtk4_layer_shell_sys as ffi; impl TryFromGlib for Layer { type Error = glib::translate::GlibNoneError; unsafe fn try_from_glib(value: ffi::GtkLayerShellLayer) -> Result { let layer = unsafe { Self::from_glib(value) }; // If we got an unknown variant, return an error; otherwise, return the value. match layer { Layer::__Unknown(_) => Err(glib::translate::GlibNoneError), _ => Ok(layer), } } } 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; pub 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_surface()`. /// ## `window` /// A layer surface. /// /// # Returns /// /// the monitor this surface will/has requested to be on. #[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("gtk4-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. To control mouse/touch interactivity use input regions, /// see [`61`](https://github.com/wmww/gtk4-layer-shell/issues/61) 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: Option<&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 "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")] fn set_namespace(&self, name_space: Option<&str>) { crate::auto::functions::set_namespace(self, name_space); } /// ## `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(&self) -> Option<*mut ffi::zwlr_layer_surface_v1> { zwlr_layer_surface_v1(self) } } // The default implementation is always fine impl> LayerShell for T {} gtk4-layer-shell-0.6.3/src/manual.rs000064400000000000000000000012071046102023000153340ustar 00000000000000use glib::object::IsA; use glib::translate::*; use gtk4_layer_shell_sys as ffi; /// ## `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 IsA, ) -> Option<*mut ffi::zwlr_layer_surface_v1> { assert_initialized_main_thread!(); unsafe { let ptr = ffi::gtk_layer_get_zwlr_layer_surface_v1(window.as_ref().to_glib_none().0); if ptr.is_null() { None } else { Some(ptr) } } }