Skip to content

Commit 12849d1

Browse files
gsk: Adapt to changed Path.foreach
1 parent eec9bcb commit 12849d1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

gsk4/src/path.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@ use glib::translate::*;
55

66
impl Path {
77
#[doc(alias = "gsk_path_foreach")]
8-
pub fn foreach<P: FnMut(&PathOperation, &graphene::Point, usize) -> bool>(
8+
pub fn foreach<P: FnMut(&PathOperation, &graphene::Point, usize, f32) -> bool>(
99
&self,
1010
flags: PathForeachFlags,
1111
func: P,
1212
) -> bool {
1313
let func_data: P = func;
1414
unsafe extern "C" fn func_func<
15-
P: FnMut(&PathOperation, &graphene::Point, usize) -> bool,
15+
P: FnMut(&PathOperation, &graphene::Point, usize, f32) -> bool,
1616
>(
1717
op: ffi::GskPathOperation,
1818
pts: *const graphene::ffi::graphene_point_t,
1919
n_pts: libc::size_t,
20+
weight: libc::c_float,
2021
user_data: glib::ffi::gpointer,
2122
) -> glib::ffi::gboolean {
2223
let op = from_glib(op);
2324
let pts = from_glib_borrow(pts);
2425
let callback: *mut P = user_data as *const _ as usize as *mut P;
25-
(*callback)(&op, &pts, n_pts).into_glib()
26+
(*callback)(&op, &pts, n_pts, weight).into_glib()
2627
}
2728
let func = Some(func_func::<P> as _);
2829
let super_callback0: &P = &func_data;

0 commit comments

Comments
 (0)