2020-06-09 01:06:49 +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-21 13:46:33 +00:00
|
|
|
use crate::ClockTime;
|
|
|
|
use crate::Object;
|
2020-06-09 01:06:49 +00:00
|
|
|
use glib::object::IsA;
|
|
|
|
use glib::translate::*;
|
|
|
|
use glib::StaticType;
|
|
|
|
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::wrapper! {
|
2020-11-21 13:46:33 +00:00
|
|
|
pub struct ControlBinding(Object<ffi::GstControlBinding, ffi::GstControlBindingClass>) @extends Object;
|
2020-06-09 01:06:49 +00:00
|
|
|
|
|
|
|
match fn {
|
2020-11-21 13:46:33 +00:00
|
|
|
get_type => || ffi::gst_control_binding_get_type(),
|
2020-06-09 01:06:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
unsafe impl Send for ControlBinding {}
|
|
|
|
unsafe impl Sync for ControlBinding {}
|
|
|
|
|
|
|
|
pub const NONE_CONTROL_BINDING: Option<&ControlBinding> = None;
|
|
|
|
|
|
|
|
pub trait ControlBindingExt: 'static {
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_control_binding_get_value")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn get_value(&self, timestamp: ClockTime) -> Option<glib::Value>;
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
//#[doc(alias = "gst_control_binding_get_value_array")]
|
2020-06-09 01:06:49 +00:00
|
|
|
//fn get_value_array(&self, timestamp: ClockTime, interval: ClockTime, values: /*Unimplemented*/&[&Fundamental: Pointer]) -> bool;
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_control_binding_is_disabled")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn is_disabled(&self) -> bool;
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_control_binding_set_disabled")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn set_disabled(&self, disabled: bool);
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_control_binding_sync_values")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn sync_values<P: IsA<Object>>(
|
|
|
|
&self,
|
|
|
|
object: &P,
|
|
|
|
timestamp: ClockTime,
|
|
|
|
last_sync: ClockTime,
|
|
|
|
) -> bool;
|
|
|
|
|
|
|
|
fn get_property_object(&self) -> Option<Object>;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<O: IsA<ControlBinding>> ControlBindingExt for O {
|
|
|
|
fn get_value(&self, timestamp: ClockTime) -> Option<glib::Value> {
|
|
|
|
unsafe {
|
2020-11-21 13:46:33 +00:00
|
|
|
from_glib_full(ffi::gst_control_binding_get_value(
|
2020-06-09 01:06:49 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
timestamp.to_glib(),
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//fn get_value_array(&self, timestamp: ClockTime, interval: ClockTime, values: /*Unimplemented*/&[&Fundamental: Pointer]) -> bool {
|
2020-11-21 13:46:33 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_control_binding_get_value_array() }
|
2020-06-09 01:06:49 +00:00
|
|
|
//}
|
|
|
|
|
|
|
|
fn is_disabled(&self) -> bool {
|
|
|
|
unsafe {
|
2020-11-21 13:46:33 +00:00
|
|
|
from_glib(ffi::gst_control_binding_is_disabled(
|
2020-06-09 01:06:49 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn set_disabled(&self, disabled: bool) {
|
|
|
|
unsafe {
|
2020-11-21 13:46:33 +00:00
|
|
|
ffi::gst_control_binding_set_disabled(
|
2020-06-09 01:06:49 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
disabled.to_glib(),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn sync_values<P: IsA<Object>>(
|
|
|
|
&self,
|
|
|
|
object: &P,
|
|
|
|
timestamp: ClockTime,
|
|
|
|
last_sync: ClockTime,
|
|
|
|
) -> bool {
|
|
|
|
unsafe {
|
2020-11-21 13:46:33 +00:00
|
|
|
from_glib(ffi::gst_control_binding_sync_values(
|
2020-06-09 01:06:49 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
object.as_ref().to_glib_none().0,
|
|
|
|
timestamp.to_glib(),
|
|
|
|
last_sync.to_glib(),
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_property_object(&self) -> Option<Object> {
|
|
|
|
unsafe {
|
2020-11-27 13:37:24 +00:00
|
|
|
let mut value = glib::Value::from_type(<Object as StaticType>::static_type());
|
2020-11-21 13:46:33 +00:00
|
|
|
glib::gobject_ffi::g_object_get_property(
|
|
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
2020-06-09 01:06:49 +00:00
|
|
|
b"object\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `object` getter")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|