gstreamer-rs/gstreamer-editing-services/src/auto/group.rs

220 lines
7.8 KiB
Rust
Raw Normal View History

// 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 Container;
use Extractable;
use TimelineElement;
use ffi;
use glib;
use glib::StaticType;
use glib::Value;
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 Group(Object<ffi::GESGroup, ffi::GESGroupClass>): Container, TimelineElement, Extractable;
match fn {
get_type => || ffi::ges_group_get_type(),
}
}
impl Group {
pub fn new() -> Group {
assert_initialized_main_thread!();
unsafe {
from_glib_none(ffi::ges_group_new())
}
}
}
impl Default for Group {
fn default() -> Self {
Self::new()
}
}
pub trait GroupExt {
fn get_property_duration(&self) -> u64;
fn set_property_duration(&self, duration: u64);
fn get_property_in_point(&self) -> u64;
fn set_property_in_point(&self, in_point: u64);
fn get_property_max_duration(&self) -> u64;
fn set_property_max_duration(&self, max_duration: u64);
fn get_property_priority(&self) -> u32;
fn set_property_priority(&self, priority: u32);
fn get_property_start(&self) -> u64;
fn set_property_start(&self, start: u64);
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_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
}
impl<O: IsA<Group> + IsA<glib::object::Object>> GroupExt for O {
fn get_property_duration(&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, "duration".to_glib_none().0, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
fn set_property_duration(&self, duration: u64) {
unsafe {
gobject_ffi::g_object_set_property(self.to_glib_none().0, "duration".to_glib_none().0, Value::from(&duration).to_glib_none().0);
}
}
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, "in-point".to_glib_none().0, 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, "in-point".to_glib_none().0, Value::from(&in_point).to_glib_none().0);
}
}
fn get_property_max_duration(&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, "max-duration".to_glib_none().0, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
fn set_property_max_duration(&self, max_duration: u64) {
unsafe {
gobject_ffi::g_object_set_property(self.to_glib_none().0, "max-duration".to_glib_none().0, Value::from(&max_duration).to_glib_none().0);
}
}
fn get_property_priority(&self) -> u32 {
unsafe {
let mut value = Value::from_type(<u32 as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0, "priority".to_glib_none().0, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
fn set_property_priority(&self, priority: u32) {
unsafe {
gobject_ffi::g_object_set_property(self.to_glib_none().0, "priority".to_glib_none().0, Value::from(&priority).to_glib_none().0);
}
}
fn get_property_start(&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, "start".to_glib_none().0, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
fn set_property_start(&self, start: u64) {
unsafe {
gobject_ffi::g_object_set_property(self.to_glib_none().0, "start".to_glib_none().0, Value::from(&start).to_glib_none().0);
}
}
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(self.to_glib_none().0, "notify::duration",
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(self.to_glib_none().0, "notify::in-point",
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(self.to_glib_none().0, "notify::max-duration",
transmute(notify_max_duration_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(self.to_glib_none().0, "notify::priority",
transmute(notify_priority_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(self.to_glib_none().0, "notify::start",
transmute(notify_start_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
}
}
}
unsafe extern "C" fn notify_duration_trampoline<P>(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Group> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Group::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_in_point_trampoline<P>(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Group> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Group::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_max_duration_trampoline<P>(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Group> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Group::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_priority_trampoline<P>(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Group> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Group::from_glib_borrow(this).downcast_unchecked())
}
unsafe extern "C" fn notify_start_trampoline<P>(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Group> {
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Group::from_glib_borrow(this).downcast_unchecked())
}