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 38 39 40 41 42 43
// 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! {
/// Flags which allow a module to specify further details about the supported
/// operations.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "GdkPixbufFormatFlags")]
pub struct PixbufFormatFlags: u32 {
/// the module can write out images in the format.
#[doc(alias = "GDK_PIXBUF_FORMAT_WRITABLE")]
const WRITABLE = ffi::GDK_PIXBUF_FORMAT_WRITABLE as _;
/// the image format is scalable
#[doc(alias = "GDK_PIXBUF_FORMAT_SCALABLE")]
const SCALABLE = ffi::GDK_PIXBUF_FORMAT_SCALABLE as _;
/// the module is threadsafe. gdk-pixbuf
/// ignores modules that are not marked as threadsafe. (Since 2.28).
#[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)
}
}