gdk4-x11-0.10.0/.cargo_vcs_info.json0000644000000001460000000000100123530ustar { "git": { "sha1": "416aa3ae63fc33ff6436ab1fe26ffbdbe47e8976" }, "path_in_vcs": "gdk4-x11" }gdk4-x11-0.10.0/COPYRIGHT000064400000000000000000000012131046102023000124320ustar 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-x11-0.10.0/Cargo.lock0000644000000356260000000000100103410ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "bitflags" version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "cairo-rs" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6466a563dea2e99f59f6ffbb749fd0bdf75764f5e6e93976b5e7bd73c4c9efb" dependencies = [ "bitflags", "cairo-sys-rs", "glib", "libc", ] [[package]] name = "cairo-sys-rs" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cab7e9f13c802625aad1ad2b4ae3989f4ce9339ff388f335a6f109f9338705e2" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "cfg-expr" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a2b34126159980f92da2a08bdec0694fd80fb5eb9e48aff25d20a0d8dfa710d" dependencies = [ "smallvec", "target-lexicon", ] [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[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.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688dc7eaf551dbac1f5b11d000d089c3db29feb25562455f47c1a2080cc60bda" dependencies = [ "gdk-pixbuf-sys", "gio", "glib", "libc", ] [[package]] name = "gdk-pixbuf-sys" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5af1823d3d1cb72616873ba0a593bd440eb92da700fdfb047505a21ee3ec3e10" 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", "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 = "gdk4-x11" version = "0.10.0" dependencies = [ "gdk4", "gdk4-x11-sys", "gio", "gir-format-check", "glib", "khronos-egl", "libc", "x11", ] [[package]] name = "gdk4-x11-sys" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e387238aacc531f93d9031b69c74ce2236b5fd6438e55bc8b7b79a60c883c350" dependencies = [ "gdk4-sys", "glib-sys", "libc", "system-deps", ] [[package]] name = "gio" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "273d64c833fbbf7cd86c4cdced893c5d3f2f5d6aeb30fd0c30d172456ce8be2e" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-util", "gio-sys", "glib", "libc", "pin-project-lite", "smallvec", ] [[package]] name = "gio-sys" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c8130f5810a839d74afc3a929c34a700bf194972bb034f2ecfe639682dd13cc" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", "windows-sys", ] [[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.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "690e8bcf8a819b5911d6ae79879226191d01253a4f602748072603defd5b9553" 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.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2be4c74454fb4a6bd3328320737d0fa3d6939e2d570f5d846da00cb222f6a0" dependencies = [ "libc", "system-deps", ] [[package]] name = "gobject-sys" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab318a786f9abd49d388013b9161fa0ef8218ea6118ee7111c95e62186f7d31f" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "hashbrown" version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indexmap" version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" 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.174" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "memchr" version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "pango" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d4803f086c4f49163c31ac14db162112a22401c116435080e4be8678c507d61" dependencies = [ "gio", "glib", "libc", "pango-sys", ] [[package]] name = "pango-sys" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66872b3cfd328ad6d1a4f89ebd5357119bd4c592a4ddbb8f6bc2386f8ce7b898" 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.95" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 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 = "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.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "syn" version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" 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 = "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 = "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 = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" dependencies = [ "memchr", ] [[package]] name = "x11" version = "2.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" dependencies = [ "libc", "pkg-config", ] gdk4-x11-0.10.0/Cargo.toml0000644000000040500000000000100103470ustar # 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.83" name = "gdk4-x11" version = "0.10.0" authors = ["The gtk-rs Project Developers"] build = false autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "Rust bindings of the GDK4 X11 library" homepage = "https://gtk-rs.org/gtk4-rs" documentation = "https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_x11/" readme = "README.md" keywords = [ "gdk4", "gdk4-x11", "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", ] [features] egl = ["khronos-egl"] v4_10 = [ "gdk4-x11-sys/v4_10", "v4_4", "gdk/v4_10", ] v4_16 = [ "gdk4-x11-sys/v4_16", "v4_10", "gdk/v4_16", ] v4_18 = [ "gdk4-x11-sys/v4_18", "v4_16", "gdk/v4_18", ] v4_4 = [ "gdk4-x11-sys/v4_4", "gdk/v4_4", ] xlib = ["x11"] [lib] name = "gdk4_x11" path = "src/lib.rs" [[test]] name = "check_gir" path = "tests/check_gir.rs" [dependencies.gdk] version = "0.10" package = "gdk4" [dependencies.gdk4-x11-sys] version = "0.10" [dependencies.gio] version = "0.21" features = ["v2_66"] [dependencies.glib] version = "0.21" features = ["v2_66"] [dependencies.khronos-egl] version = "6.0" optional = true [dependencies.libc] version = "0.2" [dependencies.x11] version = "2.20" optional = true [dev-dependencies.gir-format-check] version = "^0.1" gdk4-x11-0.10.0/Cargo.toml.orig000064400000000000000000000021421046102023000140300ustar 00000000000000[package] name = "gdk4-x11" description = "Rust bindings of the GDK4 X11 library" documentation = "https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_x11/" keywords = ["gdk4", "gdk4-x11", "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-x11-sys/v4_4", "gdk/v4_4"] v4_10 = ["gdk4-x11-sys/v4_10", "v4_4", "gdk/v4_10"] v4_16 = ["gdk4-x11-sys/v4_16", "v4_10", "gdk/v4_16"] v4_18 = ["gdk4-x11-sys/v4_18", "v4_16", "gdk/v4_18"] egl = ["khronos-egl"] xlib = ["x11"] [dependencies] gdk4-x11-sys.workspace = true gdk.workspace = true gio.workspace = true glib.workspace = true libc.workspace = true x11 = {version = "2.20", optional = true } 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-x11-0.10.0/Gir.toml000064400000000000000000000066641046102023000125740ustar 00000000000000[options] girs_directories = ["../gir-files"] library = "GdkX11" 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 = [ "GdkX11.X11AppLaunchContext", "GdkX11.X11DeviceType", "GdkX11.X11Drag", "GdkX11.X11GLContext", ] manual = [ "Gdk.Cursor", "Gdk.DeviceTool", # docs only "Gdk.DrawContext", "Gdk.InputSource", "Gdk.Rectangle", "Gdk.Seat", # docs only "Gio.AppLaunchContext", "xlib.Atom", "xlib.Cursor", "xlib.Display", "xlib.Screen", "xlib.Window", "xlib.XID", ] [[object]] name = "Gdk.AppLaunchContext" status = "manual" final_type = false [[object]] name = "Gdk.Device" status = "manual" final_type = false [[object.function]] name = "get_vendor_id" ignore = true # docs only, otherwise it gets picked as ExtManual [[object.function]] name = "get_product_id" ignore = true # docs only, otherwise it gets picked as ExtManual [[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.function]] name = "get_product_id" ignore = true # docs only, otherwise it gets picked as ExtManual [[object]] name = "Gdk.Drag" status = "manual" final_type = false [[object]] name = "Gdk.Event" # docs only status = "manual" final_type = false [[object]] name = "Gdk.GLContext" status = "manual" final_type = false [[object]] name = "Gdk.Monitor" status = "manual" final_type = false [[object.function]] name = "get_scale_factor" ignore = true # docs only, otherwise it gets picked as ExtManual [[object]] name = "Gdk.Surface" status = "manual" final_type = false [[object]] name = "GdkX11.*" status = "generate" [[object.function]] pattern = "(x11_get_xatom_by_name_for_display|x11_get_xatom_name_for_display)" manual = true [[object.function]] name = "x11_free_compound_text" ignore = true [[object.function]] name = "x11_free_text_list" ignore = true [[object.function]] name = "x11_lookup_xdisplay" ignore = true # TODO: manually implementation needed [[object]] name = "GdkX11.X11DeviceManagerXI2" status = "generate" generate_builder = true [[object]] name = "GdkX11.X11DeviceXI2" status = "generate" generate_builder = true [[object]] name = "GdkX11.X11Display" status = "generate" [[object.signal]] name = "xevent" manual = true [[object.function]] name = "get_egl_display" manual = true [[object.function]] pattern = "get_x.*" manual = true [[object.function]] name = "text_property_to_text_list" # TODO: requires a manual implementation manual = true [[object.function]] name = "set_program_class" manual = true [[object]] name = "GdkX11.X11Monitor" status = "generate" [[object.function]] name = "get_output" manual = true [[object]] name = "GdkX11.X11Screen" status = "generate" [[object.function]] name = "get_xscreen" manual = true [[object.function]] name = "get_monitor_output" manual = true [[object]] name = "GdkX11.X11Surface" status = "generate" [[object.function]] name = "get_xid" manual = true [[object.function]] name = "lookup_for_display" manual = true gdk4-x11-0.10.0/LICENSE000064400000000000000000000020001046102023000121370ustar 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-x11-0.10.0/README.md000064400000000000000000000040731046102023000124250ustar 00000000000000# Rust GDK 4 X11 bindings The project website is [here](https://gtk-rs.org/). Rust bindings of [GDK 4's X11 backend](https://docs.gtk.org/gdk4-x11/), 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 X11 contains functions specific to the X11 backend. ## Minimum supported Rust version Currently, the minimum supported Rust version is `1.83`. ## Documentation - The Rust API [Stable](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_x11)/[Development](https://gtk-rs.org/gtk4-rs/git/docs/gdk4_x11/) - [The C API](https://docs.gtk.org/gdk4-x11/) - [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_10` | Enable the new APIs part of GTK 4.10 | | `v4_4` | Enable the new APIs part of GTK 4.4 | | `egl` | Integration with the [khronos-egl](https://crates.io/crates/khronos-egl) crate | | `xlib` | Integration with the [x11](https://crates.io/crates/x11) 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-x11__ are available under the MIT License, please refer to it. gdk4-x11-0.10.0/src/auto/enums.rs000064400000000000000000000026641046102023000144060ustar 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::*; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkX11DeviceType")] pub enum X11DeviceType { #[doc(alias = "GDK_X11_DEVICE_TYPE_LOGICAL")] Logical, #[doc(alias = "GDK_X11_DEVICE_TYPE_PHYSICAL")] Physical, #[doc(alias = "GDK_X11_DEVICE_TYPE_FLOATING")] Floating, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for X11DeviceType { type GlibType = ffi::GdkX11DeviceType; #[inline] fn into_glib(self) -> ffi::GdkX11DeviceType { match self { Self::Logical => ffi::GDK_X11_DEVICE_TYPE_LOGICAL, Self::Physical => ffi::GDK_X11_DEVICE_TYPE_PHYSICAL, Self::Floating => ffi::GDK_X11_DEVICE_TYPE_FLOATING, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for X11DeviceType { #[inline] unsafe fn from_glib(value: ffi::GdkX11DeviceType) -> Self { skip_assert_initialized!(); match value { ffi::GDK_X11_DEVICE_TYPE_LOGICAL => Self::Logical, ffi::GDK_X11_DEVICE_TYPE_PHYSICAL => Self::Physical, ffi::GDK_X11_DEVICE_TYPE_FLOATING => Self::Floating, value => Self::__Unknown(value), } } } gdk4-x11-0.10.0/src/auto/functions.rs000064400000000000000000000026701046102023000152640ustar 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, X11DeviceManagerXI2, X11DeviceXI2, X11Surface}; use glib::translate::*; #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_device_get_id")] pub fn x11_device_get_id(device: &X11DeviceXI2) -> i32 { skip_assert_initialized!(); unsafe { ffi::gdk_x11_device_get_id(device.to_glib_none().0) } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_device_manager_lookup")] pub fn x11_device_manager_lookup( device_manager: &X11DeviceManagerXI2, device_id: i32, ) -> Option { skip_assert_initialized!(); unsafe { from_glib_none(ffi::gdk_x11_device_manager_lookup( device_manager.to_glib_none().0, device_id, )) } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_get_server_time")] pub fn x11_get_server_time(surface: &X11Surface) -> u32 { skip_assert_initialized!(); unsafe { ffi::gdk_x11_get_server_time(surface.to_glib_none().0) } } #[doc(alias = "gdk_x11_set_sm_client_id")] pub fn x11_set_sm_client_id(sm_client_id: Option<&str>) { assert_initialized_main_thread!(); unsafe { ffi::gdk_x11_set_sm_client_id(sm_client_id.to_glib_none().0); } } gdk4-x11-0.10.0/src/auto/mod.rs000064400000000000000000000016611046102023000140320ustar 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 x11_app_launch_context; pub use self::x11_app_launch_context::X11AppLaunchContext; mod x11_device_manager_xi2; pub use self::x11_device_manager_xi2::X11DeviceManagerXI2; mod x11_device_xi2; pub use self::x11_device_xi2::X11DeviceXI2; mod x11_display; pub use self::x11_display::X11Display; mod x11_drag; pub use self::x11_drag::X11Drag; mod x11gl_context; pub use self::x11gl_context::X11GLContext; mod x11_monitor; pub use self::x11_monitor::X11Monitor; mod x11_screen; pub use self::x11_screen::X11Screen; mod x11_surface; pub use self::x11_surface::X11Surface; mod enums; pub use self::enums::X11DeviceType; pub(crate) mod functions; pub(crate) mod builders { pub use super::x11_device_manager_xi2::X11DeviceManagerXI2Builder; pub use super::x11_device_xi2::X11DeviceXI2Builder; } gdk4-x11-0.10.0/src/auto/versions.txt000064400000000000000000000002041046102023000153060ustar 00000000000000Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) gdk4-x11-0.10.0/src/auto/x11_app_launch_context.rs000064400000000000000000000007571046102023000176270ustar 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 = "GdkX11AppLaunchContext")] pub struct X11AppLaunchContext(Object) @extends gdk::AppLaunchContext, gio::AppLaunchContext; match fn { type_ => || ffi::gdk_x11_app_launch_context_get_type(), } } impl X11AppLaunchContext {} gdk4-x11-0.10.0/src/auto/x11_device_manager_xi2.rs000064400000000000000000000052031046102023000174530ustar 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::*, translate::*}; glib::wrapper! { #[doc(alias = "GdkX11DeviceManagerXI2")] pub struct X11DeviceManagerXI2(Object); match fn { type_ => || ffi::gdk_x11_device_manager_xi2_get_type(), } } impl X11DeviceManagerXI2 { // rustdoc-stripper-ignore-next /// Creates a new builder-pattern struct instance to construct [`X11DeviceManagerXI2`] objects. /// /// This method returns an instance of [`X11DeviceManagerXI2Builder`](crate::builders::X11DeviceManagerXI2Builder) which can be used to create [`X11DeviceManagerXI2`] objects. pub fn builder() -> X11DeviceManagerXI2Builder { X11DeviceManagerXI2Builder::new() } pub fn display(&self) -> Option { ObjectExt::property(self, "display") } pub fn major(&self) -> i32 { ObjectExt::property(self, "major") } pub fn minor(&self) -> i32 { ObjectExt::property(self, "minor") } pub fn opcode(&self) -> i32 { ObjectExt::property(self, "opcode") } } // rustdoc-stripper-ignore-next /// A [builder-pattern] type to construct [`X11DeviceManagerXI2`] objects. /// /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html #[must_use = "The builder must be built to be used"] pub struct X11DeviceManagerXI2Builder { builder: glib::object::ObjectBuilder<'static, X11DeviceManagerXI2>, } impl X11DeviceManagerXI2Builder { fn new() -> Self { Self { builder: glib::object::Object::builder(), } } pub fn display(self, display: &impl IsA) -> Self { Self { builder: self.builder.property("display", display.clone().upcast()), } } pub fn major(self, major: i32) -> Self { Self { builder: self.builder.property("major", major), } } pub fn minor(self, minor: i32) -> Self { Self { builder: self.builder.property("minor", minor), } } pub fn opcode(self, opcode: i32) -> Self { Self { builder: self.builder.property("opcode", opcode), } } // rustdoc-stripper-ignore-next /// Build the [`X11DeviceManagerXI2`]. #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"] pub fn build(self) -> X11DeviceManagerXI2 { assert_initialized_main_thread!(); self.builder.build() } } gdk4-x11-0.10.0/src/auto/x11_device_xi2.rs000064400000000000000000000062471046102023000157720ustar 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::*, translate::*}; glib::wrapper! { #[doc(alias = "GdkX11DeviceXI2")] pub struct X11DeviceXI2(Object) @extends gdk::Device; match fn { type_ => || ffi::gdk_x11_device_xi2_get_type(), } } impl X11DeviceXI2 { // rustdoc-stripper-ignore-next /// Creates a new builder-pattern struct instance to construct [`X11DeviceXI2`] objects. /// /// This method returns an instance of [`X11DeviceXI2Builder`](crate::builders::X11DeviceXI2Builder) which can be used to create [`X11DeviceXI2`] objects. pub fn builder() -> X11DeviceXI2Builder { X11DeviceXI2Builder::new() } #[doc(alias = "device-id")] pub fn device_id(&self) -> i32 { ObjectExt::property(self, "device-id") } } // rustdoc-stripper-ignore-next /// A [builder-pattern] type to construct [`X11DeviceXI2`] objects. /// /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html #[must_use = "The builder must be built to be used"] pub struct X11DeviceXI2Builder { builder: glib::object::ObjectBuilder<'static, X11DeviceXI2>, } impl X11DeviceXI2Builder { fn new() -> Self { Self { builder: glib::object::Object::builder(), } } pub fn device_id(self, device_id: i32) -> Self { Self { builder: self.builder.property("device-id", device_id), } } pub fn display(self, display: &impl IsA) -> Self { Self { builder: self.builder.property("display", display.clone().upcast()), } } pub fn has_cursor(self, has_cursor: bool) -> Self { Self { builder: self.builder.property("has-cursor", has_cursor), } } pub fn name(self, name: impl Into) -> Self { Self { builder: self.builder.property("name", name.into()), } } pub fn num_touches(self, num_touches: u32) -> Self { Self { builder: self.builder.property("num-touches", num_touches), } } pub fn product_id(self, product_id: impl Into) -> Self { Self { builder: self.builder.property("product-id", product_id.into()), } } pub fn seat(self, seat: &gdk::Seat) -> Self { Self { builder: self.builder.property("seat", seat.clone()), } } pub fn source(self, source: gdk::InputSource) -> Self { Self { builder: self.builder.property("source", source), } } pub fn vendor_id(self, vendor_id: impl Into) -> Self { Self { builder: self.builder.property("vendor-id", vendor_id.into()), } } // rustdoc-stripper-ignore-next /// Build the [`X11DeviceXI2`]. #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"] pub fn build(self) -> X11DeviceXI2 { assert_initialized_main_thread!(); self.builder.build() } } gdk4-x11-0.10.0/src/auto/x11_display.rs000064400000000000000000000177631046102023000154230ustar 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, X11Screen}; use glib::translate::*; glib::wrapper! { #[doc(alias = "GdkX11Display")] pub struct X11Display(Object) @extends gdk::Display; match fn { type_ => || ffi::gdk_x11_display_get_type(), } } impl X11Display { //#[doc(alias = "gdk_x11_display_broadcast_startup_message")] //pub fn broadcast_startup_message(&self, message_type: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:gdk_x11_display_broadcast_startup_message() } //} #[doc(alias = "gdk_x11_display_error_trap_pop")] pub fn error_trap_pop(&self) -> i32 { unsafe { ffi::gdk_x11_display_error_trap_pop(self.to_glib_none().0) } } #[doc(alias = "gdk_x11_display_error_trap_pop_ignored")] pub fn error_trap_pop_ignored(&self) { unsafe { ffi::gdk_x11_display_error_trap_pop_ignored(self.to_glib_none().0); } } #[doc(alias = "gdk_x11_display_error_trap_push")] pub fn error_trap_push(&self) { unsafe { ffi::gdk_x11_display_error_trap_push(self.to_glib_none().0); } } #[doc(alias = "gdk_x11_display_get_default_group")] #[doc(alias = "get_default_group")] pub fn default_group(&self) -> gdk::Surface { unsafe { from_glib_none(ffi::gdk_x11_display_get_default_group( self.to_glib_none().0, )) } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[cfg(feature = "v4_4")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))] #[allow(deprecated)] #[doc(alias = "gdk_x11_display_get_egl_version")] #[doc(alias = "get_egl_version")] pub fn egl_version(&self) -> Option<(i32, i32)> { unsafe { let mut major = std::mem::MaybeUninit::uninit(); let mut minor = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_x11_display_get_egl_version( self.to_glib_none().0, major.as_mut_ptr(), minor.as_mut_ptr(), )); if ret { Some((major.assume_init(), minor.assume_init())) } else { None } } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_display_get_glx_version")] #[doc(alias = "get_glx_version")] pub fn glx_version(&self) -> Option<(i32, i32)> { unsafe { let mut major = std::mem::MaybeUninit::uninit(); let mut minor = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_x11_display_get_glx_version( self.to_glib_none().0, major.as_mut_ptr(), minor.as_mut_ptr(), )); if ret { Some((major.assume_init(), minor.assume_init())) } else { None } } } #[doc(alias = "gdk_x11_display_get_primary_monitor")] #[doc(alias = "get_primary_monitor")] pub fn primary_monitor(&self) -> gdk::Monitor { unsafe { from_glib_none(ffi::gdk_x11_display_get_primary_monitor( self.to_glib_none().0, )) } } #[doc(alias = "gdk_x11_display_get_screen")] #[doc(alias = "get_screen")] pub fn screen(&self) -> X11Screen { unsafe { from_glib_none(ffi::gdk_x11_display_get_screen(self.to_glib_none().0)) } } #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")] #[allow(deprecated)] #[doc(alias = "gdk_x11_display_get_startup_notification_id")] #[doc(alias = "get_startup_notification_id")] pub fn startup_notification_id(&self) -> glib::GString { unsafe { from_glib_none(ffi::gdk_x11_display_get_startup_notification_id( self.to_glib_none().0, )) } } #[doc(alias = "gdk_x11_display_get_user_time")] #[doc(alias = "get_user_time")] pub fn user_time(&self) -> u32 { unsafe { ffi::gdk_x11_display_get_user_time(self.to_glib_none().0) } } #[doc(alias = "gdk_x11_display_grab")] pub fn grab(&self) { unsafe { ffi::gdk_x11_display_grab(self.to_glib_none().0); } } #[cfg_attr(feature = "v4_16", deprecated = "Since 4.16")] #[allow(deprecated)] #[doc(alias = "gdk_x11_display_set_cursor_theme")] pub fn set_cursor_theme(&self, theme: Option<&str>, size: i32) { unsafe { ffi::gdk_x11_display_set_cursor_theme( self.to_glib_none().0, theme.to_glib_none().0, size, ); } } #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")] #[allow(deprecated)] #[doc(alias = "gdk_x11_display_set_startup_notification_id")] pub fn set_startup_notification_id(&self, startup_id: &str) { unsafe { ffi::gdk_x11_display_set_startup_notification_id( self.to_glib_none().0, startup_id.to_glib_none().0, ); } } #[doc(alias = "gdk_x11_display_set_surface_scale")] pub fn set_surface_scale(&self, scale: i32) { unsafe { ffi::gdk_x11_display_set_surface_scale(self.to_glib_none().0, scale); } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_display_string_to_compound_text")] pub fn string_to_compound_text(&self, str: &str) -> (i32, glib::GString, i32, Vec) { unsafe { let mut encoding = std::ptr::null(); let mut format = std::mem::MaybeUninit::uninit(); let mut ctext = std::ptr::null_mut(); let mut length = std::mem::MaybeUninit::uninit(); let ret = ffi::gdk_x11_display_string_to_compound_text( self.to_glib_none().0, str.to_glib_none().0, &mut encoding, format.as_mut_ptr(), &mut ctext, length.as_mut_ptr(), ); ( ret, from_glib_none(encoding), format.assume_init(), FromGlibContainer::from_glib_full_num(ctext, length.assume_init() as _), ) } } #[doc(alias = "gdk_x11_display_ungrab")] pub fn ungrab(&self) { unsafe { ffi::gdk_x11_display_ungrab(self.to_glib_none().0); } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_display_utf8_to_compound_text")] pub fn utf8_to_compound_text(&self, str: &str) -> Option<(glib::GString, i32, Vec)> { unsafe { let mut encoding = std::ptr::null(); let mut format = std::mem::MaybeUninit::uninit(); let mut ctext = std::ptr::null_mut(); let mut length = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_x11_display_utf8_to_compound_text( self.to_glib_none().0, str.to_glib_none().0, &mut encoding, format.as_mut_ptr(), &mut ctext, length.as_mut_ptr(), )); if ret { Some(( from_glib_none(encoding), format.assume_init(), FromGlibContainer::from_glib_full_num(ctext, length.assume_init() as _), )) } else { None } } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_display_open")] pub fn open(display_name: Option<&str>) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_full(ffi::gdk_x11_display_open(display_name.to_glib_none().0)) } } } gdk4-x11-0.10.0/src/auto/x11_drag.rs000064400000000000000000000006021046102023000146530ustar 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 = "GdkX11Drag")] pub struct X11Drag(Object) @extends gdk::Drag; match fn { type_ => || ffi::gdk_x11_drag_get_type(), } } impl X11Drag {} gdk4-x11-0.10.0/src/auto/x11_monitor.rs000064400000000000000000000015751046102023000154370ustar 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 = "GdkX11Monitor")] pub struct X11Monitor(Object) @extends gdk::Monitor; match fn { type_ => || ffi::gdk_x11_monitor_get_type(), } } impl X11Monitor { #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_monitor_get_workarea")] #[doc(alias = "get_workarea")] pub fn workarea(&self) -> gdk::Rectangle { unsafe { let mut workarea = gdk::Rectangle::uninitialized(); ffi::gdk_x11_monitor_get_workarea(self.to_glib_none().0, workarea.to_glib_none_mut().0); workarea } } } gdk4-x11-0.10.0/src/auto/x11_screen.rs000064400000000000000000000061601046102023000152220ustar 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::{ object::ObjectType as _, prelude::*, signal::{connect_raw, SignalHandlerId}, translate::*, }; use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkX11Screen")] pub struct X11Screen(Object); match fn { type_ => || ffi::gdk_x11_screen_get_type(), } } impl X11Screen { #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_screen_get_current_desktop")] #[doc(alias = "get_current_desktop")] pub fn current_desktop(&self) -> u32 { unsafe { ffi::gdk_x11_screen_get_current_desktop(self.to_glib_none().0) } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_screen_get_number_of_desktops")] #[doc(alias = "get_number_of_desktops")] pub fn number_of_desktops(&self) -> u32 { unsafe { ffi::gdk_x11_screen_get_number_of_desktops(self.to_glib_none().0) } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_screen_get_screen_number")] #[doc(alias = "get_screen_number")] pub fn screen_number(&self) -> i32 { unsafe { ffi::gdk_x11_screen_get_screen_number(self.to_glib_none().0) } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_screen_get_window_manager_name")] #[doc(alias = "get_window_manager_name")] pub fn window_manager_name(&self) -> glib::GString { unsafe { from_glib_none(ffi::gdk_x11_screen_get_window_manager_name( self.to_glib_none().0, )) } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_screen_supports_net_wm_hint")] pub fn supports_net_wm_hint(&self, property_name: &str) -> bool { unsafe { from_glib(ffi::gdk_x11_screen_supports_net_wm_hint( self.to_glib_none().0, property_name.to_glib_none().0, )) } } #[doc(alias = "window-manager-changed")] pub fn connect_window_manager_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn window_manager_changed_trampoline( this: *mut ffi::GdkX11Screen, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"window-manager-changed".as_ptr() as *const _, Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( window_manager_changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } gdk4-x11-0.10.0/src/auto/x11_surface.rs000064400000000000000000000107701046102023000153750ustar 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::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GdkX11Surface")] pub struct X11Surface(Object) @extends gdk::Surface; match fn { type_ => || ffi::gdk_x11_surface_get_type(), } } impl X11Surface { #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_get_desktop")] #[doc(alias = "get_desktop")] pub fn desktop(&self) -> u32 { unsafe { ffi::gdk_x11_surface_get_desktop(self.to_glib_none().0) } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_get_group")] #[doc(alias = "get_group")] pub fn group(&self) -> Option { unsafe { from_glib_none(ffi::gdk_x11_surface_get_group(self.to_glib_none().0)) } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_move_to_current_desktop")] pub fn move_to_current_desktop(&self) { unsafe { ffi::gdk_x11_surface_move_to_current_desktop(self.to_glib_none().0); } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_move_to_desktop")] pub fn move_to_desktop(&self, desktop: u32) { unsafe { ffi::gdk_x11_surface_move_to_desktop(self.to_glib_none().0, desktop); } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_set_frame_sync_enabled")] pub fn set_frame_sync_enabled(&self, frame_sync_enabled: bool) { unsafe { ffi::gdk_x11_surface_set_frame_sync_enabled( self.to_glib_none().0, frame_sync_enabled.into_glib(), ); } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_set_group")] pub fn set_group(&self, leader: &impl IsA) { unsafe { ffi::gdk_x11_surface_set_group(self.to_glib_none().0, leader.as_ref().to_glib_none().0); } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_set_skip_pager_hint")] pub fn set_skip_pager_hint(&self, skips_pager: bool) { unsafe { ffi::gdk_x11_surface_set_skip_pager_hint( self.to_glib_none().0, skips_pager.into_glib(), ); } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_set_skip_taskbar_hint")] pub fn set_skip_taskbar_hint(&self, skips_taskbar: bool) { unsafe { ffi::gdk_x11_surface_set_skip_taskbar_hint( self.to_glib_none().0, skips_taskbar.into_glib(), ); } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_set_theme_variant")] pub fn set_theme_variant(&self, variant: &str) { unsafe { ffi::gdk_x11_surface_set_theme_variant(self.to_glib_none().0, variant.to_glib_none().0); } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_set_urgency_hint")] pub fn set_urgency_hint(&self, urgent: bool) { unsafe { ffi::gdk_x11_surface_set_urgency_hint(self.to_glib_none().0, urgent.into_glib()); } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_set_user_time")] pub fn set_user_time(&self, timestamp: u32) { unsafe { ffi::gdk_x11_surface_set_user_time(self.to_glib_none().0, timestamp); } } #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")] #[allow(deprecated)] #[doc(alias = "gdk_x11_surface_set_utf8_property")] pub fn set_utf8_property(&self, name: &str, value: Option<&str>) { unsafe { ffi::gdk_x11_surface_set_utf8_property( self.to_glib_none().0, name.to_glib_none().0, value.to_glib_none().0, ); } } } gdk4-x11-0.10.0/src/auto/x11gl_context.rs000064400000000000000000000006701046102023000157520ustar 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 = "GdkX11GLContext")] pub struct X11GLContext(Object) @extends gdk::GLContext, gdk::DrawContext; match fn { type_ => || ffi::gdk_x11_gl_context_get_type(), } } impl X11GLContext {} gdk4-x11-0.10.0/src/builders.rs000064400000000000000000000002571046102023000141140ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. // rustdoc-stripper-ignore-next //! Builder pattern types. pub use crate::auto::builders::*; gdk4-x11-0.10.0/src/functions.rs000064400000000000000000000020061046102023000143050ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[cfg(feature = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] use x11::xlib::Atom as XAtom; pub use crate::auto::functions::*; #[cfg(not(feature = "xlib"))] use crate::XAtom; use crate::{ffi, X11Display}; #[doc(alias = "gdk_x11_get_xatom_by_name_for_display")] pub fn x11_get_xatom_by_name_for_display(display: &X11Display, atom_name: impl IntoGStr) -> XAtom { skip_assert_initialized!(); unsafe { atom_name.run_with_gstr(|atom_name| { ffi::gdk_x11_get_xatom_by_name_for_display(display.to_glib_none().0, atom_name.as_ptr()) }) } } #[doc(alias = "gdk_x11_get_xatom_name_for_display")] pub fn x11_get_xatom_name_for_display(display: &X11Display, xatom: XAtom) -> Option { skip_assert_initialized!(); unsafe { from_glib_none(ffi::gdk_x11_get_xatom_name_for_display( display.to_glib_none().0, xatom, )) } } gdk4-x11-0.10.0/src/lib.rs000064400000000000000000000016661046102023000130560ustar 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_x11_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 = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] pub use x11; #[macro_use] mod rt; #[allow(clippy::upper_case_acronyms)] #[allow(unused_imports)] mod auto; pub mod builders; pub mod prelude; mod functions; mod x11_display; mod x11_monitor; mod x11_screen; mod x11_surface; pub use auto::*; pub use functions::*; #[cfg(not(feature = "xlib"))] pub type XID = libc::c_ulong; #[cfg(not(feature = "xlib"))] pub type XWindow = XID; #[cfg(not(feature = "xlib"))] pub type XCursor = XID; #[cfg(not(feature = "xlib"))] pub type XAtom = XID; gdk4-x11-0.10.0/src/prelude.rs000064400000000000000000000003031046102023000137330ustar 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::*; gdk4-x11-0.10.0/src/rt.rs000064400000000000000000000003221046102023000127210ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. macro_rules! assert_initialized_main_thread { () => {}; } /// No-op. macro_rules! skip_assert_initialized { () => {}; } gdk4-x11-0.10.0/src/x11_display.rs000064400000000000000000000077431046102023000144500ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. #[cfg(feature = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] use std::{boxed::Box as Box_, mem::transmute}; #[cfg(feature = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] use glib::signal::{connect_raw, SignalHandlerId}; use glib::translate::*; #[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 = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] use x11::xlib; #[cfg(feature = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] use x11::xlib::{Cursor as XCursor, Window as XWindow}; use crate::{ffi, prelude::*, X11Display}; #[cfg(not(feature = "xlib"))] use crate::{XCursor, XWindow}; impl X11Display { #[cfg(all(feature = "v4_4", feature = "egl"))] #[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "egl"))))] #[doc(alias = "gdk_x11_display_get_egl_display")] #[doc(alias = "get_egl_display")] pub fn egl_display(&self) -> Option { unsafe { let ptr = ffi::gdk_x11_display_get_egl_display(self.to_glib_none().0); if ptr.is_null() { None } else { Some(egl::Display::from_ptr(ptr)) } } } #[doc(alias = "gdk_x11_display_get_xcursor")] #[doc(alias = "get_xcursor")] pub fn xcursor(&self, cursor: &gdk::Cursor) -> XCursor { unsafe { ffi::gdk_x11_display_get_xcursor(self.to_glib_none().0, cursor.to_glib_none().0) } } #[doc(alias = "gdk_x11_display_get_xrootwindow")] #[doc(alias = "get_xrootwindow")] pub fn xrootwindow(&self) -> XWindow { unsafe { ffi::gdk_x11_display_get_xrootwindow(self.to_glib_none().0) } } #[cfg(feature = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] #[doc(alias = "gdk_x11_display_get_xdisplay")] #[doc(alias = "get_xdisplay")] #[allow(clippy::missing_safety_doc)] pub unsafe fn xdisplay(&self) -> *mut xlib::Display { ffi::gdk_x11_display_get_xdisplay(self.to_glib_none().0) as *mut xlib::Display } #[cfg(feature = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] #[doc(alias = "gdk_x11_display_get_xscreen")] #[doc(alias = "get_xscreen")] #[allow(clippy::missing_safety_doc)] pub unsafe fn xscreen(&self) -> *mut xlib::Screen { ffi::gdk_x11_display_get_xscreen(self.to_glib_none().0) as *mut xlib::Screen } #[cfg(feature = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] #[doc(alias = "xevent")] #[allow(clippy::missing_safety_doc)] pub unsafe fn connect_xevent glib::Propagation + 'static>( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn xevent_trampoline< F: Fn(&X11Display, *mut xlib::XEvent) -> glib::Propagation + 'static, >( this: *mut ffi::GdkX11Display, xevent: glib::ffi::gpointer, f: glib::ffi::gpointer, ) -> glib::ffi::gboolean { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), xevent as *mut xlib::XEvent).into_glib() } let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"xevent".as_ptr() as *const _, Some(transmute::<*const (), unsafe extern "C" fn()>( xevent_trampoline:: as *const (), )), Box_::into_raw(f), ) } #[doc(alias = "gdk_x11_display_set_program_class")] pub fn set_program_class(&self, program_class: impl IntoGStr) { assert_initialized_main_thread!(); unsafe { program_class.run_with_gstr(|program_class| { ffi::gdk_x11_display_set_program_class( self.upcast_ref::().to_glib_none().0, program_class.as_ptr(), ); }); } } } gdk4-x11-0.10.0/src/x11_monitor.rs000064400000000000000000000007541046102023000144650ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[cfg(feature = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] use x11::xlib::XID; #[cfg(not(feature = "xlib"))] use crate::XID; use crate::{ffi, X11Monitor}; impl X11Monitor { #[doc(alias = "gdk_x11_monitor_get_output")] #[doc(alias = "get_output")] pub fn output(&self) -> XID { unsafe { ffi::gdk_x11_monitor_get_output(self.to_glib_none().0) } } } gdk4-x11-0.10.0/src/x11_screen.rs000064400000000000000000000016171046102023000142540ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[cfg(feature = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] use x11::xlib::{self, XID}; #[cfg(not(feature = "xlib"))] use crate::XID; use crate::{ffi, X11Screen}; impl X11Screen { #[cfg(feature = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] #[doc(alias = "gdk_x11_screen_get_xscreen")] #[doc(alias = "get_xscreen")] #[allow(clippy::missing_safety_doc)] pub unsafe fn xscreen(&self) -> *mut xlib::Screen { ffi::gdk_x11_screen_get_xscreen(self.to_glib_none().0) as *mut xlib::Screen } #[doc(alias = "gdk_x11_screen_get_monitor_output")] #[doc(alias = "get_monitor_output")] pub fn monitor_output(&self, monitor_num: i32) -> XID { unsafe { ffi::gdk_x11_screen_get_monitor_output(self.to_glib_none().0, monitor_num) } } } gdk4-x11-0.10.0/src/x11_surface.rs000064400000000000000000000015561046102023000144270ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[cfg(feature = "xlib")] #[cfg_attr(docsrs, doc(cfg(feature = "xlib")))] use x11::xlib::Window as XWindow; #[cfg(not(feature = "xlib"))] use crate::XWindow; use crate::{ffi, X11Surface}; impl X11Surface { #[doc(alias = "gdk_x11_surface_get_xid")] #[doc(alias = "get_xid")] pub fn xid(&self) -> XWindow { unsafe { ffi::gdk_x11_surface_get_xid(self.to_glib_none().0) } } #[doc(alias = "gdk_x11_surface_lookup_for_display")] pub fn lookup_for_display(display: &crate::X11Display, window: XWindow) -> Option { skip_assert_initialized!(); unsafe { from_glib_none(ffi::gdk_x11_surface_lookup_for_display( display.to_glib_none().0, window, )) } } } gdk4-x11-0.10.0/tests/check_gir.rs000064400000000000000000000003461046102023000145730ustar 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); }