2018-10-31 16:10:30 +00:00
|
|
|
// 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
|
|
|
|
|
2020-11-22 10:12:36 +00:00
|
|
|
use crate::Container;
|
|
|
|
use crate::Extractable;
|
|
|
|
use crate::TimelineElement;
|
2019-01-16 11:32:39 +00:00
|
|
|
use glib::object::Cast;
|
2018-10-31 16:10:30 +00:00
|
|
|
use glib::object::IsA;
|
2018-12-08 09:05:20 +00:00
|
|
|
use glib::signal::connect_raw;
|
2019-06-18 10:12:00 +00:00
|
|
|
use glib::signal::SignalHandlerId;
|
2018-10-31 16:10:30 +00:00
|
|
|
use glib::translate::*;
|
2019-06-18 10:12:00 +00:00
|
|
|
use glib::StaticType;
|
2018-10-31 16:10:30 +00:00
|
|
|
use std::boxed::Box as Box_;
|
2020-04-13 16:11:33 +00:00
|
|
|
use std::mem::transmute;
|
2018-10-31 16:10:30 +00:00
|
|
|
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::wrapper! {
|
2020-11-22 10:12:36 +00:00
|
|
|
pub struct Group(Object<ffi::GESGroup, ffi::GESGroupClass>) @extends Container, TimelineElement, @implements Extractable;
|
2018-10-31 16:10:30 +00:00
|
|
|
|
|
|
|
match fn {
|
2020-11-22 10:12:36 +00:00
|
|
|
get_type => || ffi::ges_group_get_type(),
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Group {
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "ges_group_new")]
|
2018-10-31 16:10:30 +00:00
|
|
|
pub fn new() -> Group {
|
|
|
|
assert_initialized_main_thread!();
|
2020-11-22 10:12:36 +00:00
|
|
|
unsafe { from_glib_none(ffi::ges_group_new()) }
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Default for Group {
|
|
|
|
fn default() -> Self {
|
|
|
|
Self::new()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-16 11:32:39 +00:00
|
|
|
pub const NONE_GROUP: Option<&Group> = None;
|
|
|
|
|
2018-12-08 09:05:20 +00:00
|
|
|
pub trait GroupExt: 'static {
|
2018-10-31 16:10:30 +00:00
|
|
|
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;
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_property_max_duration_notify<F: Fn(&Self) + 'static>(&self, f: F)
|
|
|
|
-> SignalHandlerId;
|
2018-10-31 16:10:30 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2018-12-08 09:05:20 +00:00
|
|
|
impl<O: IsA<Group>> GroupExt for O {
|
2018-10-31 16:10:30 +00:00
|
|
|
fn get_property_duration(&self) -> u64 {
|
|
|
|
unsafe {
|
2020-11-27 13:37:24 +00:00
|
|
|
let mut value = glib::Value::from_type(<u64 as StaticType>::static_type());
|
2020-11-22 10:12:36 +00:00
|
|
|
glib::gobject_ffi::g_object_get_property(
|
|
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
2019-06-18 10:12:00 +00:00
|
|
|
b"duration\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `duration` getter")
|
|
|
|
.unwrap()
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn set_property_duration(&self, duration: u64) {
|
|
|
|
unsafe {
|
2020-11-22 10:12:36 +00:00
|
|
|
glib::gobject_ffi::g_object_set_property(
|
|
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
2019-06-18 10:12:00 +00:00
|
|
|
b"duration\0".as_ptr() as *const _,
|
2020-11-27 13:37:24 +00:00
|
|
|
glib::Value::from(&duration).to_glib_none().0,
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_property_in_point(&self) -> u64 {
|
|
|
|
unsafe {
|
2020-11-27 13:37:24 +00:00
|
|
|
let mut value = glib::Value::from_type(<u64 as StaticType>::static_type());
|
2020-11-22 10:12:36 +00:00
|
|
|
glib::gobject_ffi::g_object_get_property(
|
|
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
2019-06-18 10:12:00 +00:00
|
|
|
b"in-point\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `in-point` getter")
|
|
|
|
.unwrap()
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn set_property_in_point(&self, in_point: u64) {
|
|
|
|
unsafe {
|
2020-11-22 10:12:36 +00:00
|
|
|
glib::gobject_ffi::g_object_set_property(
|
|
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
2019-06-18 10:12:00 +00:00
|
|
|
b"in-point\0".as_ptr() as *const _,
|
2020-11-27 13:37:24 +00:00
|
|
|
glib::Value::from(&in_point).to_glib_none().0,
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_property_max_duration(&self) -> u64 {
|
|
|
|
unsafe {
|
2020-11-27 13:37:24 +00:00
|
|
|
let mut value = glib::Value::from_type(<u64 as StaticType>::static_type());
|
2020-11-22 10:12:36 +00:00
|
|
|
glib::gobject_ffi::g_object_get_property(
|
|
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
2019-06-18 10:12:00 +00:00
|
|
|
b"max-duration\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `max-duration` getter")
|
|
|
|
.unwrap()
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn set_property_max_duration(&self, max_duration: u64) {
|
|
|
|
unsafe {
|
2020-11-22 10:12:36 +00:00
|
|
|
glib::gobject_ffi::g_object_set_property(
|
|
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
2019-06-18 10:12:00 +00:00
|
|
|
b"max-duration\0".as_ptr() as *const _,
|
2020-11-27 13:37:24 +00:00
|
|
|
glib::Value::from(&max_duration).to_glib_none().0,
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_property_priority(&self) -> u32 {
|
|
|
|
unsafe {
|
2020-11-27 13:37:24 +00:00
|
|
|
let mut value = glib::Value::from_type(<u32 as StaticType>::static_type());
|
2020-11-22 10:12:36 +00:00
|
|
|
glib::gobject_ffi::g_object_get_property(
|
|
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
2019-06-18 10:12:00 +00:00
|
|
|
b"priority\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `priority` getter")
|
|
|
|
.unwrap()
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn set_property_priority(&self, priority: u32) {
|
|
|
|
unsafe {
|
2020-11-22 10:12:36 +00:00
|
|
|
glib::gobject_ffi::g_object_set_property(
|
|
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
2019-06-18 10:12:00 +00:00
|
|
|
b"priority\0".as_ptr() as *const _,
|
2020-11-27 13:37:24 +00:00
|
|
|
glib::Value::from(&priority).to_glib_none().0,
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_property_start(&self) -> u64 {
|
|
|
|
unsafe {
|
2020-11-27 13:37:24 +00:00
|
|
|
let mut value = glib::Value::from_type(<u64 as StaticType>::static_type());
|
2020-11-22 10:12:36 +00:00
|
|
|
glib::gobject_ffi::g_object_get_property(
|
|
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
2019-06-18 10:12:00 +00:00
|
|
|
b"start\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `start` getter")
|
|
|
|
.unwrap()
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn set_property_start(&self, start: u64) {
|
|
|
|
unsafe {
|
2020-11-22 10:12:36 +00:00
|
|
|
glib::gobject_ffi::g_object_set_property(
|
|
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
2019-06-18 10:12:00 +00:00
|
|
|
b"start\0".as_ptr() as *const _,
|
2020-11-27 13:37:24 +00:00
|
|
|
glib::Value::from(&start).to_glib_none().0,
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
2019-06-18 10:12:00 +00:00
|
|
|
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(
|
2020-11-22 10:12:36 +00:00
|
|
|
this: *mut ffi::GESGroup,
|
|
|
|
_param_spec: glib::ffi::gpointer,
|
|
|
|
f: glib::ffi::gpointer,
|
2019-06-18 10:12:00 +00:00
|
|
|
) where
|
|
|
|
P: IsA<Group>,
|
2019-06-18 10:10:46 +00:00
|
|
|
{
|
|
|
|
let f: &F = &*(f as *const F);
|
2020-04-05 14:52:56 +00:00
|
|
|
f(&Group::from_glib_borrow(this).unsafe_cast_ref())
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-10-31 16:10:30 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::duration\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_duration_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn connect_property_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
2019-06-18 10:12:00 +00:00
|
|
|
unsafe extern "C" fn notify_in_point_trampoline<P, F: Fn(&P) + 'static>(
|
2020-11-22 10:12:36 +00:00
|
|
|
this: *mut ffi::GESGroup,
|
|
|
|
_param_spec: glib::ffi::gpointer,
|
|
|
|
f: glib::ffi::gpointer,
|
2019-06-18 10:12:00 +00:00
|
|
|
) where
|
|
|
|
P: IsA<Group>,
|
2019-06-18 10:10:46 +00:00
|
|
|
{
|
|
|
|
let f: &F = &*(f as *const F);
|
2020-04-05 14:52:56 +00:00
|
|
|
f(&Group::from_glib_borrow(this).unsafe_cast_ref())
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-10-31 16:10:30 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::in-point\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_in_point_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_property_max_duration_notify<F: Fn(&Self) + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_max_duration_trampoline<P, F: Fn(&P) + 'static>(
|
2020-11-22 10:12:36 +00:00
|
|
|
this: *mut ffi::GESGroup,
|
|
|
|
_param_spec: glib::ffi::gpointer,
|
|
|
|
f: glib::ffi::gpointer,
|
2019-06-18 10:12:00 +00:00
|
|
|
) where
|
|
|
|
P: IsA<Group>,
|
2019-06-18 10:10:46 +00:00
|
|
|
{
|
|
|
|
let f: &F = &*(f as *const F);
|
2020-04-05 14:52:56 +00:00
|
|
|
f(&Group::from_glib_borrow(this).unsafe_cast_ref())
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-10-31 16:10:30 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::max-duration\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_max_duration_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
2019-06-18 10:12:00 +00:00
|
|
|
unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>(
|
2020-11-22 10:12:36 +00:00
|
|
|
this: *mut ffi::GESGroup,
|
|
|
|
_param_spec: glib::ffi::gpointer,
|
|
|
|
f: glib::ffi::gpointer,
|
2019-06-18 10:12:00 +00:00
|
|
|
) where
|
|
|
|
P: IsA<Group>,
|
2019-06-18 10:10:46 +00:00
|
|
|
{
|
|
|
|
let f: &F = &*(f as *const F);
|
2020-04-05 14:52:56 +00:00
|
|
|
f(&Group::from_glib_borrow(this).unsafe_cast_ref())
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-10-31 16:10:30 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::priority\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_priority_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
2019-06-18 10:12:00 +00:00
|
|
|
unsafe extern "C" fn notify_start_trampoline<P, F: Fn(&P) + 'static>(
|
2020-11-22 10:12:36 +00:00
|
|
|
this: *mut ffi::GESGroup,
|
|
|
|
_param_spec: glib::ffi::gpointer,
|
|
|
|
f: glib::ffi::gpointer,
|
2019-06-18 10:12:00 +00:00
|
|
|
) where
|
|
|
|
P: IsA<Group>,
|
2019-06-18 10:10:46 +00:00
|
|
|
{
|
|
|
|
let f: &F = &*(f as *const F);
|
2020-04-05 14:52:56 +00:00
|
|
|
f(&Group::from_glib_borrow(this).unsafe_cast_ref())
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-10-31 16:10:30 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::start\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_start_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-10-31 16:10:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|