Commit 00cbd499 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Regenerate with latest gir

parent 16adb8e8
......@@ -116,6 +116,11 @@ trait_name = "GstBinExt"
name = "Gst.Bus"
status = "generate"
final_type = true
[[object.function]]
name = "set_sync_handler"
# Into<Option<_>> makes this hard to use
ignore = true
[[object.function]]
name = "add_signal_watch_full"
# Priority
......@@ -139,6 +144,16 @@ final_type = true
# More convenient manual implementation
ignore = true
[[object.function]]
name = "add_watch"
# More specific trait bounds possible for the closure
ignore = true
[[object.function]]
name = "add_watch_full"
# More specific trait bounds possible for the closure
ignore = true
[[object.function]]
name = "remove_watch"
[object.function.return]
......@@ -337,6 +352,11 @@ status = "generate"
# It is already a Result
nullable = false
[[object.function]]
name = "call_async"
# more specific closure type possible
ignore = true
[[object.function]]
name = "add_pad"
[object.function.return]
......@@ -796,6 +816,26 @@ status = "generate"
# Wrong place
ignore = true
[[object.function]]
pattern = "set_.*_function_full"
# More specific closure trait bounds possible
ignore = true
[[object.function]]
name = "start_task"
# More specific closure trait bounds possible
ignore = true
[[object.function]]
name = "sticky_events_foreach"
# Complex closure argument handling
ignore = true
[[object.function]]
name = "add_probe"
# Complex closure argument handling
ignore = true
[[object]]
name = "Gst.PadTemplate"
status = "generate"
......@@ -883,6 +923,11 @@ name = "Gst.Plugin"
status = "generate"
final_type = true
[[object.function]]
pattern = "register_static.*"
# Needs manual implementation
ignore = true
[[object.function]]
name = "list_free"
# useless and unsafe
......
......@@ -87,7 +87,7 @@ impl AppSink {
}
}
//pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSinkCallbacks, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) {
//pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSinkCallbacks, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
// unsafe { TODO: call ffi::gst_app_sink_set_callbacks() }
//}
......@@ -160,65 +160,65 @@ impl AppSink {
pub fn connect_eos<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"eos\0".as_ptr() as *const _,
transmute(eos_trampoline as usize), Box_::into_raw(f) as *mut _)
Some(transmute(eos_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
pub fn connect_property_buffer_list_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::buffer-list\0".as_ptr() as *const _,
transmute(notify_buffer_list_trampoline as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_buffer_list_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
pub fn connect_property_caps_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::caps\0".as_ptr() as *const _,
transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_caps_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
pub fn connect_property_drop_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::drop\0".as_ptr() as *const _,
transmute(notify_drop_trampoline as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_drop_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
pub fn connect_property_emit_signals_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::emit-signals\0".as_ptr() as *const _,
transmute(notify_emit_signals_trampoline as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_emit_signals_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
pub fn connect_property_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::eos\0".as_ptr() as *const _,
transmute(notify_eos_trampoline as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_eos_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
pub fn connect_property_max_buffers_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::max-buffers\0".as_ptr() as *const _,
transmute(notify_max_buffers_trampoline as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_max_buffers_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
pub fn connect_property_wait_on_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::wait-on-eos\0".as_ptr() as *const _,
transmute(notify_wait_on_eos_trampoline as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_wait_on_eos_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
}
......@@ -226,42 +226,42 @@ impl AppSink {
unsafe impl Send for AppSink {}
unsafe impl Sync for AppSink {}
unsafe extern "C" fn eos_trampoline(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) {
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
unsafe extern "C" fn eos_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) {
let f: &F = transmute(f);
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_buffer_list_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
unsafe extern "C" fn notify_buffer_list_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &F = transmute(f);
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
unsafe extern "C" fn notify_caps_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &F = transmute(f);
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_drop_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
unsafe extern "C" fn notify_drop_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &F = transmute(f);
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
unsafe extern "C" fn notify_emit_signals_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &F = transmute(f);
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
unsafe extern "C" fn notify_eos_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &F = transmute(f);
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_max_buffers_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
unsafe extern "C" fn notify_max_buffers_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &F = transmute(f);
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_wait_on_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
unsafe extern "C" fn notify_wait_on_eos_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &F = transmute(f);
f(&from_glib_borrow(this))
}
This diff is collapsed.
Generated by gir (https://github.com/gtk-rs/gir @ 4620f19)
Generated by gir (https://github.com/gtk-rs/gir @ eb84608)
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
......@@ -76,29 +76,29 @@ impl<O: IsA<StreamVolume>> StreamVolumeExt for O {
fn connect_property_mute_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::mute\0".as_ptr() as *const _,
transmute(notify_mute_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_mute_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_volume_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::volume\0".as_ptr() as *const _,
transmute(notify_volume_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_volume_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
}
unsafe extern "C" fn notify_mute_trampoline<P>(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_mute_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<StreamVolume> {
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
let f: &F = transmute(f);
f(&StreamVolume::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_volume_trampoline<P>(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_volume_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<StreamVolume> {
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
let f: &F = transmute(f);
f(&StreamVolume::from_glib_borrow(this).unsafe_cast())
}
Generated by gir (https://github.com/gtk-rs/gir @ 4620f19)
Generated by gir (https://github.com/gtk-rs/gir @ eb84608)
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
......@@ -106,30 +106,30 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::latency\0".as_ptr() as *const _,
transmute(notify_latency_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_latency_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_start_time_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::start-time\0".as_ptr() as *const _,
transmute(notify_start_time_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_start_time_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
unsafe extern "C" fn notify_latency_trampoline<P>(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Aggregator> {
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
let f: &F = transmute(f);
f(&Aggregator::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_start_time_trampoline<P>(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_start_time_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Aggregator> {
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
let f: &F = transmute(f);
f(&Aggregator::from_glib_borrow(this).unsafe_cast())
}
This diff is collapsed.
......@@ -210,57 +210,57 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
fn connect_property_blocksize_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::blocksize\0".as_ptr() as *const _,
transmute(notify_blocksize_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_blocksize_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_do_timestamp_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::do-timestamp\0".as_ptr() as *const _,
transmute(notify_do_timestamp_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_do_timestamp_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_num_buffers_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::num-buffers\0".as_ptr() as *const _,
transmute(notify_num_buffers_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_num_buffers_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_typefind_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::typefind\0".as_ptr() as *const _,
transmute(notify_typefind_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_typefind_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
}
unsafe extern "C" fn notify_blocksize_trampoline<P>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_blocksize_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<BaseSrc> {
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
let f: &F = transmute(f);
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_do_timestamp_trampoline<P>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_do_timestamp_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<BaseSrc> {
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
let f: &F = transmute(f);
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_num_buffers_trampoline<P>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_num_buffers_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<BaseSrc> {
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
let f: &F = transmute(f);
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_typefind_trampoline<P>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_typefind_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<BaseSrc> {
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
let f: &F = transmute(f);
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
}
......@@ -165,15 +165,15 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::qos\0".as_ptr() as *const _,
transmute(notify_qos_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_qos_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
}
unsafe extern "C" fn notify_qos_trampoline<P>(this: *mut ffi::GstBaseTransform, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseTransform, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<BaseTransform> {
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
let f: &F = transmute(f);
f(&BaseTransform::from_glib_borrow(this).unsafe_cast())
}
......@@ -34,11 +34,11 @@ pub fn type_find_helper_for_extension<'a, P: IsA<gst::Object> + 'a, Q: Into<Opti
}
}
//pub fn type_find_helper_get_range<'a, P: IsA<gst::Object>, Q: IsA<gst::Object> + 'a, R: Into<Option<&'a Q>>>(obj: &P, parent: R, func: /*Unknown conversion*//*Unimplemented*/TypeFindHelperGetRangeFunction, size: u64, extension: &str) -> (Option<gst::Caps>, gst::TypeFindProbability) {
//pub fn type_find_helper_get_range<'a, P: IsA<gst::Object>, Q: IsA<gst::Object> + 'a, R: Into<Option<&'a Q>>, S: FnMut(&gst::Object, &gst::Object, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: R, func: S, size: u64, extension: &str) -> (Option<gst::Caps>, gst::TypeFindProbability) {
// unsafe { TODO: call ffi::gst_type_find_helper_get_range() }
//}
//#[cfg(any(feature = "v1_14_3", feature = "dox"))]
//pub fn type_find_helper_get_range_full<'a, 'b, P: IsA<gst::Object>, Q: IsA<gst::Object> + 'a, R: Into<Option<&'a Q>>, S: Into<Option<&'b str>>>(obj: &P, parent: R, func: /*Unknown conversion*//*Unimplemented*/TypeFindHelperGetRangeFunction, size: u64, extension: S) -> (gst::FlowReturn, gst::Caps, gst::TypeFindProbability) {
//pub fn type_find_helper_get_range_full<'a, 'b, P: IsA<gst::Object>, Q: IsA<gst::Object> + 'a, R: Into<Option<&'a Q>>, S: FnMut(&gst::Object, &gst::Object, u64, u32, &gst::Buffer) -> gst::FlowReturn, T: Into<Option<&'b str>>>(obj: &P, parent: R, func: S, size: u64, extension: T) -> (gst::FlowReturn, gst::Caps, gst::TypeFindProbability) {
// unsafe { TODO: call ffi::gst_type_find_helper_get_range_full() }
//}
Generated by gir (https://github.com/gtk-rs/gir @ 4620f19)
Generated by gir (https://github.com/gtk-rs/gir @ eb84608)
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
......@@ -127,9 +127,9 @@ impl TestClock {
pub fn connect_property_clock_type_notify<F: Fn(&TestClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&TestClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::clock-type\0".as_ptr() as *const _,
transmute(notify_clock_type_trampoline as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_clock_type_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
}
......@@ -143,7 +143,7 @@ impl Default for TestClock {
unsafe impl Send for TestClock {}
unsafe impl Sync for TestClock {}
unsafe extern "C" fn notify_clock_type_trampoline(this: *mut ffi::GstTestClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &&(Fn(&TestClock) + Send + Sync + 'static) = transmute(f);
unsafe extern "C" fn notify_clock_type_trampoline<F: Fn(&TestClock) + Send + Sync + 'static>(this: *mut ffi::GstTestClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
let f: &F = transmute(f);
f(&from_glib_borrow(this))
}
Generated by gir (https://github.com/gtk-rs/gir @ 4620f19)
Generated by gir (https://github.com/gtk-rs/gir @ eb84608)
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
......@@ -52,13 +52,12 @@ impl Asset {
pub fn request_async<'a, P: IsA<gio::Cancellable> + 'a, Q: Into<Option<&'a P>>, R: FnOnce(Result<Asset, Error>) + Send + 'static>(extractable_type: glib::types::Type, id: &str, cancellable: Q, callback: R) {
assert_initialized_main_thread!();
let cancellable = cancellable.into();
let user_data: Box<Box<R>> = Box::new(Box::new(callback));
unsafe extern "C" fn request_async_trampoline<R: FnOnce(Result<Asset, Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut gio_ffi::GAsyncResult, user_data: glib_ffi::gpointer)
{
let user_data: Box<R> = Box::new(callback);
unsafe extern "C" fn request_async_trampoline<R: FnOnce(Result<Asset, Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut gio_ffi::GAsyncResult, user_data: glib_ffi::gpointer) {
let mut error = ptr::null_mut();
let ret = ffi::ges_asset_request_finish(res, &mut error);
let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) };
let callback: Box<Box<R>> = Box::from_raw(user_data as *mut _);
let callback: Box<R> = Box::from_raw(user_data as *mut _);
callback(result);
}
let callback = request_async_trampoline::<R>;
......@@ -184,29 +183,29 @@ impl<O: IsA<Asset>> AssetExt for O {
fn connect_property_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::proxy\0".as_ptr() as *const _,
transmute(notify_proxy_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_proxy_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_proxy_target_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::proxy-target\0".as_ptr() as *const _,
transmute(notify_proxy_target_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_proxy_target_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
}
unsafe extern "C" fn notify_proxy_trampoline<P>(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_proxy_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Asset> {
let f: &&(Fn(&P) + 'static) = transmute(f);
let f: &F = transmute(f);
f(&Asset::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_proxy_target_trampoline<P>(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_proxy_target_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Asset> {
let f: &&(Fn(&P) + 'static) = transmute(f);
let f: &F = transmute(f);
f(&Asset::from_glib_borrow(this).unsafe_cast())
}
......@@ -147,29 +147,29 @@ impl<O: IsA<Clip>> ClipExt for O {
fn connect_property_layer_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::layer\0".as_ptr() as *const _,
transmute(notify_layer_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_layer_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_supported_formats_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::supported-formats\0".as_ptr() as *const _,
transmute(notify_supported_formats_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
Some(transmute(notify_supported_formats_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
}
unsafe extern "C" fn notify_layer_trampoline<P>(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_layer_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Clip> {
let f: &&(Fn(&P) + 'static) = transmute(f);
let f: &F = transmute(f);
f(&Clip::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_supported_formats_trampoline<P>(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_supported_formats_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Clip> {
let f: &&(Fn(&P) + 'static) = transmute(f);
let f: &F = transmute(f);
f(&Clip::from_glib_borrow(this).unsafe_cast())
}
......@@ -101,43 +101,43 @@ impl<O: IsA<Container>> GESContainerExt for O {
fn connect_child_added<F: Fn(&Self, &TimelineElement) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self, &TimelineElement) + 'static>> = Box_::new(Box_::new(f));
let f: Box_<F> = Box_::new(f);