gdk4-wayland-0.9.6/.cargo_vcs_info.json0000644000000001520000000000100133340ustar { "git": { "sha1": "20d14bdf598eb1a3bde54e68c32b92775b165bd4" }, "path_in_vcs": "gdk4-wayland" }gdk4-wayland-0.9.6/COPYRIGHT000064400000000000000000000012131046102023000134160ustar 00000000000000The gtk-rs Project is licensed under the MIT license, see the LICENSE file or . Copyrights in the gtk-rs Project project are retained by their contributors. No copyright assignment is required to contribute to the gtk-rs Project project. For full authorship information, see the version control history. This project provides interoperability with various GNOME libraries but doesn't distribute any parts of them. Distributing compiled libraries and executables that link to those libraries may be subject to terms of the GNU LGPL or other licenses. For more information check the license of each GNOME library. gdk4-wayland-0.9.6/Cargo.lock0000644000000453520000000000100113220ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 3 [[package]] name = "autocfg" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "cairo-rs" version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae50b5510d86cf96ac2370e66d8dc960882f3df179d6a5a1e52bd94a1416c0f7" dependencies = [ "bitflags", "cairo-sys-rs", "glib", "libc", ] [[package]] name = "cairo-sys-rs" version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f18b6bb8e43c7eb0f2aac7976afe0c61b6f5fc2ab7bc4c139537ea56c92290df" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "cc" version = "1.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9" dependencies = [ "shlex", ] [[package]] name = "cfg-expr" version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d4ba6e40bd1184518716a6e1a781bf9160e286d219ccdb8ab2612e74cfe4789" 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 = "dlib" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ "libloading", ] [[package]] name = "downcast-rs" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", "windows-sys 0.59.0", ] [[package]] name = "futures-channel" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", ] [[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-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-core", "futures-macro", "futures-task", "pin-project-lite", "pin-utils", "slab", ] [[package]] name = "gdk-pixbuf" version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7563afd6ff0a221edfbb70a78add5075b8d9cb48e637a40a24c3ece3fea414d0" dependencies = [ "gdk-pixbuf-sys", "gio", "glib", "libc", ] [[package]] name = "gdk-pixbuf-sys" version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67f2587c9202bf997476bbba6aaed4f78a11538a2567df002a5f57f5331d0b5c" dependencies = [ "gio-sys", "glib-sys", "gobject-sys", "libc", "system-deps", ] [[package]] name = "gdk4" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4850c9d9c1aecd1a3eb14fadc1cdb0ac0a2298037e116264c7473e1740a32d60" dependencies = [ "cairo-rs", "gdk-pixbuf", "gdk4-sys", "gio", "glib", "libc", "pango", ] [[package]] name = "gdk4-sys" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f6eb95798e2b46f279cf59005daf297d5b69555428f185650d71974a910473a" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", "gio-sys", "glib-sys", "gobject-sys", "libc", "pango-sys", "pkg-config", "system-deps", ] [[package]] name = "gdk4-wayland" version = "0.9.6" dependencies = [ "gdk4", "gdk4-wayland-sys", "gio", "gir-format-check", "glib", "khronos-egl", "libc", "wayland-backend", "wayland-client", ] [[package]] name = "gdk4-wayland-sys" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c7a0f2332c531d62ee3f14f5e839ac1abac59e9b052adf1495124c00d89a34b" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "gio" version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4f00c70f8029d84ea7572dd0e1aaa79e5329667b4c17f329d79ffb1e6277487" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-util", "gio-sys", "glib", "libc", "pin-project-lite", "smallvec", ] [[package]] name = "gio-sys" version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "160eb5250a26998c3e1b54e6a3d4ea15c6c7762a6062a19a7b63eff6e2b33f9e" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", "windows-sys 0.52.0", ] [[package]] name = "gir-format-check" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a5da913a8586ce748f1164c890e1ebe75a7bbc472668f57b7f9fb893d7ac416" [[package]] name = "glib" version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707b819af8059ee5395a2de9f2317d87a53dbad8846a2f089f0bb44703f37686" 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.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "715601f8f02e71baef9c1f94a657a9a77c192aea6097cf9ae7e5e177cd8cde68" dependencies = [ "heck", "proc-macro-crate", "proc-macro2", "quote", "syn", ] [[package]] name = "glib-sys" version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8928869a44cfdd1fccb17d6746e4ff82c8f82e41ce705aa026a52ca8dc3aefb" dependencies = [ "libc", "system-deps", ] [[package]] name = "gobject-sys" version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c773a3cb38a419ad9c26c81d177d96b4b08980e8bdbbf32dace883e96e96e7e3" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "hashbrown" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indexmap" version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", "hashbrown", ] [[package]] name = "khronos-egl" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", ] [[package]] name = "libc" version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", "windows-targets", ] [[package]] name = "linux-raw-sys" version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "log" version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "pango" version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b1f5dc1b8cf9bc08bfc0843a04ee0fa2e78f1e1fa4b126844a383af4f25f0ec" dependencies = [ "gio", "glib", "libc", "pango-sys", ] [[package]] name = "pango-sys" version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dbb9b751673bd8fe49eb78620547973a1e719ed431372122b20abd12445bab5" 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.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "proc-macro-crate" version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ "toml_edit", ] [[package]] name = "proc-macro2" version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" version = "0.37.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003" dependencies = [ "memchr", ] [[package]] name = "quote" version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] [[package]] name = "rustix" version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys 0.59.0", ] [[package]] name = "scoped-tls" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "serde" version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_spanned" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[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.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "syn" version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "system-deps" version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66d23aaf9f331227789a99e8de4c91bf46703add012bdfd45fdecdfb2975a005" dependencies = [ "cfg-expr", "heck", "pkg-config", "toml", "version-compare", ] [[package]] name = "target-lexicon" version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "toml" version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ "serde", "serde_spanned", "toml_datetime", "toml_edit", ] [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", "winnow", ] [[package]] name = "unicode-ident" version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "version-compare" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "wayland-backend" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7208998eaa3870dad37ec8836979581506e0c5c64c20c9e79e9d2a10d6f47bf" dependencies = [ "cc", "downcast-rs", "rustix", "scoped-tls", "smallvec", "wayland-sys", ] [[package]] name = "wayland-client" version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2120de3d33638aaef5b9f4472bff75f07c56379cf76ea320bd3a3d65ecaf73f" dependencies = [ "bitflags", "rustix", "wayland-backend", "wayland-scanner", ] [[package]] name = "wayland-scanner" version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "896fdafd5d28145fce7958917d69f2fd44469b1d4e861cb5961bcbeebc6d1484" dependencies = [ "proc-macro2", "quick-xml", "quote", ] [[package]] name = "wayland-sys" version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbcebb399c77d5aa9fa5db874806ee7b4eba4e73650948e8f93963f128896615" dependencies = [ "dlib", "log", "pkg-config", ] [[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-sys" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 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.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59690dea168f2198d1a3b0cac23b8063efcd11012f10ae4698f284808c8ef603" dependencies = [ "memchr", ] gdk4-wayland-0.9.6/Cargo.toml0000644000000044660000000000100113460ustar # 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 = "gdk4-wayland" version = "0.9.6" authors = ["The gtk-rs Project Developers"] build = false autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "Rust bindings of the GDK 4 Wayland library" homepage = "https://gtk-rs.org/gtk4-rs" documentation = "https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_wayland/" readme = "README.md" keywords = [ "gdk4", "gdk4-wayland", "gtk-rs", "gnome", "GUI", ] categories = [ "api-bindings", "gui", ] license = "MIT" repository = "https://github.com/gtk-rs/gtk4-rs" [package.metadata.docs.rs] all-features = true rustc-args = [ "--cfg", "docsrs", ] rustdoc-args = [ "--cfg", "docsrs", "--generate-link-to-definition", ] [lib] name = "gdk4_wayland" path = "src/lib.rs" [[test]] name = "check_gir" path = "tests/check_gir.rs" [dependencies.gdk] version = "0.9" package = "gdk4" [dependencies.gdk4-wayland-sys] version = "0.9.4" [dependencies.gio] version = "0.20" features = ["v2_66"] [dependencies.glib] version = "0.20" features = ["v2_66"] [dependencies.khronos-egl] version = "6.0" optional = true [dependencies.libc] version = "0.2" [dependencies.wayland-backend] version = "0.3.0" features = ["client_system"] optional = true [dependencies.wayland-client] version = "0.31.0" optional = true [dev-dependencies.gir-format-check] version = "^0.1" [features] egl = ["khronos-egl"] v4_10 = [ "gdk4-wayland-sys/v4_10", "v4_4", "gdk/v4_10", ] v4_12 = [ "gdk4-wayland-sys/v4_12", "v4_10", "gdk/v4_12", ] v4_16 = [ "gdk4-wayland-sys/v4_16", "v4_12", "gdk/v4_16", ] v4_18 = [ "gdk4-wayland-sys/v4_18", "v4_16", "gdk/v4_18", ] v4_4 = [ "gdk4-wayland-sys/v4_4", "gdk/v4_4", ] wayland_crate = [ "wayland-client", "wayland-backend", ] gdk4-wayland-0.9.6/Cargo.toml.orig000064400000000000000000000025101046102023000150130ustar 00000000000000[package] name = "gdk4-wayland" description = "Rust bindings of the GDK 4 Wayland library" documentation = "https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_wayland/" keywords = ["gdk4", "gdk4-wayland", "gtk-rs", "gnome", "GUI"] readme = "README.md" authors.workspace = true categories.workspace = true edition.workspace = true homepage.workspace = true license.workspace = true repository.workspace = true rust-version.workspace = true version.workspace = true [features] v4_4 = ["gdk4-wayland-sys/v4_4", "gdk/v4_4"] v4_10 = ["gdk4-wayland-sys/v4_10", "v4_4", "gdk/v4_10"] v4_12 = ["gdk4-wayland-sys/v4_12", "v4_10", "gdk/v4_12"] v4_16 = ["gdk4-wayland-sys/v4_16", "v4_12", "gdk/v4_16"] v4_18 = ["gdk4-wayland-sys/v4_18", "v4_16", "gdk/v4_18"] wayland_crate = ["wayland-client", "wayland-backend"] egl = ["khronos-egl"] [dependencies] gdk4-wayland-sys.workspace = true gdk.workspace= true gio.workspace = true glib.workspace = true libc.workspace = true wayland-client = {version = "0.31.0", optional = true} wayland-backend = {version = "0.3.0", optional = true, features = ["client_system"]} khronos-egl = {version = "6.0", optional = true} [dev-dependencies] gir-format-check.workspace = true [package.metadata.docs.rs] all-features = true rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] gdk4-wayland-0.9.6/Gir.toml000064400000000000000000000043411046102023000135460ustar 00000000000000[options] girs_directories = ["../gir-files"] library = "GdkWayland" version = "4.0" min_cfg_version = "4.0.0" target_path = "." work_mode = "normal" use_gi_docgen = true single_version_file = true generate_safety_asserts = true deprecate_by_min_version = true trust_return_value_nullability = true generate = [ "GdkWayland.WaylandGLContext", "GdkWayland.WaylandPopup", ] manual = [ "Gdk.DrawContext", "Gdk.InputSource", # docs only "Gdk.Popup", "Gdk.Toplevel", ] [[object]] name = "Gdk.Device" status = "manual" final_type = false [[object]] name = "Gdk.Display" status = "manual" final_type = false [[object.function]] name = "notify_startup_complete" ignore = true # docs only, otherwise it gets picked as ExtManual [[object]] name = "Gdk.GLContext" status = "manual" final_type = false [[object]] name = "Gdk.Monitor" status = "manual" final_type = false [[object]] name = "Gdk.Seat" status = "manual" final_type = false [[object]] name = "Gdk.Surface" status = "manual" final_type = false [[object]] name = "GdkWayland.WaylandDevice" status = "generate" [[object.function]] name = "get_wl_keyboard" manual = true [[object.function]] name = "get_wl_pointer" manual = true [[object.function]] name = "get_wl_seat" manual = true [[object.function]] name = "get_xkb_keymap" ignore = true [[object]] name = "GdkWayland.WaylandDisplay" status = "generate" [[object.function]] name = "get_egl_display" manual = true [[object.function]] name = "get_wl_compositor" manual = true [[object.function]] name = "get_wl_display" manual = true [[object]] name = "GdkWayland.WaylandMonitor" status = "generate" [[object.function]] name = "get_wl_output" manual = true [[object]] name = "GdkWayland.WaylandSeat" status = "generate" [[object.function]] name = "get_wl_seat" manual = true [[object]] name = "GdkWayland.WaylandSurface" status = "generate" manual_traits = ["WaylandSurfaceExtManual"] [[object.function]] name = "get_wl_surface" rename = "wl_surface" manual = true [[object]] name = "GdkWayland.WaylandToplevel" status = "generate" [[object.function]] name = "export_handle" manual = truegdk4-wayland-0.9.6/LICENSE000064400000000000000000000020001046102023000131230ustar 00000000000000Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. gdk4-wayland-0.9.6/README.md000064400000000000000000000042621046102023000134110ustar 00000000000000# Rust GDK 4 Wayland bindings The project website is [here](https://gtk-rs.org/). Rust bindings of [GDK 4's Wayland backend](https://docs.gtk.org/gdk4-wayland/), part of [gtk4-rs](https://github.com/gtk-rs/gtk4-rs/). GDK is an intermediate layer that isolates GTK from the details of the windowing system. GDK Wayland contains functions specific to the Wayland backend. ## Minimum supported Rust version Currently, the minimum supported Rust version is `1.70`. ## Documentation - The Rust API [Stable](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_wayland/)/[Development](https://gtk-rs.org/gtk4-rs/git/docs/gdk4_wayland/) - [The C API](https://docs.gtk.org/gdk4-wayland/) - [GTK Installation instructions](https://www.gtk.org/docs/installations/) ## Using We recommend using [crates from crates.io](https://crates.io/keywords/gtk-rs), as [demonstrated here](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gtk4/index.html#library-versions). If you want to track the bleeding edge, use the git dependency instead: ```toml [dependencies] gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-wayland" } ``` Avoid mixing versioned and git crates like this: ```toml # This will not compile [dependencies] gdk-x11 = {version = "0.1", package = "gdk4-x11"} gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-wayland" } ``` ### Features | Feature | Description | | --- | ----------- | | `v4_18` | Enable the new APIs part of GTK 4.18 | | `v4_16` | Enable the new APIs part of GTK 4.16 | | `v4_12` | Enable the new APIs part of GTK 4.12 | | `v4_10` | Enable the new APIs part of GTK 4.10 | | `v4_4` | Enable the new APIs part of GTK 4.4 | | `wayland_crate` | Integration with the [wayland-client](https://crates.io/crates/wayland-client) crate | | `egl` | Integration with the [khronos-egl](https://crates.io/crates/khronos-egl) crate | ### See Also - [glib](https://crates.io/crates/glib) - [gio](https://crates.io/crates/gio) - [gsk4](https://crates.io/crates/gsk4) - [gdk4](https://crates.io/crates/gdk4) - [gtk4](https://crates.io/crates/gtk4) ## License The Rust bindings of __gdk4-wayland__ are available under the MIT License, please refer to it. gdk4-wayland-0.9.6/src/auto/mod.rs000064400000000000000000000013741046102023000150170ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT mod wayland_device; pub use self::wayland_device::WaylandDevice; mod wayland_display; pub use self::wayland_display::WaylandDisplay; mod wayland_gl_context; pub use self::wayland_gl_context::WaylandGLContext; mod wayland_monitor; pub use self::wayland_monitor::WaylandMonitor; mod wayland_popup; pub use self::wayland_popup::WaylandPopup; mod wayland_seat; pub use self::wayland_seat::WaylandSeat; mod wayland_surface; pub use self::wayland_surface::WaylandSurface; mod wayland_toplevel; pub use self::wayland_toplevel::WaylandToplevel; pub(crate) mod traits { pub use super::wayland_surface::WaylandSurfaceExt; } gdk4-wayland-0.9.6/src/auto/versions.txt000064400000000000000000000002041046102023000162720ustar 00000000000000Generated by gir (https://github.com/gtk-rs/gir @ 2b05eaddce95) from gir-files (https://github.com/gtk-rs/gir-files @ 5089b7ff80cd) gdk4-wayland-0.9.6/src/auto/wayland_device.rs000064400000000000000000000012711046102023000172120ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; use glib::translate::*; glib::wrapper! { #[doc(alias = "GdkWaylandDevice")] pub struct WaylandDevice(Object) @extends gdk::Device; match fn { type_ => || ffi::gdk_wayland_device_get_type(), } } impl WaylandDevice { #[doc(alias = "gdk_wayland_device_get_node_path")] #[doc(alias = "get_node_path")] pub fn node_path(&self) -> Option { unsafe { from_glib_none(ffi::gdk_wayland_device_get_node_path(self.to_glib_none().0)) } } } gdk4-wayland-0.9.6/src/auto/wayland_display.rs000064400000000000000000000040141046102023000174160ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT #![allow(deprecated)] use crate::ffi; use glib::translate::*; glib::wrapper! { #[doc(alias = "GdkWaylandDisplay")] pub struct WaylandDisplay(Object) @extends gdk::Display; match fn { type_ => || ffi::gdk_wayland_display_get_type(), } } impl WaylandDisplay { #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")] #[allow(deprecated)] #[doc(alias = "gdk_wayland_display_get_startup_notification_id")] #[doc(alias = "get_startup_notification_id")] pub fn startup_notification_id(&self) -> Option { unsafe { from_glib_none(ffi::gdk_wayland_display_get_startup_notification_id( self.to_glib_none().0, )) } } #[doc(alias = "gdk_wayland_display_query_registry")] pub fn query_registry(&self, global: &str) -> bool { unsafe { from_glib(ffi::gdk_wayland_display_query_registry( self.to_glib_none().0, global.to_glib_none().0, )) } } #[cfg_attr(feature = "v4_16", deprecated = "Since 4.16")] #[allow(deprecated)] #[doc(alias = "gdk_wayland_display_set_cursor_theme")] pub fn set_cursor_theme(&self, name: &str, size: i32) { unsafe { ffi::gdk_wayland_display_set_cursor_theme( self.to_glib_none().0, name.to_glib_none().0, size, ); } } #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")] #[allow(deprecated)] #[doc(alias = "gdk_wayland_display_set_startup_notification_id")] pub fn set_startup_notification_id(&self, startup_id: &str) { unsafe { ffi::gdk_wayland_display_set_startup_notification_id( self.to_glib_none().0, startup_id.to_glib_none().0, ); } } } gdk4-wayland-0.9.6/src/auto/wayland_gl_context.rs000064400000000000000000000007201046102023000201170ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; glib::wrapper! { #[doc(alias = "GdkWaylandGLContext")] pub struct WaylandGLContext(Object) @extends gdk::GLContext, gdk::DrawContext; match fn { type_ => || ffi::gdk_wayland_gl_context_get_type(), } } impl WaylandGLContext {} gdk4-wayland-0.9.6/src/auto/wayland_monitor.rs000064400000000000000000000006571046102023000174510ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; glib::wrapper! { #[doc(alias = "GdkWaylandMonitor")] pub struct WaylandMonitor(Object) @extends gdk::Monitor; match fn { type_ => || ffi::gdk_wayland_monitor_get_type(), } } impl WaylandMonitor {} gdk4-wayland-0.9.6/src/auto/wayland_popup.rs000064400000000000000000000007021046102023000171140ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::{ffi, WaylandSurface}; glib::wrapper! { #[doc(alias = "GdkWaylandPopup")] pub struct WaylandPopup(Object) @extends WaylandSurface, gdk::Surface, @implements gdk::Popup; match fn { type_ => || ffi::gdk_wayland_popup_get_type(), } } impl WaylandPopup {} gdk4-wayland-0.9.6/src/auto/wayland_seat.rs000064400000000000000000000006321046102023000167070ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; glib::wrapper! { #[doc(alias = "GdkWaylandSeat")] pub struct WaylandSeat(Object) @extends gdk::Seat; match fn { type_ => || ffi::gdk_wayland_seat_get_type(), } } impl WaylandSeat {} gdk4-wayland-0.9.6/src/auto/wayland_surface.rs000064400000000000000000000021431046102023000174020ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; use glib::prelude::*; #[cfg(feature = "v4_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] use glib::translate::*; glib::wrapper! { #[doc(alias = "GdkWaylandSurface")] pub struct WaylandSurface(Object) @extends gdk::Surface; match fn { type_ => || ffi::gdk_wayland_surface_get_type(), } } impl WaylandSurface { pub const NONE: Option<&'static WaylandSurface> = None; } mod sealed { pub trait Sealed {} impl> Sealed for T {} } pub trait WaylandSurfaceExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v4_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] #[doc(alias = "gdk_wayland_surface_force_next_commit")] fn force_next_commit(&self) { unsafe { ffi::gdk_wayland_surface_force_next_commit(self.as_ref().to_glib_none().0); } } } impl> WaylandSurfaceExt for O {} gdk4-wayland-0.9.6/src/auto/wayland_toplevel.rs000064400000000000000000000035331046102023000176100ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT #![allow(deprecated)] use crate::{ffi, WaylandSurface}; use glib::translate::*; glib::wrapper! { #[doc(alias = "GdkWaylandToplevel")] pub struct WaylandToplevel(Object) @extends WaylandSurface, gdk::Surface, @implements gdk::Toplevel; match fn { type_ => || ffi::gdk_wayland_toplevel_get_type(), } } impl WaylandToplevel { #[cfg(feature = "v4_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] #[doc(alias = "gdk_wayland_toplevel_drop_exported_handle")] pub fn drop_exported_handle(&self, handle: &str) { unsafe { ffi::gdk_wayland_toplevel_drop_exported_handle( self.to_glib_none().0, handle.to_glib_none().0, ); } } #[doc(alias = "gdk_wayland_toplevel_set_application_id")] pub fn set_application_id(&self, application_id: &str) { unsafe { ffi::gdk_wayland_toplevel_set_application_id( self.to_glib_none().0, application_id.to_glib_none().0, ); } } #[doc(alias = "gdk_wayland_toplevel_set_transient_for_exported")] pub fn set_transient_for_exported(&self, parent_handle_str: &str) -> bool { unsafe { from_glib(ffi::gdk_wayland_toplevel_set_transient_for_exported( self.to_glib_none().0, parent_handle_str.to_glib_none().0, )) } } #[cfg_attr(feature = "v4_12", deprecated = "Since 4.12")] #[allow(deprecated)] #[doc(alias = "gdk_wayland_toplevel_unexport_handle")] pub fn unexport_handle(&self) { unsafe { ffi::gdk_wayland_toplevel_unexport_handle(self.to_glib_none().0); } } } gdk4-wayland-0.9.6/src/lib.rs000064400000000000000000000012461046102023000140340ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. #![doc = include_str!("../README.md")] #![allow(deprecated)] #![cfg_attr(docsrs, feature(doc_cfg))] pub use gdk; pub use gdk4_wayland_sys as ffi; pub use gio; pub use glib; #[cfg(all(feature = "v4_4", feature = "egl"))] #[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "egl"))))] pub use khronos_egl; #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] pub use wayland_client; mod auto; pub mod prelude; pub use auto::*; mod wayland_device; mod wayland_display; mod wayland_monitor; mod wayland_seat; mod wayland_surface; mod wayland_toplevel; gdk4-wayland-0.9.6/src/prelude.rs000064400000000000000000000004351046102023000147250ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. // rustdoc-stripper-ignore-next //! Traits intended for blanket imports. #[doc(hidden)] pub use gdk::prelude::*; pub use crate::auto::traits::*; pub use crate::wayland_surface::WaylandSurfaceExtManual; gdk4-wayland-0.9.6/src/wayland_device.rs000064400000000000000000000054351046102023000162500ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use glib::translate::*; #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use wayland_client::{ backend::ObjectId, protocol::{wl_keyboard::WlKeyboard, wl_pointer::WlPointer, wl_seat::WlSeat}, Proxy, }; use crate::WaylandDevice; #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use crate::{ffi, prelude::*}; impl WaylandDevice { #[doc(alias = "gdk_wayland_device_get_wl_keyboard")] #[doc(alias = "get_wl_keyboard")] #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] pub fn wl_keyboard(&self) -> Option { let display = self.display().downcast::().unwrap(); unsafe { let keyboard_ptr = ffi::gdk_wayland_device_get_wl_keyboard(self.to_glib_none().0); if keyboard_ptr.is_null() { None } else { let cnx = display.connection(); let id = ObjectId::from_ptr(WlKeyboard::interface(), keyboard_ptr as *mut _).unwrap(); WlKeyboard::from_id(&cnx, id).ok() } } } #[doc(alias = "gdk_wayland_device_get_wl_pointer")] #[doc(alias = "get_wl_pointer")] #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] pub fn wl_pointer(&self) -> Option { let display = self.display().downcast::().unwrap(); unsafe { let pointer_ptr = ffi::gdk_wayland_device_get_wl_pointer(self.to_glib_none().0); if pointer_ptr.is_null() { None } else { let cnx = display.connection(); let id = ObjectId::from_ptr(WlPointer::interface(), pointer_ptr as *mut _).unwrap(); WlPointer::from_id(&cnx, id).ok() } } } #[doc(alias = "gdk_wayland_device_get_wl_seat")] #[doc(alias = "get_wl_seat")] #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] pub fn wl_seat(&self) -> Option { let display = self.display().downcast::().unwrap(); unsafe { let seat_ptr = ffi::gdk_wayland_device_get_wl_seat(self.to_glib_none().0); if seat_ptr.is_null() { None } else { let cnx = display.connection(); let id = ObjectId::from_ptr(WlSeat::interface(), seat_ptr as *mut _).unwrap(); WlSeat::from_id(&cnx, id).ok() } } } } gdk4-wayland-0.9.6/src/wayland_display.rs000064400000000000000000000071011046102023000164460ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use crate::ffi; #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use glib::{prelude::*, translate::*, Quark}; #[cfg(all(feature = "v4_4", feature = "egl"))] #[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "egl"))))] use khronos_egl as egl; #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use wayland_client::{ backend::ObjectId, protocol::{wl_compositor::WlCompositor, wl_display::WlDisplay}, Proxy, }; use crate::WaylandDisplay; impl WaylandDisplay { #[cfg(all(feature = "v4_4", feature = "egl"))] #[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "egl"))))] #[doc(alias = "gdk_wayland_display_get_egl_display")] #[doc(alias = "get_egl_display")] pub fn egl_display(&self) -> Option { unsafe { let ptr = ffi::gdk_wayland_display_get_egl_display(self.to_glib_none().0); if ptr.is_null() { None } else { Some(egl::Display::from_ptr(ptr)) } } } #[doc(alias = "gdk_wayland_display_get_wl_compositor")] #[doc(alias = "get_wl_compositor")] #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] pub fn wl_compositor(&self) -> Option { unsafe { let compositor_ptr = ffi::gdk_wayland_display_get_wl_compositor(self.to_glib_none().0); if compositor_ptr.is_null() { None } else { let cnx = self.connection(); let id = ObjectId::from_ptr(WlCompositor::interface(), compositor_ptr as *mut _) .unwrap(); WlCompositor::from_id(&cnx, id).ok() } } } #[doc(alias = "gdk_wayland_display_get_wl_display")] #[doc(alias = "get_wl_display")] #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] pub fn wl_display(&self) -> Option { unsafe { let display_ptr = ffi::gdk_wayland_display_get_wl_display(self.to_glib_none().0); if display_ptr.is_null() { None } else { let cnx = self.connection(); let id = ObjectId::from_ptr(WlDisplay::interface(), display_ptr as *mut _).unwrap(); WlDisplay::from_id(&cnx, id).ok() } } } #[cfg(feature = "wayland_crate")] pub(crate) fn connection(&self) -> wayland_client::Connection { use std::sync::OnceLock; static QUARK: OnceLock = OnceLock::new(); let quark = *QUARK.get_or_init(|| Quark::from_str("gtk-rs-wayland-display-connection-quark")); unsafe { match self.qdata::>(quark) { Some(conn) => conn.as_ref().clone().unwrap(), None => { let display_ptr = ffi::gdk_wayland_display_get_wl_display(self.to_glib_none().0); let backend = wayland_backend::sys::client::Backend::from_foreign_display( display_ptr as *mut _, ); let conn = wayland_client::Connection::from_backend(backend); self.set_qdata(quark, conn.clone()); conn } } } } } gdk4-wayland-0.9.6/src/wayland_monitor.rs000064400000000000000000000022561046102023000164760ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use wayland_client::{backend::ObjectId, protocol::wl_output::WlOutput, Proxy}; #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use { crate::{ffi, prelude::*}, glib::translate::*, }; use crate::WaylandMonitor; impl WaylandMonitor { #[doc(alias = "gdk_wayland_monitor_get_wl_output")] #[doc(alias = "get_wl_output")] #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] pub fn wl_output(&self) -> Option { let display = self.display().downcast::().unwrap(); unsafe { let output_ptr = ffi::gdk_wayland_monitor_get_wl_output(self.to_glib_none().0); if output_ptr.is_null() { None } else { let cnx = display.connection(); let id = ObjectId::from_ptr(WlOutput::interface(), output_ptr as *mut _).unwrap(); WlOutput::from_id(&cnx, id).ok() } } } } gdk4-wayland-0.9.6/src/wayland_seat.rs000064400000000000000000000022121046102023000157330ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use wayland_client::{backend::ObjectId, protocol::wl_seat::WlSeat, Proxy}; #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use { crate::{ffi, prelude::*}, glib::translate::*, }; use crate::WaylandSeat; impl WaylandSeat { #[doc(alias = "gdk_wayland_seat_get_wl_seat")] #[doc(alias = "get_wl_seat")] #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] pub fn wl_seat(&self) -> Option { let display = self.display().downcast::().unwrap(); unsafe { let seat_ptr = ffi::gdk_wayland_seat_get_wl_seat(self.to_glib_none().0); if seat_ptr.is_null() { None } else { let cnx = display.connection(); let id = ObjectId::from_ptr(WlSeat::interface(), seat_ptr as *mut _).unwrap(); WlSeat::from_id(&cnx, id).ok() } } } } gdk4-wayland-0.9.6/src/wayland_surface.rs000064400000000000000000000032151046102023000164330ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use glib::translate::*; #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use wayland_client::{backend::ObjectId, protocol::wl_surface::WlSurface, Proxy}; #[cfg(feature = "wayland_crate")] use crate::ffi; use crate::{prelude::*, WaylandSurface}; mod sealed { pub trait Sealed {} impl> Sealed for T {} } // rustdoc-stripper-ignore-next /// Trait containing manually implemented methods of /// [`WaylandSurface`](crate::WaylandSurface). pub trait WaylandSurfaceExtManual: sealed::Sealed + IsA + 'static { #[doc(alias = "gdk_wayland_surface_get_wl_surface")] #[doc(alias = "get_wl_surface")] #[cfg(feature = "wayland_crate")] #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] fn wl_surface(&self) -> Option { let display = self .as_ref() .display() .downcast::() .unwrap(); unsafe { let surface_ptr = ffi::gdk_wayland_surface_get_wl_surface(self.as_ref().to_glib_none().0); if surface_ptr.is_null() { None } else { let cnx = display.connection(); let id = ObjectId::from_ptr(WlSurface::interface(), surface_ptr as *mut _).unwrap(); WlSurface::from_id(&cnx, id).ok() } } } } impl> WaylandSurfaceExtManual for O {} gdk4-wayland-0.9.6/src/wayland_toplevel.rs000064400000000000000000000036231046102023000166400ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::{ffi, WaylandToplevel}; use glib::translate::*; use std::boxed::Box as Box_; impl WaylandToplevel { #[doc(alias = "gdk_wayland_toplevel_export_handle")] pub fn export_handle) + 'static>( &self, callback: P, ) -> bool { let callback_data: Box_

= Box_::new(callback); unsafe extern "C" fn callback_func< P: Fn(&WaylandToplevel, Result<&str, glib::BoolError>) + 'static, >( toplevel: *mut ffi::GdkWaylandToplevel, handle: *const libc::c_char, user_data: glib::ffi::gpointer, ) { let toplevel = from_glib_borrow(toplevel); let handle: Borrowed> = from_glib_borrow(handle); let callback = &*(user_data as *mut P); if let Some(handle) = handle.as_ref() { (*callback)(&toplevel, Ok(handle.as_str())) } else { (*callback)(&toplevel, Err(glib::bool_error!("Failed to export a handle. The compositor probably doesn't implement the xdg-foreign protocol"))) } } let callback = Some(callback_func::

as _); unsafe extern "C" fn destroy_func_func< P: Fn(&WaylandToplevel, Result<&str, glib::BoolError>) + 'static, >( data: glib::ffi::gpointer, ) { let _callback = Box_::from_raw(data as *mut P); } let destroy_call3 = Some(destroy_func_func::

as _); let super_callback0: Box_

= callback_data; unsafe { from_glib(ffi::gdk_wayland_toplevel_export_handle( self.to_glib_none().0, callback, Box_::into_raw(super_callback0) as *mut _, destroy_call3, )) } } } gdk4-wayland-0.9.6/tests/check_gir.rs000064400000000000000000000003461046102023000155570ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. #[test] fn check_gir_file() { let res = gir_format_check::check_gir_file("Gir.toml"); println!("{res}"); assert_eq!(res.nb_errors, 0); }