gdk_pixbuf/auto/
flags.rs

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
// 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 crate::ffi;
use glib::{bitflags::bitflags, translate::*};

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkPixbufFormatFlags")]
    pub struct PixbufFormatFlags: u32 {
        #[doc(alias = "GDK_PIXBUF_FORMAT_WRITABLE")]
        const WRITABLE = ffi::GDK_PIXBUF_FORMAT_WRITABLE as _;
        #[doc(alias = "GDK_PIXBUF_FORMAT_SCALABLE")]
        const SCALABLE = ffi::GDK_PIXBUF_FORMAT_SCALABLE as _;
        #[doc(alias = "GDK_PIXBUF_FORMAT_THREADSAFE")]
        const THREADSAFE = ffi::GDK_PIXBUF_FORMAT_THREADSAFE as _;
    }
}

#[doc(hidden)]
impl IntoGlib for PixbufFormatFlags {
    type GlibType = ffi::GdkPixbufFormatFlags;

    #[inline]
    fn into_glib(self) -> ffi::GdkPixbufFormatFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::GdkPixbufFormatFlags> for PixbufFormatFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkPixbufFormatFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}