// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; use std::mem::transmute; glib::wrapper! { #[doc(alias = "GstColorBalanceChannel")] pub struct ColorBalanceChannel(Object); match fn { type_ => || ffi::gst_color_balance_channel_get_type(), } } impl ColorBalanceChannel { pub const NONE: Option<&'static ColorBalanceChannel> = None; } unsafe impl Send for ColorBalanceChannel {} unsafe impl Sync for ColorBalanceChannel {} pub trait ColorBalanceChannelExt: 'static { #[doc(alias = "value-changed")] fn connect_value_changed( &self, f: F, ) -> SignalHandlerId; } impl> ColorBalanceChannelExt for O { fn connect_value_changed( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn value_changed_trampoline< P: IsA, F: Fn(&P, i32) + Send + Sync + 'static, >( this: *mut ffi::GstColorBalanceChannel, value: libc::c_int, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f( ColorBalanceChannel::from_glib_borrow(this).unsafe_cast_ref(), value, ) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"value-changed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( value_changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } }