Skip to content
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

Regenerate with latest gir #1492

Merged
merged 4 commits into from
Sep 17, 2023
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
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --features v4_10,xml_validation --manifest-path ./gtk4/Cargo.toml
args: --features v4_12,xml_validation --manifest-path ./gtk4/Cargo.toml
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --features v4_8,xml_validation --manifest-path ./gtk4/Cargo.toml
args: --features v4_12,xml_validation --manifest-path ./gtk4/Cargo.toml
# FIXME: renable once https://github.com/gtk-rs/gtk4-rs/issues/1235 is fixed
#- name: Tests
# uses: actions-rs/cargo@v1
Expand Down
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)
2 changes: 1 addition & 1 deletion gir-files
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)
Loading