Skip to content

Commit

Permalink
Regenerate with latest gir-files
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Sep 17, 2023
1 parent b0f36e3 commit d955886
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 35 deletions.
4 changes: 2 additions & 2 deletions gdk4-wayland/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)
4 changes: 2 additions & 2 deletions gdk4-wayland/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)
4 changes: 2 additions & 2 deletions gdk4-win32/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)
4 changes: 2 additions & 2 deletions gdk4-win32/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)
4 changes: 2 additions & 2 deletions gdk4-x11/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)
4 changes: 2 additions & 2 deletions gdk4-x11/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)
4 changes: 2 additions & 2 deletions gdk4/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)
4 changes: 2 additions & 2 deletions gdk4/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)
10 changes: 8 additions & 2 deletions gsk4/src/auto/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,23 @@ impl Path {

#[doc(alias = "gsk_path_get_closest_point")]
#[doc(alias = "get_closest_point")]
pub fn closest_point(&self, point: &graphene::Point, threshold: f32) -> Option<PathPoint> {
pub fn closest_point(
&self,
point: &graphene::Point,
threshold: f32,
) -> Option<(PathPoint, f32)> {
unsafe {
let mut result = PathPoint::uninitialized();
let mut distance = std::mem::MaybeUninit::uninit();
let ret = from_glib(ffi::gsk_path_get_closest_point(
self.to_glib_none().0,
point.to_glib_none().0,
threshold,
result.to_glib_none_mut().0,
distance.as_mut_ptr(),
));
if ret {
Some(result)
Some((result, distance.assume_init()))
} else {
None
}
Expand Down
4 changes: 2 additions & 2 deletions gsk4/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)
39 changes: 30 additions & 9 deletions gsk4/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,18 @@ pub const GSK_PATH_FOREACH_ALLOW_CONIC: GskPathForeachFlags = 4;
// Unions
#[derive(Copy, Clone)]
#[repr(C)]
pub union GskPathPoint_data {
pub f: [c_float; 8],
pub p: [gpointer; 8],
pub union GskPathPoint_u1 {
pub s1: GskPathPoint__s1,
pub padding: [gpointer; 8],
pub alignment: graphene::graphene_vec4_t,
}

impl ::std::fmt::Debug for GskPathPoint_data {
impl ::std::fmt::Debug for GskPathPoint_u1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GskPathPoint_data @ {self:p}"))
.field("f", unsafe { &self.f })
.field("p", unsafe { &self.p })
f.debug_struct(&format!("GskPathPoint_u1 @ {self:p}"))
.field("s1", unsafe { &self.s1 })
.field("padding", unsafe { &self.padding })
.field("alignment", unsafe { &self.alignment })
.finish()
}
}
Expand Down Expand Up @@ -305,13 +307,31 @@ impl ::std::fmt::Debug for GskPathMeasure {
#[derive(Copy, Clone)]
#[repr(C)]
pub struct GskPathPoint {
pub data: GskPathPoint_data,
pub u1: GskPathPoint_u1,
}

impl ::std::fmt::Debug for GskPathPoint {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GskPathPoint @ {self:p}"))
.field("data", &self.data)
.field("u1", &self.u1)
.finish()
}
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GskPathPoint__s1 {
pub contour: size_t,
pub idx: size_t,
pub t: c_float,
}

impl ::std::fmt::Debug for GskPathPoint__s1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GskPathPoint__s1 @ {self:p}"))
.field("contour", &self.contour)
.field("idx", &self.idx)
.field("t", &self.t)
.finish()
}
}
Expand Down Expand Up @@ -1003,6 +1023,7 @@ extern "C" {
point: *const graphene::graphene_point_t,
threshold: c_float,
result: *mut GskPathPoint,
distance: *mut c_float,
) -> gboolean;
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
Expand Down
4 changes: 2 additions & 2 deletions gsk4/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)
4 changes: 2 additions & 2 deletions gtk4/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)
4 changes: 2 additions & 2 deletions gtk4/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 @ 0f2c059e0939)
from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2)
Generated by gir (https://github.com/gtk-rs/gir @ 133ee1d93c85)
from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)

0 comments on commit d955886

Please sign in to comment.