1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
use crate::{ContentFormats, ContentFormatsBuilder};
use glib::translate::*;
impl ContentFormats {
#[doc(alias = "gdk_content_formats_get_gtypes")]
#[doc(alias = "get_gtypes")]
pub fn types(&self) -> Vec<glib::Type> {
unsafe {
let mut n_types = std::mem::MaybeUninit::uninit();
let types =
ffi::gdk_content_formats_get_gtypes(self.to_glib_none().0, n_types.as_mut_ptr());
FromGlibContainer::from_glib_none_num(types, n_types.assume_init() as _)
}
}
pub fn builder() -> ContentFormatsBuilder {
ContentFormatsBuilder::default()
}
}
#[cfg(any(feature = "v4_4", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_4")))]
impl std::str::FromStr for ContentFormats {
type Err = glib::BoolError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
skip_assert_initialized!();
ContentFormats::parse(s)
}
}