diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b9bd2cbb24d8..b26aa053e09a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -25,7 +25,7 @@ jobs: - { name: "gio", features: "v2_84", nightly: "--all-features", test_sys: true } - { name: "glib", features: "v2_84,log", nightly: "--all-features", test_sys: true } - { name: "graphene", features: "v1_12", nightly: "", test_sys: true } - - { name: "pango", features: "v1_56", nightly: "--all-features", test_sys: true } + - { name: "pango", features: "v1_56", nightly: "", test_sys: true } - { name: "pangocairo", features: "", nightly: "--all-features", test_sys: true } steps: - uses: actions/checkout@v4 diff --git a/Cargo.lock b/Cargo.lock index 78b351d70cf0..7e0a607d5289 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,9 +71,9 @@ dependencies = [ [[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 = "bumpalo" @@ -101,7 +101,7 @@ dependencies = [ "glib-sys", "libc", "system-deps", - "windows-sys 0.52.0", + "windows-sys 0.61.0", "x11", ] @@ -113,10 +113,11 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.32" +version = "1.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" +checksum = "65193589c6404eb80b450d618eaf9a2cafaaafd57ecce47370519ef674a7bd44" dependencies = [ + "find-msvc-tools", "shlex", ] @@ -132,9 +133,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 = "ciborium" @@ -165,18 +166,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.43" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50fd97c9dc2399518aa331917ac6f274280ec5eb34e555dd291899745c48ec6f" +checksum = "7eac00902d9d136acd712710d71823fb8ac8004ca445a89e73a41d45aa712931" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.43" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35b5830294e1fa0462034af85cc95225a4cb07092c088c55bda3147cfcd8f65" +checksum = "2ad9bbf750e73b5884fb8a211a9424a1906c1e156724260fdae972f31d70e1d6" dependencies = [ "anstyle", "clap_lex", @@ -275,12 +276,12 @@ 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]] @@ -310,6 +311,12 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +[[package]] +name = "find-msvc-tools" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d" + [[package]] name = "float_eq" version = "1.0.1" @@ -471,7 +478,7 @@ dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasi 0.14.7+wasi-0.2.4", ] [[package]] @@ -503,7 +510,7 @@ dependencies = [ "shell-words", "system-deps", "tempfile", - "windows-sys 0.52.0", + "windows-sys 0.61.0", ] [[package]] @@ -568,9 +575,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 = "gobject-sys" @@ -642,9 +649,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[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", @@ -667,9 +674,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", @@ -677,9 +684,9 @@ dependencies = [ [[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 = "libz-sys" @@ -695,9 +702,9 @@ dependencies = [ [[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 = "lock_api" @@ -711,9 +718,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 = "memchr" @@ -816,7 +823,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -867,18 +874,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", ] @@ -900,9 +907,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rayon" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ "either", "rayon-core", @@ -910,9 +917,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -929,9 +936,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", @@ -941,9 +948,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", @@ -952,9 +959,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "ring" @@ -972,15 +979,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.8" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.60.2", + "windows-sys 0.61.0", ] [[package]] @@ -1037,9 +1044,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.3.4" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22b2d775fb28f245817589471dd49c5edf64237f4a19d10ce9a92ff4651a27f4" +checksum = "46e6f046b7fef48e2660c57ed794263155d713de679057f2d0c169bfc6e756cc" dependencies = [ "sdd", ] @@ -1068,18 +1075,28 @@ checksum = "490dcfcbfef26be6800d11870ff2df8774fa6e86d047e3e8c8a76b25655e41ca" [[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", @@ -1088,14 +1105,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.142" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] @@ -1158,9 +1176,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[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", @@ -1188,15 +1206,15 @@ checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" [[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", - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -1226,8 +1244,8 @@ checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", - "toml_datetime", - "toml_edit", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", ] [[package]] @@ -1239,6 +1257,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" @@ -1248,7 +1275,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", ] @@ -1269,9 +1317,9 @@ dependencies = [ [[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 = "untrusted" @@ -1309,30 +1357,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 = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" dependencies = [ - "wit-bindgen-rt", + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "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", @@ -1344,9 +1402,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", @@ -1354,9 +1412,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", @@ -1367,18 +1425,18 @@ 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 = "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", @@ -1405,18 +1463,18 @@ dependencies = [ [[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-link" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" [[package]] name = "windows-sys" @@ -1424,25 +1482,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] name = "windows-sys" -version = "0.59.0" +version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.3", + "windows-link", ] [[package]] @@ -1451,31 +1500,14 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] @@ -1484,113 +1516,62 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - [[package]] name = "winnow" -version = "0.7.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", -] +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "x11" diff --git a/cairo/src/image_surface.rs b/cairo/src/image_surface.rs index c6d3ddc7d097..3495b8b930d1 100644 --- a/cairo/src/image_surface.rs +++ b/cairo/src/image_surface.rs @@ -64,7 +64,12 @@ impl ImageSurface { (data.as_mut_ptr(), data.len()) }; - assert!(len >= (height * stride) as usize); + assert!(width >= 0, "width must be non-negative"); + assert!(height >= 0, "height must be non-negative"); + assert!(stride >= 0, "stride must be non-negative"); + + // check if there is integer overflow + assert!(len >= height.checked_mul(stride).unwrap() as usize); let result = unsafe { ImageSurface::from_raw_full(ffi::cairo_image_surface_create_for_data( ptr, diff --git a/cairo/src/region.rs b/cairo/src/region.rs index 930a5983dc9e..78e450ce2698 100644 --- a/cairo/src/region.rs +++ b/cairo/src/region.rs @@ -176,6 +176,8 @@ impl Region { #[doc(alias = "get_rectangle")] #[doc(alias = "cairo_region_get_rectangle")] pub fn rectangle(&self, nth: i32) -> RectangleInt { + let total_rectangles = self.num_rectangles(); + assert!(nth >= 0 && nth < total_rectangles, "nth is out of range"); unsafe { let rectangle: RectangleInt = ::std::mem::zeroed(); ffi::cairo_region_get_rectangle(self.0.as_ptr(), nth, rectangle.to_raw_none()); diff --git a/cairo/sys/Cargo.toml b/cairo/sys/Cargo.toml index e6eaf5e8f4d7..d14c70774973 100644 --- a/cairo/sys/Cargo.toml +++ b/cairo/sys/Cargo.toml @@ -64,7 +64,7 @@ version = "2.16" features = ["xlib"] [target.'cfg(windows)'.dependencies] -windows-sys = { version = ">=0.52, <=0.60", features = ["Win32_Graphics_Gdi"], optional = true } +windows-sys = { version = ">=0.52, <=0.61", features = ["Win32_Graphics_Gdi"], optional = true } [build-dependencies] system-deps = "7" diff --git a/deny.toml b/deny.toml index b9b13f8b9083..7a0d6a754786 100644 --- a/deny.toml +++ b/deny.toml @@ -24,6 +24,15 @@ multiple-versions = "deny" wildcards = "allow" highlight = "all" +# system-deps depends on an old version +[[bans.skip]] +name = "toml_edit" +version = "0.22" + +[[bans.skip]] +name = "toml_datetime" +version = "0.6" + [sources] unknown-registry = "deny" unknown-git = "deny" diff --git a/gdk-pixbuf/src/auto/versions.txt b/gdk-pixbuf/src/auto/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/gdk-pixbuf/src/auto/versions.txt +++ b/gdk-pixbuf/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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/gdk-pixbuf/sys/versions.txt +++ b/gdk-pixbuf/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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gio/src/auto/enums.rs b/gio/src/auto/enums.rs index 8b472daf0ffa..eb87b0b63a9c 100644 --- a/gio/src/auto/enums.rs +++ b/gio/src/auto/enums.rs @@ -471,12 +471,12 @@ impl DBusError { //} //#[doc(alias = "g_dbus_error_set_dbus_error")] - //pub fn set_dbus_error(error: &mut glib::Error, dbus_error_name: &str, dbus_error_message: &str, format: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { + //pub fn set_dbus_error(dbus_error_name: &str, dbus_error_message: &str, format: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> Option { // unsafe { TODO: call ffi:g_dbus_error_set_dbus_error() } //} //#[doc(alias = "g_dbus_error_set_dbus_error_valist")] - //pub fn set_dbus_error_valist(error: &mut glib::Error, dbus_error_name: &str, dbus_error_message: &str, format: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { + //pub fn set_dbus_error_valist(dbus_error_name: &str, dbus_error_message: &str, format: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option { // unsafe { TODO: call ffi:g_dbus_error_set_dbus_error_valist() } //} diff --git a/gio/src/auto/versions.txt b/gio/src/auto/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/gio/src/auto/versions.txt +++ b/gio/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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/gio/src/data_input_stream.rs b/gio/src/data_input_stream.rs index 07bfc1ca5822..c3dce736ef20 100644 --- a/gio/src/data_input_stream.rs +++ b/gio/src/data_input_stream.rs @@ -11,7 +11,7 @@ pub trait DataInputStreamExtManual: IsA + 'static { fn read_line>( &self, cancellable: Option<&P>, - ) -> Result, glib::Error> { + ) -> Result>, glib::Error> { unsafe { let mut length = mem::MaybeUninit::uninit(); let mut error = ptr::null_mut(); @@ -21,9 +21,13 @@ pub trait DataInputStreamExtManual: IsA + 'static { cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error, ); - let length = length.assume_init(); if error.is_null() { - Ok(FromGlibContainer::from_glib_full_num(ret, length)) + if ret.is_null() { + Ok(None) + } else { + let length = length.assume_init(); + Ok(Some(FromGlibContainer::from_glib_full_num(ret, length))) + } } else { Err(from_glib_full(error)) } @@ -33,7 +37,7 @@ pub trait DataInputStreamExtManual: IsA + 'static { #[doc(alias = "g_data_input_stream_read_line_async")] fn read_line_async< P: IsA, - Q: FnOnce(Result, glib::Error>) + 'static, + Q: FnOnce(Result>, glib::Error>) + 'static, >( &self, io_priority: glib::Priority, @@ -53,7 +57,7 @@ pub trait DataInputStreamExtManual: IsA + 'static { let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn read_line_async_trampoline< - Q: FnOnce(Result, glib::Error>) + 'static, + Q: FnOnce(Result>, glib::Error>) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut ffi::GAsyncResult, @@ -67,9 +71,13 @@ pub trait DataInputStreamExtManual: IsA + 'static { length.as_mut_ptr(), &mut error, ); - let length = length.assume_init(); let result = if error.is_null() { - Ok(FromGlibContainer::from_glib_full_num(ret, length)) + if ret.is_null() { + Ok(None) + } else { + let length = length.assume_init(); + Ok(Some(FromGlibContainer::from_glib_full_num(ret, length))) + } } else { Err(from_glib_full(error)) }; @@ -95,8 +103,9 @@ pub trait DataInputStreamExtManual: IsA + 'static { io_priority: glib::Priority, ) -> Pin< Box_< - dyn std::future::Future, glib::Error>> - + 'static, + dyn std::future::Future< + Output = Result>, glib::Error>, + > + 'static, >, > { Box_::pin(crate::GioFuture::new( @@ -159,7 +168,7 @@ pub trait DataInputStreamExtManual: IsA + 'static { user_data: glib::ffi::gpointer, ) { let mut error = ptr::null_mut(); - let ret = ffi::g_data_input_stream_read_line_finish( + let ret = ffi::g_data_input_stream_read_line_finish_utf8( _source_object as *mut _, res, ptr::null_mut(), diff --git a/gio/src/file.rs b/gio/src/file.rs index 52ab7b94bd42..36551614867d 100644 --- a/gio/src/file.rs +++ b/gio/src/file.rs @@ -169,7 +169,7 @@ pub trait FileExtManual: IsA + Sized { #[doc(alias = "g_file_replace_contents_async")] fn replace_contents_async< B: AsRef<[u8]> + Send + 'static, - R: FnOnce(Result<(B, glib::GString), (B, glib::Error)>) + 'static, + R: FnOnce(Result<(B, Option), (B, glib::Error)>) + 'static, C: IsA, >( &self, @@ -203,7 +203,7 @@ pub trait FileExtManual: IsA + Sized { }; unsafe extern "C" fn replace_contents_async_trampoline< B: AsRef<[u8]> + Send + 'static, - R: FnOnce(Result<(B, glib::GString), (B, glib::Error)>) + 'static, + R: FnOnce(Result<(B, Option), (B, glib::Error)>) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut ffi::GAsyncResult, @@ -253,7 +253,7 @@ pub trait FileExtManual: IsA + Sized { flags: FileCreateFlags, ) -> Pin< Box< - dyn std::future::Future> + dyn std::future::Future), (B, glib::Error)>> + 'static, >, > { diff --git a/gio/src/list_store.rs b/gio/src/list_store.rs index b388015153e7..d5e7c218d9da 100644 --- a/gio/src/list_store.rs +++ b/gio/src/list_store.rs @@ -25,8 +25,8 @@ impl ListStore { ) -> u32 { unsafe { let mut func = compare_func; - let func_obj: &mut (dyn FnMut(&Object, &Object) -> Ordering) = &mut func; - let func_ptr = &func_obj as *const &mut (dyn FnMut(&Object, &Object) -> Ordering) + let func_obj: &mut dyn FnMut(&Object, &Object) -> Ordering = &mut func; + let func_ptr = &func_obj as *const &mut dyn FnMut(&Object, &Object) -> Ordering as glib::ffi::gpointer; ffi::g_list_store_insert_sorted( @@ -42,8 +42,8 @@ impl ListStore { pub fn sort Ordering>(&self, compare_func: F) { unsafe { let mut func = compare_func; - let func_obj: &mut (dyn FnMut(&Object, &Object) -> Ordering) = &mut func; - let func_ptr = &func_obj as *const &mut (dyn FnMut(&Object, &Object) -> Ordering) + let func_obj: &mut dyn FnMut(&Object, &Object) -> Ordering = &mut func; + let func_ptr = &func_obj as *const &mut dyn FnMut(&Object, &Object) -> Ordering as glib::ffi::gpointer; ffi::g_list_store_sort( @@ -224,7 +224,7 @@ unsafe extern "C" fn compare_func_trampoline( b: glib::ffi::gconstpointer, func: glib::ffi::gpointer, ) -> i32 { - let func = func as *mut &mut (dyn FnMut(&Object, &Object) -> Ordering); + let func = func as *mut &mut dyn FnMut(&Object, &Object) -> Ordering; let a = from_glib_borrow(a as *mut glib::gobject_ffi::GObject); let b = from_glib_borrow(b as *mut glib::gobject_ffi::GObject); diff --git a/gio/sys/Cargo.toml b/gio/sys/Cargo.toml index b5a33a53694f..d2b9807d80d5 100644 --- a/gio/sys/Cargo.toml +++ b/gio/sys/Cargo.toml @@ -11,7 +11,7 @@ workspace = true workspace = true [target."cfg(windows)".dependencies.windows-sys] -version = ">=0.52, <=0.60" +version = ">=0.52, <=0.61" features = ["Win32_Networking_WinSock"] [dev-dependencies] diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/gio/sys/versions.txt +++ b/gio/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 @ a79d23cd6a42) +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 a79d23cd6a42..1490bcc19dc8 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit a79d23cd6a42a10ed7d2d817b59ab7ebf179f8c9 +Subproject commit 1490bcc19dc80accb62a7ebc5d75c2dd49c386d0 diff --git a/glib-macros/src/async_test.rs b/glib-macros/src/async_test.rs index b55e84f4048b..0dcdb588482f 100644 --- a/glib-macros/src/async_test.rs +++ b/glib-macros/src/async_test.rs @@ -34,7 +34,8 @@ pub(crate) fn async_test(_args: TokenStream, mut item: TokenStream) -> TokenStre item_fn.block = syn::parse2(quote::quote! { { let main_ctx = glib::MainContext::new(); - main_ctx.block_on(async #body) + main_ctx.with_thread_default(|| main_ctx.block_on(async #body)) + .expect("cannot set thread default main context for test") } }) .expect("Body parsing failure"); diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/glib/gobject-sys/versions.txt +++ b/glib/gobject-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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/glib/src/auto/main_context.rs b/glib/src/auto/main_context.rs index eaa868c9ca5a..621d6c893dc6 100644 --- a/glib/src/auto/main_context.rs +++ b/glib/src/auto/main_context.rs @@ -50,12 +50,12 @@ impl MainContext { } //#[doc(alias = "g_main_context_find_source_by_funcs_user_data")] - //pub fn find_source_by_funcs_user_data(&self, funcs: /*Ignored*/&mut SourceFuncs, user_data: /*Unimplemented*/Option) -> Source { + //pub fn find_source_by_funcs_user_data(&self, funcs: /*Ignored*/&mut SourceFuncs, user_data: /*Unimplemented*/Option) -> Option { // unsafe { TODO: call ffi:g_main_context_find_source_by_funcs_user_data() } //} //#[doc(alias = "g_main_context_find_source_by_user_data")] - //pub fn find_source_by_user_data(&self, user_data: /*Unimplemented*/Option) -> Source { + //pub fn find_source_by_user_data(&self, user_data: /*Unimplemented*/Option) -> Option { // unsafe { TODO: call ffi:g_main_context_find_source_by_user_data() } //} diff --git a/glib/src/auto/versions.txt b/glib/src/auto/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/glib/src/auto/versions.txt +++ b/glib/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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/glib/src/date.rs b/glib/src/date.rs index 39947b99cc1a..83e5cf1de198 100644 --- a/glib/src/date.rs +++ b/glib/src/date.rs @@ -274,7 +274,7 @@ impl Date { #[doc(alias = "g_date_subtract_days")] pub fn subtract_days(&mut self, n_days: u32) -> Result<(), BoolError> { let julian = self.julian(); - if julian > n_days { + if julian < n_days { Err(bool_error!("invalid number of days")) } else { unsafe { diff --git a/glib/src/functions.rs b/glib/src/functions.rs index 37e3dd660d2c..612951fc3d36 100644 --- a/glib/src/functions.rs +++ b/glib/src/functions.rs @@ -179,11 +179,11 @@ pub fn spawn_async_with_pipes< standard_error.as_mut_ptr(), &mut error, ); - let child_pid = from_glib(child_pid.assume_init()); - let standard_input = standard_input.assume_init(); - let standard_output = standard_output.assume_init(); - let standard_error = standard_error.assume_init(); if error.is_null() { + let child_pid = from_glib(child_pid.assume_init()); + let standard_input = standard_input.assume_init(); + let standard_output = standard_output.assume_init(); + let standard_error = standard_error.assume_init(); #[cfg(not(windows))] { Ok(( diff --git a/glib/src/gstring.rs b/glib/src/gstring.rs index e35ff864050f..b8bbe783dbea 100644 --- a/glib/src/gstring.rs +++ b/glib/src/gstring.rs @@ -151,7 +151,7 @@ impl GStr { if ffi::g_utf8_validate(ptr as *const _, -1, &mut end_ptr) != ffi::GFALSE { Some(Self::from_utf8_with_nul_unchecked(slice::from_raw_parts( ptr as *const u8, - end_ptr.offset_from(ptr) as usize + 1, + end_ptr.offset_from(ptr as *const u8) as usize + 1, ))) } else { None diff --git a/glib/sys/src/lib.rs b/glib/sys/src/lib.rs index 9d98c445df9b..bcd5b8e37781 100644 --- a/glib/sys/src/lib.rs +++ b/glib/sys/src/lib.rs @@ -7560,14 +7560,10 @@ extern "C" { #[cfg(feature = "v2_78")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_78")))] pub fn g_utf8_truncate_middle(string: *const c_char, truncate_length: size_t) -> *mut c_char; - pub fn g_utf8_validate(str: *const u8, max_len: ssize_t, end: *mut *const c_char) -> gboolean; + pub fn g_utf8_validate(str: *const u8, max_len: ssize_t, end: *mut *const u8) -> gboolean; #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - pub fn g_utf8_validate_len( - str: *const u8, - max_len: size_t, - end: *mut *const c_char, - ) -> gboolean; + pub fn g_utf8_validate_len(str: *const u8, max_len: size_t, end: *mut *const u8) -> gboolean; pub fn g_uuid_string_is_valid(str: *const c_char) -> gboolean; pub fn g_uuid_string_random() -> *mut c_char; pub fn g_variant_get_gtype() -> GType; diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/glib/sys/versions.txt +++ b/glib/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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/graphene/Gir.toml b/graphene/Gir.toml index 348249edf9f1..3d1903fd3d4c 100644 --- a/graphene/Gir.toml +++ b/graphene/Gir.toml @@ -375,6 +375,9 @@ boxed_inline = true name = "init_from_vec3" rename = "from_vec3" manual = true # manual proper constructor + [[object.function]] + pattern = "intersect_(box|sphere|triangle)" + manual = true # Handle no intersection cases [[object]] name = "Graphene.Rect" diff --git a/graphene/src/auto/ray.rs b/graphene/src/auto/ray.rs index 1fa2acafb62f..e01b286d8a2e 100644 --- a/graphene/src/auto/ray.rs +++ b/graphene/src/auto/ray.rs @@ -2,7 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use crate::{ffi, Box, Plane, Point3D, RayIntersectionKind, Sphere, Triangle, Vec3}; +use crate::{ffi, Box, Plane, Point3D, Sphere, Triangle, Vec3}; use glib::translate::*; glib::wrapper! { @@ -85,45 +85,6 @@ impl Ray { } } - #[doc(alias = "graphene_ray_intersect_box")] - pub fn intersect_box(&self, b: &Box) -> (RayIntersectionKind, f32) { - unsafe { - let mut t_out = std::mem::MaybeUninit::uninit(); - let ret = from_glib(ffi::graphene_ray_intersect_box( - self.to_glib_none().0, - b.to_glib_none().0, - t_out.as_mut_ptr(), - )); - (ret, t_out.assume_init()) - } - } - - #[doc(alias = "graphene_ray_intersect_sphere")] - pub fn intersect_sphere(&self, s: &Sphere) -> (RayIntersectionKind, f32) { - unsafe { - let mut t_out = std::mem::MaybeUninit::uninit(); - let ret = from_glib(ffi::graphene_ray_intersect_sphere( - self.to_glib_none().0, - s.to_glib_none().0, - t_out.as_mut_ptr(), - )); - (ret, t_out.assume_init()) - } - } - - #[doc(alias = "graphene_ray_intersect_triangle")] - pub fn intersect_triangle(&self, t: &Triangle) -> (RayIntersectionKind, f32) { - unsafe { - let mut t_out = std::mem::MaybeUninit::uninit(); - let ret = from_glib(ffi::graphene_ray_intersect_triangle( - self.to_glib_none().0, - t.to_glib_none().0, - t_out.as_mut_ptr(), - )); - (ret, t_out.assume_init()) - } - } - #[doc(alias = "graphene_ray_intersects_box")] pub fn intersects_box(&self, b: &Box) -> bool { unsafe { ffi::graphene_ray_intersects_box(self.to_glib_none().0, b.to_glib_none().0) } diff --git a/graphene/src/auto/versions.txt b/graphene/src/auto/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/graphene/src/auto/versions.txt +++ b/graphene/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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/graphene/src/ray.rs b/graphene/src/ray.rs index b13ed42024a3..5206dbd24c89 100644 --- a/graphene/src/ray.rs +++ b/graphene/src/ray.rs @@ -4,7 +4,7 @@ use std::fmt; use glib::translate::*; -use crate::{ffi, Point3D, Ray, Vec3}; +use crate::{ffi, Box, Point3D, Ray, RayIntersectionKind, Sphere, Triangle, Vec3}; impl Ray { #[doc(alias = "graphene_ray_init")] @@ -35,6 +35,54 @@ impl Ray { ray } } + + #[doc(alias = "graphene_ray_intersect_box")] + pub fn intersect_box(&self, b: &Box) -> (RayIntersectionKind, Option) { + unsafe { + let mut t_out = std::mem::MaybeUninit::uninit(); + let ret = from_glib(ffi::graphene_ray_intersect_box( + self.to_glib_none().0, + b.to_glib_none().0, + t_out.as_mut_ptr(), + )); + match ret { + RayIntersectionKind::None => (ret, None), + _ => (ret, Some(t_out.assume_init())), + } + } + } + + #[doc(alias = "graphene_ray_intersect_sphere")] + pub fn intersect_sphere(&self, s: &Sphere) -> (RayIntersectionKind, Option) { + unsafe { + let mut t_out = std::mem::MaybeUninit::uninit(); + let ret = from_glib(ffi::graphene_ray_intersect_sphere( + self.to_glib_none().0, + s.to_glib_none().0, + t_out.as_mut_ptr(), + )); + match ret { + RayIntersectionKind::None => (ret, None), + _ => (ret, Some(t_out.assume_init())), + } + } + } + + #[doc(alias = "graphene_ray_intersect_triangle")] + pub fn intersect_triangle(&self, t: &Triangle) -> (RayIntersectionKind, Option) { + unsafe { + let mut t_out = std::mem::MaybeUninit::uninit(); + let ret = from_glib(ffi::graphene_ray_intersect_triangle( + self.to_glib_none().0, + t.to_glib_none().0, + t_out.as_mut_ptr(), + )); + match ret { + RayIntersectionKind::None => (ret, None), + _ => (ret, Some(t_out.assume_init())), + } + } + } } impl fmt::Debug for Ray { diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/graphene/sys/versions.txt +++ b/graphene/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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/pango/Cargo.toml b/pango/Cargo.toml index 3a26581f880c..5aba93620432 100644 --- a/pango/Cargo.toml +++ b/pango/Cargo.toml @@ -22,6 +22,7 @@ v1_50 = ["v1_48", "pango-sys/v1_50"] v1_52 = ["v1_50", "pango-sys/v1_52"] v1_54 = ["v1_52", "pango-sys/v1_54"] v1_56 = ["v1_54", "pango-sys/v1_56"] +v1_57 = ["v1_56", "pango-sys/v1_57"] [dependencies] pango-sys.workspace = true diff --git a/pango/Gir.toml b/pango/Gir.toml index 00e195c2789d..ad5bc0134659 100644 --- a/pango/Gir.toml +++ b/pango/Gir.toml @@ -20,6 +20,7 @@ generate = [ "Pango.CoverageLevel", "Pango.Direction", "Pango.EllipsizeMode", + "Pango.FontColor", "Pango.FontFace", "Pango.FontMask", "Pango.FontMetrics", @@ -95,11 +96,13 @@ status = "generate" ignore = true [[object.function]] name = "itemize" + manual = true [[object.function.parameter]] name = "cached_iter" const = true [[object.function]] name = "itemize_with_base_dir" + manual = true [[object.function.parameter]] name = "cached_iter" const = true diff --git a/pango/src/auto/enums.rs b/pango/src/auto/enums.rs index 5e6bf819ceaa..afb097c04041 100644 --- a/pango/src/auto/enums.rs +++ b/pango/src/auto/enums.rs @@ -988,6 +988,120 @@ impl From for glib::Value { } } +#[cfg(feature = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] +#[non_exhaustive] +#[doc(alias = "PangoFontColor")] +pub enum FontColor { + #[doc(alias = "PANGO_FONT_COLOR_FORBIDDEN")] + Forbidden, + #[doc(alias = "PANGO_FONT_COLOR_REQUIRED")] + Required, + #[doc(alias = "PANGO_FONT_COLOR_DONT_CARE")] + DontCare, + #[doc(hidden)] + __Unknown(i32), +} + +#[cfg(feature = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +#[doc(hidden)] +impl IntoGlib for FontColor { + type GlibType = ffi::PangoFontColor; + + #[inline] + fn into_glib(self) -> ffi::PangoFontColor { + match self { + Self::Forbidden => ffi::PANGO_FONT_COLOR_FORBIDDEN, + Self::Required => ffi::PANGO_FONT_COLOR_REQUIRED, + Self::DontCare => ffi::PANGO_FONT_COLOR_DONT_CARE, + Self::__Unknown(value) => value, + } + } +} + +#[cfg(feature = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +#[doc(hidden)] +impl FromGlib for FontColor { + #[inline] + unsafe fn from_glib(value: ffi::PangoFontColor) -> Self { + match value { + ffi::PANGO_FONT_COLOR_FORBIDDEN => Self::Forbidden, + ffi::PANGO_FONT_COLOR_REQUIRED => Self::Required, + ffi::PANGO_FONT_COLOR_DONT_CARE => Self::DontCare, + value => Self::__Unknown(value), + } + } +} + +#[cfg(feature = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +impl StaticType for FontColor { + #[inline] + #[doc(alias = "pango_font_color_get_type")] + fn static_type() -> glib::Type { + unsafe { from_glib(ffi::pango_font_color_get_type()) } + } +} + +#[cfg(feature = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +impl glib::HasParamSpec for FontColor { + 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 = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +impl glib::value::ValueType for FontColor { + type Type = Self; +} + +#[cfg(feature = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +unsafe impl<'a> glib::value::FromValue<'a> for FontColor { + type Checker = glib::value::GenericValueTypeChecker; + + #[inline] + unsafe fn from_value(value: &'a glib::Value) -> Self { + from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +#[cfg(feature = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +impl ToValue for FontColor { + #[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 = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +impl From for glib::Value { + #[inline] + fn from(v: FontColor) -> Self { + ToValue::to_value(&v) + } +} + #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] diff --git a/pango/src/auto/flags.rs b/pango/src/auto/flags.rs index 67d7835c2573..526ee1818008 100644 --- a/pango/src/auto/flags.rs +++ b/pango/src/auto/flags.rs @@ -31,6 +31,10 @@ bitflags! { #[cfg_attr(docsrs, doc(cfg(feature = "v1_56")))] #[doc(alias = "PANGO_FONT_MASK_FEATURES")] const FEATURES = ffi::PANGO_FONT_MASK_FEATURES as _; + #[cfg(feature = "v1_57")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] + #[doc(alias = "PANGO_FONT_MASK_COLOR")] + const COLOR = ffi::PANGO_FONT_MASK_COLOR as _; } } diff --git a/pango/src/auto/font_description.rs b/pango/src/auto/font_description.rs index a5147d7bbc9a..8b3cc3cd72e6 100644 --- a/pango/src/auto/font_description.rs +++ b/pango/src/auto/font_description.rs @@ -2,6 +2,9 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +#[cfg(feature = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +use crate::FontColor; use crate::{ffi, FontMask, Gravity, Stretch, Style, Variant, Weight}; use glib::translate::*; @@ -47,6 +50,14 @@ impl FontDescription { } } + #[cfg(feature = "v1_57")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] + #[doc(alias = "pango_font_description_get_color")] + #[doc(alias = "get_color")] + pub fn color(&self) -> FontColor { + unsafe { from_glib(ffi::pango_font_description_get_color(self.to_glib_none().0)) } + } + #[doc(alias = "pango_font_description_get_family")] #[doc(alias = "get_family")] pub fn family(&self) -> Option { @@ -176,6 +187,15 @@ impl FontDescription { } } + #[cfg(feature = "v1_57")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] + #[doc(alias = "pango_font_description_set_color")] + pub fn set_color(&mut self, color: FontColor) { + unsafe { + ffi::pango_font_description_set_color(self.to_glib_none_mut().0, color.into_glib()); + } + } + #[doc(alias = "pango_font_description_set_family")] pub fn set_family(&mut self, family: &str) { unsafe { diff --git a/pango/src/auto/functions.rs b/pango/src/auto/functions.rs index 0f60a789d07b..72f713e40242 100644 --- a/pango/src/auto/functions.rs +++ b/pango/src/auto/functions.rs @@ -2,9 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use crate::{ - ffi, AttrIterator, AttrList, Context, Direction, Item, Stretch, Style, Variant, Weight, -}; +use crate::{ffi, AttrList, Direction, Stretch, Style, Variant, Weight}; use glib::translate::*; //#[cfg_attr(feature = "v1_44", deprecated = "Since 1.44")] @@ -56,50 +54,6 @@ pub fn is_zero_width(ch: char) -> bool { unsafe { from_glib(ffi::pango_is_zero_width(ch.into_glib())) } } -#[doc(alias = "pango_itemize")] -pub fn itemize( - context: &Context, - text: &str, - start_index: i32, - length: i32, - attrs: &AttrList, - cached_iter: Option<&AttrIterator>, -) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_full(ffi::pango_itemize( - context.to_glib_none().0, - text.to_glib_none().0, - start_index, - length, - attrs.to_glib_none().0, - mut_override(cached_iter.to_glib_none().0), - )) - } -} - -#[doc(alias = "pango_itemize_with_base_dir")] -pub fn itemize_with_base_dir( - context: &Context, - base_dir: Direction, - text: &str, - start_index: i32, - length: i32, - attrs: &AttrList, - cached_iter: Option<&AttrIterator>, -) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_full(ffi::pango_itemize_with_base_dir( - context.to_glib_none().0, - base_dir.into_glib(), - text.to_glib_none().0, - start_index, - length, - attrs.to_glib_none().0, - mut_override(cached_iter.to_glib_none().0), - )) - } -} - #[doc(alias = "pango_markup_parser_finish")] pub fn markup_parser_finish( context: &glib::MarkupParseContext, diff --git a/pango/src/auto/mod.rs b/pango/src/auto/mod.rs index d05be0a76e3b..10af05fd3a8b 100644 --- a/pango/src/auto/mod.rs +++ b/pango/src/auto/mod.rs @@ -79,6 +79,9 @@ pub use self::enums::BidiType; pub use self::enums::CoverageLevel; pub use self::enums::Direction; pub use self::enums::EllipsizeMode; +#[cfg(feature = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +pub use self::enums::FontColor; #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] pub use self::enums::FontScale; diff --git a/pango/src/auto/versions.txt b/pango/src/auto/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/pango/src/auto/versions.txt +++ b/pango/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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/pango/src/functions.rs b/pango/src/functions.rs index 9452a3515ffc..4e2f231b8241 100644 --- a/pango/src/functions.rs +++ b/pango/src/functions.rs @@ -6,7 +6,7 @@ use std::{ffi::c_char, ptr}; pub use crate::auto::functions::*; #[cfg(feature = "v1_44")] use crate::ShapeFlags; -use crate::{ffi, Analysis, GlyphString, Item}; +use crate::{ffi, Analysis, AttrIterator, AttrList, Context, Direction, GlyphString, Item}; #[doc(alias = "pango_reorder_items")] pub fn reorder_items(logical_items: &glib::List) -> glib::List { @@ -93,3 +93,65 @@ pub fn extents_to_pixels( ffi::pango_extents_to_pixels(inclusive.to_glib_none_mut().0, nearest.to_glib_none_mut().0); } } + +#[doc(alias = "pango_itemize")] +pub fn itemize( + context: &Context, + text: &str, + start_index: i32, + length: i32, + attrs: &AttrList, + cached_iter: Option<&AttrIterator>, +) -> Vec { + let total_length = text.len() as i32; + assert!( + start_index >= 0 && start_index < total_length, + "start_index is out of range" + ); + assert!( + length >= 0 && start_index.checked_add(length).unwrap() < total_length, + "start_index + length is out of range" + ); + unsafe { + FromGlibPtrContainer::from_glib_full(ffi::pango_itemize( + context.to_glib_none().0, + text.to_glib_none().0, + start_index, + length, + attrs.to_glib_none().0, + mut_override(cached_iter.to_glib_none().0), + )) + } +} + +#[doc(alias = "pango_itemize_with_base_dir")] +pub fn itemize_with_base_dir( + context: &Context, + base_dir: Direction, + text: &str, + start_index: i32, + length: i32, + attrs: &AttrList, + cached_iter: Option<&AttrIterator>, +) -> Vec { + let total_length = text.len() as i32; + assert!( + start_index >= 0 && start_index < total_length, + "start_index is out of range" + ); + assert!( + length >= 0 && start_index.checked_add(length).unwrap() < total_length, + "start_index + length is out of range" + ); + unsafe { + FromGlibPtrContainer::from_glib_full(ffi::pango_itemize_with_base_dir( + context.to_glib_none().0, + base_dir.into_glib(), + text.to_glib_none().0, + start_index, + length, + attrs.to_glib_none().0, + mut_override(cached_iter.to_glib_none().0), + )) + } +} diff --git a/pango/sys/Cargo.toml b/pango/sys/Cargo.toml index 4a28ec8b5d9c..46cfab8d3bbb 100644 --- a/pango/sys/Cargo.toml +++ b/pango/sys/Cargo.toml @@ -23,6 +23,7 @@ v1_50 = ["v1_48"] v1_52 = ["v1_50"] v1_54 = ["v1_52"] v1_56 = ["v1_54"] +v1_57 = ["v1_56"] [lib] name = "pango_sys" @@ -85,6 +86,9 @@ version = "1.54" [package.metadata.system-deps.pango.v1_56] version = "1.55" +[package.metadata.system-deps.pango.v1_57] +version = "1.57" + [package.metadata.docs.rs] rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] diff --git a/pango/sys/src/lib.rs b/pango/sys/src/lib.rs index a6164829ce49..0f5a2b46c117 100644 --- a/pango/sys/src/lib.rs +++ b/pango/sys/src/lib.rs @@ -129,6 +129,11 @@ pub const PANGO_ELLIPSIZE_START: PangoEllipsizeMode = 1; pub const PANGO_ELLIPSIZE_MIDDLE: PangoEllipsizeMode = 2; pub const PANGO_ELLIPSIZE_END: PangoEllipsizeMode = 3; +pub type PangoFontColor = c_int; +pub const PANGO_FONT_COLOR_FORBIDDEN: PangoFontColor = 0; +pub const PANGO_FONT_COLOR_REQUIRED: PangoFontColor = 1; +pub const PANGO_FONT_COLOR_DONT_CARE: PangoFontColor = 2; + pub type PangoFontScale = c_int; pub const PANGO_FONT_SCALE_NONE: PangoFontScale = 0; pub const PANGO_FONT_SCALE_SUPERSCRIPT: PangoFontScale = 1; @@ -378,6 +383,9 @@ pub const PANGO_FONT_MASK_VARIATIONS: PangoFontMask = 128; #[cfg(feature = "v1_56")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_56")))] pub const PANGO_FONT_MASK_FEATURES: PangoFontMask = 256; +#[cfg(feature = "v1_57")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] +pub const PANGO_FONT_MASK_COLOR: PangoFontMask = 512; pub type PangoLayoutDeserializeFlags = c_uint; pub const PANGO_LAYOUT_DESERIALIZE_DEFAULT: PangoLayoutDeserializeFlags = 0; @@ -1449,6 +1457,13 @@ extern "C" { //========================================================================= pub fn pango_ellipsize_mode_get_type() -> GType; + //========================================================================= + // PangoFontColor + //========================================================================= + #[cfg(feature = "v1_57")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] + pub fn pango_font_color_get_type() -> GType; + //========================================================================= // PangoFontScale //========================================================================= @@ -1767,6 +1782,9 @@ extern "C" { desc2: *const PangoFontDescription, ) -> gboolean; pub fn pango_font_description_free(desc: *mut PangoFontDescription); + #[cfg(feature = "v1_57")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] + pub fn pango_font_description_get_color(desc: *const PangoFontDescription) -> PangoFontColor; pub fn pango_font_description_get_family(desc: *const PangoFontDescription) -> *const c_char; #[cfg(feature = "v1_56")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_56")))] @@ -1803,6 +1821,9 @@ extern "C" { desc: *mut PangoFontDescription, size: c_double, ); + #[cfg(feature = "v1_57")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))] + pub fn pango_font_description_set_color(desc: *mut PangoFontDescription, color: PangoFontColor); pub fn pango_font_description_set_family( desc: *mut PangoFontDescription, family: *const c_char, diff --git a/pango/sys/tests/abi.rs b/pango/sys/tests/abi.rs index 8eb4b5e10a6d..0320ffa76fb9 100644 --- a/pango/sys/tests/abi.rs +++ b/pango/sys/tests/abi.rs @@ -355,6 +355,13 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ alignment: align_of::(), }, ), + ( + "PangoFontColor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ( "PangoFontFace", Layout { @@ -746,6 +753,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) PANGO_ELLIPSIZE_MIDDLE", "2"), ("(gint) PANGO_ELLIPSIZE_NONE", "0"), ("(gint) PANGO_ELLIPSIZE_START", "1"), + ("(gint) PANGO_FONT_COLOR_DONT_CARE", "2"), + ("(gint) PANGO_FONT_COLOR_FORBIDDEN", "0"), + ("(gint) PANGO_FONT_COLOR_REQUIRED", "1"), + ("(guint) PANGO_FONT_MASK_COLOR", "512"), ("(guint) PANGO_FONT_MASK_FAMILY", "1"), ("(guint) PANGO_FONT_MASK_FEATURES", "256"), ("(guint) PANGO_FONT_MASK_GRAVITY", "64"), diff --git a/pango/sys/tests/constant.c b/pango/sys/tests/constant.c index be70f9e2a096..ed8ed20ffa39 100644 --- a/pango/sys/tests/constant.c +++ b/pango/sys/tests/constant.c @@ -115,6 +115,10 @@ int main() { PRINT_CONSTANT((gint) PANGO_ELLIPSIZE_MIDDLE); PRINT_CONSTANT((gint) PANGO_ELLIPSIZE_NONE); PRINT_CONSTANT((gint) PANGO_ELLIPSIZE_START); + PRINT_CONSTANT((gint) PANGO_FONT_COLOR_DONT_CARE); + PRINT_CONSTANT((gint) PANGO_FONT_COLOR_FORBIDDEN); + PRINT_CONSTANT((gint) PANGO_FONT_COLOR_REQUIRED); + PRINT_CONSTANT((guint) PANGO_FONT_MASK_COLOR); PRINT_CONSTANT((guint) PANGO_FONT_MASK_FAMILY); PRINT_CONSTANT((guint) PANGO_FONT_MASK_FEATURES); PRINT_CONSTANT((guint) PANGO_FONT_MASK_GRAVITY); diff --git a/pango/sys/tests/layout.c b/pango/sys/tests/layout.c index 670246e3cdf2..c47f074d8f06 100644 --- a/pango/sys/tests/layout.c +++ b/pango/sys/tests/layout.c @@ -29,6 +29,7 @@ int main() { printf("%s;%zu;%zu\n", "PangoEllipsizeMode", sizeof(PangoEllipsizeMode), alignof(PangoEllipsizeMode)); printf("%s;%zu;%zu\n", "PangoFont", sizeof(PangoFont), alignof(PangoFont)); printf("%s;%zu;%zu\n", "PangoFontClass", sizeof(PangoFontClass), alignof(PangoFontClass)); + printf("%s;%zu;%zu\n", "PangoFontColor", sizeof(PangoFontColor), alignof(PangoFontColor)); printf("%s;%zu;%zu\n", "PangoFontFace", sizeof(PangoFontFace), alignof(PangoFontFace)); printf("%s;%zu;%zu\n", "PangoFontFaceClass", sizeof(PangoFontFaceClass), alignof(PangoFontFaceClass)); printf("%s;%zu;%zu\n", "PangoFontFamily", sizeof(PangoFontFamily), alignof(PangoFontFamily)); diff --git a/pango/sys/versions.txt b/pango/sys/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/pango/sys/versions.txt +++ b/pango/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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/pangocairo/src/auto/versions.txt b/pangocairo/src/auto/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/pangocairo/src/auto/versions.txt +++ b/pangocairo/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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8) diff --git a/pangocairo/sys/versions.txt b/pangocairo/sys/versions.txt index 4e282f2a791c..6960ba3cfc15 100644 --- a/pangocairo/sys/versions.txt +++ b/pangocairo/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 @ a79d23cd6a42) +Generated by gir (https://github.com/gtk-rs/gir @ 566d8ff6a9ab) +from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)