gdk4/auto/content_formats_builder.rs
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// DO NOT EDIT
4
5use crate::ffi;
6use glib::translate::*;
7
8glib::wrapper! {
9 /// Auxiliary object to create a [`ContentFormats`][crate::ContentFormats].
10 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
11 pub struct ContentFormatsBuilder(Shared<ffi::GdkContentFormatsBuilder>);
12
13 match fn {
14 ref => |ptr| ffi::gdk_content_formats_builder_ref(ptr),
15 unref => |ptr| ffi::gdk_content_formats_builder_unref(ptr),
16 type_ => || ffi::gdk_content_formats_builder_get_type(),
17 }
18}
19
20impl ContentFormatsBuilder {
21 /// Create a new [`ContentFormatsBuilder`][crate::ContentFormatsBuilder] object.
22 ///
23 /// The resulting builder would create an empty [`ContentFormats`][crate::ContentFormats].
24 /// Use addition functions to add types to it.
25 ///
26 /// # Returns
27 ///
28 /// a new [`ContentFormatsBuilder`][crate::ContentFormatsBuilder]
29 #[doc(alias = "gdk_content_formats_builder_new")]
30 pub fn new() -> ContentFormatsBuilder {
31 assert_initialized_main_thread!();
32 unsafe { from_glib_full(ffi::gdk_content_formats_builder_new()) }
33 }
34}
35
36impl Default for ContentFormatsBuilder {
37 fn default() -> Self {
38 Self::new()
39 }
40}