diff --git a/.github/workflows/windows-msvc.yml b/.github/workflows/windows-msvc.yml index 942abb13662c..b0ffb7a76f8f 100644 --- a/.github/workflows/windows-msvc.yml +++ b/.github/workflows/windows-msvc.yml @@ -24,6 +24,7 @@ jobs: ci-msvc: name: Windows MSVC runs-on: windows-latest + continue-on-error: true env: PKG_CONFIG_PATH: 'C:\gnome\lib\pkgconfig' @@ -75,7 +76,7 @@ jobs: working-directory: /gtk if: steps.cache.outputs.cache-hit != 'true' run: | - meson setup builddir --prefix=C:/gnome -Dbuild-demos=false -Dbuild-tests=false -Dvulkan=disabled -Dmedia-gstreamer=disabled -Dbuild-examples=false -Dglib:tests=false -Dharfbuzz:tests=disabled -Dharfbuzz:docs=disabled -Dgraphene:tests=false -Dgdk-pixbuf:tests=false -Dcairo:tests=disabled -Dglib:sysprof=disabled + meson setup builddir --prefix=C:/gnome -Dbuild-demos=false -Dbuild-tests=false -Dvulkan=disabled -Dmedia-gstreamer=disabled -Dbuild-examples=false -Dglib:tests=false -Dharfbuzz:tests=disabled -Dharfbuzz:docs=disabled -Dgraphene:tests=false -Dgdk-pixbuf:tests=false -Dcairo:tests=disabled -Dglib:sysprof=disabled -Dgdk-pixbuf:documentation=false - name: Build and install GTK working-directory: /gtk diff --git a/Cargo.lock b/Cargo.lock index 767a1eeed532..05691300c5c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,12 +17,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -44,6 +38,12 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.5.0" @@ -88,9 +88,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" [[package]] name = "bitmaps" @@ -115,18 +115,18 @@ checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytemuck" -version = "1.23.1" +version = "1.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.9.3" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" +checksum = "4f154e572231cb6ba2bd1176980827e3d5dc04cc183a75dea38109fbdd672d29" dependencies = [ "proc-macro2", "quote", @@ -147,10 +147,10 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cairo-rs" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "cairo-sys-rs", "glib", "libc", @@ -158,8 +158,8 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "glib-sys", "libc", @@ -168,18 +168,19 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.29" +version = "1.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1599538de2394445747c8cf7935946e3cc27e9625f889d979bfb2aaf569362" +checksum = "65193589c6404eb80b450d618eaf9a2cafaaafd57ecce47370519ef674a7bd44" dependencies = [ + "find-msvc-tools", "shlex", ] [[package]] name = "cfg-expr" -version = "0.18.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a2b34126159980f92da2a08bdec0694fd80fb5eb9e48aff25d20a0d8dfa710d" +checksum = "d0890061c4d3223e7267f3bad2ec40b997d64faac1c2815a4a9d95018e2b9e9c" dependencies = [ "smallvec", "target-lexicon", @@ -187,9 +188,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "cfg_aliases" @@ -199,16 +200,15 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-link", + "windows-link 0.2.0", ] [[package]] @@ -217,7 +217,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad36507aeb7e16159dfe68db81ccc27571c3ccd4b76fb2fb72fc59e7a4b1b64c" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "block", "cocoa-foundation", "core-foundation", @@ -233,7 +233,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81411967c50ee9a1fc11365f8c585f863a22a9697c89239c452292c40ba79b0d" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "block", "core-foundation", "core-graphics-types", @@ -277,7 +277,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "core-foundation", "core-graphics-types", "foreign-types", @@ -290,7 +290,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "core-foundation", "libc", ] @@ -356,19 +356,19 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.0", ] [[package]] name = "event-listener" -version = "5.4.0" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue", "parking", @@ -397,7 +397,7 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffdf29af13b81d7562ccd57624242b2ed56edc2c83dad25f13bd74d87e7fa8d9" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "bytemuck", "fnv", "glow", @@ -423,6 +423,12 @@ dependencies = [ "rustc_version", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d" + [[package]] name = "fnv" version = "1.0.7" @@ -458,9 +464,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -530,8 +536,8 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "gdk-pixbuf-sys", "gio", @@ -541,8 +547,8 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "gio-sys", "glib-sys", @@ -710,7 +716,7 @@ dependencies = [ "js-sys", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasi 0.14.7+wasi-0.2.4", "wasm-bindgen", ] @@ -732,8 +738,8 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gio" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "futures-channel", "futures-core", @@ -748,14 +754,14 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", - "windows-sys 0.60.2", + "windows-sys 0.61.0", ] [[package]] @@ -797,10 +803,10 @@ dependencies = [ [[package]] name = "glib" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "futures-channel", "futures-core", "futures-executor", @@ -817,8 +823,8 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "heck", "proc-macro-crate", @@ -829,8 +835,8 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "libc", "system-deps", @@ -851,9 +857,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "glow" @@ -869,8 +875,8 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "glib-sys", "libc", @@ -879,8 +885,8 @@ dependencies = [ [[package]] name = "graphene-rs" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "glib", "graphene-sys", @@ -889,8 +895,8 @@ dependencies = [ [[package]] name = "graphene-sys" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "glib-sys", "libc", @@ -957,7 +963,7 @@ dependencies = [ "gtk4", "proc-macro-crate", "proc-macro2", - "quick-xml 0.38.0", + "quick-xml 0.38.3", "quote", "syn", "trybuild2", @@ -1003,9 +1009,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" [[package]] name = "heck" @@ -1055,18 +1061,20 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", + "futures-core", "http", "http-body", "httparse", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", @@ -1091,9 +1099,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" dependencies = [ "base64", "bytes", @@ -1115,9 +1123,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1225,9 +1233,9 @@ dependencies = [ [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -1279,9 +1287,9 @@ checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408" [[package]] name = "indexmap" -version = "2.10.0" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "92119844f513ffa41556430369ab02c295a3578af21cf945caa3e9e0c2481ac3" dependencies = [ "equivalent", "hashbrown", @@ -1289,11 +1297,11 @@ dependencies = [ [[package]] name = "io-uring" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "cfg-if", "libc", ] @@ -1322,9 +1330,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "6247da8b8658ad4e73a186e747fcc5fc2a29f979d6fe6269127fdb5fd08298d0" dependencies = [ "once_cell", "wasm-bindgen", @@ -1359,9 +1367,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.174" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libloading" @@ -1370,7 +1378,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.2", + "windows-targets 0.53.3", ] [[package]] @@ -1381,15 +1389,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" @@ -1409,9 +1411,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "lru" @@ -1504,8 +1506,8 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "pango" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "gio", "glib", @@ -1515,8 +1517,8 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.21.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#a93a100230de5eb68850af90a96961c34d2b917b" +version = "0.21.2" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.21#b4fa4f26e84fd2f133fedfc6807b07af654909f5" dependencies = [ "glib-sys", "gobject-sys", @@ -1555,9 +1557,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project-lite" @@ -1579,9 +1581,9 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "potential_utf" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" dependencies = [ "zerovec", ] @@ -1597,18 +1599,18 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ - "toml_edit", + "toml_edit 0.23.5", ] [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] @@ -1624,18 +1626,18 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.38.0" +version = "0.38.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8927b0664f5c5a98265138b7e3f90aa19a6b21353182469ace36d4ac527b7b1b" +checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" dependencies = [ "memchr", ] [[package]] name = "quinn" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" dependencies = [ "bytes", "cfg_aliases", @@ -1653,9 +1655,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.12" +version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" dependencies = [ "bytes", "getrandom 0.3.3", @@ -1674,16 +1676,16 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcebb1209ee276352ef14ff8732e24cc2b02bbac986cd74a4c81bcb2f9881970" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" dependencies = [ "cfg_aliases", "libc", "once_cell", "socket2", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -1703,9 +1705,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha", "rand_core 0.9.3", @@ -1747,18 +1749,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.13" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", ] [[package]] name = "reqwest" -version = "0.12.22" +version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" dependencies = [ "base64", "bytes", @@ -1817,9 +1819,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -1838,35 +1840,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.9.1", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.0.7" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "errno", "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "linux-raw-sys", + "windows-sys 0.61.0", ] [[package]] name = "rustls" -version = "0.23.29" +version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" +checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ "once_cell", "ring", @@ -1888,9 +1877,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.4" +version = "0.103.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" +checksum = "8572f3c2cb9934231157b45499fc41e1f58c589fdfb81a844ba873265e80f8eb" dependencies = [ "ring", "rustls-pki-types", @@ -1899,9 +1888,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rustybuzz" @@ -1909,7 +1898,7 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "bytemuck", "core_maths", "log", @@ -1941,24 +1930,34 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.225" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.225" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.225" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" dependencies = [ "proc-macro2", "quote", @@ -1967,14 +1966,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] @@ -2022,9 +2022,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] @@ -2041,9 +2041,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "slotmap" @@ -2062,12 +2062,12 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.5.10" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2084,9 +2084,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.104" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -2128,21 +2128,21 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.13.2" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.20.0" +version = "3.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +checksum = "84fa4d11fadde498443cca10fd3ac23c951f0dc59e080e9f4b93d4df4e4eea53" dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", - "rustix 1.0.7", - "windows-sys 0.59.0", + "rustix", + "windows-sys 0.61.0", ] [[package]] @@ -2156,18 +2156,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", @@ -2186,9 +2186,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] @@ -2201,9 +2201,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.46.1" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", @@ -2216,7 +2216,7 @@ dependencies = [ "slab", "socket2", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2248,8 +2248,8 @@ checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", - "toml_datetime", - "toml_edit", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", ] [[package]] @@ -2261,6 +2261,15 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a197c0ec7d131bfc6f7e82c8442ba1595aeab35da7adbf05b6b73cd06a16b6be" +dependencies = [ + "serde_core", +] + [[package]] name = "toml_edit" version = "0.22.27" @@ -2270,7 +2279,28 @@ dependencies = [ "indexmap", "serde", "serde_spanned", - "toml_datetime", + "toml_datetime 0.6.11", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2ad0b7ae9cfeef5605163839cb9221f453399f15cfb5c10be9885fcf56611f9" +dependencies = [ + "indexmap", + "toml_datetime 0.7.1", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10" +dependencies = [ "winnow", ] @@ -2295,7 +2325,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "bytes", "futures-util", "http", @@ -2394,9 +2424,9 @@ checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" [[package]] name = "unicode-properties" @@ -2424,13 +2454,14 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.4" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -2468,30 +2499,40 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.2+wasi-0.2.4" +version = "0.14.7+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" +dependencies = [ + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "wit-bindgen-rt", + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "4ad224d2776649cfb4f4471124f8176e54c1cca67a88108e30a0cd98b90e7ad3" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.100" +version = "0.2.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "3a1364104bdcd3c03f22b16a3b1c9620891469f5e9f09bc38b2db121e593e732" dependencies = [ "bumpalo", "log", @@ -2503,9 +2544,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.50" +version = "0.4.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +checksum = "9c0a08ecf5d99d5604a6666a70b3cde6ab7cc6142f5e641a8ef48fc744ce8854" dependencies = [ "cfg-if", "js-sys", @@ -2516,9 +2557,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "0d7ab4ca3e367bb1ed84ddbd83cc6e41e115f8337ed047239578210214e36c76" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2526,9 +2567,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "4a518014843a19e2dbbd0ed5dfb6b99b23fb886b14e6192a00803a3e14c552b0" dependencies = [ "proc-macro2", "quote", @@ -2539,22 +2580,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "255eb0aa4cc2eea3662a00c2bbd66e93911b7361d5e0fcd62385acfd7e15dcee" dependencies = [ "unicode-ident", ] [[package]] name = "wayland-backend" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe770181423e5fc79d3e2a7f4410b7799d5aab1de4372853de3c6aa13ca24121" +checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" dependencies = [ "cc", "downcast-rs", - "rustix 0.38.44", + "rustix", "scoped-tls", "smallvec", "wayland-sys", @@ -2562,23 +2603,23 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.10" +version = "0.31.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978fa7c67b0847dbd6a9f350ca2569174974cd4082737054dbb7fbb79d7d9a61" +checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" dependencies = [ - "bitflags 2.9.1", - "rustix 0.38.44", + "bitflags 2.9.4", + "rustix", "wayland-backend", "wayland-scanner", ] [[package]] name = "wayland-protocols" -version = "0.32.8" +version = "0.32.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779075454e1e9a521794fed15886323ea0feda3f8b0fc1390f5398141310422a" +checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "wayland-backend", "wayland-client", "wayland-scanner", @@ -2586,9 +2627,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.6" +version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "896fdafd5d28145fce7958917d69f2fd44469b1d4e861cb5961bcbeebc6d1484" +checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" dependencies = [ "proc-macro2", "quick-xml 0.37.5", @@ -2597,9 +2638,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.6" +version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcebb399c77d5aa9fa5db874806ee7b4eba4e73650948e8f93963f128896615" +checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" dependencies = [ "dlib", "log", @@ -2608,9 +2649,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.77" +version = "0.3.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +checksum = "50462a022f46851b81d5441d1a6f5bac0b21a1d72d64bd4906fbdd4bf7230ec7" dependencies = [ "js-sys", "wasm-bindgen", @@ -2628,9 +2669,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8782dd5a41a24eed3a4f40b606249b3e236ca61adf1f25ea4d45c73de122b502" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" dependencies = [ "rustls-pki-types", ] @@ -2643,56 +2684,56 @@ checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" [[package]] name = "winapi-util" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] name = "windows" -version = "0.61.3" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +checksum = "9579d0e6970fd5250aa29aba5994052385ff55cf7b28a059e484bb79ea842e42" dependencies = [ "windows-collections", "windows-core", "windows-future", - "windows-link", + "windows-link 0.2.0", "windows-numerics", ] [[package]] name = "windows-collections" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +checksum = "a90dd7a7b86859ec4cdf864658b311545ef19dbcf17a672b52ab7cefe80c336f" dependencies = [ "windows-core", ] [[package]] name = "windows-core" -version = "0.61.2" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "57fe7168f7de578d2d8a05b07fd61870d2e73b4020e9f49aa00da8471723497c" dependencies = [ "windows-implement", "windows-interface", - "windows-link", + "windows-link 0.2.0", "windows-result", "windows-strings", ] [[package]] name = "windows-future" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +checksum = "b2194dee901458cb79e1148a4e9aac2b164cc95fa431891e7b296ff0b2f1d8a6" dependencies = [ "windows-core", - "windows-link", + "windows-link 0.2.0", "windows-threading", ] @@ -2725,31 +2766,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] -name = "windows-numerics" +name = "windows-link" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" + +[[package]] +name = "windows-numerics" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ce3498fe0aba81e62e477408383196b4b0363db5e0c27646f932676283b43d8" dependencies = [ "windows-core", - "windows-link", + "windows-link 0.2.0", ] [[package]] name = "windows-result" -version = "0.3.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" dependencies = [ - "windows-link", + "windows-link 0.2.0", ] [[package]] name = "windows-strings" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" dependencies = [ - "windows-link", + "windows-link 0.2.0", ] [[package]] @@ -2776,7 +2823,16 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.2", + "windows-targets 0.53.3", +] + +[[package]] +name = "windows-sys" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa" +dependencies = [ + "windows-link 0.2.0", ] [[package]] @@ -2797,10 +2853,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.2" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ + "windows-link 0.1.3", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -2813,11 +2870,11 @@ dependencies = [ [[package]] name = "windows-threading" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +checksum = "ab47f085ad6932defa48855254c758cdd0e2f2d48e62a34118a268d8f345e118" dependencies = [ - "windows-link", + "windows-link 0.2.0", ] [[package]] @@ -2918,21 +2975,18 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.1", -] +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" @@ -2991,18 +3045,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.26" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.26" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", @@ -3049,9 +3103,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" dependencies = [ "yoke", "zerofrom", diff --git a/deny.toml b/deny.toml index 1dc4cfe49c2d..17a664935bfd 100644 --- a/deny.toml +++ b/deny.toml @@ -26,16 +26,13 @@ multiple-versions = "deny" wildcards = "allow" highlight = "all" skip = [ - {name = "windows-targets", version = "0.52.6"}, - {name = "windows_aarch64_gnullvm", version = "0.52.6"}, - {name = "windows_aarch64_msvc", version = "0.52.6"}, - {name = "windows_i686_gnu", version = "0.52.6"}, - {name = "windows_i686_gnullvm", version = "0.52.6"}, - {name = "windows_i686_msvc", version = "0.52.6"}, - {name = "windows_x86_64_gnu", version = "0.52.6"}, - {name = "windows_x86_64_gnullvm", version = "0.52.6"}, - {name = "windows_x86_64_msvc", version = "0.52.6"}, - {name = "windows-sys", version = "0.59.0"}, + # system-deps depends on an old version + {name = "toml_edit", version = "0.22"}, + {name = "toml_datetime", version = "0.6"}, + # libloading depends on an old version + {name = "windows-link", version = "0.1"}, + # wayland-scanner depends on an old version + {name = "quick-xml", version = "0.37"}, ] [sources] diff --git a/gdk4-macos/src/auto/versions.txt b/gdk4-macos/src/auto/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gdk4-macos/src/auto/versions.txt +++ b/gdk4-macos/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gdk4-macos/sys/versions.txt b/gdk4-macos/sys/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gdk4-macos/sys/versions.txt +++ b/gdk4-macos/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gdk4-wayland/src/auto/versions.txt b/gdk4-wayland/src/auto/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gdk4-wayland/src/auto/versions.txt +++ b/gdk4-wayland/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gdk4-wayland/sys/versions.txt b/gdk4-wayland/sys/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gdk4-wayland/sys/versions.txt +++ b/gdk4-wayland/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gdk4-win32/Cargo.toml b/gdk4-win32/Cargo.toml index 7d261447ab42..7b4fd8118fe5 100644 --- a/gdk4-win32/Cargo.toml +++ b/gdk4-win32/Cargo.toml @@ -31,7 +31,7 @@ gio.workspace = true glib.workspace = true libc.workspace = true khronos-egl = {version = "6.0", optional = true} -windows = { version = "0.61", features = [ +windows = { version = ">= 0.61, <= 0.62", features = [ "Win32_Foundation", "Win32_UI_WindowsAndMessaging", ], optional = true } diff --git a/gdk4-win32/src/auto/versions.txt b/gdk4-win32/src/auto/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gdk4-win32/src/auto/versions.txt +++ b/gdk4-win32/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gdk4-win32/sys/versions.txt b/gdk4-win32/sys/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gdk4-win32/sys/versions.txt +++ b/gdk4-win32/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gdk4-x11/src/auto/versions.txt b/gdk4-x11/src/auto/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gdk4-x11/src/auto/versions.txt +++ b/gdk4-x11/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gdk4-x11/sys/versions.txt b/gdk4-x11/sys/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gdk4-x11/sys/versions.txt +++ b/gdk4-x11/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gdk4/Gir.toml b/gdk4/Gir.toml index c57ce5975b01..d623e5a1d5cf 100644 --- a/gdk4/Gir.toml +++ b/gdk4/Gir.toml @@ -53,6 +53,7 @@ generate = [ "Gdk.ProximityEvent", "Gdk.ScrollDirection", "Gdk.ScrollEvent", + "Gdk.ScrollRelativeDirection", "Gdk.ScrollUnit", "Gdk.SeatCapabilities", "Gdk.SubpixelLayout", diff --git a/gdk4/src/auto/enums.rs b/gdk4/src/auto/enums.rs index dde7ed038d88..b81fe2e59f1e 100644 --- a/gdk4/src/auto/enums.rs +++ b/gdk4/src/auto/enums.rs @@ -1848,6 +1848,42 @@ pub enum MemoryFormat { #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] #[doc(alias = "GDK_MEMORY_B8G8R8G8_422")] B8g8r8g8422, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X6G10_X6B10_X6R10_420")] + X6g10X6b10X6r10420, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X6G10_X6B10_X6R10_422")] + X6g10X6b10X6r10422, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X6G10_X6B10_X6R10_444")] + X6g10X6b10X6r10444, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X4G12_X4B12_X4R12_420")] + X4g12X4b12X4r12420, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X4G12_X4B12_X4R12_422")] + X4g12X4b12X4r12422, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X4G12_X4B12_X4R12_444")] + X4g12X4b12X4r12444, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_G16_B16_R16_420")] + G16B16R16420, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_G16_B16_R16_422")] + G16B16R16422, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_G16_B16_R16_444")] + G16B16R16444, #[doc(hidden)] __Unknown(i32), } @@ -1965,6 +2001,24 @@ impl IntoGlib for MemoryFormat { Self::R8g8b8g8422 => ffi::GDK_MEMORY_R8G8B8G8_422, #[cfg(feature = "v4_20")] Self::B8g8r8g8422 => ffi::GDK_MEMORY_B8G8R8G8_422, + #[cfg(feature = "v4_20")] + Self::X6g10X6b10X6r10420 => ffi::GDK_MEMORY_X6G10_X6B10_X6R10_420, + #[cfg(feature = "v4_20")] + Self::X6g10X6b10X6r10422 => ffi::GDK_MEMORY_X6G10_X6B10_X6R10_422, + #[cfg(feature = "v4_20")] + Self::X6g10X6b10X6r10444 => ffi::GDK_MEMORY_X6G10_X6B10_X6R10_444, + #[cfg(feature = "v4_20")] + Self::X4g12X4b12X4r12420 => ffi::GDK_MEMORY_X4G12_X4B12_X4R12_420, + #[cfg(feature = "v4_20")] + Self::X4g12X4b12X4r12422 => ffi::GDK_MEMORY_X4G12_X4B12_X4R12_422, + #[cfg(feature = "v4_20")] + Self::X4g12X4b12X4r12444 => ffi::GDK_MEMORY_X4G12_X4B12_X4R12_444, + #[cfg(feature = "v4_20")] + Self::G16B16R16420 => ffi::GDK_MEMORY_G16_B16_R16_420, + #[cfg(feature = "v4_20")] + Self::G16B16R16422 => ffi::GDK_MEMORY_G16_B16_R16_422, + #[cfg(feature = "v4_20")] + Self::G16B16R16444 => ffi::GDK_MEMORY_G16_B16_R16_444, Self::__Unknown(value) => value, } } @@ -2083,6 +2137,24 @@ impl FromGlib for MemoryFormat { ffi::GDK_MEMORY_R8G8B8G8_422 => Self::R8g8b8g8422, #[cfg(feature = "v4_20")] ffi::GDK_MEMORY_B8G8R8G8_422 => Self::B8g8r8g8422, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X6G10_X6B10_X6R10_420 => Self::X6g10X6b10X6r10420, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X6G10_X6B10_X6R10_422 => Self::X6g10X6b10X6r10422, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X6G10_X6B10_X6R10_444 => Self::X6g10X6b10X6r10444, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X4G12_X4B12_X4R12_420 => Self::X4g12X4b12X4r12420, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X4G12_X4B12_X4R12_422 => Self::X4g12X4b12X4r12422, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X4G12_X4B12_X4R12_444 => Self::X4g12X4b12X4r12444, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_G16_B16_R16_420 => Self::G16B16R16420, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_G16_B16_R16_422 => Self::G16B16R16422, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_G16_B16_R16_444 => Self::G16B16R16444, value => Self::__Unknown(value), } } @@ -2364,6 +2436,124 @@ impl From for glib::Value { } } +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] +#[non_exhaustive] +#[doc(alias = "GdkScrollRelativeDirection")] +pub enum ScrollRelativeDirection { + #[doc(alias = "GDK_SCROLL_RELATIVE_DIRECTION_IDENTICAL")] + Identical, + #[doc(alias = "GDK_SCROLL_RELATIVE_DIRECTION_INVERTED")] + Inverted, + #[doc(alias = "GDK_SCROLL_RELATIVE_DIRECTION_UNKNOWN")] + Unknown, + #[doc(hidden)] + __Unknown(i32), +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +#[doc(hidden)] +impl IntoGlib for ScrollRelativeDirection { + type GlibType = ffi::GdkScrollRelativeDirection; + + #[inline] + fn into_glib(self) -> ffi::GdkScrollRelativeDirection { + match self { + Self::Identical => ffi::GDK_SCROLL_RELATIVE_DIRECTION_IDENTICAL, + Self::Inverted => ffi::GDK_SCROLL_RELATIVE_DIRECTION_INVERTED, + Self::Unknown => ffi::GDK_SCROLL_RELATIVE_DIRECTION_UNKNOWN, + Self::__Unknown(value) => value, + } + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +#[doc(hidden)] +impl FromGlib for ScrollRelativeDirection { + #[inline] + unsafe fn from_glib(value: ffi::GdkScrollRelativeDirection) -> Self { + skip_assert_initialized!(); + + match value { + ffi::GDK_SCROLL_RELATIVE_DIRECTION_IDENTICAL => Self::Identical, + ffi::GDK_SCROLL_RELATIVE_DIRECTION_INVERTED => Self::Inverted, + ffi::GDK_SCROLL_RELATIVE_DIRECTION_UNKNOWN => Self::Unknown, + value => Self::__Unknown(value), + } + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl StaticType for ScrollRelativeDirection { + #[inline] + #[doc(alias = "gdk_scroll_relative_direction_get_type")] + fn static_type() -> glib::Type { + unsafe { from_glib(ffi::gdk_scroll_relative_direction_get_type()) } + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl glib::HasParamSpec for ScrollRelativeDirection { + type ParamSpec = glib::ParamSpecEnum; + type SetValue = Self; + type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; + + fn param_spec_builder() -> Self::BuilderFn { + Self::ParamSpec::builder_with_default + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl glib::value::ValueType for ScrollRelativeDirection { + type Type = Self; +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +unsafe impl<'a> glib::value::FromValue<'a> for ScrollRelativeDirection { + type Checker = glib::value::GenericValueTypeChecker; + + #[inline] + unsafe fn from_value(value: &'a glib::Value) -> Self { + skip_assert_initialized!(); + from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl ToValue for ScrollRelativeDirection { + #[inline] + fn to_value(&self) -> glib::Value { + let mut value = glib::Value::for_value_type::(); + unsafe { + glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); + } + value + } + + #[inline] + fn value_type(&self) -> glib::Type { + Self::static_type() + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl From for glib::Value { + #[inline] + fn from(v: ScrollRelativeDirection) -> Self { + skip_assert_initialized!(); + ToValue::to_value(&v) + } +} + #[cfg(feature = "v4_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] diff --git a/gdk4/src/auto/flags.rs b/gdk4/src/auto/flags.rs index 1b6e683cef63..255a94bf3128 100644 --- a/gdk4/src/auto/flags.rs +++ b/gdk4/src/auto/flags.rs @@ -213,6 +213,10 @@ bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "GdkDragAction")] pub struct DragAction: u32 { + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_ACTION_NONE")] + const NONE = ffi::GDK_ACTION_NONE as _; #[doc(alias = "GDK_ACTION_COPY")] const COPY = ffi::GDK_ACTION_COPY as _; #[doc(alias = "GDK_ACTION_MOVE")] diff --git a/gdk4/src/auto/mod.rs b/gdk4/src/auto/mod.rs index 8efb2ceb1b6a..3ff516349614 100644 --- a/gdk4/src/auto/mod.rs +++ b/gdk4/src/auto/mod.rs @@ -255,6 +255,9 @@ pub use self::enums::KeyMatch; pub use self::enums::MemoryFormat; pub use self::enums::NotifyType; pub use self::enums::ScrollDirection; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub use self::enums::ScrollRelativeDirection; #[cfg(feature = "v4_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] pub use self::enums::ScrollUnit; diff --git a/gdk4/src/auto/scroll_event.rs b/gdk4/src/auto/scroll_event.rs index 0df7bb51c49d..aead96e88655 100644 --- a/gdk4/src/auto/scroll_event.rs +++ b/gdk4/src/auto/scroll_event.rs @@ -6,6 +6,9 @@ #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] use crate::ScrollUnit; use crate::{ffi, ScrollDirection}; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +use crate::{Event, ScrollRelativeDirection}; use glib::{prelude::*, translate::*}; glib::wrapper! { @@ -58,4 +61,17 @@ impl ScrollEvent { pub fn is_stop(&self) -> bool { unsafe { from_glib(ffi::gdk_scroll_event_is_stop(self.to_glib_none().0)) } } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gdk_scroll_event_get_relative_direction")] + #[doc(alias = "get_relative_direction")] + pub fn relative_direction(event: impl AsRef) -> ScrollRelativeDirection { + skip_assert_initialized!(); + unsafe { + from_glib(ffi::gdk_scroll_event_get_relative_direction( + event.as_ref().to_glib_none().0, + )) + } + } } diff --git a/gdk4/src/auto/versions.txt b/gdk4/src/auto/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gdk4/src/auto/versions.txt +++ b/gdk4/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gdk4/sys/src/lib.rs b/gdk4/sys/src/lib.rs index 95e531eb8881..1a8410006a16 100644 --- a/gdk4/sys/src/lib.rs +++ b/gdk4/sys/src/lib.rs @@ -308,7 +308,34 @@ pub const GDK_MEMORY_R8G8B8G8_422: GdkMemoryFormat = 54; #[cfg(feature = "v4_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] pub const GDK_MEMORY_B8G8R8G8_422: GdkMemoryFormat = 55; -pub const GDK_MEMORY_N_FORMATS: GdkMemoryFormat = 56; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X6G10_X6B10_X6R10_420: GdkMemoryFormat = 56; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X6G10_X6B10_X6R10_422: GdkMemoryFormat = 57; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X6G10_X6B10_X6R10_444: GdkMemoryFormat = 58; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X4G12_X4B12_X4R12_420: GdkMemoryFormat = 59; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X4G12_X4B12_X4R12_422: GdkMemoryFormat = 60; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X4G12_X4B12_X4R12_444: GdkMemoryFormat = 61; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_G16_B16_R16_420: GdkMemoryFormat = 62; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_G16_B16_R16_422: GdkMemoryFormat = 63; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_G16_B16_R16_444: GdkMemoryFormat = 64; +pub const GDK_MEMORY_N_FORMATS: GdkMemoryFormat = 65; pub type GdkNotifyType = c_int; pub const GDK_NOTIFY_ANCESTOR: GdkNotifyType = 0; @@ -325,6 +352,11 @@ pub const GDK_SCROLL_LEFT: GdkScrollDirection = 2; pub const GDK_SCROLL_RIGHT: GdkScrollDirection = 3; pub const GDK_SCROLL_SMOOTH: GdkScrollDirection = 4; +pub type GdkScrollRelativeDirection = c_int; +pub const GDK_SCROLL_RELATIVE_DIRECTION_IDENTICAL: GdkScrollRelativeDirection = 0; +pub const GDK_SCROLL_RELATIVE_DIRECTION_INVERTED: GdkScrollRelativeDirection = 1; +pub const GDK_SCROLL_RELATIVE_DIRECTION_UNKNOWN: GdkScrollRelativeDirection = 2; + pub type GdkScrollUnit = c_int; pub const GDK_SCROLL_UNIT_WHEEL: GdkScrollUnit = 0; pub const GDK_SCROLL_UNIT_SURFACE: GdkScrollUnit = 1; @@ -2855,6 +2887,9 @@ pub const GDK_AXIS_FLAG_ROTATION: GdkAxisFlags = 1024; pub const GDK_AXIS_FLAG_SLIDER: GdkAxisFlags = 2048; pub type GdkDragAction = c_uint; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_ACTION_NONE: GdkDragAction = 0; pub const GDK_ACTION_COPY: GdkDragAction = 1; pub const GDK_ACTION_MOVE: GdkDragAction = 2; pub const GDK_ACTION_LINK: GdkDragAction = 4; @@ -4182,6 +4217,13 @@ extern "C" { //========================================================================= pub fn gdk_scroll_direction_get_type() -> GType; + //========================================================================= + // GdkScrollRelativeDirection + //========================================================================= + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gdk_scroll_relative_direction_get_type() -> GType; + //========================================================================= // GdkScrollUnit //========================================================================= @@ -5851,6 +5893,11 @@ extern "C" { // GdkScrollEvent //========================================================================= pub fn gdk_scroll_event_get_type() -> GType; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gdk_scroll_event_get_relative_direction( + event: *mut GdkEvent, + ) -> GdkScrollRelativeDirection; pub fn gdk_scroll_event_get_deltas( event: *mut GdkScrollEvent, delta_x: *mut c_double, diff --git a/gdk4/sys/tests/abi.rs b/gdk4/sys/tests/abi.rs index 2dbfff8e117d..efb3cb32628b 100644 --- a/gdk4/sys/tests/abi.rs +++ b/gdk4/sys/tests/abi.rs @@ -404,6 +404,13 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ alignment: align_of::(), }, ), + ( + "GdkScrollRelativeDirection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ( "GdkScrollUnit", Layout { @@ -496,6 +503,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) GDK_ACTION_COPY", "1"), ("(guint) GDK_ACTION_LINK", "4"), ("(guint) GDK_ACTION_MOVE", "2"), + ("(guint) GDK_ACTION_NONE", "0"), ("(guint) GDK_ALT_MASK", "8"), ("(guint) GDK_ANCHOR_FLIP", "3"), ("(guint) GDK_ANCHOR_FLIP_X", "1"), @@ -3085,6 +3093,9 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GDK_MEMORY_G16A16", "22"), ("(gint) GDK_MEMORY_G16A16_PREMULTIPLIED", "21"), ("(gint) GDK_MEMORY_G16_B16R16_420", "41"), + ("(gint) GDK_MEMORY_G16_B16_R16_420", "62"), + ("(gint) GDK_MEMORY_G16_B16_R16_422", "63"), + ("(gint) GDK_MEMORY_G16_B16_R16_444", "64"), ("(gint) GDK_MEMORY_G8", "20"), ("(gint) GDK_MEMORY_G8A8", "19"), ("(gint) GDK_MEMORY_G8A8_PREMULTIPLIED", "18"), @@ -3106,7 +3117,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GDK_MEMORY_G8_R8_B8_420", "47"), ("(gint) GDK_MEMORY_G8_R8_B8_422", "49"), ("(gint) GDK_MEMORY_G8_R8_B8_444", "51"), - ("(gint) GDK_MEMORY_N_FORMATS", "56"), + ("(gint) GDK_MEMORY_N_FORMATS", "65"), ("(gint) GDK_MEMORY_R16G16B16", "9"), ("(gint) GDK_MEMORY_R16G16B16A16", "11"), ("(gint) GDK_MEMORY_R16G16B16A16_FLOAT", "14"), @@ -3121,6 +3132,12 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GDK_MEMORY_R8G8B8A8_PREMULTIPLIED", "2"), ("(gint) GDK_MEMORY_R8G8B8G8_422", "54"), ("(gint) GDK_MEMORY_R8G8B8X8", "31"), + ("(gint) GDK_MEMORY_X4G12_X4B12_X4R12_420", "59"), + ("(gint) GDK_MEMORY_X4G12_X4B12_X4R12_422", "60"), + ("(gint) GDK_MEMORY_X4G12_X4B12_X4R12_444", "61"), + ("(gint) GDK_MEMORY_X6G10_X6B10_X6R10_420", "56"), + ("(gint) GDK_MEMORY_X6G10_X6B10_X6R10_422", "57"), + ("(gint) GDK_MEMORY_X6G10_X6B10_X6R10_444", "58"), ("(gint) GDK_MEMORY_X8B8G8R8", "32"), ("(gint) GDK_MEMORY_X8R8G8B8", "30"), ("(guint) GDK_META_MASK", "268435456"), @@ -3147,6 +3164,9 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GDK_SCROLL", "15"), ("(gint) GDK_SCROLL_DOWN", "1"), ("(gint) GDK_SCROLL_LEFT", "2"), + ("(gint) GDK_SCROLL_RELATIVE_DIRECTION_IDENTICAL", "0"), + ("(gint) GDK_SCROLL_RELATIVE_DIRECTION_INVERTED", "1"), + ("(gint) GDK_SCROLL_RELATIVE_DIRECTION_UNKNOWN", "2"), ("(gint) GDK_SCROLL_RIGHT", "3"), ("(gint) GDK_SCROLL_SMOOTH", "4"), ("(gint) GDK_SCROLL_UNIT_SURFACE", "1"), diff --git a/gdk4/sys/tests/constant.c b/gdk4/sys/tests/constant.c index 95b9af354998..c0073a4dba06 100644 --- a/gdk4/sys/tests/constant.c +++ b/gdk4/sys/tests/constant.c @@ -33,6 +33,7 @@ int main() { PRINT_CONSTANT((guint) GDK_ACTION_COPY); PRINT_CONSTANT((guint) GDK_ACTION_LINK); PRINT_CONSTANT((guint) GDK_ACTION_MOVE); + PRINT_CONSTANT((guint) GDK_ACTION_NONE); PRINT_CONSTANT((guint) GDK_ALT_MASK); PRINT_CONSTANT((guint) GDK_ANCHOR_FLIP); PRINT_CONSTANT((guint) GDK_ANCHOR_FLIP_X); @@ -2622,6 +2623,9 @@ int main() { PRINT_CONSTANT((gint) GDK_MEMORY_G16A16); PRINT_CONSTANT((gint) GDK_MEMORY_G16A16_PREMULTIPLIED); PRINT_CONSTANT((gint) GDK_MEMORY_G16_B16R16_420); + PRINT_CONSTANT((gint) GDK_MEMORY_G16_B16_R16_420); + PRINT_CONSTANT((gint) GDK_MEMORY_G16_B16_R16_422); + PRINT_CONSTANT((gint) GDK_MEMORY_G16_B16_R16_444); PRINT_CONSTANT((gint) GDK_MEMORY_G8); PRINT_CONSTANT((gint) GDK_MEMORY_G8A8); PRINT_CONSTANT((gint) GDK_MEMORY_G8A8_PREMULTIPLIED); @@ -2658,6 +2662,12 @@ int main() { PRINT_CONSTANT((gint) GDK_MEMORY_R8G8B8A8_PREMULTIPLIED); PRINT_CONSTANT((gint) GDK_MEMORY_R8G8B8G8_422); PRINT_CONSTANT((gint) GDK_MEMORY_R8G8B8X8); + PRINT_CONSTANT((gint) GDK_MEMORY_X4G12_X4B12_X4R12_420); + PRINT_CONSTANT((gint) GDK_MEMORY_X4G12_X4B12_X4R12_422); + PRINT_CONSTANT((gint) GDK_MEMORY_X4G12_X4B12_X4R12_444); + PRINT_CONSTANT((gint) GDK_MEMORY_X6G10_X6B10_X6R10_420); + PRINT_CONSTANT((gint) GDK_MEMORY_X6G10_X6B10_X6R10_422); + PRINT_CONSTANT((gint) GDK_MEMORY_X6G10_X6B10_X6R10_444); PRINT_CONSTANT((gint) GDK_MEMORY_X8B8G8R8); PRINT_CONSTANT((gint) GDK_MEMORY_X8R8G8B8); PRINT_CONSTANT((guint) GDK_META_MASK); @@ -2684,6 +2694,9 @@ int main() { PRINT_CONSTANT((gint) GDK_SCROLL); PRINT_CONSTANT((gint) GDK_SCROLL_DOWN); PRINT_CONSTANT((gint) GDK_SCROLL_LEFT); + PRINT_CONSTANT((gint) GDK_SCROLL_RELATIVE_DIRECTION_IDENTICAL); + PRINT_CONSTANT((gint) GDK_SCROLL_RELATIVE_DIRECTION_INVERTED); + PRINT_CONSTANT((gint) GDK_SCROLL_RELATIVE_DIRECTION_UNKNOWN); PRINT_CONSTANT((gint) GDK_SCROLL_RIGHT); PRINT_CONSTANT((gint) GDK_SCROLL_SMOOTH); PRINT_CONSTANT((gint) GDK_SCROLL_UNIT_SURFACE); diff --git a/gdk4/sys/tests/layout.c b/gdk4/sys/tests/layout.c index f37f2bd73c51..c662b99405d5 100644 --- a/gdk4/sys/tests/layout.c +++ b/gdk4/sys/tests/layout.c @@ -36,6 +36,7 @@ int main() { printf("%s;%zu;%zu\n", "GdkRGBA", sizeof(GdkRGBA), alignof(GdkRGBA)); printf("%s;%zu;%zu\n", "GdkRectangle", sizeof(GdkRectangle), alignof(GdkRectangle)); printf("%s;%zu;%zu\n", "GdkScrollDirection", sizeof(GdkScrollDirection), alignof(GdkScrollDirection)); + printf("%s;%zu;%zu\n", "GdkScrollRelativeDirection", sizeof(GdkScrollRelativeDirection), alignof(GdkScrollRelativeDirection)); printf("%s;%zu;%zu\n", "GdkScrollUnit", sizeof(GdkScrollUnit), alignof(GdkScrollUnit)); printf("%s;%zu;%zu\n", "GdkSeat", sizeof(GdkSeat), alignof(GdkSeat)); printf("%s;%zu;%zu\n", "GdkSeatCapabilities", sizeof(GdkSeatCapabilities), alignof(GdkSeatCapabilities)); diff --git a/gdk4/sys/versions.txt b/gdk4/sys/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gdk4/sys/versions.txt +++ b/gdk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gir b/gir index 19ccbbc9a3d1..566d8ff6a9ab 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit 19ccbbc9a3d1cc9271b7a5fa5d84b5652ee99492 +Subproject commit 566d8ff6a9ab94abecb89b003043b5a003b0e65d diff --git a/gir-files b/gir-files index 5c1e490fe50a..1490bcc19dc8 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit 5c1e490fe50a56dae5ee72e39c410aa9d9a0a1ae +Subproject commit 1490bcc19dc80accb62a7ebc5d75c2dd49c386d0 diff --git a/gsk4/Gir.toml b/gsk4/Gir.toml index e362deedad54..49210a2bb7cc 100644 --- a/gsk4/Gir.toml +++ b/gsk4/Gir.toml @@ -20,6 +20,7 @@ generate = [ "Gsk.ClipNode", "Gsk.ColorMatrixNode", "Gsk.ColorNode", + "Gsk.ComponentTransfer", "Gsk.ConicGradientNode", "Gsk.Corner", "Gsk.CrossFadeNode", @@ -117,6 +118,12 @@ name = "Gsk.ColorStop" status = "manual" boxed_inline = true +[[object]] +name = "Gsk.ComponentTransferNode" +status = "generate" +# See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8880 +version = "4.20" + [[object]] name = "Gsk.ContainerNode" status = "generate" @@ -278,7 +285,7 @@ status = "generate" name = "second" nullable = false [[object.function]] - pattern = "(translate_3d|translate|transform|skew|scale_3d|scale|rotate_3d|rotate|invert)" + pattern = "(translate_3d|translate|transform|skew|scale_3d|scale|rotate_3d|rotate|invert|matrix_2d)" manual = true # those functions return NULL in C which represents an identity transform [[object.function]] name = "print" diff --git a/gsk4/src/auto/broadway_renderer.rs b/gsk4/src/auto/broadway_renderer.rs index cfbe41525229..cd4b10f637fa 100644 --- a/gsk4/src/auto/broadway_renderer.rs +++ b/gsk4/src/auto/broadway_renderer.rs @@ -1,6 +1,7 @@ // 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, Renderer}; use glib::{prelude::*, translate::*}; @@ -15,6 +16,8 @@ glib::wrapper! { } impl BroadwayRenderer { + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] + #[allow(deprecated)] #[doc(alias = "gsk_broadway_renderer_new")] pub fn new() -> BroadwayRenderer { assert_initialized_main_thread!(); diff --git a/gsk4/src/auto/component_transfer.rs b/gsk4/src/auto/component_transfer.rs new file mode 100644 index 000000000000..f5b3c4be3ded --- /dev/null +++ b/gsk4/src/auto/component_transfer.rs @@ -0,0 +1,89 @@ +// 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! { + #[derive(Debug, PartialOrd, Ord, Hash)] + pub struct ComponentTransfer(Boxed); + + match fn { + copy => |ptr| ffi::gsk_component_transfer_copy(ptr), + free => |ptr| ffi::gsk_component_transfer_free(ptr), + type_ => || ffi::gsk_component_transfer_get_type(), + } +} + +impl ComponentTransfer { + #[doc(alias = "gsk_component_transfer_new_discrete")] + pub fn new_discrete(values: &[f32]) -> ComponentTransfer { + assert_initialized_main_thread!(); + let n = values.len() as _; + unsafe { + from_glib_full(ffi::gsk_component_transfer_new_discrete( + n, + values.to_glib_none().0, + )) + } + } + + #[doc(alias = "gsk_component_transfer_new_gamma")] + pub fn new_gamma(amp: f32, exp: f32, ofs: f32) -> ComponentTransfer { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gsk_component_transfer_new_gamma(amp, exp, ofs)) } + } + + #[doc(alias = "gsk_component_transfer_new_identity")] + pub fn new_identity() -> ComponentTransfer { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gsk_component_transfer_new_identity()) } + } + + #[doc(alias = "gsk_component_transfer_new_levels")] + pub fn new_levels(n: f32) -> ComponentTransfer { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gsk_component_transfer_new_levels(n)) } + } + + #[doc(alias = "gsk_component_transfer_new_linear")] + pub fn new_linear(m: f32, b: f32) -> ComponentTransfer { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gsk_component_transfer_new_linear(m, b)) } + } + + #[doc(alias = "gsk_component_transfer_new_table")] + pub fn new_table(values: &[f32]) -> ComponentTransfer { + assert_initialized_main_thread!(); + let n = values.len() as _; + unsafe { + from_glib_full(ffi::gsk_component_transfer_new_table( + n, + values.to_glib_none().0, + )) + } + } + + #[doc(alias = "gsk_component_transfer_equal")] + fn equal(&self, other: &ComponentTransfer) -> bool { + assert_initialized_main_thread!(); + unsafe { + from_glib(ffi::gsk_component_transfer_equal( + ToGlibPtr::<*const ffi::GskComponentTransfer>::to_glib_none(self).0 + as glib::ffi::gconstpointer, + ToGlibPtr::<*const ffi::GskComponentTransfer>::to_glib_none(other).0 + as glib::ffi::gconstpointer, + )) + } + } +} + +impl PartialEq for ComponentTransfer { + #[inline] + fn eq(&self, other: &Self) -> bool { + self.equal(other) + } +} + +impl Eq for ComponentTransfer {} diff --git a/gsk4/src/auto/component_transfer_node.rs b/gsk4/src/auto/component_transfer_node.rs new file mode 100644 index 000000000000..6e34bb0576ec --- /dev/null +++ b/gsk4/src/auto/component_transfer_node.rs @@ -0,0 +1,65 @@ +// 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, ComponentTransfer, RenderNode}; +use glib::{prelude::*, translate::*}; + +glib::wrapper! { + #[doc(alias = "GskComponentTransferNode")] + pub struct ComponentTransferNode(Shared); + + match fn { + ref => |ptr| ffi::gsk_render_node_ref(ptr as *mut ffi::GskRenderNode), + unref => |ptr| ffi::gsk_render_node_unref(ptr as *mut ffi::GskRenderNode), + } +} + +impl StaticType for ComponentTransferNode { + fn static_type() -> glib::Type { + unsafe { from_glib(ffi::gsk_component_transfer_node_get_type()) } + } +} + +impl ComponentTransferNode { + #[doc(alias = "gsk_component_transfer_node_new")] + pub fn new( + child: impl AsRef, + r: &ComponentTransfer, + g: &ComponentTransfer, + b: &ComponentTransfer, + a: &ComponentTransfer, + ) -> ComponentTransferNode { + skip_assert_initialized!(); + unsafe { + from_glib_full(ffi::gsk_component_transfer_node_new( + child.as_ref().to_glib_none().0, + r.to_glib_none().0, + g.to_glib_none().0, + b.to_glib_none().0, + a.to_glib_none().0, + )) + } + } + + #[doc(alias = "gsk_component_transfer_node_get_child")] + #[doc(alias = "get_child")] + pub fn child(&self) -> RenderNode { + unsafe { + from_glib_none(ffi::gsk_component_transfer_node_get_child( + self.to_glib_none().0, + )) + } + } + + #[doc(alias = "gsk_component_transfer_node_get_transfer")] + #[doc(alias = "get_transfer")] + pub fn transfer(&self, component: u32) -> ComponentTransfer { + unsafe { + from_glib_none(ffi::gsk_component_transfer_node_get_transfer( + self.to_glib_none().0, + component, + )) + } + } +} diff --git a/gsk4/src/auto/enums.rs b/gsk4/src/auto/enums.rs index ecb1bd50b0c9..ffb21556d5e1 100644 --- a/gsk4/src/auto/enums.rs +++ b/gsk4/src/auto/enums.rs @@ -1310,6 +1310,10 @@ pub enum RenderNodeType { #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] #[doc(alias = "GSK_SUBSURFACE_NODE")] SubsurfaceNode, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GSK_COMPONENT_TRANSFER_NODE")] + ComponentTransferNode, #[doc(hidden)] __Unknown(i32), } @@ -1356,6 +1360,8 @@ impl IntoGlib for RenderNodeType { Self::StrokeNode => ffi::GSK_STROKE_NODE, #[cfg(feature = "v4_14")] Self::SubsurfaceNode => ffi::GSK_SUBSURFACE_NODE, + #[cfg(feature = "v4_20")] + Self::ComponentTransferNode => ffi::GSK_COMPONENT_TRANSFER_NODE, Self::__Unknown(value) => value, } } @@ -1403,6 +1409,8 @@ impl FromGlib for RenderNodeType { ffi::GSK_STROKE_NODE => Self::StrokeNode, #[cfg(feature = "v4_14")] ffi::GSK_SUBSURFACE_NODE => Self::SubsurfaceNode, + #[cfg(feature = "v4_20")] + ffi::GSK_COMPONENT_TRANSFER_NODE => Self::ComponentTransferNode, value => Self::__Unknown(value), } } diff --git a/gsk4/src/auto/mod.rs b/gsk4/src/auto/mod.rs index b288da02812d..8a550386b7f2 100644 --- a/gsk4/src/auto/mod.rs +++ b/gsk4/src/auto/mod.rs @@ -33,6 +33,13 @@ pub use self::color_matrix_node::ColorMatrixNode; mod color_node; pub use self::color_node::ColorNode; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +mod component_transfer_node; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub use self::component_transfer_node::ComponentTransferNode; + mod conic_gradient_node; pub use self::conic_gradient_node::ConicGradientNode; @@ -140,6 +147,13 @@ mod vulkan_renderer; #[cfg_attr(docsrs, doc(cfg(feature = "vulkan")))] pub use self::vulkan_renderer::VulkanRenderer; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +mod component_transfer; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub use self::component_transfer::ComponentTransfer; + #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] mod path; diff --git a/gsk4/src/auto/versions.txt b/gsk4/src/auto/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gsk4/src/auto/versions.txt +++ b/gsk4/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gsk4/src/transform.rs b/gsk4/src/transform.rs index 29a1d2e69aa1..23ad17a4654b 100644 --- a/gsk4/src/transform.rs +++ b/gsk4/src/transform.rs @@ -137,6 +137,25 @@ impl Transform { res.unwrap_or_default() } } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gsk_transform_matrix_2d")] + #[must_use] + pub fn matrix_2d(self, xx: f32, yx: f32, xy: f32, yy: f32, dx: f32, dy: f32) -> Transform { + unsafe { + let res: Option = from_glib_full(ffi::gsk_transform_matrix_2d( + self.into_glib_ptr(), + xx, + yx, + xy, + yy, + dx, + dy, + )); + res.unwrap_or_default() + } + } } impl std::str::FromStr for Transform { diff --git a/gsk4/sys/Gir.toml b/gsk4/sys/Gir.toml index 67ee90d5cb98..073742eaa3ff 100644 --- a/gsk4/sys/Gir.toml +++ b/gsk4/sys/Gir.toml @@ -31,6 +31,12 @@ name = "Gsk.BroadwayRendererClass" status = "generate" cfg_condition = "feature = \"broadway\"" +[[object]] +name = "Gsk.ComponentTransferNode" +status = "generate" +# See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8880 +version = "4.20" + [[object]] name = "Gsk.VulkanRenderer" status = "generate" diff --git a/gsk4/sys/src/lib.rs b/gsk4/sys/src/lib.rs index 7120561667c3..0fa2d78b7076 100644 --- a/gsk4/sys/src/lib.rs +++ b/gsk4/sys/src/lib.rs @@ -148,6 +148,9 @@ pub const GSK_STROKE_NODE: GskRenderNodeType = 29; #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub const GSK_SUBSURFACE_NODE: GskRenderNodeType = 30; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GSK_COMPONENT_TRANSFER_NODE: GskRenderNodeType = 31; pub type GskScalingFilter = c_int; pub const GSK_SCALING_FILTER_LINEAR: GskScalingFilter = 0; @@ -262,6 +265,20 @@ impl ::std::fmt::Debug for GskColorStop { } } +#[repr(C)] +#[allow(dead_code)] +pub struct GskComponentTransfer { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GskComponentTransfer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GskComponentTransfer @ {self:p}")) + .finish() + } +} + #[repr(C)] #[allow(dead_code)] pub struct _GskGLRendererClass { @@ -604,6 +621,20 @@ impl ::std::fmt::Debug for GskColorNode { } } +#[repr(C)] +#[allow(dead_code)] +pub struct GskComponentTransferNode { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GskComponentTransferNode { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GskComponentTransferNode @ {self:p}")) + .finish() + } +} + #[repr(C)] #[allow(dead_code)] pub struct GskConicGradientNode { @@ -1102,6 +1133,52 @@ extern "C" { #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_foreach_flags_get_type() -> GType; + //========================================================================= + // GskComponentTransfer + //========================================================================= + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_get_type() -> GType; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_discrete( + n: c_uint, + values: *mut c_float, + ) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_gamma( + amp: c_float, + exp: c_float, + ofs: c_float, + ) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_identity() -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_levels(n: c_float) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_linear(m: c_float, b: c_float) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_table( + n: c_uint, + values: *mut c_float, + ) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_copy( + other: *const GskComponentTransfer, + ) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_free(self_: *mut GskComponentTransfer); + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_equal(self_: gconstpointer, other: gconstpointer) -> gboolean; + //========================================================================= // GskPath //========================================================================= @@ -1659,6 +1736,17 @@ extern "C" { next: *mut GskTransform, matrix: *const graphene::graphene_matrix_t, ) -> *mut GskTransform; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_transform_matrix_2d( + next: *mut GskTransform, + xx: c_float, + yx: c_float, + xy: c_float, + yy: c_float, + dx: c_float, + dy: c_float, + ) -> *mut GskTransform; pub fn gsk_transform_perspective(next: *mut GskTransform, depth: c_float) -> *mut GskTransform; pub fn gsk_transform_print(self_: *mut GskTransform, string: *mut glib::GString); pub fn gsk_transform_ref(self_: *mut GskTransform) -> *mut GskTransform; @@ -1848,6 +1936,33 @@ extern "C" { ) -> *mut GskColorNode; pub fn gsk_color_node_get_color(node: *const GskColorNode) -> *const gdk::GdkRGBA; + //========================================================================= + // GskComponentTransferNode + //========================================================================= + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_node_get_type() -> GType; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_node_new( + child: *mut GskRenderNode, + r: *const GskComponentTransfer, + g: *const GskComponentTransfer, + b: *const GskComponentTransfer, + a: *const GskComponentTransfer, + ) -> *mut GskComponentTransferNode; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_node_get_child( + node: *const GskComponentTransferNode, + ) -> *mut GskRenderNode; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_node_get_transfer( + node: *const GskComponentTransferNode, + component: c_uint, + ) -> *const GskComponentTransfer; + //========================================================================= // GskConicGradientNode //========================================================================= diff --git a/gsk4/sys/tests/abi.rs b/gsk4/sys/tests/abi.rs index 1f3b7f12e526..bc7350dfb488 100644 --- a/gsk4/sys/tests/abi.rs +++ b/gsk4/sys/tests/abi.rs @@ -374,6 +374,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GSK_CLIP_NODE", "17"), ("(gint) GSK_COLOR_MATRIX_NODE", "15"), ("(gint) GSK_COLOR_NODE", "3"), + ("(gint) GSK_COMPONENT_TRANSFER_NODE", "31"), ("(gint) GSK_CONIC_GRADIENT_NODE", "8"), ("(gint) GSK_CONTAINER_NODE", "1"), ("(gint) GSK_CORNER_BOTTOM_LEFT", "3"), diff --git a/gsk4/sys/tests/constant.c b/gsk4/sys/tests/constant.c index c0520332e1a2..71e6e4cb707e 100644 --- a/gsk4/sys/tests/constant.c +++ b/gsk4/sys/tests/constant.c @@ -51,6 +51,7 @@ int main() { PRINT_CONSTANT((gint) GSK_CLIP_NODE); PRINT_CONSTANT((gint) GSK_COLOR_MATRIX_NODE); PRINT_CONSTANT((gint) GSK_COLOR_NODE); + PRINT_CONSTANT((gint) GSK_COMPONENT_TRANSFER_NODE); PRINT_CONSTANT((gint) GSK_CONIC_GRADIENT_NODE); PRINT_CONSTANT((gint) GSK_CONTAINER_NODE); PRINT_CONSTANT((gint) GSK_CORNER_BOTTOM_LEFT); diff --git a/gsk4/sys/versions.txt b/gsk4/sys/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gsk4/sys/versions.txt +++ b/gsk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gtk4-macros/src/lib.rs b/gtk4-macros/src/lib.rs index 458de2e657ef..552451bcc38b 100644 --- a/gtk4-macros/src/lib.rs +++ b/gtk4-macros/src/lib.rs @@ -144,7 +144,7 @@ pub fn include_blueprint(input: TokenStream) -> TokenStream { /// } /// ``` /// -/// The [`CompositeTemplate`] macro can also be used with [Blueprint](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/) +/// The [`CompositeTemplate`] macro can also be used with [Blueprint](https://gnome.pages.gitlab.gnome.org/blueprint-compiler/) /// if the feature `blueprint` is enabled. /// you can use `string` or `file` relative to the project directory but not /// `resource` diff --git a/gtk4/Cargo.toml b/gtk4/Cargo.toml index e019020dfba3..4276936fd6a0 100644 --- a/gtk4/Cargo.toml +++ b/gtk4/Cargo.toml @@ -26,7 +26,7 @@ v4_12 = ["gtk4-sys/v4_12", "v4_10", "gdk/v4_12"] v4_14 = ["gtk4-sys/v4_14", "v4_12", "gdk/v4_14", "gsk/v4_14"] v4_16 = ["gtk4-sys/v4_16", "v4_14", "gdk/v4_16", "gsk/v4_16"] v4_18 = ["gtk4-sys/v4_18", "gdk/v4_18", "v4_16"] -v4_20 = ["gtk4-sys/v4_20", "gdk/v4_20", "v4_18"] +v4_20 = ["gtk4-sys/v4_20", "gdk/v4_20", "gsk/v4_20", "v4_18"] gio_v2_80 = ["gio/v2_80"] xml_validation = ["gtk4-macros/xml_validation"] blueprint = ["gtk4-macros/blueprint"] diff --git a/gtk4/Gir.toml b/gtk4/Gir.toml index 829f8a3dd828..d7f2f50074db 100644 --- a/gtk4/Gir.toml +++ b/gtk4/Gir.toml @@ -148,6 +148,8 @@ generate = [ "Gtk.InputPurpose", "Gtk.Inscription", "Gtk.InscriptionOverflow", + "Gtk.InterfaceColorScheme", + "Gtk.InterfaceContrast", "Gtk.Justification", "Gtk.LayoutChild", "Gtk.LayoutManager", @@ -362,6 +364,7 @@ manual = [ "Gsk.BlendMode", "Gsk.CairoNode", # docs only "Gsk.ColorStop", + "Gsk.ComponentTransfer", "Gsk.FillRule", "Gsk.GLShaderNode", # docs only "Gsk.MaskMode", diff --git a/gtk4/src/auto/application.rs b/gtk4/src/auto/application.rs index 555ac6a811ea..77adc40089f6 100644 --- a/gtk4/src/auto/application.rs +++ b/gtk4/src/auto/application.rs @@ -54,6 +54,7 @@ impl ApplicationBuilder { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] pub fn register_session(self, register_session: bool) -> Self { Self { builder: self.builder.property("register-session", register_session), @@ -261,11 +262,13 @@ pub trait GtkApplicationExt: IsA + 'static { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "register-session")] fn is_register_session(&self) -> bool { ObjectExt::property(self.as_ref(), "register-session") } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "register-session")] fn set_register_session(&self, register_session: bool) { ObjectExt::set_property(self.as_ref(), "register-session", register_session) @@ -405,6 +408,7 @@ pub trait GtkApplicationExt: IsA + 'static { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "register-session")] fn connect_register_session_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_register_session_trampoline< diff --git a/gtk4/src/auto/css_provider.rs b/gtk4/src/auto/css_provider.rs index 76b257ba2b91..1ff338079850 100644 --- a/gtk4/src/auto/css_provider.rs +++ b/gtk4/src/auto/css_provider.rs @@ -4,6 +4,9 @@ #![allow(deprecated)] use crate::{ffi, CssSection, StyleProvider}; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +use crate::{InterfaceColorScheme, InterfaceContrast}; use glib::{ object::ObjectType as _, prelude::*, @@ -28,6 +31,14 @@ impl CssProvider { unsafe { from_glib_full(ffi::gtk_css_provider_new()) } } + // rustdoc-stripper-ignore-next + /// Creates a new builder-pattern struct instance to construct [`CssProvider`] objects. + /// + /// This method returns an instance of [`CssProviderBuilder`](crate::builders::CssProviderBuilder) which can be used to create [`CssProvider`] objects. + pub fn builder() -> CssProviderBuilder { + CssProviderBuilder::new() + } + #[cfg(feature = "v4_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] #[doc(alias = "gtk_css_provider_load_from_bytes")] @@ -90,6 +101,8 @@ impl CssProvider { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] + #[allow(deprecated)] #[doc(alias = "gtk_css_provider_load_named")] pub fn load_named(&self, name: &str, variant: Option<&str>) { unsafe { @@ -107,6 +120,34 @@ impl CssProvider { unsafe { from_glib_full(ffi::gtk_css_provider_to_string(self.to_glib_none().0)) } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "prefers-color-scheme")] + pub fn prefers_color_scheme(&self) -> InterfaceColorScheme { + ObjectExt::property(self, "prefers-color-scheme") + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "prefers-color-scheme")] + pub fn set_prefers_color_scheme(&self, prefers_color_scheme: InterfaceColorScheme) { + ObjectExt::set_property(self, "prefers-color-scheme", prefers_color_scheme) + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "prefers-contrast")] + pub fn prefers_contrast(&self) -> InterfaceContrast { + ObjectExt::property(self, "prefers-contrast") + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "prefers-contrast")] + pub fn set_prefers_contrast(&self, prefers_contrast: InterfaceContrast) { + ObjectExt::set_property(self, "prefers-contrast", prefers_contrast) + } + #[doc(alias = "parsing-error")] pub fn connect_parsing_error( &self, @@ -139,6 +180,61 @@ impl CssProvider { ) } } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "prefers-color-scheme")] + pub fn connect_prefers_color_scheme_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_prefers_color_scheme_trampoline< + F: Fn(&CssProvider) + 'static, + >( + this: *mut ffi::GtkCssProvider, + _param_spec: glib::ffi::gpointer, + 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"notify::prefers-color-scheme".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_prefers_color_scheme_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "prefers-contrast")] + pub fn connect_prefers_contrast_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_prefers_contrast_trampoline( + this: *mut ffi::GtkCssProvider, + _param_spec: glib::ffi::gpointer, + 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"notify::prefers-contrast".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_prefers_contrast_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } impl Default for CssProvider { @@ -153,3 +249,46 @@ impl std::fmt::Display for CssProvider { f.write_str(&self.to_str()) } } + +// rustdoc-stripper-ignore-next +/// A [builder-pattern] type to construct [`CssProvider`] 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 CssProviderBuilder { + builder: glib::object::ObjectBuilder<'static, CssProvider>, +} + +impl CssProviderBuilder { + fn new() -> Self { + Self { + builder: glib::object::Object::builder(), + } + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn prefers_color_scheme(self, prefers_color_scheme: InterfaceColorScheme) -> Self { + Self { + builder: self + .builder + .property("prefers-color-scheme", prefers_color_scheme), + } + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn prefers_contrast(self, prefers_contrast: InterfaceContrast) -> Self { + Self { + builder: self.builder.property("prefers-contrast", prefers_contrast), + } + } + + // rustdoc-stripper-ignore-next + /// Build the [`CssProvider`]. + #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"] + pub fn build(self) -> CssProvider { + assert_initialized_main_thread!(); + self.builder.build() + } +} diff --git a/gtk4/src/auto/entry.rs b/gtk4/src/auto/entry.rs index 69adf9ad6150..124c980f4b71 100644 --- a/gtk4/src/auto/entry.rs +++ b/gtk4/src/auto/entry.rs @@ -164,6 +164,34 @@ impl EntryBuilder { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn menu_entry_icon_primary_text( + self, + menu_entry_icon_primary_text: impl Into, + ) -> Self { + Self { + builder: self.builder.property( + "menu-entry-icon-primary-text", + menu_entry_icon_primary_text.into(), + ), + } + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn menu_entry_icon_secondary_text( + self, + menu_entry_icon_secondary_text: impl Into, + ) -> Self { + Self { + builder: self.builder.property( + "menu-entry-icon-secondary-text", + menu_entry_icon_secondary_text.into(), + ), + } + } + pub fn overwrite_mode(self, overwrite_mode: bool) -> Self { Self { builder: self.builder.property("overwrite-mode", overwrite_mode), @@ -804,6 +832,19 @@ pub trait EntryExt: IsA + 'static { unsafe { ffi::gtk_entry_get_max_length(self.as_ref().to_glib_none().0) } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk_entry_get_menu_entry_icon_text")] + #[doc(alias = "get_menu_entry_icon_text")] + fn menu_entry_icon_text(&self, icon_pos: EntryIconPosition) -> Option { + unsafe { + from_glib_none(ffi::gtk_entry_get_menu_entry_icon_text( + self.as_ref().to_glib_none().0, + icon_pos.into_glib(), + )) + } + } + #[doc(alias = "gtk_entry_get_overwrite_mode")] #[doc(alias = "get_overwrite_mode")] #[doc(alias = "overwrite-mode")] @@ -1086,6 +1127,19 @@ pub trait EntryExt: IsA + 'static { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk_entry_set_menu_entry_icon_text")] + fn set_menu_entry_icon_text(&self, icon_pos: EntryIconPosition, text: &str) { + unsafe { + ffi::gtk_entry_set_menu_entry_icon_text( + self.as_ref().to_glib_none().0, + icon_pos.into_glib(), + text.to_glib_none().0, + ); + } + } + #[doc(alias = "gtk_entry_set_overwrite_mode")] #[doc(alias = "overwrite-mode")] fn set_overwrite_mode(&self, overwrite: bool) { @@ -1179,6 +1233,42 @@ pub trait EntryExt: IsA + 'static { ObjectExt::property(self.as_ref(), "invisible-char-set") } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-primary-text")] + fn menu_entry_icon_primary_text(&self) -> Option { + ObjectExt::property(self.as_ref(), "menu-entry-icon-primary-text") + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-primary-text")] + fn set_menu_entry_icon_primary_text(&self, menu_entry_icon_primary_text: Option<&str>) { + ObjectExt::set_property( + self.as_ref(), + "menu-entry-icon-primary-text", + menu_entry_icon_primary_text, + ) + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-secondary-text")] + fn menu_entry_icon_secondary_text(&self) -> Option { + ObjectExt::property(self.as_ref(), "menu-entry-icon-secondary-text") + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-secondary-text")] + fn set_menu_entry_icon_secondary_text(&self, menu_entry_icon_secondary_text: Option<&str>) { + ObjectExt::set_property( + self.as_ref(), + "menu-entry-icon-secondary-text", + menu_entry_icon_secondary_text, + ) + } + #[doc(alias = "primary-icon-activatable")] fn is_primary_icon_activatable(&self) -> bool { ObjectExt::property(self.as_ref(), "primary-icon-activatable") @@ -1805,6 +1895,68 @@ pub trait EntryExt: IsA + 'static { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-primary-text")] + fn connect_menu_entry_icon_primary_text_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_menu_entry_icon_primary_text_trampoline< + P: IsA, + F: Fn(&P) + 'static, + >( + this: *mut ffi::GtkEntry, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, + ) { + let f: &F = &*(f as *const F); + f(Entry::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + c"notify::menu-entry-icon-primary-text".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_menu_entry_icon_primary_text_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-secondary-text")] + fn connect_menu_entry_icon_secondary_text_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_menu_entry_icon_secondary_text_trampoline< + P: IsA, + F: Fn(&P) + 'static, + >( + this: *mut ffi::GtkEntry, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, + ) { + let f: &F = &*(f as *const F); + f(Entry::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + c"notify::menu-entry-icon-secondary-text".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_menu_entry_icon_secondary_text_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + #[doc(alias = "overwrite-mode")] fn connect_overwrite_mode_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_overwrite_mode_trampoline< diff --git a/gtk4/src/auto/enums.rs b/gtk4/src/auto/enums.rs index d8e44c1b3460..66e1769147ec 100644 --- a/gtk4/src/auto/enums.rs +++ b/gtk4/src/auto/enums.rs @@ -4715,6 +4715,18 @@ pub enum FilterChange { LessStrict, #[doc(alias = "GTK_FILTER_CHANGE_MORE_STRICT")] MoreStrict, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GTK_FILTER_CHANGE_DIFFERENT_REWATCH")] + DifferentRewatch, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GTK_FILTER_CHANGE_LESS_STRICT_REWATCH")] + LessStrictRewatch, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GTK_FILTER_CHANGE_MORE_STRICT_REWATCH")] + MoreStrictRewatch, #[doc(hidden)] __Unknown(i32), } @@ -4729,6 +4741,12 @@ impl IntoGlib for FilterChange { Self::Different => ffi::GTK_FILTER_CHANGE_DIFFERENT, Self::LessStrict => ffi::GTK_FILTER_CHANGE_LESS_STRICT, Self::MoreStrict => ffi::GTK_FILTER_CHANGE_MORE_STRICT, + #[cfg(feature = "v4_20")] + Self::DifferentRewatch => ffi::GTK_FILTER_CHANGE_DIFFERENT_REWATCH, + #[cfg(feature = "v4_20")] + Self::LessStrictRewatch => ffi::GTK_FILTER_CHANGE_LESS_STRICT_REWATCH, + #[cfg(feature = "v4_20")] + Self::MoreStrictRewatch => ffi::GTK_FILTER_CHANGE_MORE_STRICT_REWATCH, Self::__Unknown(value) => value, } } @@ -4744,6 +4762,12 @@ impl FromGlib for FilterChange { ffi::GTK_FILTER_CHANGE_DIFFERENT => Self::Different, ffi::GTK_FILTER_CHANGE_LESS_STRICT => Self::LessStrict, ffi::GTK_FILTER_CHANGE_MORE_STRICT => Self::MoreStrict, + #[cfg(feature = "v4_20")] + ffi::GTK_FILTER_CHANGE_DIFFERENT_REWATCH => Self::DifferentRewatch, + #[cfg(feature = "v4_20")] + ffi::GTK_FILTER_CHANGE_LESS_STRICT_REWATCH => Self::LessStrictRewatch, + #[cfg(feature = "v4_20")] + ffi::GTK_FILTER_CHANGE_MORE_STRICT_REWATCH => Self::MoreStrictRewatch, value => Self::__Unknown(value), } } @@ -5954,6 +5978,250 @@ impl From for glib::Value { } } +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] +#[non_exhaustive] +#[doc(alias = "GtkInterfaceColorScheme")] +pub enum InterfaceColorScheme { + #[doc(alias = "GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED")] + Unsupported, + #[doc(alias = "GTK_INTERFACE_COLOR_SCHEME_DEFAULT")] + Default, + #[doc(alias = "GTK_INTERFACE_COLOR_SCHEME_DARK")] + Dark, + #[doc(alias = "GTK_INTERFACE_COLOR_SCHEME_LIGHT")] + Light, + #[doc(hidden)] + __Unknown(i32), +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +#[doc(hidden)] +impl IntoGlib for InterfaceColorScheme { + type GlibType = ffi::GtkInterfaceColorScheme; + + #[inline] + fn into_glib(self) -> ffi::GtkInterfaceColorScheme { + match self { + Self::Unsupported => ffi::GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED, + Self::Default => ffi::GTK_INTERFACE_COLOR_SCHEME_DEFAULT, + Self::Dark => ffi::GTK_INTERFACE_COLOR_SCHEME_DARK, + Self::Light => ffi::GTK_INTERFACE_COLOR_SCHEME_LIGHT, + Self::__Unknown(value) => value, + } + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +#[doc(hidden)] +impl FromGlib for InterfaceColorScheme { + #[inline] + unsafe fn from_glib(value: ffi::GtkInterfaceColorScheme) -> Self { + skip_assert_initialized!(); + + match value { + ffi::GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED => Self::Unsupported, + ffi::GTK_INTERFACE_COLOR_SCHEME_DEFAULT => Self::Default, + ffi::GTK_INTERFACE_COLOR_SCHEME_DARK => Self::Dark, + ffi::GTK_INTERFACE_COLOR_SCHEME_LIGHT => Self::Light, + value => Self::__Unknown(value), + } + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl StaticType for InterfaceColorScheme { + #[inline] + #[doc(alias = "gtk_interface_color_scheme_get_type")] + fn static_type() -> glib::Type { + unsafe { from_glib(ffi::gtk_interface_color_scheme_get_type()) } + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl glib::HasParamSpec for InterfaceColorScheme { + type ParamSpec = glib::ParamSpecEnum; + type SetValue = Self; + type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; + + fn param_spec_builder() -> Self::BuilderFn { + Self::ParamSpec::builder_with_default + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl glib::value::ValueType for InterfaceColorScheme { + type Type = Self; +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +unsafe impl<'a> glib::value::FromValue<'a> for InterfaceColorScheme { + type Checker = glib::value::GenericValueTypeChecker; + + #[inline] + unsafe fn from_value(value: &'a glib::Value) -> Self { + skip_assert_initialized!(); + from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl ToValue for InterfaceColorScheme { + #[inline] + fn to_value(&self) -> glib::Value { + let mut value = glib::Value::for_value_type::(); + unsafe { + glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); + } + value + } + + #[inline] + fn value_type(&self) -> glib::Type { + Self::static_type() + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl From for glib::Value { + #[inline] + fn from(v: InterfaceColorScheme) -> Self { + skip_assert_initialized!(); + ToValue::to_value(&v) + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] +#[non_exhaustive] +#[doc(alias = "GtkInterfaceContrast")] +pub enum InterfaceContrast { + #[doc(alias = "GTK_INTERFACE_CONTRAST_UNSUPPORTED")] + Unsupported, + #[doc(alias = "GTK_INTERFACE_CONTRAST_NO_PREFERENCE")] + NoPreference, + #[doc(alias = "GTK_INTERFACE_CONTRAST_MORE")] + More, + #[doc(alias = "GTK_INTERFACE_CONTRAST_LESS")] + Less, + #[doc(hidden)] + __Unknown(i32), +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +#[doc(hidden)] +impl IntoGlib for InterfaceContrast { + type GlibType = ffi::GtkInterfaceContrast; + + #[inline] + fn into_glib(self) -> ffi::GtkInterfaceContrast { + match self { + Self::Unsupported => ffi::GTK_INTERFACE_CONTRAST_UNSUPPORTED, + Self::NoPreference => ffi::GTK_INTERFACE_CONTRAST_NO_PREFERENCE, + Self::More => ffi::GTK_INTERFACE_CONTRAST_MORE, + Self::Less => ffi::GTK_INTERFACE_CONTRAST_LESS, + Self::__Unknown(value) => value, + } + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +#[doc(hidden)] +impl FromGlib for InterfaceContrast { + #[inline] + unsafe fn from_glib(value: ffi::GtkInterfaceContrast) -> Self { + skip_assert_initialized!(); + + match value { + ffi::GTK_INTERFACE_CONTRAST_UNSUPPORTED => Self::Unsupported, + ffi::GTK_INTERFACE_CONTRAST_NO_PREFERENCE => Self::NoPreference, + ffi::GTK_INTERFACE_CONTRAST_MORE => Self::More, + ffi::GTK_INTERFACE_CONTRAST_LESS => Self::Less, + value => Self::__Unknown(value), + } + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl StaticType for InterfaceContrast { + #[inline] + #[doc(alias = "gtk_interface_contrast_get_type")] + fn static_type() -> glib::Type { + unsafe { from_glib(ffi::gtk_interface_contrast_get_type()) } + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl glib::HasParamSpec for InterfaceContrast { + type ParamSpec = glib::ParamSpecEnum; + type SetValue = Self; + type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; + + fn param_spec_builder() -> Self::BuilderFn { + Self::ParamSpec::builder_with_default + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl glib::value::ValueType for InterfaceContrast { + type Type = Self; +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +unsafe impl<'a> glib::value::FromValue<'a> for InterfaceContrast { + type Checker = glib::value::GenericValueTypeChecker; + + #[inline] + unsafe fn from_value(value: &'a glib::Value) -> Self { + skip_assert_initialized!(); + from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl ToValue for InterfaceContrast { + #[inline] + fn to_value(&self) -> glib::Value { + let mut value = glib::Value::for_value_type::(); + unsafe { + glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); + } + value + } + + #[inline] + fn value_type(&self) -> glib::Type { + Self::static_type() + } +} + +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +impl From for glib::Value { + #[inline] + fn from(v: InterfaceContrast) -> Self { + skip_assert_initialized!(); + ToValue::to_value(&v) + } +} + #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GtkJustification")] diff --git a/gtk4/src/auto/file_dialog.rs b/gtk4/src/auto/file_dialog.rs index 88692eaff504..a8f78e7024d9 100644 --- a/gtk4/src/auto/file_dialog.rs +++ b/gtk4/src/auto/file_dialog.rs @@ -237,7 +237,7 @@ impl FileDialog { #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] #[doc(alias = "gtk_file_dialog_open_multiple_text_files")] pub fn open_multiple_text_files< - P: FnOnce(Result<(Option, glib::GString), glib::Error>) + 'static, + P: FnOnce(Result<(gio::ListModel, glib::GString), glib::Error>) + 'static, >( &self, parent: Option<&impl IsA>, @@ -257,7 +257,7 @@ impl FileDialog { let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn open_multiple_text_files_trampoline< - P: FnOnce(Result<(Option, glib::GString), glib::Error>) + 'static, + P: FnOnce(Result<(gio::ListModel, glib::GString), glib::Error>) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, @@ -300,9 +300,8 @@ impl FileDialog { parent: Option<&(impl IsA + Clone + 'static)>, ) -> Pin< Box_< - dyn std::future::Future< - Output = Result<(Option, glib::GString), glib::Error>, - > + 'static, + dyn std::future::Future> + + 'static, >, > { let parent = parent.map(ToOwned::to_owned); @@ -320,9 +319,7 @@ impl FileDialog { #[cfg(feature = "v4_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] #[doc(alias = "gtk_file_dialog_open_text_file")] - pub fn open_text_file< - P: FnOnce(Result<(Option, glib::GString), glib::Error>) + 'static, - >( + pub fn open_text_file) + 'static>( &self, parent: Option<&impl IsA>, cancellable: Option<&impl IsA>, @@ -341,7 +338,7 @@ impl FileDialog { let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn open_text_file_trampoline< - P: FnOnce(Result<(Option, glib::GString), glib::Error>) + 'static, + P: FnOnce(Result<(gio::File, glib::GString), glib::Error>) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, @@ -384,9 +381,8 @@ impl FileDialog { parent: Option<&(impl IsA + Clone + 'static)>, ) -> Pin< Box_< - dyn std::future::Future< - Output = Result<(Option, glib::GString), glib::Error>, - > + 'static, + dyn std::future::Future> + + 'static, >, > { let parent = parent.map(ToOwned::to_owned); @@ -471,7 +467,7 @@ impl FileDialog { #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] #[doc(alias = "gtk_file_dialog_save_text_file")] pub fn save_text_file< - P: FnOnce(Result<(Option, glib::GString, glib::GString), glib::Error>) + 'static, + P: FnOnce(Result<(gio::File, glib::GString, glib::GString), glib::Error>) + 'static, >( &self, parent: Option<&impl IsA>, @@ -491,8 +487,7 @@ impl FileDialog { let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn save_text_file_trampoline< - P: FnOnce(Result<(Option, glib::GString, glib::GString), glib::Error>) - + 'static, + P: FnOnce(Result<(gio::File, glib::GString, glib::GString), glib::Error>) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, @@ -542,7 +537,7 @@ impl FileDialog { ) -> Pin< Box_< dyn std::future::Future< - Output = Result<(Option, glib::GString, glib::GString), glib::Error>, + Output = Result<(gio::File, glib::GString, glib::GString), glib::Error>, > + 'static, >, > { diff --git a/gtk4/src/auto/filter_list_model.rs b/gtk4/src/auto/filter_list_model.rs index 21c7d7257dde..f1c3c3918d51 100644 --- a/gtk4/src/auto/filter_list_model.rs +++ b/gtk4/src/auto/filter_list_model.rs @@ -86,6 +86,19 @@ impl FilterListModel { unsafe { ffi::gtk_filter_list_model_get_pending(self.to_glib_none().0) } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk_filter_list_model_get_watch_items")] + #[doc(alias = "get_watch_items")] + #[doc(alias = "watch-items")] + pub fn is_watch_items(&self) -> bool { + unsafe { + from_glib(ffi::gtk_filter_list_model_get_watch_items( + self.to_glib_none().0, + )) + } + } + #[doc(alias = "gtk_filter_list_model_set_filter")] #[doc(alias = "filter")] pub fn set_filter(&self, filter: Option<&impl IsA>) { @@ -119,6 +132,19 @@ impl FilterListModel { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk_filter_list_model_set_watch_items")] + #[doc(alias = "watch-items")] + pub fn set_watch_items(&self, watch_items: bool) { + unsafe { + ffi::gtk_filter_list_model_set_watch_items( + self.to_glib_none().0, + watch_items.into_glib(), + ); + } + } + #[doc(alias = "filter")] pub fn connect_filter_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_filter_trampoline( @@ -210,6 +236,31 @@ impl FilterListModel { ) } } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "watch-items")] + pub fn connect_watch_items_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_watch_items_trampoline( + this: *mut ffi::GtkFilterListModel, + _param_spec: glib::ffi::gpointer, + 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"notify::watch-items".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_watch_items_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } impl Default for FilterListModel { @@ -252,6 +303,14 @@ impl FilterListModelBuilder { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn watch_items(self, watch_items: bool) -> Self { + Self { + builder: self.builder.property("watch-items", watch_items), + } + } + // rustdoc-stripper-ignore-next /// Build the [`FilterListModel`]. #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"] diff --git a/gtk4/src/auto/flags.rs b/gtk4/src/auto/flags.rs index b1a0e46f1aca..da42afdfc86d 100644 --- a/gtk4/src/auto/flags.rs +++ b/gtk4/src/auto/flags.rs @@ -531,6 +531,10 @@ bitflags! { const DISCRETE = ffi::GTK_EVENT_CONTROLLER_SCROLL_DISCRETE as _; #[doc(alias = "GTK_EVENT_CONTROLLER_SCROLL_KINETIC")] const KINETIC = ffi::GTK_EVENT_CONTROLLER_SCROLL_KINETIC as _; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GTK_EVENT_CONTROLLER_SCROLL_PHYSICAL_DIRECTION")] + const PHYSICAL_DIRECTION = ffi::GTK_EVENT_CONTROLLER_SCROLL_PHYSICAL_DIRECTION as _; #[doc(alias = "GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES")] const BOTH_AXES = ffi::GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES as _; } diff --git a/gtk4/src/auto/mod.rs b/gtk4/src/auto/mod.rs index 6eab0f8ee095..e3f0038965aa 100644 --- a/gtk4/src/auto/mod.rs +++ b/gtk4/src/auto/mod.rs @@ -1206,6 +1206,12 @@ pub use self::enums::InputPurpose; #[cfg(feature = "v4_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] pub use self::enums::InscriptionOverflow; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub use self::enums::InterfaceColorScheme; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub use self::enums::InterfaceContrast; pub use self::enums::Justification; pub use self::enums::LevelBarMode; pub use self::enums::License; @@ -1650,6 +1656,7 @@ pub(crate) mod builders { pub use super::combo_box_text::ComboBoxTextBuilder; pub use super::constraint::ConstraintBuilder; pub use super::constraint_guide::ConstraintGuideBuilder; + pub use super::css_provider::CssProviderBuilder; #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")] pub use super::dialog::DialogBuilder; pub use super::drag_source::DragSourceBuilder; diff --git a/gtk4/src/auto/settings.rs b/gtk4/src/auto/settings.rs index 55efaa8b81f4..d293b540a96f 100644 --- a/gtk4/src/auto/settings.rs +++ b/gtk4/src/auto/settings.rs @@ -6,6 +6,9 @@ #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] use crate::FontRendering; use crate::{ffi, StyleProvider}; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +use crate::{InterfaceColorScheme, InterfaceContrast}; use glib::{ prelude::*, signal::{connect_raw, SignalHandlerId}, @@ -66,11 +69,13 @@ impl Settings { ) } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-application-prefer-dark-theme")] pub fn is_gtk_application_prefer_dark_theme(&self) -> bool { ObjectExt::property(self, "gtk-application-prefer-dark-theme") } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-application-prefer-dark-theme")] pub fn set_gtk_application_prefer_dark_theme(&self, gtk_application_prefer_dark_theme: bool) { ObjectExt::set_property( @@ -346,6 +351,38 @@ impl Settings { ObjectExt::set_property(self, "gtk-im-module", gtk_im_module) } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk-interface-color-scheme")] + pub fn gtk_interface_color_scheme(&self) -> InterfaceColorScheme { + ObjectExt::property(self, "gtk-interface-color-scheme") + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk-interface-color-scheme")] + pub fn set_gtk_interface_color_scheme(&self, gtk_interface_color_scheme: InterfaceColorScheme) { + ObjectExt::set_property( + self, + "gtk-interface-color-scheme", + gtk_interface_color_scheme, + ) + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk-interface-contrast")] + pub fn gtk_interface_contrast(&self) -> InterfaceContrast { + ObjectExt::property(self, "gtk-interface-contrast") + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk-interface-contrast")] + pub fn set_gtk_interface_contrast(&self, gtk_interface_contrast: InterfaceContrast) { + ObjectExt::set_property(self, "gtk-interface-contrast", gtk_interface_contrast) + } + #[doc(alias = "gtk-keynav-use-caret")] pub fn is_gtk_keynav_use_caret(&self) -> bool { ObjectExt::property(self, "gtk-keynav-use-caret") @@ -440,31 +477,37 @@ impl Settings { ObjectExt::set_property(self, "gtk-recent-files-max-age", gtk_recent_files_max_age) } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-app-menu")] pub fn is_gtk_shell_shows_app_menu(&self) -> bool { ObjectExt::property(self, "gtk-shell-shows-app-menu") } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-app-menu")] pub fn set_gtk_shell_shows_app_menu(&self, gtk_shell_shows_app_menu: bool) { ObjectExt::set_property(self, "gtk-shell-shows-app-menu", gtk_shell_shows_app_menu) } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-desktop")] pub fn is_gtk_shell_shows_desktop(&self) -> bool { ObjectExt::property(self, "gtk-shell-shows-desktop") } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-desktop")] pub fn set_gtk_shell_shows_desktop(&self, gtk_shell_shows_desktop: bool) { ObjectExt::set_property(self, "gtk-shell-shows-desktop", gtk_shell_shows_desktop) } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-menubar")] pub fn is_gtk_shell_shows_menubar(&self) -> bool { ObjectExt::property(self, "gtk-shell-shows-menubar") } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-menubar")] pub fn set_gtk_shell_shows_menubar(&self, gtk_shell_shows_menubar: bool) { ObjectExt::set_property(self, "gtk-shell-shows-menubar", gtk_shell_shows_menubar) @@ -669,6 +712,7 @@ impl Settings { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-application-prefer-dark-theme")] pub fn connect_gtk_application_prefer_dark_theme_notify( &self, @@ -1361,6 +1405,66 @@ impl Settings { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk-interface-color-scheme")] + pub fn connect_gtk_interface_color_scheme_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_gtk_interface_color_scheme_trampoline< + F: Fn(&Settings) + 'static, + >( + this: *mut ffi::GtkSettings, + _param_spec: glib::ffi::gpointer, + 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"notify::gtk-interface-color-scheme".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_gtk_interface_color_scheme_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk-interface-contrast")] + pub fn connect_gtk_interface_contrast_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_gtk_interface_contrast_trampoline< + F: Fn(&Settings) + 'static, + >( + this: *mut ffi::GtkSettings, + _param_spec: glib::ffi::gpointer, + 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"notify::gtk-interface-contrast".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_gtk_interface_contrast_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + #[doc(alias = "gtk-keynav-use-caret")] pub fn connect_gtk_keynav_use_caret_notify( &self, @@ -1605,6 +1709,7 @@ impl Settings { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-app-menu")] pub fn connect_gtk_shell_shows_app_menu_notify( &self, @@ -1633,6 +1738,7 @@ impl Settings { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-desktop")] pub fn connect_gtk_shell_shows_desktop_notify( &self, @@ -1661,6 +1767,7 @@ impl Settings { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-menubar")] pub fn connect_gtk_shell_shows_menubar_notify( &self, @@ -2029,6 +2136,7 @@ impl SettingsBuilder { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] pub fn gtk_application_prefer_dark_theme( self, gtk_application_prefer_dark_theme: bool, @@ -2239,6 +2347,29 @@ impl SettingsBuilder { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_interface_color_scheme( + self, + gtk_interface_color_scheme: InterfaceColorScheme, + ) -> Self { + Self { + builder: self + .builder + .property("gtk-interface-color-scheme", gtk_interface_color_scheme), + } + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_interface_contrast(self, gtk_interface_contrast: InterfaceContrast) -> Self { + Self { + builder: self + .builder + .property("gtk-interface-contrast", gtk_interface_contrast), + } + } + pub fn gtk_keynav_use_caret(self, gtk_keynav_use_caret: bool) -> Self { Self { builder: self @@ -2316,6 +2447,7 @@ impl SettingsBuilder { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] pub fn gtk_shell_shows_app_menu(self, gtk_shell_shows_app_menu: bool) -> Self { Self { builder: self @@ -2324,6 +2456,7 @@ impl SettingsBuilder { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] pub fn gtk_shell_shows_desktop(self, gtk_shell_shows_desktop: bool) -> Self { Self { builder: self @@ -2332,6 +2465,7 @@ impl SettingsBuilder { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] pub fn gtk_shell_shows_menubar(self, gtk_shell_shows_menubar: bool) -> Self { Self { builder: self diff --git a/gtk4/src/auto/snapshot.rs b/gtk4/src/auto/snapshot.rs index 83b8acdceb92..480742a3b11d 100644 --- a/gtk4/src/auto/snapshot.rs +++ b/gtk4/src/auto/snapshot.rs @@ -371,6 +371,27 @@ pub trait SnapshotExt: IsA + 'static { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk_snapshot_push_component_transfer")] + fn push_component_transfer( + &self, + red: &gsk::ComponentTransfer, + green: &gsk::ComponentTransfer, + blue: &gsk::ComponentTransfer, + alpha: &gsk::ComponentTransfer, + ) { + unsafe { + ffi::gtk_snapshot_push_component_transfer( + self.as_ref().to_glib_none().0, + red.to_glib_none().0, + green.to_glib_none().0, + blue.to_glib_none().0, + alpha.to_glib_none().0, + ); + } + } + #[doc(alias = "gtk_snapshot_push_cross_fade")] fn push_cross_fade(&self, progress: f64) { unsafe { diff --git a/gtk4/src/auto/versions.txt b/gtk4/src/auto/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gtk4/src/auto/versions.txt +++ b/gtk4/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gtk4/src/constraint_layout.rs b/gtk4/src/constraint_layout.rs index 59332bc58410..0fa70418285d 100644 --- a/gtk4/src/constraint_layout.rs +++ b/gtk4/src/constraint_layout.rs @@ -21,7 +21,7 @@ impl ConstraintLayout { Some(glib::ffi::g_str_hash), Some(glib::ffi::g_str_equal), Some(glib::ffi::g_free), - Some(glib::ffi::g_free), + None, ); for (key, widget) in views { @@ -29,7 +29,7 @@ impl ConstraintLayout { glib::ffi::g_hash_table_insert( hash_table, key_ptr as *mut _, - widget.to_glib_full() as *mut _, + widget.as_ptr() as *mut _, ); } @@ -43,6 +43,9 @@ impl ConstraintLayout { hash_table, &mut err, ); + + glib::ffi::g_hash_table_unref(hash_table); + if !err.is_null() { Err(from_glib_full(err)) } else { diff --git a/gtk4/src/param_spec_expression.rs b/gtk4/src/param_spec_expression.rs index 64e6a1fa2457..1c5e6b78737f 100644 --- a/gtk4/src/param_spec_expression.rs +++ b/gtk4/src/param_spec_expression.rs @@ -127,7 +127,7 @@ impl ParamSpecExpression { /// This method returns an instance of /// [`ParamSpecExpressionBuilder`](crate::builders::ParamSpecExpressionBuilder) /// which can be used to create [`ParamSpecExpression`] objects. - pub fn builder(name: &str) -> ParamSpecExpressionBuilder { + pub fn builder(name: &str) -> ParamSpecExpressionBuilder<'_> { assert_initialized_main_thread!(); ParamSpecExpressionBuilder::new(name) } diff --git a/gtk4/sys/src/lib.rs b/gtk4/sys/src/lib.rs index 827784ad80f1..c416e1af562e 100644 --- a/gtk4/sys/src/lib.rs +++ b/gtk4/sys/src/lib.rs @@ -459,6 +459,15 @@ pub type GtkFilterChange = c_int; pub const GTK_FILTER_CHANGE_DIFFERENT: GtkFilterChange = 0; pub const GTK_FILTER_CHANGE_LESS_STRICT: GtkFilterChange = 1; pub const GTK_FILTER_CHANGE_MORE_STRICT: GtkFilterChange = 2; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GTK_FILTER_CHANGE_DIFFERENT_REWATCH: GtkFilterChange = 3; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GTK_FILTER_CHANGE_LESS_STRICT_REWATCH: GtkFilterChange = 4; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GTK_FILTER_CHANGE_MORE_STRICT_REWATCH: GtkFilterChange = 5; pub type GtkFilterMatch = c_int; pub const GTK_FILTER_MATCH_SOME: GtkFilterMatch = 0; @@ -521,6 +530,18 @@ pub const GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START: GtkInscriptionOverflow = 1; pub const GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE: GtkInscriptionOverflow = 2; pub const GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END: GtkInscriptionOverflow = 3; +pub type GtkInterfaceColorScheme = c_int; +pub const GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED: GtkInterfaceColorScheme = 0; +pub const GTK_INTERFACE_COLOR_SCHEME_DEFAULT: GtkInterfaceColorScheme = 1; +pub const GTK_INTERFACE_COLOR_SCHEME_DARK: GtkInterfaceColorScheme = 2; +pub const GTK_INTERFACE_COLOR_SCHEME_LIGHT: GtkInterfaceColorScheme = 3; + +pub type GtkInterfaceContrast = c_int; +pub const GTK_INTERFACE_CONTRAST_UNSUPPORTED: GtkInterfaceContrast = 0; +pub const GTK_INTERFACE_CONTRAST_NO_PREFERENCE: GtkInterfaceContrast = 1; +pub const GTK_INTERFACE_CONTRAST_MORE: GtkInterfaceContrast = 2; +pub const GTK_INTERFACE_CONTRAST_LESS: GtkInterfaceContrast = 3; + pub type GtkJustification = c_int; pub const GTK_JUSTIFY_LEFT: GtkJustification = 0; pub const GTK_JUSTIFY_RIGHT: GtkJustification = 1; @@ -1102,6 +1123,9 @@ pub const GTK_EVENT_CONTROLLER_SCROLL_VERTICAL: GtkEventControllerScrollFlags = pub const GTK_EVENT_CONTROLLER_SCROLL_HORIZONTAL: GtkEventControllerScrollFlags = 2; pub const GTK_EVENT_CONTROLLER_SCROLL_DISCRETE: GtkEventControllerScrollFlags = 4; pub const GTK_EVENT_CONTROLLER_SCROLL_KINETIC: GtkEventControllerScrollFlags = 8; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GTK_EVENT_CONTROLLER_SCROLL_PHYSICAL_DIRECTION: GtkEventControllerScrollFlags = 16; pub const GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES: GtkEventControllerScrollFlags = 3; pub type GtkFontChooserLevel = c_uint; @@ -10163,6 +10187,20 @@ extern "C" { #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] pub fn gtk_inscription_overflow_get_type() -> GType; + //========================================================================= + // GtkInterfaceColorScheme + //========================================================================= + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_interface_color_scheme_get_type() -> GType; + + //========================================================================= + // GtkInterfaceContrast + //========================================================================= + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_interface_contrast_get_type() -> GType; + //========================================================================= // GtkJustification //========================================================================= @@ -13610,6 +13648,12 @@ extern "C" { pub fn gtk_entry_get_input_purpose(entry: *mut GtkEntry) -> GtkInputPurpose; pub fn gtk_entry_get_invisible_char(entry: *mut GtkEntry) -> u32; pub fn gtk_entry_get_max_length(entry: *mut GtkEntry) -> c_int; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_entry_get_menu_entry_icon_text( + entry: *mut GtkEntry, + icon_pos: GtkEntryIconPosition, + ) -> *const c_char; pub fn gtk_entry_get_overwrite_mode(entry: *mut GtkEntry) -> gboolean; pub fn gtk_entry_get_placeholder_text(entry: *mut GtkEntry) -> *const c_char; pub fn gtk_entry_get_progress_fraction(entry: *mut GtkEntry) -> c_double; @@ -13672,6 +13716,13 @@ extern "C" { pub fn gtk_entry_set_input_purpose(entry: *mut GtkEntry, purpose: GtkInputPurpose); pub fn gtk_entry_set_invisible_char(entry: *mut GtkEntry, ch: u32); pub fn gtk_entry_set_max_length(entry: *mut GtkEntry, max: c_int); + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_entry_set_menu_entry_icon_text( + entry: *mut GtkEntry, + icon_pos: GtkEntryIconPosition, + text: *const c_char, + ); pub fn gtk_entry_set_overwrite_mode(entry: *mut GtkEntry, overwrite: gboolean); pub fn gtk_entry_set_placeholder_text(entry: *mut GtkEntry, text: *const c_char); pub fn gtk_entry_set_progress_fraction(entry: *mut GtkEntry, fraction: c_double); @@ -14286,6 +14337,9 @@ extern "C" { pub fn gtk_filter_list_model_get_incremental(self_: *mut GtkFilterListModel) -> gboolean; pub fn gtk_filter_list_model_get_model(self_: *mut GtkFilterListModel) -> *mut gio::GListModel; pub fn gtk_filter_list_model_get_pending(self_: *mut GtkFilterListModel) -> c_uint; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_filter_list_model_get_watch_items(self_: *mut GtkFilterListModel) -> gboolean; pub fn gtk_filter_list_model_set_filter(self_: *mut GtkFilterListModel, filter: *mut GtkFilter); pub fn gtk_filter_list_model_set_incremental( self_: *mut GtkFilterListModel, @@ -14295,6 +14349,12 @@ extern "C" { self_: *mut GtkFilterListModel, model: *mut gio::GListModel, ); + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_filter_list_model_set_watch_items( + self_: *mut GtkFilterListModel, + watch_items: gboolean, + ); //========================================================================= // GtkFixed @@ -18170,6 +18230,15 @@ extern "C" { color_matrix: *const graphene::graphene_matrix_t, color_offset: *const graphene::graphene_vec4_t, ); + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_snapshot_push_component_transfer( + snapshot: *mut GtkSnapshot, + red: *const gsk::GskComponentTransfer, + green: *const gsk::GskComponentTransfer, + blue: *const gsk::GskComponentTransfer, + alpha: *const gsk::GskComponentTransfer, + ); pub fn gtk_snapshot_push_cross_fade(snapshot: *mut GtkSnapshot, progress: c_double); pub fn gtk_snapshot_push_debug(snapshot: *mut GtkSnapshot, message: *const c_char, ...); #[cfg(feature = "v4_14")] diff --git a/gtk4/sys/tests/abi.rs b/gtk4/sys/tests/abi.rs index 879ff9048d9c..2bd619418c8d 100644 --- a/gtk4/sys/tests/abi.rs +++ b/gtk4/sys/tests/abi.rs @@ -1321,6 +1321,20 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ alignment: align_of::(), }, ), + ( + "GtkInterfaceColorScheme", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GtkInterfaceContrast", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ( "GtkJustification", Layout { @@ -2986,6 +3000,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) GTK_EVENT_CONTROLLER_SCROLL_HORIZONTAL", "2"), ("(guint) GTK_EVENT_CONTROLLER_SCROLL_KINETIC", "8"), ("(guint) GTK_EVENT_CONTROLLER_SCROLL_NONE", "0"), + ( + "(guint) GTK_EVENT_CONTROLLER_SCROLL_PHYSICAL_DIRECTION", + "16", + ), ("(guint) GTK_EVENT_CONTROLLER_SCROLL_VERTICAL", "1"), ("(gint) GTK_EVENT_SEQUENCE_CLAIMED", "1"), ("(gint) GTK_EVENT_SEQUENCE_DENIED", "2"), @@ -2998,8 +3016,11 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME", "3"), ("(gint) GTK_FILE_CHOOSER_ERROR_NONEXISTENT", "0"), ("(gint) GTK_FILTER_CHANGE_DIFFERENT", "0"), + ("(gint) GTK_FILTER_CHANGE_DIFFERENT_REWATCH", "3"), ("(gint) GTK_FILTER_CHANGE_LESS_STRICT", "1"), + ("(gint) GTK_FILTER_CHANGE_LESS_STRICT_REWATCH", "4"), ("(gint) GTK_FILTER_CHANGE_MORE_STRICT", "2"), + ("(gint) GTK_FILTER_CHANGE_MORE_STRICT_REWATCH", "5"), ("(gint) GTK_FILTER_MATCH_ALL", "2"), ("(gint) GTK_FILTER_MATCH_NONE", "1"), ("(gint) GTK_FILTER_MATCH_SOME", "0"), @@ -3065,6 +3086,14 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END", "3"), ("(gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE", "2"), ("(gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START", "1"), + ("(gint) GTK_INTERFACE_COLOR_SCHEME_DARK", "2"), + ("(gint) GTK_INTERFACE_COLOR_SCHEME_DEFAULT", "1"), + ("(gint) GTK_INTERFACE_COLOR_SCHEME_LIGHT", "3"), + ("(gint) GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED", "0"), + ("(gint) GTK_INTERFACE_CONTRAST_LESS", "3"), + ("(gint) GTK_INTERFACE_CONTRAST_MORE", "2"), + ("(gint) GTK_INTERFACE_CONTRAST_NO_PREFERENCE", "1"), + ("(gint) GTK_INTERFACE_CONTRAST_UNSUPPORTED", "0"), ("GTK_INVALID_LIST_POSITION", "4294967295"), ("(gint) GTK_JUSTIFY_CENTER", "2"), ("(gint) GTK_JUSTIFY_FILL", "3"), diff --git a/gtk4/sys/tests/constant.c b/gtk4/sys/tests/constant.c index e71f5a63e74c..e74d45146f29 100644 --- a/gtk4/sys/tests/constant.c +++ b/gtk4/sys/tests/constant.c @@ -401,6 +401,7 @@ int main() { PRINT_CONSTANT((guint) GTK_EVENT_CONTROLLER_SCROLL_HORIZONTAL); PRINT_CONSTANT((guint) GTK_EVENT_CONTROLLER_SCROLL_KINETIC); PRINT_CONSTANT((guint) GTK_EVENT_CONTROLLER_SCROLL_NONE); + PRINT_CONSTANT((guint) GTK_EVENT_CONTROLLER_SCROLL_PHYSICAL_DIRECTION); PRINT_CONSTANT((guint) GTK_EVENT_CONTROLLER_SCROLL_VERTICAL); PRINT_CONSTANT((gint) GTK_EVENT_SEQUENCE_CLAIMED); PRINT_CONSTANT((gint) GTK_EVENT_SEQUENCE_DENIED); @@ -413,8 +414,11 @@ int main() { PRINT_CONSTANT((gint) GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME); PRINT_CONSTANT((gint) GTK_FILE_CHOOSER_ERROR_NONEXISTENT); PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_DIFFERENT); + PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_DIFFERENT_REWATCH); PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_LESS_STRICT); + PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_LESS_STRICT_REWATCH); PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_MORE_STRICT); + PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_MORE_STRICT_REWATCH); PRINT_CONSTANT((gint) GTK_FILTER_MATCH_ALL); PRINT_CONSTANT((gint) GTK_FILTER_MATCH_NONE); PRINT_CONSTANT((gint) GTK_FILTER_MATCH_SOME); @@ -480,6 +484,14 @@ int main() { PRINT_CONSTANT((gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END); PRINT_CONSTANT((gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE); PRINT_CONSTANT((gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START); + PRINT_CONSTANT((gint) GTK_INTERFACE_COLOR_SCHEME_DARK); + PRINT_CONSTANT((gint) GTK_INTERFACE_COLOR_SCHEME_DEFAULT); + PRINT_CONSTANT((gint) GTK_INTERFACE_COLOR_SCHEME_LIGHT); + PRINT_CONSTANT((gint) GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED); + PRINT_CONSTANT((gint) GTK_INTERFACE_CONTRAST_LESS); + PRINT_CONSTANT((gint) GTK_INTERFACE_CONTRAST_MORE); + PRINT_CONSTANT((gint) GTK_INTERFACE_CONTRAST_NO_PREFERENCE); + PRINT_CONSTANT((gint) GTK_INTERFACE_CONTRAST_UNSUPPORTED); PRINT_CONSTANT(GTK_INVALID_LIST_POSITION); PRINT_CONSTANT((gint) GTK_JUSTIFY_CENTER); PRINT_CONSTANT((gint) GTK_JUSTIFY_FILL); diff --git a/gtk4/sys/tests/layout.c b/gtk4/sys/tests/layout.c index 481e15202086..7d090a1a9eea 100644 --- a/gtk4/sys/tests/layout.c +++ b/gtk4/sys/tests/layout.c @@ -167,6 +167,8 @@ int main() { printf("%s;%zu;%zu\n", "GtkInputPurpose", sizeof(GtkInputPurpose), alignof(GtkInputPurpose)); printf("%s;%zu;%zu\n", "GtkInscriptionClass", sizeof(GtkInscriptionClass), alignof(GtkInscriptionClass)); printf("%s;%zu;%zu\n", "GtkInscriptionOverflow", sizeof(GtkInscriptionOverflow), alignof(GtkInscriptionOverflow)); + printf("%s;%zu;%zu\n", "GtkInterfaceColorScheme", sizeof(GtkInterfaceColorScheme), alignof(GtkInterfaceColorScheme)); + printf("%s;%zu;%zu\n", "GtkInterfaceContrast", sizeof(GtkInterfaceContrast), alignof(GtkInterfaceContrast)); printf("%s;%zu;%zu\n", "GtkJustification", sizeof(GtkJustification), alignof(GtkJustification)); printf("%s;%zu;%zu\n", "GtkLayoutChild", sizeof(GtkLayoutChild), alignof(GtkLayoutChild)); printf("%s;%zu;%zu\n", "GtkLayoutChildClass", sizeof(GtkLayoutChildClass), alignof(GtkLayoutChildClass)); diff --git a/gtk4/sys/versions.txt b/gtk4/sys/versions.txt index 67f2af610909..6960ba3cfc15 100644 --- a/gtk4/sys/versions.txt +++ b/gtk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 19ccbbc9a3d1) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)