1 | // This file was generated by gir (https://github.com/gtk-rs/gir) |
2 | // from gir-files (https://github.com/gtk-rs/gir-files) |
3 | // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) |
4 | // DO NOT EDIT |
5 | |
6 | use crate::{Element, Object, Toc}; |
7 | use glib::{prelude::*, translate::*}; |
8 | |
9 | glib::wrapper! { |
10 | #[doc (alias = "GstTocSetter" )] |
11 | pub struct TocSetter(Interface<ffi::GstTocSetter, ffi::GstTocSetterInterface>) @requires Element, Object; |
12 | |
13 | match fn { |
14 | type_ => || ffi::gst_toc_setter_get_type(), |
15 | } |
16 | } |
17 | |
18 | impl TocSetter { |
19 | pub const NONE: Option<&'static TocSetter> = None; |
20 | } |
21 | |
22 | unsafe impl Send for TocSetter {} |
23 | unsafe impl Sync for TocSetter {} |
24 | |
25 | mod sealed { |
26 | pub trait Sealed {} |
27 | impl<T: super::IsA<super::TocSetter>> Sealed for T {} |
28 | } |
29 | |
30 | pub trait TocSetterExt: IsA<TocSetter> + sealed::Sealed + 'static { |
31 | #[doc (alias = "gst_toc_setter_get_toc" )] |
32 | #[doc (alias = "get_toc" )] |
33 | fn toc(&self) -> Option<Toc> { |
34 | unsafe { from_glib_full(ptr:ffi::gst_toc_setter_get_toc(self.as_ref().to_glib_none().0)) } |
35 | } |
36 | |
37 | #[doc (alias = "gst_toc_setter_reset" )] |
38 | fn reset(&self) { |
39 | unsafe { |
40 | ffi::gst_toc_setter_reset(self.as_ref().to_glib_none().0); |
41 | } |
42 | } |
43 | |
44 | #[doc (alias = "gst_toc_setter_set_toc" )] |
45 | fn set_toc(&self, toc: Option<&Toc>) { |
46 | unsafe { |
47 | ffi::gst_toc_setter_set_toc(self.as_ref().to_glib_none().0, toc:toc.to_glib_none().0); |
48 | } |
49 | } |
50 | } |
51 | |
52 | impl<O: IsA<TocSetter>> TocSetterExt for O {} |
53 | |