> =
Box_::from_raw(user_data as *mut _);
- let callback: P = callback.into_inner();
+ let callback: Q = callback.into_inner();
callback(result);
}
- let callback = read_text_async_trampoline::;
+ let callback = read_text_async_trampoline::;
unsafe {
ffi::gdk_clipboard_read_text_async(
self.to_glib_none().0,
- cancellable.map(|p| p.as_ref()).to_glib_none().0,
+ cancellable
+ .into()
+ .as_ref()
+ .map(|p| p.as_ref())
+ .to_glib_none()
+ .0,
Some(callback),
Box_::into_raw(user_data) as *mut _,
);
@@ -108,10 +117,14 @@ impl Clipboard {
}
#[doc(alias = "gdk_clipboard_read_texture_async")]
- pub fn read_texture_async, glib::Error>) + 'static>(
+ pub fn read_texture_async<
+ 'a,
+ P: IsA,
+ Q: FnOnce(Result