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
// 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 glib::translate::*;

glib::wrapper! {
    /// A [`ContentFormatsBuilder`][crate::ContentFormatsBuilder] is an auxiliary struct used to create
    /// new [`ContentFormats`][crate::ContentFormats], and should not be kept around.
    #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct ContentFormatsBuilder(Shared<ffi::GdkContentFormatsBuilder>);

    match fn {
        ref => |ptr| ffi::gdk_content_formats_builder_ref(ptr),
        unref => |ptr| ffi::gdk_content_formats_builder_unref(ptr),
        type_ => || ffi::gdk_content_formats_builder_get_type(),
    }
}

impl ContentFormatsBuilder {
    /// Create a new [`ContentFormatsBuilder`][crate::ContentFormatsBuilder] object.
    ///
    /// The resulting builder would create an empty [`ContentFormats`][crate::ContentFormats].
    /// Use addition functions to add types to it.
    ///
    /// # Returns
    ///
    /// a new [`ContentFormatsBuilder`][crate::ContentFormatsBuilder]
    #[doc(alias = "gdk_content_formats_builder_new")]
    pub fn new() -> ContentFormatsBuilder {
        assert_initialized_main_thread!();
        unsafe { from_glib_full(ffi::gdk_content_formats_builder_new()) }
    }
}

impl Default for ContentFormatsBuilder {
    fn default() -> Self {
        Self::new()
    }
}