gstreamer-rs/gstreamer-editing-services/src/auto/timeline_element.rs
2018-12-08 14:58:14 +02:00

493 lines
19 KiB
Rust

// 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 Extractable;
use Timeline;
use TrackType;
use ffi;
use glib::StaticType;
use glib::Value;
use glib::object::Downcast;
use glib::object::IsA;
use glib::signal::SignalHandlerId;
use glib::signal::connect_raw;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use gst;
use std::boxed::Box as Box_;
use std::mem::transmute;
glib_wrapper! {
pub struct TimelineElement(Object<ffi::GESTimelineElement, ffi::GESTimelineElementClass>): Extractable;
match fn {
get_type => || ffi::ges_timeline_element_get_type(),
}
}
pub trait TimelineElementExt: 'static {
//fn add_child_property<P: IsA</*Ignored*/glib::ParamSpec>, Q: IsA<glib::Object>>(&self, pspec: &P, child: &Q) -> bool;
fn copy(&self, deep: bool) -> Option<TimelineElement>;
//fn get_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
//fn get_child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool;
//fn get_child_property_by_pspec<P: IsA</*Ignored*/glib::ParamSpec>>(&self, pspec: &P, value: /*Ignored*/glib::Value);
//fn get_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported);
fn get_duration(&self) -> gst::ClockTime;
fn get_inpoint(&self) -> gst::ClockTime;
fn get_max_duration(&self) -> gst::ClockTime;
fn get_name(&self) -> Option<String>;
fn get_parent(&self) -> Option<TimelineElement>;
fn get_priority(&self) -> u32;
fn get_start(&self) -> gst::ClockTime;
fn get_timeline(&self) -> Option<Timeline>;
fn get_toplevel_parent(&self) -> Option<TimelineElement>;
fn get_track_types(&self) -> TrackType;
//fn list_children_properties(&self) -> /*Ignored*/Vec<glib::ParamSpec>;
//fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<glib::Object>;
fn paste(&self, paste_position: gst::ClockTime) -> Option<TimelineElement>;
//fn remove_child_property<P: IsA</*Ignored*/glib::ParamSpec>>(&self, pspec: &P) -> bool;
fn ripple(&self, start: gst::ClockTime) -> bool;
fn ripple_end(&self, end: gst::ClockTime) -> bool;
fn roll_end(&self, end: gst::ClockTime) -> bool;
fn roll_start(&self, start: gst::ClockTime) -> bool;
//fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
//fn set_child_property(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> bool;
//fn set_child_property_by_pspec<P: IsA</*Ignored*/glib::ParamSpec>>(&self, pspec: &P, value: /*Ignored*/&glib::Value);
//fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported);
fn set_duration(&self, duration: gst::ClockTime);
fn set_inpoint(&self, inpoint: gst::ClockTime);
fn set_max_duration(&self, maxduration: gst::ClockTime);
fn set_name<'a, P: Into<Option<&'a str>>>(&self, name: P) -> bool;
fn set_parent<P: IsA<TimelineElement>>(&self, parent: &P) -> bool;
fn set_priority(&self, priority: u32);
fn set_start(&self, start: gst::ClockTime);
fn set_timeline(&self, timeline: &Timeline) -> bool;
fn trim(&self, start: gst::ClockTime) -> bool;
fn get_property_in_point(&self) -> u64;
fn set_property_in_point(&self, in_point: u64);
fn get_property_serialize(&self) -> bool;
fn set_property_serialize(&self, serialize: bool);
//fn connect_deep_notify<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_max_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_serialize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
}
impl<O: IsA<TimelineElement>> TimelineElementExt for O {
//fn add_child_property<P: IsA</*Ignored*/glib::ParamSpec>, Q: IsA<glib::Object>>(&self, pspec: &P, child: &Q) -> bool {
// unsafe { TODO: call ffi::ges_timeline_element_add_child_property() }
//}
fn copy(&self, deep: bool) -> Option<TimelineElement> {
unsafe {
from_glib_none(ffi::ges_timeline_element_copy(self.to_glib_none().0, deep.to_glib()))
}
}
//fn get_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
// unsafe { TODO: call ffi::ges_timeline_element_get_child_properties() }
//}
//fn get_child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool {
// unsafe { TODO: call ffi::ges_timeline_element_get_child_property() }
//}
//fn get_child_property_by_pspec<P: IsA</*Ignored*/glib::ParamSpec>>(&self, pspec: &P, value: /*Ignored*/glib::Value) {
// unsafe { TODO: call ffi::ges_timeline_element_get_child_property_by_pspec() }
//}
//fn get_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
// unsafe { TODO: call ffi::ges_timeline_element_get_child_property_valist() }
//}
fn get_duration(&self) -> gst::ClockTime {
unsafe {
from_glib(ffi::ges_timeline_element_get_duration(self.to_glib_none().0))
}
}
fn get_inpoint(&self) -> gst::ClockTime {
unsafe {
from_glib(ffi::ges_timeline_element_get_inpoint(self.to_glib_none().0))
}
}
fn get_max_duration(&self) -> gst::ClockTime {
unsafe {
from_glib(ffi::ges_timeline_element_get_max_duration(self.to_glib_none().0))
}
}
fn get_name(&self) -> Option<String> {
unsafe {
from_glib_full(ffi::ges_timeline_element_get_name(self.to_glib_none().0))
}
}
fn get_parent(&self) -> Option<TimelineElement> {
unsafe {
from_glib_full(ffi::ges_timeline_element_get_parent(self.to_glib_none().0))
}
}
fn get_priority(&self) -> u32 {
unsafe {
ffi::ges_timeline_element_get_priority(self.to_glib_none().0)
}
}
fn get_start(&self) -> gst::ClockTime {
unsafe {
from_glib(ffi::ges_timeline_element_get_start(self.to_glib_none().0))
}
}
fn get_timeline(&self) -> Option<Timeline> {
unsafe {
from_glib_full(ffi::ges_timeline_element_get_timeline(self.to_glib_none().0))
}
}
fn get_toplevel_parent(&self) -> Option<TimelineElement> {
unsafe {
from_glib_full(ffi::ges_timeline_element_get_toplevel_parent(self.to_glib_none().0))
}
}
fn get_track_types(&self) -> TrackType {
unsafe {
from_glib(ffi::ges_timeline_element_get_track_types(self.to_glib_none().0))
}
}
//fn list_children_properties(&self) -> /*Ignored*/Vec<glib::ParamSpec> {
// unsafe { TODO: call ffi::ges_timeline_element_list_children_properties() }
//}
//fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<glib::Object> {
// unsafe { TODO: call ffi::ges_timeline_element_lookup_child() }
//}
fn paste(&self, paste_position: gst::ClockTime) -> Option<TimelineElement> {
unsafe {
from_glib_none(ffi::ges_timeline_element_paste(self.to_glib_none().0, paste_position.to_glib()))
}
}
//fn remove_child_property<P: IsA</*Ignored*/glib::ParamSpec>>(&self, pspec: &P) -> bool {
// unsafe { TODO: call ffi::ges_timeline_element_remove_child_property() }
//}
fn ripple(&self, start: gst::ClockTime) -> bool {
unsafe {
from_glib(ffi::ges_timeline_element_ripple(self.to_glib_none().0, start.to_glib()))
}
}
fn ripple_end(&self, end: gst::ClockTime) -> bool {
unsafe {
from_glib(ffi::ges_timeline_element_ripple_end(self.to_glib_none().0, end.to_glib()))
}
}
fn roll_end(&self, end: gst::ClockTime) -> bool {
unsafe {
from_glib(ffi::ges_timeline_element_roll_end(self.to_glib_none().0, end.to_glib()))
}
}
fn roll_start(&self, start: gst::ClockTime) -> bool {
unsafe {
from_glib(ffi::ges_timeline_element_roll_start(self.to_glib_none().0, start.to_glib()))
}
}
//fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
// unsafe { TODO: call ffi::ges_timeline_element_set_child_properties() }
//}
//fn set_child_property(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> bool {
// unsafe { TODO: call ffi::ges_timeline_element_set_child_property() }
//}
//fn set_child_property_by_pspec<P: IsA</*Ignored*/glib::ParamSpec>>(&self, pspec: &P, value: /*Ignored*/&glib::Value) {
// unsafe { TODO: call ffi::ges_timeline_element_set_child_property_by_pspec() }
//}
//fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
// unsafe { TODO: call ffi::ges_timeline_element_set_child_property_valist() }
//}
fn set_duration(&self, duration: gst::ClockTime) {
unsafe {
ffi::ges_timeline_element_set_duration(self.to_glib_none().0, duration.to_glib());
}
}
fn set_inpoint(&self, inpoint: gst::ClockTime) {
unsafe {
ffi::ges_timeline_element_set_inpoint(self.to_glib_none().0, inpoint.to_glib());
}
}
fn set_max_duration(&self, maxduration: gst::ClockTime) {
unsafe {
ffi::ges_timeline_element_set_max_duration(self.to_glib_none().0, maxduration.to_glib());
}
}
fn set_name<'a, P: Into<Option<&'a str>>>(&self, name: P) -> bool {
let name = name.into();
let name = name.to_glib_none();
unsafe {
from_glib(ffi::ges_timeline_element_set_name(self.to_glib_none().0, name.0))
}
}
fn set_parent<P: IsA<TimelineElement>>(&self, parent: &P) -> bool {
unsafe {
from_glib(ffi::ges_timeline_element_set_parent(self.to_glib_none().0, parent.to_glib_none().0))
}
}
fn set_priority(&self, priority: u32) {
unsafe {
ffi::ges_timeline_element_set_priority(self.to_glib_none().0, priority);
}
}
fn set_start(&self, start: gst::ClockTime) {
unsafe {
ffi::ges_timeline_element_set_start(self.to_glib_none().0, start.to_glib());
}
}
fn set_timeline(&self, timeline: &Timeline) -> bool {
unsafe {
from_glib(ffi::ges_timeline_element_set_timeline(self.to_glib_none().0, timeline.to_glib_none().0))
}
}
fn trim(&self, start: gst::ClockTime) -> bool {
unsafe {
from_glib(ffi::ges_timeline_element_trim(self.to_glib_none().0, start.to_glib()))
}
}
fn get_property_in_point(&self) -> u64 {
unsafe {
let mut value = Value::from_type(<u64 as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
fn set_property_in_point(&self, in_point: u64) {
unsafe {
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0);
}
}
fn get_property_serialize(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
fn set_property_serialize(&self, serialize: bool) {
unsafe {
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, Value::from(&serialize).to_glib_none().0);
}
}
//fn connect_deep_notify<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
// Ignored prop: GObject.ParamSpec
//}
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
connect_raw(self.to_glib_none().0 as *mut _, b"notify::duration\0".as_ptr() as *const _,
transmute(notify_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
connect_raw(self.to_glib_none().0 as *mut _, b"notify::in-point\0".as_ptr() as *const _,
transmute(notify_in_point_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_max_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
connect_raw(self.to_glib_none().0 as *mut _, b"notify::max-duration\0".as_ptr() as *const _,
transmute(notify_max_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
connect_raw(self.to_glib_none().0 as *mut _, b"notify::name\0".as_ptr() as *const _,
transmute(notify_name_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
connect_raw(self.to_glib_none().0 as *mut _, b"notify::parent\0".as_ptr() as *const _,
transmute(notify_parent_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
connect_raw(self.to_glib_none().0 as *mut _, b"notify::priority\0".as_ptr() as *const _,
transmute(notify_priority_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_serialize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
connect_raw(self.to_glib_none().0 as *mut _, b"notify::serialize\0".as_ptr() as *const _,
transmute(notify_serialize_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
connect_raw(self.to_glib_none().0 as *mut _, b"notify::start\0".as_ptr() as *const _,
transmute(notify_start_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
connect_raw(self.to_glib_none().0 as *mut _, b"notify::timeline\0".as_ptr() as *const _,
transmute(notify_timeline_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
}
unsafe extern "C" fn notify_duration_trampoline<P>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<TimelineElement> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&TimelineElement::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_in_point_trampoline<P>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<TimelineElement> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&TimelineElement::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_max_duration_trampoline<P>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<TimelineElement> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&TimelineElement::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_name_trampoline<P>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<TimelineElement> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&TimelineElement::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_parent_trampoline<P>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<TimelineElement> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&TimelineElement::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_priority_trampoline<P>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<TimelineElement> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&TimelineElement::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_serialize_trampoline<P>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<TimelineElement> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&TimelineElement::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_start_trampoline<P>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<TimelineElement> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&TimelineElement::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_timeline_trampoline<P>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<TimelineElement> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&TimelineElement::from_glib_borrow(this).downcast_unchecked())
}