From 24c68827c298b1df3bebbfa64479d71fe895447b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 07:54:13 +0000 Subject: [PATCH 01/25] build(deps): bump quick-xml from 0.36.2 to 0.37.1 Bumps [quick-xml](https://github.com/tafia/quick-xml) from 0.36.2 to 0.37.1. - [Release notes](https://github.com/tafia/quick-xml/releases) - [Changelog](https://github.com/tafia/quick-xml/blob/master/Changelog.md) - [Commits](https://github.com/tafia/quick-xml/compare/v0.36.2...v0.37.1) --- updated-dependencies: - dependency-name: quick-xml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 13 +++++++++++-- gtk4-macros/Cargo.toml | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5a07ef22f10e..dd93c62c1d3e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -801,7 +801,7 @@ dependencies = [ "gtk4", "proc-macro-crate", "proc-macro2", - "quick-xml", + "quick-xml 0.37.1", "quote", "syn", "trybuild2", @@ -1439,6 +1439,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "quick-xml" +version = "0.37.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f22f29bdff3987b4d8632ef95fd6424ec7e4e0a57e2f4fc63e489e75357f6a03" +dependencies = [ + "memchr", +] + [[package]] name = "quinn" version = "0.11.5" @@ -2318,7 +2327,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ "proc-macro2", - "quick-xml", + "quick-xml 0.36.2", "quote", ] diff --git a/gtk4-macros/Cargo.toml b/gtk4-macros/Cargo.toml index 9d27969b6acb..670103fa636a 100644 --- a/gtk4-macros/Cargo.toml +++ b/gtk4-macros/Cargo.toml @@ -21,7 +21,7 @@ xml_validation = ["quick-xml"] blueprint = [] [dependencies] -quick-xml = {version = "0.36", optional = true} +quick-xml = {version = "0.37", optional = true} proc-macro-crate = "3.0" proc-macro2 = "1.0" quote = "1.0" From 9fb635d8f77ed0914fe303639713a5e09e60d621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 18 Nov 2024 10:10:33 +0200 Subject: [PATCH 02/25] Update to femtovg 0.11 and glow 0.15 --- Cargo.lock | 59 ++++++++++++++++++++++++++++++++++++--------- examples/Cargo.toml | 4 +-- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dd93c62c1d3e..6cfff12adedb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -112,6 +112,20 @@ name = "bytemuck" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "byteorder" @@ -218,6 +232,15 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core_maths" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b02505ccb8c50b0aa21ace0fc08c3e53adebd4e58caa18a36152803c7709a3" +dependencies = [ + "libm", +] + [[package]] name = "crossbeam-utils" version = "0.8.20" @@ -307,11 +330,12 @@ checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "femtovg" -version = "0.9.2" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47921d14afc4daad9bedc926099bc6edcaa23e37a957448f86cdefcbafe2f632" +checksum = "eafc3dd3c956423a6669e1f6f9ab23261dbe45cdb24ce23dba38b0389b8a8ff8" dependencies = [ "bitflags 2.6.0", + "bytemuck", "fnv", "glow", "imgref", @@ -701,9 +725,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "glow" -version = "0.13.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +checksum = "e33cd8ff5e02c1a5463ec10a846c8f3166a3ae0382ec33de6a327ea6dd61c41d" dependencies = [ "js-sys", "slotmap", @@ -1228,6 +1252,12 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "libm" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" + [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -1696,12 +1726,14 @@ dependencies = [ [[package]] name = "rustybuzz" -version = "0.14.1" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" +checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" dependencies = [ "bitflags 2.6.0", "bytemuck", + "core_maths", + "log", "smallvec", "ttf-parser", "unicode-bidi-mirroring", @@ -2119,9 +2151,12 @@ dependencies = [ [[package]] name = "ttf-parser" -version = "0.21.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" +checksum = "5902c5d130972a0000f60860bfbf46f7ca3db5391eddfedd1b8728bd9dc96c0e" +dependencies = [ + "core_maths", +] [[package]] name = "typenum" @@ -2137,15 +2172,15 @@ checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-bidi-mirroring" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" +checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe" [[package]] name = "unicode-ccc" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" +checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e" [[package]] name = "unicode-ident" diff --git a/examples/Cargo.toml b/examples/Cargo.toml index b1ab953986bd..62bd47515fe7 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -7,9 +7,9 @@ authors.workspace = true [dependencies] chrono = "0.4" -femtovg = { version = "0.9", optional = true, default-features = false } +femtovg = { version = "0.11", optional = true, default-features = false } glium = { version = "0.35", optional = true, default-features = false } -glow = { version = "0.13.0", optional = true } +glow = { version = "0.15.0", optional = true } epoxy = { version = "0.1.0", optional = true } libloading = { version = "0.8.0", optional = true } im-rc = { version = "15", optional = true } From 34ecb5efed2b0b6fa3c5805276f3d3a78cc1a4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 18 Nov 2024 10:12:10 +0200 Subject: [PATCH 03/25] deny: Add override for quick-xml --- deny.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deny.toml b/deny.toml index 7cd713b6c0c3..5b2c6ed006aa 100644 --- a/deny.toml +++ b/deny.toml @@ -32,3 +32,7 @@ unknown-git = "deny" allow-git = [ "https://github.com/gtk-rs/gtk-rs-core", ] + +[[bans.skip]] +name = "quick-xml" +version = "0.36.0" From 464ee0fb24da8a360c795524ec4812f047399cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 18 Dec 2024 20:19:04 +0200 Subject: [PATCH 04/25] Update gir --- gir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir b/gir index e9ef1f366af2..e06125dad46a 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit e9ef1f366af2a54be48d37cff1104a77cd975413 +Subproject commit e06125dad46a08379ad5c1f20c6fb566c68fc657 From a0b7227be9bece20e5d39f9fab92467f5407e969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 18 Dec 2024 20:19:09 +0200 Subject: [PATCH 05/25] Update gir-files --- gir-files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir-files b/gir-files index d48ffb674809..01066bc7d926 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit d48ffb674809dba0989cdc3af9a149defe0d3c85 +Subproject commit 01066bc7d926da07306225c810f13ca42cfcf0b6 From 7c4d610b3665ce0a1e1229487229d816ff776002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 18 Dec 2024 20:20:05 +0200 Subject: [PATCH 06/25] Regenerate with latest gir --- gdk4-wayland/src/auto/versions.txt | 4 ++-- gdk4-wayland/sys/versions.txt | 4 ++-- gdk4-win32/src/auto/versions.txt | 4 ++-- gdk4-win32/sys/versions.txt | 4 ++-- gdk4-x11/src/auto/versions.txt | 4 ++-- gdk4-x11/sys/versions.txt | 4 ++-- gdk4/src/auto/cicp_params.rs | 2 +- gdk4/src/auto/content_formats.rs | 7 +++++++ gdk4/src/auto/dmabuf_texture_builder.rs | 2 +- gdk4/src/auto/gl_texture_builder.rs | 2 +- gdk4/src/auto/versions.txt | 4 ++-- gdk4/sys/src/lib.rs | 3 +++ gdk4/sys/versions.txt | 4 ++-- gsk4/src/auto/versions.txt | 4 ++-- gsk4/sys/versions.txt | 4 ++-- gtk4/src/auto/flags.rs | 4 ++++ gtk4/src/auto/functions.rs | 10 ++++++++++ gtk4/src/auto/text_view.rs | 17 +++++++++++++++++ gtk4/src/auto/versions.txt | 4 ++-- gtk4/sys/src/lib.rs | 13 +++++++++++++ gtk4/sys/tests/abi.rs | 1 + gtk4/sys/tests/constant.c | 1 + gtk4/sys/versions.txt | 4 ++-- 23 files changed, 83 insertions(+), 27 deletions(-) diff --git a/gdk4-wayland/src/auto/versions.txt b/gdk4-wayland/src/auto/versions.txt index 2bf5373b57cc..bba14f1d708d 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 @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gdk4-wayland/sys/versions.txt b/gdk4-wayland/sys/versions.txt index 2bf5373b57cc..bba14f1d708d 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 @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gdk4-win32/src/auto/versions.txt b/gdk4-win32/src/auto/versions.txt index 2bf5373b57cc..bba14f1d708d 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 @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gdk4-win32/sys/versions.txt b/gdk4-win32/sys/versions.txt index 2bf5373b57cc..bba14f1d708d 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 @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gdk4-x11/src/auto/versions.txt b/gdk4-x11/src/auto/versions.txt index 2bf5373b57cc..bba14f1d708d 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 @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gdk4-x11/sys/versions.txt b/gdk4-x11/sys/versions.txt index 2bf5373b57cc..bba14f1d708d 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 @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gdk4/src/auto/cicp_params.rs b/gdk4/src/auto/cicp_params.rs index a6807d7ec998..817312fe1829 100644 --- a/gdk4/src/auto/cicp_params.rs +++ b/gdk4/src/auto/cicp_params.rs @@ -27,7 +27,7 @@ impl CicpParams { } #[doc(alias = "gdk_cicp_params_build_color_state")] - pub fn build_color_state(&self) -> Result, glib::Error> { + pub fn build_color_state(&self) -> Result { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::gdk_cicp_params_build_color_state(self.to_glib_none().0, &mut error); diff --git a/gdk4/src/auto/content_formats.rs b/gdk4/src/auto/content_formats.rs index 2cef38f3a6df..67ec0bbf66b5 100644 --- a/gdk4/src/auto/content_formats.rs +++ b/gdk4/src/auto/content_formats.rs @@ -73,6 +73,13 @@ impl ContentFormats { } } + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + #[doc(alias = "gdk_content_formats_is_empty")] + pub fn is_empty(&self) -> bool { + unsafe { from_glib(ffi::gdk_content_formats_is_empty(self.to_glib_none().0)) } + } + #[doc(alias = "gdk_content_formats_match")] #[doc(alias = "match")] pub fn match_(&self, second: &ContentFormats) -> bool { diff --git a/gdk4/src/auto/dmabuf_texture_builder.rs b/gdk4/src/auto/dmabuf_texture_builder.rs index 4320f6eed1d8..f53242bb08b4 100644 --- a/gdk4/src/auto/dmabuf_texture_builder.rs +++ b/gdk4/src/auto/dmabuf_texture_builder.rs @@ -36,7 +36,7 @@ impl DmabufTextureBuilder { #[doc(alias = "color-state")] pub fn color_state(&self) -> Option { unsafe { - from_glib_full(ffi::gdk_dmabuf_texture_builder_get_color_state( + from_glib_none(ffi::gdk_dmabuf_texture_builder_get_color_state( self.to_glib_none().0, )) } diff --git a/gdk4/src/auto/gl_texture_builder.rs b/gdk4/src/auto/gl_texture_builder.rs index c3621efd025a..8275c471d2e7 100644 --- a/gdk4/src/auto/gl_texture_builder.rs +++ b/gdk4/src/auto/gl_texture_builder.rs @@ -40,7 +40,7 @@ impl GLTextureBuilder { #[doc(alias = "color-state")] pub fn color_state(&self) -> ColorState { unsafe { - from_glib_full(ffi::gdk_gl_texture_builder_get_color_state( + from_glib_none(ffi::gdk_gl_texture_builder_get_color_state( self.to_glib_none().0, )) } diff --git a/gdk4/src/auto/versions.txt b/gdk4/src/auto/versions.txt index 2bf5373b57cc..bba14f1d708d 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 @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gdk4/sys/src/lib.rs b/gdk4/sys/src/lib.rs index df07ed285c69..030cac15fd2b 100644 --- a/gdk4/sys/src/lib.rs +++ b/gdk4/sys/src/lib.rs @@ -4080,6 +4080,9 @@ extern "C" { formats: *const GdkContentFormats, n_mime_types: *mut size_t, ) -> *const *const c_char; + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + pub fn gdk_content_formats_is_empty(formats: *mut GdkContentFormats) -> gboolean; pub fn gdk_content_formats_match( first: *const GdkContentFormats, second: *const GdkContentFormats, diff --git a/gdk4/sys/versions.txt b/gdk4/sys/versions.txt index 2bf5373b57cc..bba14f1d708d 100644 --- a/gdk4/sys/versions.txt +++ b/gdk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gsk4/src/auto/versions.txt b/gsk4/src/auto/versions.txt index 2bf5373b57cc..bba14f1d708d 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 @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gsk4/sys/versions.txt b/gsk4/sys/versions.txt index 2bf5373b57cc..bba14f1d708d 100644 --- a/gsk4/sys/versions.txt +++ b/gsk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gtk4/src/auto/flags.rs b/gtk4/src/auto/flags.rs index ccd452fb5e03..3c7cf5d8e723 100644 --- a/gtk4/src/auto/flags.rs +++ b/gtk4/src/auto/flags.rs @@ -681,6 +681,10 @@ bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "GtkIconLookupFlags")] pub struct IconLookupFlags: u32 { + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + #[doc(alias = "GTK_ICON_LOOKUP_NONE")] + const NONE = ffi::GTK_ICON_LOOKUP_NONE as _; #[doc(alias = "GTK_ICON_LOOKUP_FORCE_REGULAR")] const FORCE_REGULAR = ffi::GTK_ICON_LOOKUP_FORCE_REGULAR as _; #[doc(alias = "GTK_ICON_LOOKUP_FORCE_SYMBOLIC")] diff --git a/gtk4/src/auto/functions.rs b/gtk4/src/auto/functions.rs index a44aac8acd0e..86aa7f297f87 100644 --- a/gtk4/src/auto/functions.rs +++ b/gtk4/src/auto/functions.rs @@ -35,6 +35,16 @@ pub fn check_version( } } +#[cfg(feature = "v4_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] +#[doc(alias = "gtk_disable_portals")] +pub fn disable_portals() { + assert_initialized_main_thread!(); + unsafe { + ffi::gtk_disable_portals(); + } +} + #[doc(alias = "gtk_disable_setlocale")] pub fn disable_setlocale() { assert_not_initialized!(); diff --git a/gtk4/src/auto/text_view.rs b/gtk4/src/auto/text_view.rs index 74bf0e99874b..ed8914235500 100644 --- a/gtk4/src/auto/text_view.rs +++ b/gtk4/src/auto/text_view.rs @@ -843,6 +843,23 @@ pub trait TextViewExt: IsA + sealed::Sealed + 'static { unsafe { ffi::gtk_text_view_get_top_margin(self.as_ref().to_glib_none().0) } } + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + #[doc(alias = "gtk_text_view_get_visible_offset")] + #[doc(alias = "get_visible_offset")] + fn visible_offset(&self) -> (f64, f64) { + unsafe { + let mut x_offset = std::mem::MaybeUninit::uninit(); + let mut y_offset = std::mem::MaybeUninit::uninit(); + ffi::gtk_text_view_get_visible_offset( + self.as_ref().to_glib_none().0, + x_offset.as_mut_ptr(), + y_offset.as_mut_ptr(), + ); + (x_offset.assume_init(), y_offset.assume_init()) + } + } + #[doc(alias = "gtk_text_view_get_visible_rect")] #[doc(alias = "get_visible_rect")] fn visible_rect(&self) -> gdk::Rectangle { diff --git a/gtk4/src/auto/versions.txt b/gtk4/src/auto/versions.txt index 2bf5373b57cc..bba14f1d708d 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 @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gtk4/sys/src/lib.rs b/gtk4/sys/src/lib.rs index c190605b743c..dbe2f18aed72 100644 --- a/gtk4/sys/src/lib.rs +++ b/gtk4/sys/src/lib.rs @@ -1070,6 +1070,9 @@ pub const GTK_FONT_CHOOSER_LEVEL_VARIATIONS: GtkFontChooserLevel = 4; pub const GTK_FONT_CHOOSER_LEVEL_FEATURES: GtkFontChooserLevel = 8; pub type GtkIconLookupFlags = c_uint; +#[cfg(feature = "v4_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] +pub const GTK_ICON_LOOKUP_NONE: GtkIconLookupFlags = 0; pub const GTK_ICON_LOOKUP_FORCE_REGULAR: GtkIconLookupFlags = 1; pub const GTK_ICON_LOOKUP_FORCE_SYMBOLIC: GtkIconLookupFlags = 2; pub const GTK_ICON_LOOKUP_PRELOAD: GtkIconLookupFlags = 4; @@ -19013,6 +19016,13 @@ extern "C" { pub fn gtk_text_view_get_rtl_context(text_view: *mut GtkTextView) -> *mut pango::PangoContext; pub fn gtk_text_view_get_tabs(text_view: *mut GtkTextView) -> *mut pango::PangoTabArray; pub fn gtk_text_view_get_top_margin(text_view: *mut GtkTextView) -> c_int; + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + pub fn gtk_text_view_get_visible_offset( + text_view: *mut GtkTextView, + x_offset: *mut c_double, + y_offset: *mut c_double, + ); pub fn gtk_text_view_get_visible_rect( text_view: *mut GtkTextView, visible_rect: *mut gdk::GdkRectangle, @@ -21254,6 +21264,9 @@ extern "C" { ) -> *const c_char; pub fn gtk_css_parser_error_quark() -> glib::GQuark; pub fn gtk_css_parser_warning_quark() -> glib::GQuark; + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + pub fn gtk_disable_portals(); pub fn gtk_disable_setlocale(); pub fn gtk_distribute_natural_allocation( extra_space: c_int, diff --git a/gtk4/sys/tests/abi.rs b/gtk4/sys/tests/abi.rs index 3d114d6da0df..265a949f793b 100644 --- a/gtk4/sys/tests/abi.rs +++ b/gtk4/sys/tests/abi.rs @@ -2996,6 +2996,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GTK_GRAPHICS_OFFLOAD_ENABLED", "0"), ("(guint) GTK_ICON_LOOKUP_FORCE_REGULAR", "1"), ("(guint) GTK_ICON_LOOKUP_FORCE_SYMBOLIC", "2"), + ("(guint) GTK_ICON_LOOKUP_NONE", "0"), ("(guint) GTK_ICON_LOOKUP_PRELOAD", "4"), ("(gint) GTK_ICON_SIZE_INHERIT", "0"), ("(gint) GTK_ICON_SIZE_LARGE", "2"), diff --git a/gtk4/sys/tests/constant.c b/gtk4/sys/tests/constant.c index 2cd2bb0496c1..5d73094b8c68 100644 --- a/gtk4/sys/tests/constant.c +++ b/gtk4/sys/tests/constant.c @@ -425,6 +425,7 @@ int main() { PRINT_CONSTANT((gint) GTK_GRAPHICS_OFFLOAD_ENABLED); PRINT_CONSTANT((guint) GTK_ICON_LOOKUP_FORCE_REGULAR); PRINT_CONSTANT((guint) GTK_ICON_LOOKUP_FORCE_SYMBOLIC); + PRINT_CONSTANT((guint) GTK_ICON_LOOKUP_NONE); PRINT_CONSTANT((guint) GTK_ICON_LOOKUP_PRELOAD); PRINT_CONSTANT((gint) GTK_ICON_SIZE_INHERIT); PRINT_CONSTANT((gint) GTK_ICON_SIZE_LARGE); diff --git a/gtk4/sys/versions.txt b/gtk4/sys/versions.txt index 2bf5373b57cc..bba14f1d708d 100644 --- a/gtk4/sys/versions.txt +++ b/gtk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) From 1edfc9856a5cf5906db60127a1be0536f28493f5 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 13 Nov 2024 07:59:48 +0100 Subject: [PATCH 07/25] Add a basic gdk4-macos --- Cargo.lock | 24 +++ Cargo.toml | 3 + gdk4-macos/COPYRIGHT | 1 + gdk4-macos/Cargo.toml | 31 +++ gdk4-macos/Gir.toml | 33 ++++ gdk4-macos/LICENSE | 1 + gdk4-macos/README.md | 62 ++++++ gdk4-macos/src/auto/macos_device.rs | 16 ++ gdk4-macos/src/auto/macos_display.rs | 16 ++ gdk4-macos/src/auto/macos_gl_context.rs | 16 ++ gdk4-macos/src/auto/macos_keymap.rs | 16 ++ gdk4-macos/src/auto/macos_monitor.rs | 43 +++++ gdk4-macos/src/auto/macos_seat.rs | 16 ++ gdk4-macos/src/auto/macos_surface.rs | 57 ++++++ gdk4-macos/src/auto/mod.rs | 24 +++ gdk4-macos/src/auto/versions.txt | 2 + gdk4-macos/src/lib.rs | 18 ++ gdk4-macos/src/prelude.rs | 7 + gdk4-macos/src/rt.rs | 10 + gdk4-macos/sys/Cargo.toml | 64 +++++++ gdk4-macos/sys/Gir.toml | 14 ++ gdk4-macos/sys/LICENSE | 1 + gdk4-macos/sys/build.rs | 17 ++ gdk4-macos/sys/src/lib.rs | 240 ++++++++++++++++++++++++ gdk4-macos/sys/versions.txt | 2 + gdk4-macos/tests/check_gir.rs | 8 + 26 files changed, 742 insertions(+) create mode 120000 gdk4-macos/COPYRIGHT create mode 100644 gdk4-macos/Cargo.toml create mode 100644 gdk4-macos/Gir.toml create mode 120000 gdk4-macos/LICENSE create mode 100644 gdk4-macos/README.md create mode 100644 gdk4-macos/src/auto/macos_device.rs create mode 100644 gdk4-macos/src/auto/macos_display.rs create mode 100644 gdk4-macos/src/auto/macos_gl_context.rs create mode 100644 gdk4-macos/src/auto/macos_keymap.rs create mode 100644 gdk4-macos/src/auto/macos_monitor.rs create mode 100644 gdk4-macos/src/auto/macos_seat.rs create mode 100644 gdk4-macos/src/auto/macos_surface.rs create mode 100644 gdk4-macos/src/auto/mod.rs create mode 100644 gdk4-macos/src/auto/versions.txt create mode 100644 gdk4-macos/src/lib.rs create mode 100644 gdk4-macos/src/prelude.rs create mode 100644 gdk4-macos/src/rt.rs create mode 100644 gdk4-macos/sys/Cargo.toml create mode 100644 gdk4-macos/sys/Gir.toml create mode 120000 gdk4-macos/sys/LICENSE create mode 100644 gdk4-macos/sys/build.rs create mode 100644 gdk4-macos/sys/src/lib.rs create mode 100644 gdk4-macos/sys/versions.txt create mode 100644 gdk4-macos/tests/check_gir.rs diff --git a/Cargo.lock b/Cargo.lock index 6cfff12adedb..99e6b3c87c08 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -476,6 +476,30 @@ dependencies = [ "pango", ] +[[package]] +name = "gdk4-macos" +version = "0.9.4" +dependencies = [ + "gdk4", + "gdk4-macos-sys", + "gio", + "gir-format-check", + "glib", + "libc", +] + +[[package]] +name = "gdk4-macos-sys" +version = "0.9.4" +dependencies = [ + "gdk4-sys", + "glib-sys", + "libc", + "shell-words", + "system-deps", + "tempfile", +] + [[package]] name = "gdk4-sys" version = "0.9.4" diff --git a/Cargo.toml b/Cargo.toml index d2359b123765..e42ddf25f8f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,8 @@ members = [ "gdk4-wayland/sys", "gdk4-win32", "gdk4-win32/sys", + "gdk4-macos", + "gdk4-macos/sys", "gsk4", "gsk4/sys", "gtk4", @@ -67,4 +69,5 @@ gsk4-sys = {path = "gsk4/sys", version = "0.9.4"} gsk = {package = "gsk4", path = "gsk4", version = "0.9"} gtk4-macros = {path = "gtk4-macros", version = "0.9"} gtk4-sys = {path = "gtk4/sys", version = "0.9.4"} +gdk4-macos-sys = {path = "gdk4-macos/sys", version = "0.9"} gtk = { path = "gtk4", package = "gtk4", version = "0.9" } diff --git a/gdk4-macos/COPYRIGHT b/gdk4-macos/COPYRIGHT new file mode 120000 index 000000000000..dc5f40a221a3 --- /dev/null +++ b/gdk4-macos/COPYRIGHT @@ -0,0 +1 @@ +../COPYRIGHT \ No newline at end of file diff --git a/gdk4-macos/Cargo.toml b/gdk4-macos/Cargo.toml new file mode 100644 index 000000000000..78a6c78b02e5 --- /dev/null +++ b/gdk4-macos/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "gdk4-macos" +description = "Rust bindings of the GDK4 macos library" +documentation = "https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_macos/" +keywords = ["gdk4", "gdk4-macos", "gtk-rs", "gnome", "GUI"] +readme = "README.md" +authors.workspace = true +categories.workspace = true +edition.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true +rust-version.workspace = true +version.workspace = true + +[features] + +[dependencies] +gdk4-macos-sys.workspace = true +gdk.workspace = true +gio.workspace = true +glib.workspace = true +libc.workspace = true + +[dev-dependencies] +gir-format-check.workspace = true + +[package.metadata.docs.rs] +all-features = true +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] diff --git a/gdk4-macos/Gir.toml b/gdk4-macos/Gir.toml new file mode 100644 index 000000000000..443dcfd05f42 --- /dev/null +++ b/gdk4-macos/Gir.toml @@ -0,0 +1,33 @@ +[options] +girs_directories = ["../gir-files"] +library = "GdkMacos" +version = "4.0" +min_cfg_version = "4.0.0" +target_path = "." +work_mode = "normal" +use_gi_docgen = true +single_version_file = true +generate_safety_asserts = true +deprecate_by_min_version = true +trust_return_value_nullability = true + +generate = [ + "GdkMacos.MacosDevice", + "GdkMacos.MacosDisplay", + "GdkMacos.MacosGLContext", + "GdkMacos.MacosKeymap", + "GdkMacos.MacosMonitor", + "GdkMacos.MacosSeat", + "GdkMacos.MacosSurface", +] + +manual = [ + "Gdk.Device", + "Gdk.Display", + "Gdk.DrawContext", + "Gdk.GLContext", + "Gdk.Monitor", + "Gdk.Rectangle", + "Gdk.Seat", + "Gdk.Surface", +] diff --git a/gdk4-macos/LICENSE b/gdk4-macos/LICENSE new file mode 120000 index 000000000000..ea5b60640b01 --- /dev/null +++ b/gdk4-macos/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/gdk4-macos/README.md b/gdk4-macos/README.md new file mode 100644 index 000000000000..763e17ed6638 --- /dev/null +++ b/gdk4-macos/README.md @@ -0,0 +1,62 @@ +# Rust GDK 4 X11 bindings + +The project website is [here](https://gtk-rs.org/). + +Rust bindings of [GDK 4's X11 backend](https://docs.gtk.org/gdk4-x11/), +part of [gtk4-rs](https://github.com/gtk-rs/gtk4-rs/). + +GDK is an intermediate layer that isolates GTK from the details of the windowing system. +GDK X11 contains functions specific to the X11 backend. + +## Minimum supported Rust version + +Currently, the minimum supported Rust version is `1.80`. + +## Documentation + +- The Rust API [Stable](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_x11)/[Development](https://gtk-rs.org/gtk4-rs/git/docs/gdk4_x11/) +- [The C API](https://docs.gtk.org/gdk4-x11/) +- [GTK Installation instructions](https://www.gtk.org/docs/installations/) + +## Using + +We recommend using [crates from crates.io](https://crates.io/keywords/gtk-rs), +as [demonstrated here](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gtk4/index.html#library-versions). + +If you want to track the bleeding edge, use the git dependency instead: + +```toml +[dependencies] +gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-wayland" } +``` + +Avoid mixing versioned and git crates like this: + +```toml +# This will not compile +[dependencies] +gdk-x11 = {version = "0.1", package = "gdk4-x11"} +gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-wayland" } +``` + +### Features + +| Feature | Description | +| --- | ----------- | +| `v4_16` | Enable the new APIs part of GTK 4.16 | +| `v4_10` | Enable the new APIs part of GTK 4.10 | +| `v4_4` | Enable the new APIs part of GTK 4.4 | +| `egl` | Integration with the [khronos-egl](https://crates.io/crates/khronos-egl) crate | +| `xlib` | Integration with the [x11](https://crates.io/crates/x11) crate | + +### See Also + +- [glib](https://crates.io/crates/glib) +- [gio](https://crates.io/crates/gio) +- [gsk4](https://crates.io/crates/gsk4) +- [gdk4](https://crates.io/crates/gdk4) +- [gtk4](https://crates.io/crates/gtk4) + +## License + +The Rust bindings of __gdk4-x11__ are available under the MIT License, please refer to it. diff --git a/gdk4-macos/src/auto/macos_device.rs b/gdk4-macos/src/auto/macos_device.rs new file mode 100644 index 000000000000..c3134ffd0f11 --- /dev/null +++ b/gdk4-macos/src/auto/macos_device.rs @@ -0,0 +1,16 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use crate::ffi; + +glib::wrapper! { + #[doc(alias = "GdkMacosDevice")] + pub struct MacosDevice(Object) @extends gdk::Device; + + match fn { + type_ => || ffi::gdk_macos_device_get_type(), + } +} + +impl MacosDevice {} diff --git a/gdk4-macos/src/auto/macos_display.rs b/gdk4-macos/src/auto/macos_display.rs new file mode 100644 index 000000000000..14b1cc78bff9 --- /dev/null +++ b/gdk4-macos/src/auto/macos_display.rs @@ -0,0 +1,16 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use crate::ffi; + +glib::wrapper! { + #[doc(alias = "GdkMacosDisplay")] + pub struct MacosDisplay(Object) @extends gdk::Display; + + match fn { + type_ => || ffi::gdk_macos_display_get_type(), + } +} + +impl MacosDisplay {} diff --git a/gdk4-macos/src/auto/macos_gl_context.rs b/gdk4-macos/src/auto/macos_gl_context.rs new file mode 100644 index 000000000000..02c418cde55c --- /dev/null +++ b/gdk4-macos/src/auto/macos_gl_context.rs @@ -0,0 +1,16 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use crate::ffi; + +glib::wrapper! { + #[doc(alias = "GdkMacosGLContext")] + pub struct MacosGLContext(Object) @extends gdk::GLContext, gdk::DrawContext; + + match fn { + type_ => || ffi::gdk_macos_gl_context_get_type(), + } +} + +impl MacosGLContext {} diff --git a/gdk4-macos/src/auto/macos_keymap.rs b/gdk4-macos/src/auto/macos_keymap.rs new file mode 100644 index 000000000000..1f73318e06e1 --- /dev/null +++ b/gdk4-macos/src/auto/macos_keymap.rs @@ -0,0 +1,16 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use crate::ffi; + +glib::wrapper! { + #[doc(alias = "GdkMacosKeymap")] + pub struct MacosKeymap(Object); + + match fn { + type_ => || ffi::gdk_macos_keymap_get_type(), + } +} + +impl MacosKeymap {} diff --git a/gdk4-macos/src/auto/macos_monitor.rs b/gdk4-macos/src/auto/macos_monitor.rs new file mode 100644 index 000000000000..9d8e5a837aaf --- /dev/null +++ b/gdk4-macos/src/auto/macos_monitor.rs @@ -0,0 +1,43 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use crate::ffi; +use glib::{prelude::*, translate::*}; + +glib::wrapper! { + #[doc(alias = "GdkMacosMonitor")] + pub struct MacosMonitor(Object) @extends gdk::Monitor; + + match fn { + type_ => || ffi::gdk_macos_monitor_get_type(), + } +} + +impl MacosMonitor { + #[doc(alias = "gdk_macos_monitor_get_geometry")] + #[doc(alias = "get_geometry")] + pub fn geometry(self_: &impl IsA, geometry: &mut gdk::Rectangle) { + assert_initialized_main_thread!(); + unsafe { + ffi::gdk_macos_monitor_get_geometry( + self_.as_ref().to_glib_none().0, + geometry.to_glib_none_mut().0, + ); + } + } + + #[doc(alias = "gdk_macos_monitor_get_workarea")] + #[doc(alias = "get_workarea")] + pub fn workarea(monitor: &impl IsA) -> gdk::Rectangle { + assert_initialized_main_thread!(); + unsafe { + let mut geometry = gdk::Rectangle::uninitialized(); + ffi::gdk_macos_monitor_get_workarea( + monitor.as_ref().to_glib_none().0, + geometry.to_glib_none_mut().0, + ); + geometry + } + } +} diff --git a/gdk4-macos/src/auto/macos_seat.rs b/gdk4-macos/src/auto/macos_seat.rs new file mode 100644 index 000000000000..c85a1f761d92 --- /dev/null +++ b/gdk4-macos/src/auto/macos_seat.rs @@ -0,0 +1,16 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use crate::ffi; + +glib::wrapper! { + #[doc(alias = "GdkMacosSeat")] + pub struct MacosSeat(Object) @extends gdk::Seat; + + match fn { + type_ => || ffi::gdk_macos_seat_get_type(), + } +} + +impl MacosSeat {} diff --git a/gdk4-macos/src/auto/macos_surface.rs b/gdk4-macos/src/auto/macos_surface.rs new file mode 100644 index 000000000000..8dc628bd49ec --- /dev/null +++ b/gdk4-macos/src/auto/macos_surface.rs @@ -0,0 +1,57 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use crate::ffi; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::boxed::Box as Box_; + +glib::wrapper! { + #[doc(alias = "GdkMacosSurface")] + pub struct MacosSurface(Object) @extends gdk::Surface; + + match fn { + type_ => || ffi::gdk_macos_surface_get_type(), + } +} + +impl MacosSurface { + //#[cfg(feature = "v4_8")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] + //#[doc(alias = "gdk_macos_surface_get_native_window")] + //#[doc(alias = "get_native_window")] + //pub fn native_window(&self) -> /*Unimplemented*/Option { + // unsafe { TODO: call ffi:gdk_macos_surface_get_native_window() } + //} + + //pub fn native(&self) -> /*Unimplemented*/Basic: Pointer { + // ObjectExt::property(self, "native") + //} + + #[doc(alias = "native")] + pub fn connect_native_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_native_trampoline( + this: *mut ffi::GdkMacosSurface, + _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 _, + b"notify::native\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_native_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } +} diff --git a/gdk4-macos/src/auto/mod.rs b/gdk4-macos/src/auto/mod.rs new file mode 100644 index 000000000000..94440ae4e7ec --- /dev/null +++ b/gdk4-macos/src/auto/mod.rs @@ -0,0 +1,24 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +mod macos_device; +pub use self::macos_device::MacosDevice; + +mod macos_display; +pub use self::macos_display::MacosDisplay; + +mod macos_gl_context; +pub use self::macos_gl_context::MacosGLContext; + +mod macos_keymap; +pub use self::macos_keymap::MacosKeymap; + +mod macos_monitor; +pub use self::macos_monitor::MacosMonitor; + +mod macos_seat; +pub use self::macos_seat::MacosSeat; + +mod macos_surface; +pub use self::macos_surface::MacosSurface; diff --git a/gdk4-macos/src/auto/versions.txt b/gdk4-macos/src/auto/versions.txt new file mode 100644 index 000000000000..bba14f1d708d --- /dev/null +++ b/gdk4-macos/src/auto/versions.txt @@ -0,0 +1,2 @@ +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gdk4-macos/src/lib.rs b/gdk4-macos/src/lib.rs new file mode 100644 index 000000000000..c9ff34a3d8b2 --- /dev/null +++ b/gdk4-macos/src/lib.rs @@ -0,0 +1,18 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#![doc = include_str!("../README.md")] +#![allow(deprecated)] +#![cfg_attr(docsrs, feature(doc_cfg))] + +pub use gdk; +pub use gdk4_macos_sys as ffi; +pub use gio; +pub use glib; +#[macro_use] +mod rt; + +mod auto; + +pub mod prelude; + +pub use auto::*; diff --git a/gdk4-macos/src/prelude.rs b/gdk4-macos/src/prelude.rs new file mode 100644 index 000000000000..8c10e121793f --- /dev/null +++ b/gdk4-macos/src/prelude.rs @@ -0,0 +1,7 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +// rustdoc-stripper-ignore-next +//! Traits intended for blanket imports. + +#[doc(hidden)] +pub use gdk::prelude::*; diff --git a/gdk4-macos/src/rt.rs b/gdk4-macos/src/rt.rs new file mode 100644 index 000000000000..917563e7bff9 --- /dev/null +++ b/gdk4-macos/src/rt.rs @@ -0,0 +1,10 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +macro_rules! assert_initialized_main_thread { + () => {}; +} + +/// No-op. +macro_rules! skip_assert_initialized { + () => {}; +} diff --git a/gdk4-macos/sys/Cargo.toml b/gdk4-macos/sys/Cargo.toml new file mode 100644 index 000000000000..64df27ded78f --- /dev/null +++ b/gdk4-macos/sys/Cargo.toml @@ -0,0 +1,64 @@ +[package] +name = "gdk4-macos-sys" +build = "build.rs" +description = "FFI bindings of GDK4 macos" +documentation = "https://gtk-rs.org/gtk4-rs/git/docs/gdk4_macos_sys/" +keywords = ["gdk4", "gdk4-macos", "ffi", "gtk-rs", "gnome"] + +[package.authors] +workspace = true + +[package.categories] +workspace = true + +[package.edition] +workspace = true + +[package.homepage] +workspace = true + +[package.license] +workspace = true + +[package.repository] +workspace = true + +[package.rust-version] +workspace = true + +[package.version] +workspace = true + +[package.metadata.docs.rs] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +all-features = true + +[package.metadata.system-deps.gtk4_macos] +name = "gtk4-macos" +version = "4" + +[package.metadata.system-deps.gtk4_macos.v4_8] +version = "4.8" + +[lib] +name = "gdk4_macos_sys" + +[features] +v4_8 = [] + +[dependencies] +libc = "0.2" + +[dependencies.gdk4-sys] +workspace = true + +[dependencies.glib-sys] +workspace = true + +[build-dependencies] +system-deps = "7" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" diff --git a/gdk4-macos/sys/Gir.toml b/gdk4-macos/sys/Gir.toml new file mode 100644 index 000000000000..768073d79f4c --- /dev/null +++ b/gdk4-macos/sys/Gir.toml @@ -0,0 +1,14 @@ +[options] +work_mode = "sys" +library = "GdkMacos" +version = "4.0" +min_cfg_version = "4.0.0" +single_version_file = "." +girs_directories = ["../../gir-files"] + +external_libraries = [ + "GLib", +] + +[external_libraries] +gdk4 = "Gdk" diff --git a/gdk4-macos/sys/LICENSE b/gdk4-macos/sys/LICENSE new file mode 120000 index 000000000000..30cff7403da0 --- /dev/null +++ b/gdk4-macos/sys/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/gdk4-macos/sys/build.rs b/gdk4-macos/sys/build.rs new file mode 100644 index 000000000000..e98844f2d792 --- /dev/null +++ b/gdk4-macos/sys/build.rs @@ -0,0 +1,17 @@ +// 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 + +#[cfg(not(docsrs))] +use std::process; + +#[cfg(docsrs)] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(docsrs))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + println!("cargo:warning={s}"); + process::exit(1); + } +} diff --git a/gdk4-macos/sys/src/lib.rs b/gdk4-macos/sys/src/lib.rs new file mode 100644 index 000000000000..f067cb202945 --- /dev/null +++ b/gdk4-macos/sys/src/lib.rs @@ -0,0 +1,240 @@ +// 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(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal, + clippy::upper_case_acronyms +)] +#![cfg_attr(docsrs, feature(doc_cfg))] + +use gdk4_sys as gdk; +use glib_sys as glib; + +#[cfg(unix)] +#[allow(unused_imports)] +use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t}; +#[allow(unused_imports)] +use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE}; +#[allow(unused_imports)] +use std::ffi::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Records +#[repr(C)] +#[allow(dead_code)] +pub struct _GdkMacosDeviceClass { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GdkMacosDeviceClass = _GdkMacosDeviceClass; + +#[repr(C)] +#[allow(dead_code)] +pub struct _GdkMacosDisplayClass { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GdkMacosDisplayClass = _GdkMacosDisplayClass; + +#[repr(C)] +#[allow(dead_code)] +pub struct _GdkMacosGLContextClass { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GdkMacosGLContextClass = _GdkMacosGLContextClass; + +#[repr(C)] +#[allow(dead_code)] +pub struct _GdkMacosKeymapClass { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GdkMacosKeymapClass = _GdkMacosKeymapClass; + +#[repr(C)] +#[allow(dead_code)] +pub struct _GdkMacosMonitorClass { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GdkMacosMonitorClass = _GdkMacosMonitorClass; + +#[repr(C)] +#[allow(dead_code)] +pub struct _GdkMacosSeatClass { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GdkMacosSeatClass = _GdkMacosSeatClass; + +#[repr(C)] +#[allow(dead_code)] +pub struct _GdkMacosSurfaceClass { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GdkMacosSurfaceClass = _GdkMacosSurfaceClass; + +// Classes +#[repr(C)] +#[allow(dead_code)] +pub struct GdkMacosDevice { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GdkMacosDevice { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GdkMacosDevice @ {self:p}")) + .finish() + } +} + +#[repr(C)] +#[allow(dead_code)] +pub struct GdkMacosDisplay { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GdkMacosDisplay { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GdkMacosDisplay @ {self:p}")) + .finish() + } +} + +#[repr(C)] +#[allow(dead_code)] +pub struct GdkMacosGLContext { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GdkMacosGLContext { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GdkMacosGLContext @ {self:p}")) + .finish() + } +} + +#[repr(C)] +#[allow(dead_code)] +pub struct GdkMacosKeymap { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GdkMacosKeymap { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GdkMacosKeymap @ {self:p}")) + .finish() + } +} + +#[repr(C)] +#[allow(dead_code)] +pub struct GdkMacosMonitor { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GdkMacosMonitor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GdkMacosMonitor @ {self:p}")) + .finish() + } +} + +#[repr(C)] +#[allow(dead_code)] +pub struct GdkMacosSeat { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GdkMacosSeat { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GdkMacosSeat @ {self:p}")).finish() + } +} + +#[repr(C)] +#[allow(dead_code)] +pub struct GdkMacosSurface { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GdkMacosSurface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GdkMacosSurface @ {self:p}")) + .finish() + } +} + +extern "C" { + + //========================================================================= + // GdkMacosDevice + //========================================================================= + pub fn gdk_macos_device_get_type() -> GType; + + //========================================================================= + // GdkMacosDisplay + //========================================================================= + pub fn gdk_macos_display_get_type() -> GType; + + //========================================================================= + // GdkMacosGLContext + //========================================================================= + pub fn gdk_macos_gl_context_get_type() -> GType; + + //========================================================================= + // GdkMacosKeymap + //========================================================================= + pub fn gdk_macos_keymap_get_type() -> GType; + + //========================================================================= + // GdkMacosMonitor + //========================================================================= + pub fn gdk_macos_monitor_get_type() -> GType; + pub fn gdk_macos_monitor_get_geometry( + self_: *mut gdk::GdkMonitor, + geometry: *mut gdk::GdkRectangle, + ); + pub fn gdk_macos_monitor_get_workarea( + monitor: *mut gdk::GdkMonitor, + geometry: *mut gdk::GdkRectangle, + ); + + //========================================================================= + // GdkMacosSeat + //========================================================================= + pub fn gdk_macos_seat_get_type() -> GType; + + //========================================================================= + // GdkMacosSurface + //========================================================================= + pub fn gdk_macos_surface_get_type() -> GType; + #[cfg(feature = "v4_8")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] + pub fn gdk_macos_surface_get_native_window(self_: *mut GdkMacosSurface) -> gpointer; + +} diff --git a/gdk4-macos/sys/versions.txt b/gdk4-macos/sys/versions.txt new file mode 100644 index 000000000000..bba14f1d708d --- /dev/null +++ b/gdk4-macos/sys/versions.txt @@ -0,0 +1,2 @@ +Generated by gir (https://github.com/gtk-rs/gir @ e06125dad46a) +from gir-files (https://github.com/gtk-rs/gir-files @ 01066bc7d926) diff --git a/gdk4-macos/tests/check_gir.rs b/gdk4-macos/tests/check_gir.rs new file mode 100644 index 000000000000..2ccf5ff05bcf --- /dev/null +++ b/gdk4-macos/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{res}"); + assert_eq!(res.nb_errors, 0); +} From b672cd396973a81cb8a159b67e5662836d7a0381 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 13 Nov 2024 08:01:19 +0100 Subject: [PATCH 08/25] gdk4-macos: Ignore Monitor.get_geometry The function does not have any implementation --- gdk4-macos/Gir.toml | 8 +++++++- gdk4-macos/src/auto/macos_monitor.rs | 12 ------------ gdk4-macos/sys/Gir.toml | 8 ++++++++ gdk4-macos/sys/src/lib.rs | 4 ---- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/gdk4-macos/Gir.toml b/gdk4-macos/Gir.toml index 443dcfd05f42..1deea6c27fb7 100644 --- a/gdk4-macos/Gir.toml +++ b/gdk4-macos/Gir.toml @@ -16,7 +16,6 @@ generate = [ "GdkMacos.MacosDisplay", "GdkMacos.MacosGLContext", "GdkMacos.MacosKeymap", - "GdkMacos.MacosMonitor", "GdkMacos.MacosSeat", "GdkMacos.MacosSurface", ] @@ -31,3 +30,10 @@ manual = [ "Gdk.Seat", "Gdk.Surface", ] + +[[object]] +name = "GdkMacos.MacosMonitor" +status = "generate" + [[object.function]] + name = "get_geometry" + ignore = true # The function does not exists \ No newline at end of file diff --git a/gdk4-macos/src/auto/macos_monitor.rs b/gdk4-macos/src/auto/macos_monitor.rs index 9d8e5a837aaf..f5c37a7c7199 100644 --- a/gdk4-macos/src/auto/macos_monitor.rs +++ b/gdk4-macos/src/auto/macos_monitor.rs @@ -15,18 +15,6 @@ glib::wrapper! { } impl MacosMonitor { - #[doc(alias = "gdk_macos_monitor_get_geometry")] - #[doc(alias = "get_geometry")] - pub fn geometry(self_: &impl IsA, geometry: &mut gdk::Rectangle) { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_macos_monitor_get_geometry( - self_.as_ref().to_glib_none().0, - geometry.to_glib_none_mut().0, - ); - } - } - #[doc(alias = "gdk_macos_monitor_get_workarea")] #[doc(alias = "get_workarea")] pub fn workarea(monitor: &impl IsA) -> gdk::Rectangle { diff --git a/gdk4-macos/sys/Gir.toml b/gdk4-macos/sys/Gir.toml index 768073d79f4c..ffa3e359a2d3 100644 --- a/gdk4-macos/sys/Gir.toml +++ b/gdk4-macos/sys/Gir.toml @@ -12,3 +12,11 @@ external_libraries = [ [external_libraries] gdk4 = "Gdk" + + +[[object]] +name = "GdkMacos.MacosMonitor" +status = "generate" + [[object.function]] + name = "get_geometry" + ignore = true # The function does not exists \ No newline at end of file diff --git a/gdk4-macos/sys/src/lib.rs b/gdk4-macos/sys/src/lib.rs index f067cb202945..5ee3081c0460 100644 --- a/gdk4-macos/sys/src/lib.rs +++ b/gdk4-macos/sys/src/lib.rs @@ -215,10 +215,6 @@ extern "C" { // GdkMacosMonitor //========================================================================= pub fn gdk_macos_monitor_get_type() -> GType; - pub fn gdk_macos_monitor_get_geometry( - self_: *mut gdk::GdkMonitor, - geometry: *mut gdk::GdkRectangle, - ); pub fn gdk_macos_monitor_get_workarea( monitor: *mut gdk::GdkMonitor, geometry: *mut gdk::GdkRectangle, From 71b06b94f42bdbb30c28436aa85b9857e97d0221 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 13 Nov 2024 08:04:08 +0100 Subject: [PATCH 09/25] gdk4-macos: Export v4.8 feature and fixup readme --- gdk4-macos/Cargo.toml | 1 + gdk4-macos/README.md | 20 ++++++++------------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/gdk4-macos/Cargo.toml b/gdk4-macos/Cargo.toml index 78a6c78b02e5..6c6824625630 100644 --- a/gdk4-macos/Cargo.toml +++ b/gdk4-macos/Cargo.toml @@ -14,6 +14,7 @@ rust-version.workspace = true version.workspace = true [features] +v4_8 = ["gdk4-macos-sys/v4_8"] [dependencies] gdk4-macos-sys.workspace = true diff --git a/gdk4-macos/README.md b/gdk4-macos/README.md index 763e17ed6638..ed78d169e6a1 100644 --- a/gdk4-macos/README.md +++ b/gdk4-macos/README.md @@ -1,12 +1,12 @@ -# Rust GDK 4 X11 bindings +# Rust GDK 4 Macos bindings The project website is [here](https://gtk-rs.org/). -Rust bindings of [GDK 4's X11 backend](https://docs.gtk.org/gdk4-x11/), +Rust bindings of GDK 4's Macos backend, part of [gtk4-rs](https://github.com/gtk-rs/gtk4-rs/). GDK is an intermediate layer that isolates GTK from the details of the windowing system. -GDK X11 contains functions specific to the X11 backend. +GDK Macos contains functions specific to the Macos backend. ## Minimum supported Rust version @@ -14,8 +14,8 @@ Currently, the minimum supported Rust version is `1.80`. ## Documentation -- The Rust API [Stable](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_x11)/[Development](https://gtk-rs.org/gtk4-rs/git/docs/gdk4_x11/) -- [The C API](https://docs.gtk.org/gdk4-x11/) +- The Rust API [Stable](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_macos)/[Development](https://gtk-rs.org/gtk4-rs/git/docs/gdk4_macos/) +- [The C API](https://docs.gtk.org/gdk4-macos/) - [GTK Installation instructions](https://www.gtk.org/docs/installations/) ## Using @@ -35,7 +35,7 @@ Avoid mixing versioned and git crates like this: ```toml # This will not compile [dependencies] -gdk-x11 = {version = "0.1", package = "gdk4-x11"} +gdk-macos = {version = "0.1", package = "gdk4-macos"} gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-wayland" } ``` @@ -43,11 +43,7 @@ gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-w | Feature | Description | | --- | ----------- | -| `v4_16` | Enable the new APIs part of GTK 4.16 | -| `v4_10` | Enable the new APIs part of GTK 4.10 | -| `v4_4` | Enable the new APIs part of GTK 4.4 | -| `egl` | Integration with the [khronos-egl](https://crates.io/crates/khronos-egl) crate | -| `xlib` | Integration with the [x11](https://crates.io/crates/x11) crate | +| `v4_8` | Enable the new APIs part of GTK 4.8 | ### See Also @@ -59,4 +55,4 @@ gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-w ## License -The Rust bindings of __gdk4-x11__ are available under the MIT License, please refer to it. +The Rust bindings of __gdk4-macos__ are available under the MIT License, please refer to it. From 633cb0f0d4055325b9e78360b9f6bf18632651e8 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 13 Nov 2024 08:07:04 +0100 Subject: [PATCH 10/25] ci: Build & test gdk4-macos --- .github/workflows/CI.yml | 1 + .github/workflows/macos.yml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f4eb9dae1fe7..1843b2116a33 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -166,6 +166,7 @@ jobs: - { name: "gtk4", is_macros_crate: false } - { name: "gdk4", is_macros_crate: false } - { name: "gsk4", is_macros_crate: false } + - { name: "gdk4-macos", is_macros_crate: false } - { name: "gdk4-x11", is_macros_crate: false } - { name: "gdk4-wayland", is_macros_crate: false } - { name: "gdk4-win32", is_macros_crate: false } diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 47e0b03ee6d6..3b267ad1fbc6 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -52,3 +52,19 @@ jobs: # with: # command: test # args: --features v4_8,xml_validation + + - name: Build gdk4-macos + uses: actions-rs/cargo@v1 + with: + command: build + args: --features v4_8 --manifest-path ./gdk4-macos/Cargo.toml + - name: Clippy gdk4-macos + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --features v4_8 --manifest-path ./gdk4-macos/Cargo.toml + - name: Tests gdk4-macos + uses: actions-rs/cargo@v1 + with: + command: test + args: --features v4_8 --manifest-path ./gdk4-macos/Cargo.toml From ced5fce1be185eadfd7c7a9dcfb354073005e327 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 13 Nov 2024 08:07:57 +0100 Subject: [PATCH 11/25] readme: Add gdk4-macos --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ffac7bf2c5c3..fdf64fab29b5 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ A group of crates that aims to provide complete [GTK](https://gtk.org/) 4 bindin - [GTK](./gtk4) - [GDK](./gdk4): An intermediate layer which isolates GTK from the details of the windowing system. + - [GDK Macos](./gdk4-macos): Macos backend specific functions. - [GDK Wayland](./gdk4-wayland): Wayland backend specific functions. - [GDK Win32](./gdk4-win32): Windows backend specific functions. - [GDK X11](./gdk4-x11): X backend specific functions. From c660f412d0d6c00d5879d9d818fcf1913475d9b2 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 13 Nov 2024 08:09:35 +0100 Subject: [PATCH 12/25] ci: Build & deploy gdk4-macos docs --- .github/workflows/CI.yml | 2 ++ .github/workflows/docs.yml | 3 +++ .github/workflows/macos.yml | 2 ++ 3 files changed, 7 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1843b2116a33..ea076e9fd318 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,6 +6,7 @@ on: - ".github/workflows/CI.yml" - "examples/**" - "gdk4/**" + - "gdk4-macos/**" - "gdk4-wayland/**" - "gdk4-win32/**" - "gdk4-x11/**" @@ -17,6 +18,7 @@ on: - ".github/workflows/CI.yml" - "examples/**" - "gdk4/**" + - "gdk4-macos/**" - "gdk4-wayland/**" - "gdk4-win32/**" - "gdk4-x11/**" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index edc73919401c..2578c052e631 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,6 +6,7 @@ on: paths: - ".github/workflows/docs.yml" - "gdk4/**" + - "gdk4-macos/**" - "gdk4-wayland/**" - "gdk4-win32/**" - "gdk4-x11/**" @@ -17,6 +18,7 @@ on: paths: - ".github/workflows/docs.yml" - "gdk4/**" + - "gdk4-macos/**" - "gdk4-wayland/**" - "gdk4-win32/**" - "gdk4-x11/**" @@ -82,6 +84,7 @@ jobs: -p gdk4-x11 -p gdk4-x11-sys -p gsk4 -p gsk4-sys -p gtk4 -p gtk4-sys + -p gdk4-macos -p gdk4-macos-sys -p gtk4-macros --all-features --no-deps diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3b267ad1fbc6..24df45178677 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -6,6 +6,7 @@ on: paths: - ".github/workflows/macos.yml" - "gdk4/**" + - "gdk4-macos/**" - "gsk4/**" - "gtk4/**" - "gtk4-macros/**" @@ -13,6 +14,7 @@ on: paths: - ".github/workflows/macos.yml" - "gdk4/**" + - "gdk4-macos/**" - "gsk4/**" - "gtk4/**" - "gtk4-macros/**" From e3fd6db12ddd30db91a0b1aaa9a879cae35ad643 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Wed, 20 Nov 2024 22:59:08 +0100 Subject: [PATCH 13/25] gdk: Generate MemoryTextureBuilder --- gdk4/Gir.toml | 12 +- gdk4/src/auto/memory_texture_builder.rs | 431 ++++++++++++++++++++++++ gdk4/src/auto/mod.rs | 7 + 3 files changed, 449 insertions(+), 1 deletion(-) create mode 100644 gdk4/src/auto/memory_texture_builder.rs diff --git a/gdk4/Gir.toml b/gdk4/Gir.toml index 1f5ddef1cc2b..cbaec4d770f6 100644 --- a/gdk4/Gir.toml +++ b/gdk4/Gir.toml @@ -566,6 +566,16 @@ name = "Gdk.MemoryTexture" status = "generate" concurrency = "send+sync" +[[object]] +name = "Gdk.MemoryTextureBuilder" +status = "generate" +concurrency = "send+sync" + [[object.function]] + name = "set_update_region" + [[object.function.parameter]] + name = "region" + const = true + [[object]] name = "Gdk.Monitor" status = "generate" @@ -668,4 +678,4 @@ name = "Gdk.ToplevelState" status = "generate" [[object.member]] name = "suspended" - version = "4.12" \ No newline at end of file + version = "4.12" diff --git a/gdk4/src/auto/memory_texture_builder.rs b/gdk4/src/auto/memory_texture_builder.rs new file mode 100644 index 000000000000..07a6b36f50fe --- /dev/null +++ b/gdk4/src/auto/memory_texture_builder.rs @@ -0,0 +1,431 @@ +// 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, ColorState, MemoryFormat, Texture}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::boxed::Box as Box_; + +glib::wrapper! { + #[doc(alias = "GdkMemoryTextureBuilder")] + pub struct MemoryTextureBuilder(Object); + + match fn { + type_ => || ffi::gdk_memory_texture_builder_get_type(), + } +} + +impl MemoryTextureBuilder { + #[doc(alias = "gdk_memory_texture_builder_new")] + pub fn new() -> MemoryTextureBuilder { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gdk_memory_texture_builder_new()) } + } + + #[doc(alias = "gdk_memory_texture_builder_build")] + pub fn build(&self) -> Texture { + unsafe { from_glib_full(ffi::gdk_memory_texture_builder_build(self.to_glib_none().0)) } + } + + #[doc(alias = "gdk_memory_texture_builder_get_bytes")] + #[doc(alias = "get_bytes")] + pub fn bytes(&self) -> Option { + unsafe { + from_glib_none(ffi::gdk_memory_texture_builder_get_bytes( + self.to_glib_none().0, + )) + } + } + + #[doc(alias = "gdk_memory_texture_builder_get_color_state")] + #[doc(alias = "get_color_state")] + #[doc(alias = "color-state")] + pub fn color_state(&self) -> ColorState { + unsafe { + from_glib_none(ffi::gdk_memory_texture_builder_get_color_state( + self.to_glib_none().0, + )) + } + } + + #[doc(alias = "gdk_memory_texture_builder_get_format")] + #[doc(alias = "get_format")] + pub fn format(&self) -> MemoryFormat { + unsafe { + from_glib(ffi::gdk_memory_texture_builder_get_format( + self.to_glib_none().0, + )) + } + } + + #[doc(alias = "gdk_memory_texture_builder_get_height")] + #[doc(alias = "get_height")] + pub fn height(&self) -> i32 { + unsafe { ffi::gdk_memory_texture_builder_get_height(self.to_glib_none().0) } + } + + #[doc(alias = "gdk_memory_texture_builder_get_stride")] + #[doc(alias = "get_stride")] + pub fn stride(&self) -> usize { + unsafe { ffi::gdk_memory_texture_builder_get_stride(self.to_glib_none().0) } + } + + #[doc(alias = "gdk_memory_texture_builder_get_update_region")] + #[doc(alias = "get_update_region")] + #[doc(alias = "update-region")] + pub fn update_region(&self) -> Option { + unsafe { + from_glib_none(ffi::gdk_memory_texture_builder_get_update_region( + self.to_glib_none().0, + )) + } + } + + #[doc(alias = "gdk_memory_texture_builder_get_update_texture")] + #[doc(alias = "get_update_texture")] + #[doc(alias = "update-texture")] + pub fn update_texture(&self) -> Option { + unsafe { + from_glib_none(ffi::gdk_memory_texture_builder_get_update_texture( + self.to_glib_none().0, + )) + } + } + + #[doc(alias = "gdk_memory_texture_builder_get_width")] + #[doc(alias = "get_width")] + pub fn width(&self) -> i32 { + unsafe { ffi::gdk_memory_texture_builder_get_width(self.to_glib_none().0) } + } + + #[doc(alias = "gdk_memory_texture_builder_set_bytes")] + #[doc(alias = "bytes")] + pub fn set_bytes(&self, bytes: Option<&glib::Bytes>) { + unsafe { + ffi::gdk_memory_texture_builder_set_bytes( + self.to_glib_none().0, + bytes.to_glib_none().0, + ); + } + } + + #[doc(alias = "gdk_memory_texture_builder_set_color_state")] + #[doc(alias = "color-state")] + pub fn set_color_state(&self, color_state: Option<&ColorState>) { + unsafe { + ffi::gdk_memory_texture_builder_set_color_state( + self.to_glib_none().0, + color_state.to_glib_none().0, + ); + } + } + + #[doc(alias = "gdk_memory_texture_builder_set_format")] + #[doc(alias = "format")] + pub fn set_format(&self, format: MemoryFormat) { + unsafe { + ffi::gdk_memory_texture_builder_set_format(self.to_glib_none().0, format.into_glib()); + } + } + + #[doc(alias = "gdk_memory_texture_builder_set_height")] + #[doc(alias = "height")] + pub fn set_height(&self, height: i32) { + unsafe { + ffi::gdk_memory_texture_builder_set_height(self.to_glib_none().0, height); + } + } + + #[doc(alias = "gdk_memory_texture_builder_set_stride")] + #[doc(alias = "stride")] + pub fn set_stride(&self, stride: usize) { + unsafe { + ffi::gdk_memory_texture_builder_set_stride(self.to_glib_none().0, stride); + } + } + + #[doc(alias = "gdk_memory_texture_builder_set_update_region")] + #[doc(alias = "update-region")] + pub fn set_update_region(&self, region: Option<&cairo::Region>) { + unsafe { + ffi::gdk_memory_texture_builder_set_update_region( + self.to_glib_none().0, + mut_override(region.to_glib_none().0), + ); + } + } + + #[doc(alias = "gdk_memory_texture_builder_set_update_texture")] + #[doc(alias = "update-texture")] + pub fn set_update_texture(&self, texture: Option<&impl IsA>) { + unsafe { + ffi::gdk_memory_texture_builder_set_update_texture( + self.to_glib_none().0, + texture.map(|p| p.as_ref()).to_glib_none().0, + ); + } + } + + #[doc(alias = "gdk_memory_texture_builder_set_width")] + #[doc(alias = "width")] + pub fn set_width(&self, width: i32) { + unsafe { + ffi::gdk_memory_texture_builder_set_width(self.to_glib_none().0, width); + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "bytes")] + pub fn connect_bytes_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_bytes_trampoline< + F: Fn(&MemoryTextureBuilder) + Send + Sync + 'static, + >( + this: *mut ffi::GdkMemoryTextureBuilder, + _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 _, + b"notify::bytes\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_bytes_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "color-state")] + pub fn connect_color_state_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_color_state_trampoline< + F: Fn(&MemoryTextureBuilder) + Send + Sync + 'static, + >( + this: *mut ffi::GdkMemoryTextureBuilder, + _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 _, + b"notify::color-state\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_color_state_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "format")] + pub fn connect_format_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_format_trampoline< + F: Fn(&MemoryTextureBuilder) + Send + Sync + 'static, + >( + this: *mut ffi::GdkMemoryTextureBuilder, + _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 _, + b"notify::format\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_format_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "height")] + pub fn connect_height_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_height_trampoline< + F: Fn(&MemoryTextureBuilder) + Send + Sync + 'static, + >( + this: *mut ffi::GdkMemoryTextureBuilder, + _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 _, + b"notify::height\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_height_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "stride")] + pub fn connect_stride_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_stride_trampoline< + F: Fn(&MemoryTextureBuilder) + Send + Sync + 'static, + >( + this: *mut ffi::GdkMemoryTextureBuilder, + _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 _, + b"notify::stride\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_stride_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "update-region")] + pub fn connect_update_region_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_update_region_trampoline< + F: Fn(&MemoryTextureBuilder) + Send + Sync + 'static, + >( + this: *mut ffi::GdkMemoryTextureBuilder, + _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 _, + b"notify::update-region\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_update_region_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "update-texture")] + pub fn connect_update_texture_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_update_texture_trampoline< + F: Fn(&MemoryTextureBuilder) + Send + Sync + 'static, + >( + this: *mut ffi::GdkMemoryTextureBuilder, + _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 _, + b"notify::update-texture\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_update_texture_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "width")] + pub fn connect_width_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_width_trampoline< + F: Fn(&MemoryTextureBuilder) + Send + Sync + 'static, + >( + this: *mut ffi::GdkMemoryTextureBuilder, + _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 _, + b"notify::width\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_width_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl Default for MemoryTextureBuilder { + fn default() -> Self { + Self::new() + } +} + +unsafe impl Send for MemoryTextureBuilder {} +unsafe impl Sync for MemoryTextureBuilder {} diff --git a/gdk4/src/auto/mod.rs b/gdk4/src/auto/mod.rs index a4cee2ff388f..929a9cd512c0 100644 --- a/gdk4/src/auto/mod.rs +++ b/gdk4/src/auto/mod.rs @@ -114,6 +114,13 @@ pub use self::key_event::KeyEvent; mod memory_texture; pub use self::memory_texture::MemoryTexture; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +mod memory_texture_builder; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +pub use self::memory_texture_builder::MemoryTextureBuilder; + mod monitor; pub use self::monitor::Monitor; From 41753fc2eeb4ab309993a6467a0b4736f7d61c14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 07:34:33 +0000 Subject: [PATCH 14/25] build(deps): bump docker/metadata-action from 5.5.1 to 5.6.1 Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.5.1 to 5.6.1. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/8e5442c4ef9f78752691e2d8f8d19755c6f78e81...369eb591f429131d6889c46b94e711f089e6ca96) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index d7a717c3725e..f4c66847ebc8 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -37,7 +37,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 + uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | From 4dd437954a2f92e91ee88600adc793cc7e89c447 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 07:33:01 +0000 Subject: [PATCH 15/25] build(deps): bump docker/build-push-action from 6.9.0 to 6.10.0 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.9.0 to 6.10.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/4f58ea79222b3b9dc2c8bbdd6debcef730109a75...48aba3b46d1b1fec4febb7c5d0c644b249a11355) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index f4c66847ebc8..2913e45d76e7 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -45,7 +45,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - name: Build and push Docker image - uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c + uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 with: push: ${{ github.event_name != 'pull_request' }} context: . From 962a37d4df97c247b524eeb00ed238ad65e127bd Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Tue, 10 Dec 2024 11:20:43 +0100 Subject: [PATCH 16/25] examples: Fix typos --- examples/custom_orientable/custom_orientable/imp.rs | 2 +- examples/custom_widget/ex_button/imp.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/custom_orientable/custom_orientable/imp.rs b/examples/custom_orientable/custom_orientable/imp.rs index a97c8a29345b..800cd4e0fd43 100644 --- a/examples/custom_orientable/custom_orientable/imp.rs +++ b/examples/custom_orientable/custom_orientable/imp.rs @@ -62,7 +62,7 @@ impl ObjectImpl for CustomOrientable { } fn dispose(&self) { - // Child widgets need to be manually unparented in `dispose()`. + // Child widgets need to be manually un-parented in `dispose()`. if let Some(child) = self.first_label.borrow_mut().take() { child.unparent(); } diff --git a/examples/custom_widget/ex_button/imp.rs b/examples/custom_widget/ex_button/imp.rs index 2a44901e7c61..d985b53f02cd 100644 --- a/examples/custom_widget/ex_button/imp.rs +++ b/examples/custom_widget/ex_button/imp.rs @@ -66,7 +66,7 @@ impl ObjectImpl for ExButton { } fn dispose(&self) { - // Child widgets need to be manually unparented in `dispose()`. + // Child widgets need to be manually un-parented in `dispose()`. if let Some(child) = self.child.borrow_mut().take() { child.unparent(); } From 63ae724670d338127e0c7ce7d38bfa117404e6b2 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Tue, 10 Dec 2024 11:46:29 +0100 Subject: [PATCH 17/25] deny: Allow Unicode-3.0 from unicode-ident --- deny.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/deny.toml b/deny.toml index 5b2c6ed006aa..f7b5b6feb688 100644 --- a/deny.toml +++ b/deny.toml @@ -18,6 +18,7 @@ allow = [ "Apache-2.0 WITH LLVM-exception", "Unicode-DFS-2016", "ISC", + "Unicode-3.0" ] confidence-threshold = 0.8 From 9d4de33b8d4f8cd5af0d0feb2f635e26cd5708df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 18 Dec 2024 10:04:56 +0200 Subject: [PATCH 18/25] deny: Remove obsolete entries --- deny.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/deny.toml b/deny.toml index f7b5b6feb688..02a3bf5f1f46 100644 --- a/deny.toml +++ b/deny.toml @@ -16,7 +16,6 @@ allow = [ "MIT", "Apache-2.0", "Apache-2.0 WITH LLVM-exception", - "Unicode-DFS-2016", "ISC", "Unicode-3.0" ] From 2b981b4775b27a02c99da625baff3ffe81fe6cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 18 Dec 2024 10:07:26 +0200 Subject: [PATCH 19/25] ci: Update macOS CI to macos-14 --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 24df45178677..9d2816a34689 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,7 +23,7 @@ on: jobs: ci-macos: name: macOS - runs-on: macos-12 + runs-on: macos-14 steps: - uses: actions/checkout@v4 From bcc15a74efb02a5ffebe703ceb9d51041ee3d126 Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Mon, 9 Dec 2024 10:45:21 +0100 Subject: [PATCH 20/25] gdk4-macos: manually implement native_window method For now we need to depend on the cocoa crate in order to implement this method since it is the only decent crate implementing the cocoa api. --- .github/workflows/macos.yml | 6 +- Cargo.lock | 116 +++++++++++++++++++++++++++ gdk4-macos/Cargo.toml | 2 + gdk4-macos/Gir.toml | 14 +++- gdk4-macos/README.md | 1 + gdk4-macos/src/auto/macos_surface.rs | 12 --- gdk4-macos/src/lib.rs | 12 +++ gdk4-macos/src/macos_surface.rs | 29 +++++++ 8 files changed, 175 insertions(+), 17 deletions(-) create mode 100644 gdk4-macos/src/macos_surface.rs diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9d2816a34689..c72571e76423 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -59,14 +59,14 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - args: --features v4_8 --manifest-path ./gdk4-macos/Cargo.toml + args: --features cocoa,v4_8 --manifest-path ./gdk4-macos/Cargo.toml - name: Clippy gdk4-macos uses: actions-rs/cargo@v1 with: command: clippy - args: --features v4_8 --manifest-path ./gdk4-macos/Cargo.toml + args: --features cocoa,v4_8 --manifest-path ./gdk4-macos/Cargo.toml - name: Tests gdk4-macos uses: actions-rs/cargo@v1 with: command: test - args: --features v4_8 --manifest-path ./gdk4-macos/Cargo.toml + args: --features cocoa,v4_8 --manifest-path ./gdk4-macos/Cargo.toml diff --git a/Cargo.lock b/Cargo.lock index 99e6b3c87c08..f5c3629e5620 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -101,6 +101,12 @@ dependencies = [ "typenum", ] +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + [[package]] name = "bumpalo" version = "3.16.0" @@ -211,6 +217,36 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "cocoa" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" +dependencies = [ + "bitflags 2.6.0", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d" +dependencies = [ + "bitflags 2.6.0", + "block", + "core-foundation", + "core-graphics-types", + "libc", + "objc", +] + [[package]] name = "color_quant" version = "1.1.0" @@ -226,12 +262,46 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core-graphics" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "libc", +] + [[package]] name = "core_maths" version = "0.1.0" @@ -366,6 +436,33 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -480,6 +577,7 @@ dependencies = [ name = "gdk4-macos" version = "0.9.4" dependencies = [ + "cocoa", "gdk4", "gdk4-macos-sys", "gio", @@ -1316,6 +1414,15 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + [[package]] name = "memchr" version = "2.7.4" @@ -1367,6 +1474,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + [[package]] name = "object" version = "0.36.5" diff --git a/gdk4-macos/Cargo.toml b/gdk4-macos/Cargo.toml index 6c6824625630..c22026b17ae4 100644 --- a/gdk4-macos/Cargo.toml +++ b/gdk4-macos/Cargo.toml @@ -15,6 +15,7 @@ version.workspace = true [features] v4_8 = ["gdk4-macos-sys/v4_8"] +cocoa = ["dep:cocoa"] [dependencies] gdk4-macos-sys.workspace = true @@ -22,6 +23,7 @@ gdk.workspace = true gio.workspace = true glib.workspace = true libc.workspace = true +cocoa = { version = "0.26", default-features = false, optional = true } [dev-dependencies] gir-format-check.workspace = true diff --git a/gdk4-macos/Gir.toml b/gdk4-macos/Gir.toml index 1deea6c27fb7..5e1cbbec5e83 100644 --- a/gdk4-macos/Gir.toml +++ b/gdk4-macos/Gir.toml @@ -17,7 +17,6 @@ generate = [ "GdkMacos.MacosGLContext", "GdkMacos.MacosKeymap", "GdkMacos.MacosSeat", - "GdkMacos.MacosSurface", ] manual = [ @@ -36,4 +35,15 @@ name = "GdkMacos.MacosMonitor" status = "generate" [[object.function]] name = "get_geometry" - ignore = true # The function does not exists \ No newline at end of file + ignore = true # The function does not exists + +[[object]] +name = "GdkMacos.MacosSurface" +status = "generate" + [[object.function]] + name = "get_native_window" + manual = true + rename = "native" + [[object.property]] + name = "native" + generate = ["notify"] diff --git a/gdk4-macos/README.md b/gdk4-macos/README.md index ed78d169e6a1..f14bb698d00c 100644 --- a/gdk4-macos/README.md +++ b/gdk4-macos/README.md @@ -44,6 +44,7 @@ gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-w | Feature | Description | | --- | ----------- | | `v4_8` | Enable the new APIs part of GTK 4.8 | +| `cocoa` | Integration with the [cocoa](https://crates.io/crates/cocoa) crate | ### See Also diff --git a/gdk4-macos/src/auto/macos_surface.rs b/gdk4-macos/src/auto/macos_surface.rs index 8dc628bd49ec..940bbfd288fb 100644 --- a/gdk4-macos/src/auto/macos_surface.rs +++ b/gdk4-macos/src/auto/macos_surface.rs @@ -20,18 +20,6 @@ glib::wrapper! { } impl MacosSurface { - //#[cfg(feature = "v4_8")] - //#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] - //#[doc(alias = "gdk_macos_surface_get_native_window")] - //#[doc(alias = "get_native_window")] - //pub fn native_window(&self) -> /*Unimplemented*/Option { - // unsafe { TODO: call ffi:gdk_macos_surface_get_native_window() } - //} - - //pub fn native(&self) -> /*Unimplemented*/Basic: Pointer { - // ObjectExt::property(self, "native") - //} - #[doc(alias = "native")] pub fn connect_native_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_native_trampoline( diff --git a/gdk4-macos/src/lib.rs b/gdk4-macos/src/lib.rs index c9ff34a3d8b2..ae80203a7d53 100644 --- a/gdk4-macos/src/lib.rs +++ b/gdk4-macos/src/lib.rs @@ -4,6 +4,9 @@ #![allow(deprecated)] #![cfg_attr(docsrs, feature(doc_cfg))] +#[cfg(not(feature = "cocoa"))] +use std::ffi::c_void; + pub use gdk; pub use gdk4_macos_sys as ffi; pub use gio; @@ -16,3 +19,12 @@ mod auto; pub mod prelude; pub use auto::*; + +mod macos_surface; + +#[cfg(not(feature = "cocoa"))] +#[allow(non_camel_case_types)] +pub type id = *mut c_void; + +#[cfg(feature = "cocoa")] +pub use cocoa::base::id; diff --git a/gdk4-macos/src/macos_surface.rs b/gdk4-macos/src/macos_surface.rs new file mode 100644 index 000000000000..ade6daa03c44 --- /dev/null +++ b/gdk4-macos/src/macos_surface.rs @@ -0,0 +1,29 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[cfg(feature = "v4_8")] +use crate::ffi; +#[cfg(not(feature = "v4_8"))] +use crate::prelude::*; +use crate::{id, MacosSurface}; +#[cfg(feature = "v4_8")] +use glib::translate::*; +#[cfg(not(feature = "v4_8"))] +use std::ffi::c_void; + +impl MacosSurface { + #[doc(alias = "gdk_macos_surface_get_native_window")] + #[doc(alias = "get_native_window")] + pub fn native(&self) -> id { + #[cfg(feature = "v4_8")] + unsafe { + let native_window_ptr = ffi::gdk_macos_surface_get_native_window(self.to_glib_none().0); + native_window_ptr as id + } + + #[cfg(not(feature = "v4_8"))] + { + let native_window_ptr: *mut c_void = ObjectExt::property(self, "native"); + native_window_ptr as id + } + } +} From baaf90ce9dbe69f5ad40183d2feb2b87da50f72d Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Mon, 9 Dec 2024 13:02:50 +0100 Subject: [PATCH 21/25] README: point to gdk4-macos instead of wayland --- gdk4-macos/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk4-macos/README.md b/gdk4-macos/README.md index f14bb698d00c..cfe0fd03bef2 100644 --- a/gdk4-macos/README.md +++ b/gdk4-macos/README.md @@ -27,7 +27,7 @@ If you want to track the bleeding edge, use the git dependency instead: ```toml [dependencies] -gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-wayland" } +gdk-macos = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-macos" } ``` Avoid mixing versioned and git crates like this: From 995cd16aa095bb91023a890f63991d229abb6112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 18 Dec 2024 10:21:34 +0200 Subject: [PATCH 22/25] gtk4-macros: Wait for blueprint-compiler process in all branches Otherwise clippy complains and zombie processes might stay around. Also make sure to never panic on normal errors for the same reason, and provide more useful error messages. --- gtk4-macros/src/blueprint.rs | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/gtk4-macros/src/blueprint.rs b/gtk4-macros/src/blueprint.rs index a10e0a59c502..7bea1ecb7954 100644 --- a/gtk4-macros/src/blueprint.rs +++ b/gtk4-macros/src/blueprint.rs @@ -1,28 +1,36 @@ // Take a look at the license at the top of the repository in the LICENSE file. use std::{ - io::{Error, ErrorKind, Read, Result, Write}, + io::Write, process::{Command, Stdio}, }; -pub(crate) fn compile_blueprint(blueprint: &[u8]) -> Result { +pub(crate) fn compile_blueprint(blueprint: &[u8]) -> Result { let mut compiler = Command::new("blueprint-compiler") .args(["compile", "-"]) .stdin(Stdio::piped()) .stdout(Stdio::piped()) .spawn() - .unwrap_or_else(|_| panic!("blueprint-compiler not found")); - + .map_err(|e| format!("blueprint-compiler couldn't be spawned: {e}"))?; let mut stdin = compiler.stdin.take().unwrap(); - stdin.write_all(b"using Gtk 4.0;\n")?; - stdin.write_all(blueprint)?; + if let Err(e) = stdin + .write_all(b"using Gtk 4.0;\n") + .and_then(|_| stdin.write_all(blueprint)) + { + let _ = compiler.wait(); + return Err(format!( + "Couldn't send blueprint to blueprint-compiler: {e}" + )); + } drop(stdin); - let mut buf = String::new(); - compiler.stdout.unwrap().read_to_string(&mut buf)?; + let output = compiler + .wait_with_output() + .map_err(|e| format!("blueprint-compiler process failed: {e}"))?; + let buf = String::from_utf8(output.stdout).unwrap(); if !buf.starts_with('<') { - return Err(Error::new(ErrorKind::Other, buf)); + return Err(format!("blueprint-compiler failed: {buf}")); } Ok(buf) From cf95bb85f991a48b496f7b01a7b68d448c0e614f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 18 Dec 2024 20:26:47 +0200 Subject: [PATCH 23/25] Update Cargo.lock --- Cargo.lock | 313 +++++++++++++++++++++++++++-------------------------- 1 file changed, 162 insertions(+), 151 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f5c3629e5620..646078c35e1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -115,9 +115,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" dependencies = [ "bytemuck_derive", ] @@ -147,14 +147,14 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "cairo-rs" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "bitflags 2.6.0", "cairo-sys-rs", @@ -164,8 +164,8 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "glib-sys", "libc", @@ -174,18 +174,18 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.37" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" +checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" dependencies = [ "shlex", ] [[package]] name = "cfg-expr" -version = "0.17.0" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0890061c4d3223e7267f3bad2ec40b997d64faac1c2815a4a9d95018e2b9e9c" +checksum = "8d4ba6e40bd1184518716a6e1a781bf9160e286d219ccdb8ab2612e74cfe4789" dependencies = [ "smallvec", "target-lexicon", @@ -205,9 +205,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -313,9 +313,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "displaydoc" @@ -363,12 +363,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -384,9 +384,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" dependencies = [ "event-listener", "pin-project-lite", @@ -394,9 +394,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "femtovg" @@ -537,8 +537,8 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "gdk-pixbuf-sys", "gio", @@ -548,8 +548,8 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "gio-sys", "glib-sys", @@ -700,8 +700,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -722,8 +724,8 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gio" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "futures-channel", "futures-core", @@ -738,14 +740,14 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -782,13 +784,13 @@ checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" dependencies = [ "khronos_api 3.1.0", "log", - "xml-rs 0.8.23", + "xml-rs 0.8.24", ] [[package]] name = "glib" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "bitflags 2.6.0", "futures-channel", @@ -807,8 +809,8 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "heck", "proc-macro-crate", @@ -819,8 +821,8 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "libc", "system-deps", @@ -859,8 +861,8 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "glib-sys", "libc", @@ -869,8 +871,8 @@ dependencies = [ [[package]] name = "graphene-rs" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "glib", "graphene-sys", @@ -879,8 +881,8 @@ dependencies = [ [[package]] name = "graphene-sys" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "glib-sys", "libc", @@ -993,9 +995,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" @@ -1003,17 +1005,11 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -1051,9 +1047,9 @@ checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "hyper" -version = "1.5.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", @@ -1302,9 +1298,9 @@ checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408" [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown", @@ -1318,16 +1314,17 @@ checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1360,15 +1357,15 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.162" +version = "0.2.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" [[package]] name = "libloading" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", "windows-targets", @@ -1446,20 +1443,19 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", ] [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi", "libc", "wasi", "windows-sys 0.52.0", @@ -1500,8 +1496,8 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "pango" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "gio", "glib", @@ -1511,8 +1507,8 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.20.5" -source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#9583dc6fa3a11fbbb567b27bc81709bf5c5950b2" +version = "0.20.8" +source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.20#96e4705cbfb7b4c4273cb46773349b5f4d1bdd73" dependencies = [ "glib-sys", "gobject-sys", @@ -1593,9 +1589,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1620,9 +1616,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", "pin-project-lite", @@ -1638,26 +1634,29 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", + "getrandom", "rand", "ring", "rustc-hash", "rustls", + "rustls-pki-types", "slab", "thiserror", "tinyvec", "tracing", + "web-time", ] [[package]] name = "quinn-udp" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" dependencies = [ "cfg_aliases", "libc", @@ -1717,9 +1716,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] @@ -1798,9 +1797,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" [[package]] name = "rustc_version" @@ -1813,22 +1812,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.39" +version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.16" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "once_cell", "ring", @@ -1849,9 +1848,12 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -1902,24 +1904,24 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" [[package]] name = "serde" -version = "1.0.214" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", @@ -1928,9 +1930,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -2026,9 +2028,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2054,9 +2056,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.87" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2065,9 +2067,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] @@ -2126,18 +2128,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.68" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" +checksum = "08f5383f3e0071702bf93ab5ee99b52d26936be9dedd9413067cbdcddcb6141a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.68" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" +checksum = "f2f357fcec90b3caef6623a099691be676d033b40a058ac95d2a6ade6fa0c943" dependencies = [ "proc-macro2", "quote", @@ -2171,9 +2173,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.1" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes", @@ -2200,12 +2202,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ "rustls", - "rustls-pki-types", "tokio", ] @@ -2251,9 +2252,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-core", @@ -2261,9 +2262,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", ] @@ -2291,9 +2292,9 @@ dependencies = [ [[package]] name = "ttf-parser" -version = "0.25.0" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5902c5d130972a0000f60860bfbf46f7ca3db5391eddfedd1b8728bd9dc96c0e" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" dependencies = [ "core_maths", ] @@ -2306,9 +2307,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-bidi-mirroring" @@ -2324,9 +2325,9 @@ checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-properties" @@ -2354,9 +2355,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.3" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -2404,9 +2405,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", "once_cell", @@ -2415,13 +2416,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -2430,21 +2430,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2452,9 +2453,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", @@ -2465,9 +2466,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wayland-backend" @@ -2519,9 +2520,19 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -2529,9 +2540,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.6" +version = "0.26.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" dependencies = [ "rustls-pki-types", ] @@ -2767,9 +2778,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af310deaae937e48a26602b730250b4949e125f468f11e6990be3e5304ddd96f" +checksum = "ea8b391c9a790b496184c29f7f93b9ed5b16abb306c05415b68bcc16e4d06432" [[package]] name = "yoke" @@ -2785,9 +2796,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", From 87a3c3e000b9378a4231ae68a129d1d0f7eab3c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 07:40:02 +0000 Subject: [PATCH 24/25] build(deps): bump glium from 0.35.0 to 0.36.0 Bumps [glium](https://github.com/glium/glium) from 0.35.0 to 0.36.0. - [Release notes](https://github.com/glium/glium/releases) - [Changelog](https://github.com/glium/glium/blob/master/CHANGELOG.md) - [Commits](https://github.com/glium/glium/commits/v0.36.0) --- updated-dependencies: - dependency-name: glium dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- examples/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 646078c35e1f..a5d9517e6175 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -830,9 +830,9 @@ dependencies = [ [[package]] name = "glium" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a3028d1f135b5395e6e4336916b424bc5dd2b38c6e378ce2704e4b8f4a617ed" +checksum = "8cf52ce4f5ce1501bb056627f35484a819e812d1d93f0f3da413676421b1bbe0" dependencies = [ "backtrace", "fnv", diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 62bd47515fe7..4424efeb8f02 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -8,7 +8,7 @@ authors.workspace = true chrono = "0.4" femtovg = { version = "0.11", optional = true, default-features = false } -glium = { version = "0.35", optional = true, default-features = false } +glium = { version = "0.36", optional = true, default-features = false } glow = { version = "0.15.0", optional = true } epoxy = { version = "0.1.0", optional = true } libloading = { version = "0.8.0", optional = true } From 8b228dbe8420af0afe5bc804957e15651346f5dd Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 31 Oct 2024 14:39:24 +0100 Subject: [PATCH 25/25] Fix new beta clippy warnings --- gtk4/src/accessible.rs | 4 ++-- gtk4/src/bitset_iter.rs | 6 +++--- gtk4/src/response_type.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk4/src/accessible.rs b/gtk4/src/accessible.rs index 3f45f4a682dd..7341c6e461b5 100644 --- a/gtk4/src/accessible.rs +++ b/gtk4/src/accessible.rs @@ -124,7 +124,7 @@ pub enum Property<'p> { ValueText(&'p str), } -impl<'p> Property<'p> { +impl Property<'_> { fn to_property_value(&self) -> (AccessibleProperty, Value) { use Property::*; @@ -178,7 +178,7 @@ pub enum Relation<'r> { SetSize(i32), } -impl<'r> Relation<'r> { +impl Relation<'_> { fn to_relation_value(&self) -> (AccessibleRelation, Value) { use Relation::*; diff --git a/gtk4/src/bitset_iter.rs b/gtk4/src/bitset_iter.rs index ac4fcb52f74c..344e7dd57b8c 100644 --- a/gtk4/src/bitset_iter.rs +++ b/gtk4/src/bitset_iter.rs @@ -108,7 +108,7 @@ impl<'a> BitsetIter<'a> { } } -impl<'a> Iterator for BitsetIter<'a> { +impl Iterator for BitsetIter<'_> { type Item = u32; #[doc(alias = "gtk_bitset_iter_next")] @@ -129,14 +129,14 @@ impl<'a> Iterator for BitsetIter<'a> { } } -impl<'a> std::iter::FusedIterator for BitsetIter<'a> {} +impl std::iter::FusedIterator for BitsetIter<'_> {} #[doc(hidden)] impl<'a> ToGlibPtr<'a, *const ffi::GtkBitsetIter> for BitsetIter<'a> { type Storage = &'a Self; #[inline] - fn to_glib_none(&'a self) -> Stash<*const ffi::GtkBitsetIter, Self> { + fn to_glib_none(&'a self) -> Stash<'a, *const ffi::GtkBitsetIter, Self> { Stash(&self.0 as *const ffi::GtkBitsetIter, self) } } diff --git a/gtk4/src/response_type.rs b/gtk4/src/response_type.rs index 3df4e9da2458..a862bb058b59 100644 --- a/gtk4/src/response_type.rs +++ b/gtk4/src/response_type.rs @@ -118,7 +118,7 @@ impl ValueType for ResponseType { type Type = Self; } -unsafe impl<'a> FromValue<'a> for ResponseType { +unsafe impl FromValue<'_> for ResponseType { type Checker = glib::value::GenericValueTypeChecker; #[inline]