Skip to content

Automated PR: Changes from updating gir/gir-files #1719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- { name: "gdk-pixbuf", features: "v2_42", nightly: "--all-features", test_sys: true }
- { name: "gio", features: "v2_84", nightly: "--all-features", test_sys: true }
- { name: "glib", features: "v2_84,log", nightly: "--all-features", test_sys: true }
- { name: "graphene", features: "", nightly: "", test_sys: true }
- { name: "graphene", features: "v1_12", nightly: "", test_sys: true }
- { name: "pango", features: "v1_56", nightly: "--all-features", test_sys: true }
- { name: "pangocairo", features: "", nightly: "--all-features", test_sys: true }
steps:
Expand Down
4 changes: 2 additions & 2 deletions gdk-pixbuf/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 19e8a2f15e0e)
from gir-files (https://github.com/gtk-rs/gir-files @ be4559caec2b)
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
from gir-files (https://github.com/gtk-rs/gir-files @ 5262e0fefdc7)
4 changes: 2 additions & 2 deletions gdk-pixbuf/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 19e8a2f15e0e)
from gir-files (https://github.com/gtk-rs/gir-files @ be4559caec2b)
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
from gir-files (https://github.com/gtk-rs/gir-files @ 5262e0fefdc7)
4 changes: 2 additions & 2 deletions gio/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 19e8a2f15e0e)
from gir-files (https://github.com/gtk-rs/gir-files @ be4559caec2b)
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
from gir-files (https://github.com/gtk-rs/gir-files @ 5262e0fefdc7)
43 changes: 43 additions & 0 deletions gio/src/auto/zlib_compressor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ impl ZlibCompressor {
unsafe { from_glib_none(ffi::g_zlib_compressor_get_file_info(self.to_glib_none().0)) }
}

#[cfg(feature = "v2_86")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_86")))]
#[doc(alias = "g_zlib_compressor_get_os")]
#[doc(alias = "get_os")]
pub fn os(&self) -> i32 {
unsafe { ffi::g_zlib_compressor_get_os(self.to_glib_none().0) }
}

#[doc(alias = "g_zlib_compressor_set_file_info")]
#[doc(alias = "file-info")]
pub fn set_file_info(&self, file_info: Option<&FileInfo>) {
Expand All @@ -40,6 +48,16 @@ impl ZlibCompressor {
}
}

#[cfg(feature = "v2_86")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_86")))]
#[doc(alias = "g_zlib_compressor_set_os")]
#[doc(alias = "os")]
pub fn set_os(&self, os: i32) {
unsafe {
ffi::g_zlib_compressor_set_os(self.to_glib_none().0, os);
}
}

pub fn format(&self) -> ZlibCompressorFormat {
ObjectExt::property(self, "format")
}
Expand Down Expand Up @@ -70,4 +88,29 @@ impl ZlibCompressor {
)
}
}

#[cfg(feature = "v2_86")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_86")))]
#[doc(alias = "os")]
pub fn connect_os_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_os_trampoline<F: Fn(&ZlibCompressor) + 'static>(
this: *mut ffi::GZlibCompressor,
_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_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
c"notify::os".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_os_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
}
6 changes: 6 additions & 0 deletions gio/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15040,10 +15040,16 @@ extern "C" {
level: c_int,
) -> *mut GZlibCompressor;
pub fn g_zlib_compressor_get_file_info(compressor: *mut GZlibCompressor) -> *mut GFileInfo;
#[cfg(feature = "v2_86")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_86")))]
pub fn g_zlib_compressor_get_os(compressor: *mut GZlibCompressor) -> c_int;
pub fn g_zlib_compressor_set_file_info(
compressor: *mut GZlibCompressor,
file_info: *mut GFileInfo,
);
#[cfg(feature = "v2_86")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_86")))]
pub fn g_zlib_compressor_set_os(compressor: *mut GZlibCompressor, os: c_int);

//=========================================================================
// GZlibDecompressor
Expand Down
4 changes: 2 additions & 2 deletions gio/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 19e8a2f15e0e)
from gir-files (https://github.com/gtk-rs/gir-files @ be4559caec2b)
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
from gir-files (https://github.com/gtk-rs/gir-files @ 5262e0fefdc7)
11 changes: 11 additions & 0 deletions glib/Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,17 @@ concurrency = "send+sync"
# parameter type
ignore = true

[[object.function]]
name = "dup_context"
# implemented as the normal getter
manual = true

[[object.function]]
name = "get_context"
# implemented conditionally around this or
# dup_context() (see above)
manual = true

[[object]]
name = "GLib.ThreadPool"
status = "manual"
Expand Down
4 changes: 2 additions & 2 deletions glib/gobject-sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 19e8a2f15e0e)
from gir-files (https://github.com/gtk-rs/gir-files @ be4559caec2b)
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
from gir-files (https://github.com/gtk-rs/gir-files @ 5262e0fefdc7)
8 changes: 1 addition & 7 deletions glib/src/auto/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::{ffi, translate::*, MainContext};
use crate::{ffi, translate::*};

crate::wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
Expand Down Expand Up @@ -51,12 +51,6 @@ impl Source {
unsafe { from_glib(ffi::g_source_get_can_recurse(self.to_glib_none().0)) }
}

#[doc(alias = "g_source_get_context")]
#[doc(alias = "get_context")]
pub fn context(&self) -> Option<MainContext> {
unsafe { from_glib_none(ffi::g_source_get_context(self.to_glib_none().0)) }
}

#[doc(alias = "g_source_get_name")]
#[doc(alias = "get_name")]
pub fn name(&self) -> Option<crate::GString> {
Expand Down
4 changes: 2 additions & 2 deletions glib/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 19e8a2f15e0e)
from gir-files (https://github.com/gtk-rs/gir-files @ be4559caec2b)
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
from gir-files (https://github.com/gtk-rs/gir-files @ 5262e0fefdc7)
14 changes: 14 additions & 0 deletions glib/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1270,4 +1270,18 @@ impl Source {
))
}
}

#[doc(alias = "g_source_get_context")]
#[doc(alias = "get_context")]
#[doc(alias = "g_source_dup_context")]
pub fn context(&self) -> Option<MainContext> {
#[cfg(feature = "v2_86")]
unsafe {
from_glib_full(ffi::g_source_dup_context(self.to_glib_none().0))
}
#[cfg(not(feature = "v2_86"))]
unsafe {
from_glib_none(ffi::g_source_get_context(self.to_glib_none().0))
}
}
}
3 changes: 3 additions & 0 deletions glib/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5147,6 +5147,9 @@ extern "C" {
pub fn g_source_add_unix_fd(source: *mut GSource, fd: c_int, events: GIOCondition) -> gpointer;
pub fn g_source_attach(source: *mut GSource, context: *mut GMainContext) -> c_uint;
pub fn g_source_destroy(source: *mut GSource);
#[cfg(feature = "v2_86")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_86")))]
pub fn g_source_dup_context(source: *mut GSource) -> *mut GMainContext;
pub fn g_source_get_can_recurse(source: *mut GSource) -> gboolean;
pub fn g_source_get_context(source: *mut GSource) -> *mut GMainContext;
pub fn g_source_get_current_time(source: *mut GSource, timeval: *mut GTimeVal);
Expand Down
4 changes: 2 additions & 2 deletions glib/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 19e8a2f15e0e)
from gir-files (https://github.com/gtk-rs/gir-files @ be4559caec2b)
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
from gir-files (https://github.com/gtk-rs/gir-files @ 5262e0fefdc7)
1 change: 1 addition & 0 deletions graphene/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ version.workspace = true
name = "graphene"

[features]
v1_12 = ["graphene-sys/v1_12"]

[dependencies]
graphene-sys.workspace = true
Expand Down
40 changes: 40 additions & 0 deletions graphene/Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,46 @@ boxed_inline = true
# float array
manual = true

[[object]]
name = "Graphene.Box2D"
status = "generate"
boxed_inline = true
[[object.function]]
# contents undefined
name = "alloc"
ignore = true
[[object.function]]
name = "init_from_box"
ignore = true # Copy like constructor
[[object.function]]
name = "init"
manual = true # manual proper constructor
rename = "new"
[[object.function]]
name = "init_from_points"
manual = true # manual proper constructor
rename = "from_points"
[[object.function]]
name = "init_from_vec2"
manual = true # manual proper constructor
rename = "from_vec2"
[[object.function]]
name = "init_from_rect"
manual = true # manual proper constructor
rename = "from_rect"
[[object.function]]
name = "init_from_vectors"
manual = true # manual proper constructor
rename = "from_vectors"
[[object.function]]
name = "get_vertices"
# float array
manual = true
[[object.function]]
name = "to_float"
# float array
manual = true

[[object]]
name = "Graphene.Euler"
status = "generate"
Expand Down
Loading
Loading