From 95e8efce84be8e4bc935ab0895e57bccc5a4afe5 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 1 Feb 2024 14:51:50 +0100 Subject: [PATCH 1/3] Update gir submodule --- gir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir b/gir index 68044d02c2a3..9ebc44374393 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit 68044d02c2a373011dd3a9ae4685ae1453fa0844 +Subproject commit 9ebc44374393a6555d68563e9df86da51417920d From e3b304d38dbcf0efd2cfcd9fbdf6edfb53ddb2b2 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 1 Feb 2024 14:52:37 +0100 Subject: [PATCH 2/3] Regenerate with latest gir --- gdk4-wayland/src/auto/versions.txt | 2 +- gdk4-wayland/sys/src/lib.rs | 2 ++ gdk4-wayland/sys/versions.txt | 2 +- gdk4-win32/src/auto/versions.txt | 2 +- gdk4-win32/sys/src/lib.rs | 3 +++ gdk4-win32/sys/versions.txt | 2 +- gdk4-x11/src/auto/versions.txt | 2 +- gdk4-x11/sys/src/lib.rs | 3 +++ gdk4-x11/sys/versions.txt | 2 +- gdk4/src/auto/versions.txt | 2 +- gdk4/sys/src/lib.rs | 7 +++++++ gdk4/sys/versions.txt | 2 +- gsk4/src/auto/versions.txt | 2 +- gsk4/sys/src/lib.rs | 7 +++++++ gsk4/sys/versions.txt | 2 +- gtk4/src/auto/versions.txt | 2 +- gtk4/sys/src/lib.rs | 10 ++++++++++ gtk4/sys/versions.txt | 2 +- 18 files changed, 44 insertions(+), 12 deletions(-) diff --git a/gdk4-wayland/src/auto/versions.txt b/gdk4-wayland/src/auto/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 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 @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gdk4-wayland/sys/src/lib.rs b/gdk4-wayland/sys/src/lib.rs index b3e7dd738db4..49096e3cf9cc 100644 --- a/gdk4-wayland/sys/src/lib.rs +++ b/gdk4-wayland/sys/src/lib.rs @@ -11,6 +11,8 @@ )] #![cfg_attr(docsrs, feature(doc_cfg))] +use glib_sys as glib; + #[allow(unused_imports)] use libc::{ c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, diff --git a/gdk4-wayland/sys/versions.txt b/gdk4-wayland/sys/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 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 @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gdk4-win32/src/auto/versions.txt b/gdk4-win32/src/auto/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 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 @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gdk4-win32/sys/src/lib.rs b/gdk4-win32/sys/src/lib.rs index 32b4d81d7392..240f7b0d1f64 100644 --- a/gdk4-win32/sys/src/lib.rs +++ b/gdk4-win32/sys/src/lib.rs @@ -11,6 +11,9 @@ )] #![cfg_attr(docsrs, feature(doc_cfg))] +use gdk4_sys as gdk; +use glib_sys as glib; + #[allow(unused_imports)] use libc::{ c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, diff --git a/gdk4-win32/sys/versions.txt b/gdk4-win32/sys/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 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 @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gdk4-x11/src/auto/versions.txt b/gdk4-x11/src/auto/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 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 @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gdk4-x11/sys/src/lib.rs b/gdk4-x11/sys/src/lib.rs index f2a56c090627..a50042ecde39 100644 --- a/gdk4-x11/sys/src/lib.rs +++ b/gdk4-x11/sys/src/lib.rs @@ -11,6 +11,9 @@ )] #![cfg_attr(docsrs, feature(doc_cfg))] +use gdk4_sys as gdk; +use glib_sys as glib; + #[allow(unused_imports)] use libc::{ c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, diff --git a/gdk4-x11/sys/versions.txt b/gdk4-x11/sys/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 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 @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gdk4/src/auto/versions.txt b/gdk4/src/auto/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 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 @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gdk4/sys/src/lib.rs b/gdk4/sys/src/lib.rs index 6ad2385f8638..4075f4be34da 100644 --- a/gdk4/sys/src/lib.rs +++ b/gdk4/sys/src/lib.rs @@ -11,6 +11,13 @@ )] #![cfg_attr(docsrs, feature(doc_cfg))] +use cairo_sys as cairo; +use gdk_pixbuf_sys as gdk_pixbuf; +use gio_sys as gio; +use glib_sys as glib; +use gobject_sys as gobject; +use pango_sys as pango; + #[allow(unused_imports)] use libc::{ c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, diff --git a/gdk4/sys/versions.txt b/gdk4/sys/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 100644 --- a/gdk4/sys/versions.txt +++ b/gdk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gsk4/src/auto/versions.txt b/gsk4/src/auto/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 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 @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gsk4/sys/src/lib.rs b/gsk4/sys/src/lib.rs index 477e73716a05..0e20a2b557e6 100644 --- a/gsk4/sys/src/lib.rs +++ b/gsk4/sys/src/lib.rs @@ -11,6 +11,13 @@ )] #![cfg_attr(docsrs, feature(doc_cfg))] +use cairo_sys as cairo; +use gdk4_sys as gdk; +use glib_sys as glib; +use gobject_sys as gobject; +use graphene_sys as graphene; +use pango_sys as pango; + #[allow(unused_imports)] use libc::{ c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, diff --git a/gsk4/sys/versions.txt b/gsk4/sys/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 100644 --- a/gsk4/sys/versions.txt +++ b/gsk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gtk4/src/auto/versions.txt b/gtk4/src/auto/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 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 @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gtk4/sys/src/lib.rs b/gtk4/sys/src/lib.rs index d59ff0874a9f..513d664ca6c1 100644 --- a/gtk4/sys/src/lib.rs +++ b/gtk4/sys/src/lib.rs @@ -11,6 +11,16 @@ )] #![cfg_attr(docsrs, feature(doc_cfg))] +use cairo_sys as cairo; +use gdk4_sys as gdk; +use gdk_pixbuf_sys as gdk_pixbuf; +use gio_sys as gio; +use glib_sys as glib; +use gobject_sys as gobject; +use graphene_sys as graphene; +use gsk4_sys as gsk; +use pango_sys as pango; + #[allow(unused_imports)] use libc::{ c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, diff --git a/gtk4/sys/versions.txt b/gtk4/sys/versions.txt index fbcdac0bd2ac..f85b15d2bb7c 100644 --- a/gtk4/sys/versions.txt +++ b/gtk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 68044d02c2a3) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) From b7fb4607c8ad0c1219d05478086995240ad2ebd9 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 1 Feb 2024 15:00:19 +0100 Subject: [PATCH 3/3] Use cargo workspace features for ffi --- Cargo.toml | 12 ++++++- gdk4-wayland/sys/Cargo.toml | 6 ++-- gdk4-win32/sys/Cargo.toml | 14 +++----- gdk4-x11/sys/Cargo.toml | 14 +++----- gdk4/sys/Cargo.toml | 46 +++++++++--------------- gsk4/sys/Cargo.toml | 46 +++++++++--------------- gtk4/sys/Cargo.toml | 70 ++++++++++++++----------------------- 7 files changed, 83 insertions(+), 125 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0c9639651b90..90df3f410c57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,15 +48,25 @@ rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] [workspace.dependencies] +cairo-sys-rs = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19"} cairo-rs = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["use_glib"]} +gdk-pixbuf-sys = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19"} gdk-pixbuf = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19"} +gio-sys = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v2_66"]} gio = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v2_66"]} +gobject-sys = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v2_66"]} +glib-sys = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v2_66"]} glib = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v2_66"]} +graphene-sys = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19"} graphene = {package = "graphene-rs", git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19"} libc = "0.2" +pango-sys = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v1_46"]} pango = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.19", features = ["v1_46"]} gir-format-check = "^0.1" +gdk4-sys = {path = "gdk4/sys", version = "0.8"} gdk = {package = "gdk4", path = "gdk4", version = "0.8"} +gsk4-sys = {path = "gsk4/sys", version = "0.8"} gsk = {package = "gsk4", path = "gsk4", version = "0.8"} gtk4-macros = {path = "gtk4-macros", version = "0.8"} -gtk = { path = "gtk4", package = "gtk4", version = "0.8" } \ No newline at end of file +gtk4-sys = {path = "gtk4/sys", version = "0.8"} +gtk = { path = "gtk4", package = "gtk4", version = "0.8" } diff --git a/gdk4-wayland/sys/Cargo.toml b/gdk4-wayland/sys/Cargo.toml index 00e368952f8a..89791fe92092 100644 --- a/gdk4-wayland/sys/Cargo.toml +++ b/gdk4-wayland/sys/Cargo.toml @@ -58,10 +58,8 @@ v4_12 = ["v4_10"] [dependencies] libc = "0.2" -[dependencies.glib] -package = "glib-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" +[dependencies.glib-sys] +workspace = true [build-dependencies] system-deps = "6" diff --git a/gdk4-win32/sys/Cargo.toml b/gdk4-win32/sys/Cargo.toml index 45c6ec79262c..73d85b6ebb3c 100644 --- a/gdk4-win32/sys/Cargo.toml +++ b/gdk4-win32/sys/Cargo.toml @@ -54,15 +54,11 @@ v4_8 = ["v4_4"] [dependencies] libc = "0.2" -[dependencies.gdk] -package = "gdk4-sys" -path = "../../gdk4/sys" -version = "0.8" - -[dependencies.glib] -package = "glib-sys" -git = "https://github.com/gtk-rs/gtk-rs-core.git" -version = "0.19" +[dependencies.gdk4-sys] +workspace = true + +[dependencies.glib-sys] +workspace = true [build-dependencies] system-deps = "6" diff --git a/gdk4-x11/sys/Cargo.toml b/gdk4-x11/sys/Cargo.toml index 5b1553cfbf60..3570f9079fb3 100644 --- a/gdk4-x11/sys/Cargo.toml +++ b/gdk4-x11/sys/Cargo.toml @@ -54,15 +54,11 @@ v4_10 = ["v4_4"] [dependencies] libc = "0.2" -[dependencies.gdk] -package = "gdk4-sys" -path = "../../gdk4/sys" -version = "0.8" - -[dependencies.glib] -package = "glib-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" +[dependencies.gdk4-sys] +workspace = true + +[dependencies.glib-sys] +workspace = true [build-dependencies] system-deps = "6" diff --git a/gdk4/sys/Cargo.toml b/gdk4/sys/Cargo.toml index 82049e747a1b..32386693ed76 100644 --- a/gdk4/sys/Cargo.toml +++ b/gdk4/sys/Cargo.toml @@ -74,35 +74,23 @@ v4_14 = ["v4_12"] [dependencies] libc = "0.2" -[dependencies.cairo] -package = "cairo-sys-rs" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.gdk_pixbuf] -package = "gdk-pixbuf-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.gio] -package = "gio-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.glib] -package = "glib-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.gobject] -package = "gobject-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.pango] -package = "pango-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" +[dependencies.cairo-sys-rs] +workspace = true + +[dependencies.gdk-pixbuf-sys] +workspace = true + +[dependencies.gio-sys] +workspace = true + +[dependencies.glib-sys] +workspace = true + +[dependencies.gobject-sys] +workspace = true + +[dependencies.pango-sys] +workspace = true [build-dependencies] system-deps = "6" diff --git a/gsk4/sys/Cargo.toml b/gsk4/sys/Cargo.toml index b4f0abfdd92c..721844ca1a1a 100644 --- a/gsk4/sys/Cargo.toml +++ b/gsk4/sys/Cargo.toml @@ -68,35 +68,23 @@ v4_14 = ["v4_10"] [dependencies] libc = "0.2" -[dependencies.cairo] -package = "cairo-sys-rs" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.gdk] -package = "gdk4-sys" -path = "../../gdk4/sys" -version = "0.8" - -[dependencies.glib] -package = "glib-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.gobject] -package = "gobject-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.graphene] -package = "graphene-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.pango] -package = "pango-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" +[dependencies.graphene-sys] +workspace = true + +[dependencies.cairo-sys-rs] +workspace = true + +[dependencies.glib-sys] +workspace = true + +[dependencies.gobject-sys] +workspace = true + +[dependencies.pango-sys] +workspace = true + +[dependencies.gdk4-sys] +workspace = true [build-dependencies] system-deps = "6" diff --git a/gtk4/sys/Cargo.toml b/gtk4/sys/Cargo.toml index faa6583bcfe7..14e481a72528 100644 --- a/gtk4/sys/Cargo.toml +++ b/gtk4/sys/Cargo.toml @@ -75,50 +75,32 @@ v4_14 = ["v4_12"] [dependencies] libc = "0.2" -[dependencies.cairo] -package = "cairo-sys-rs" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.gdk_pixbuf] -package = "gdk-pixbuf-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.gdk] -package = "gdk4-sys" -path = "../../gdk4/sys" -version = "0.8" - -[dependencies.gio] -package = "gio-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.glib] -package = "glib-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.gobject] -package = "gobject-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.graphene] -package = "graphene-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" - -[dependencies.gsk] -package = "gsk4-sys" -path = "../../gsk4/sys" -version = "0.8" - -[dependencies.pango] -package = "pango-sys" -git = "https://github.com/gtk-rs/gtk-rs-core" -version = "0.19" +[dependencies.cairo-sys-rs] +workspace = true + +[dependencies.gdk-pixbuf-sys] +workspace = true + +[dependencies.gio-sys] +workspace = true + +[dependencies.glib-sys] +workspace = true + +[dependencies.gobject-sys] +workspace = true + +[dependencies.pango-sys] +workspace = true + +[dependencies.graphene-sys] +workspace = true + +[dependencies.gdk4-sys] +workspace = true + +[dependencies.gsk4-sys] +workspace = true [build-dependencies] system-deps = "6"