// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use Asset; use BaseEffect; use Container; use Extractable; use Layer; use TimelineElement; use Track; use TrackElement; use TrackType; use ffi; use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect; use glib::translate::*; use glib_ffi; use gobject_ffi; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; use std::ptr; glib_wrapper! { pub struct Clip(Object): Container, TimelineElement, Extractable; match fn { get_type => || ffi::ges_clip_get_type(), } } pub trait ClipExt { fn add_asset>(&self, asset: &P) -> Option; fn find_track_element<'a, P: IsA + 'a, Q: Into>>(&self, track: Q, type_: glib::types::Type) -> Option; fn find_track_elements<'a, P: IsA + 'a, Q: Into>>(&self, track: Q, track_type: TrackType, type_: glib::types::Type) -> Vec; fn get_layer(&self) -> Option; fn get_supported_formats(&self) -> TrackType; fn get_top_effect_index>(&self, effect: &P) -> i32; fn get_top_effect_position>(&self, effect: &P) -> i32; fn get_top_effects(&self) -> Vec; fn move_to_layer(&self, layer: &Layer) -> bool; fn set_supported_formats(&self, supportedformats: TrackType); fn set_top_effect_index>(&self, effect: &P, newindex: u32) -> bool; fn set_top_effect_priority>(&self, effect: &P, newpriority: u32) -> bool; fn split(&self, position: u64) -> Option; fn connect_property_layer_notify(&self, f: F) -> SignalHandlerId; fn connect_property_supported_formats_notify(&self, f: F) -> SignalHandlerId; } impl + IsA> ClipExt for O { fn add_asset>(&self, asset: &P) -> Option { unsafe { from_glib_none(ffi::ges_clip_add_asset(self.to_glib_none().0, asset.to_glib_none().0)) } } fn find_track_element<'a, P: IsA + 'a, Q: Into>>(&self, track: Q, type_: glib::types::Type) -> Option { let track = track.into(); let track = track.to_glib_none(); unsafe { from_glib_full(ffi::ges_clip_find_track_element(self.to_glib_none().0, track.0, type_.to_glib())) } } fn find_track_elements<'a, P: IsA + 'a, Q: Into>>(&self, track: Q, track_type: TrackType, type_: glib::types::Type) -> Vec { let track = track.into(); let track = track.to_glib_none(); unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_clip_find_track_elements(self.to_glib_none().0, track.0, track_type.to_glib(), type_.to_glib())) } } fn get_layer(&self) -> Option { unsafe { from_glib_full(ffi::ges_clip_get_layer(self.to_glib_none().0)) } } fn get_supported_formats(&self) -> TrackType { unsafe { from_glib(ffi::ges_clip_get_supported_formats(self.to_glib_none().0)) } } fn get_top_effect_index>(&self, effect: &P) -> i32 { unsafe { ffi::ges_clip_get_top_effect_index(self.to_glib_none().0, effect.to_glib_none().0) } } fn get_top_effect_position>(&self, effect: &P) -> i32 { unsafe { ffi::ges_clip_get_top_effect_position(self.to_glib_none().0, effect.to_glib_none().0) } } fn get_top_effects(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_clip_get_top_effects(self.to_glib_none().0)) } } fn move_to_layer(&self, layer: &Layer) -> bool { unsafe { from_glib(ffi::ges_clip_move_to_layer(self.to_glib_none().0, layer.to_glib_none().0)) } } fn set_supported_formats(&self, supportedformats: TrackType) { unsafe { ffi::ges_clip_set_supported_formats(self.to_glib_none().0, supportedformats.to_glib()); } } fn set_top_effect_index>(&self, effect: &P, newindex: u32) -> bool { unsafe { from_glib(ffi::ges_clip_set_top_effect_index(self.to_glib_none().0, effect.to_glib_none().0, newindex)) } } fn set_top_effect_priority>(&self, effect: &P, newpriority: u32) -> bool { unsafe { from_glib(ffi::ges_clip_set_top_effect_priority(self.to_glib_none().0, effect.to_glib_none().0, newpriority)) } } fn split(&self, position: u64) -> Option { unsafe { from_glib_none(ffi::ges_clip_split(self.to_glib_none().0, position)) } } fn connect_property_layer_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); connect(self.to_glib_none().0, "notify::layer", transmute(notify_layer_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } fn connect_property_supported_formats_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); connect(self.to_glib_none().0, "notify::supported-formats", transmute(notify_supported_formats_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } } unsafe extern "C" fn notify_layer_trampoline

(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { let f: &&(Fn(&P) + 'static) = transmute(f); f(&Clip::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_supported_formats_trampoline

(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { let f: &&(Fn(&P) + 'static) = transmute(f); f(&Clip::from_glib_borrow(this).downcast_unchecked()) }