// 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::{bitflags::bitflags, prelude::*, translate::*};
use std::fmt;

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkAnchorHints")]
    pub struct AnchorHints: u32 {
        #[doc(alias = "GDK_ANCHOR_FLIP_X")]
        const FLIP_X = ffi::GDK_ANCHOR_FLIP_X as _;
        #[doc(alias = "GDK_ANCHOR_FLIP_Y")]
        const FLIP_Y = ffi::GDK_ANCHOR_FLIP_Y as _;
        #[doc(alias = "GDK_ANCHOR_SLIDE_X")]
        const SLIDE_X = ffi::GDK_ANCHOR_SLIDE_X as _;
        #[doc(alias = "GDK_ANCHOR_SLIDE_Y")]
        const SLIDE_Y = ffi::GDK_ANCHOR_SLIDE_Y as _;
        #[doc(alias = "GDK_ANCHOR_RESIZE_X")]
        const RESIZE_X = ffi::GDK_ANCHOR_RESIZE_X as _;
        #[doc(alias = "GDK_ANCHOR_RESIZE_Y")]
        const RESIZE_Y = ffi::GDK_ANCHOR_RESIZE_Y as _;
        #[doc(alias = "GDK_ANCHOR_FLIP")]
        const FLIP = ffi::GDK_ANCHOR_FLIP as _;
        #[doc(alias = "GDK_ANCHOR_SLIDE")]
        const SLIDE = ffi::GDK_ANCHOR_SLIDE as _;
        #[doc(alias = "GDK_ANCHOR_RESIZE")]
        const RESIZE = ffi::GDK_ANCHOR_RESIZE as _;
    }
}

impl fmt::Display for AnchorHints {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

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

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

#[doc(hidden)]
impl FromGlib<ffi::GdkAnchorHints> for AnchorHints {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkAnchorHints) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for AnchorHints {
    #[inline]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::gdk_anchor_hints_get_type()) }
    }
}

impl glib::HasParamSpec for AnchorHints {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name| Self::ParamSpec::builder(name)
    }
}

impl glib::value::ValueType for AnchorHints {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for AnchorHints {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for AnchorHints {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<AnchorHints> for glib::Value {
    #[inline]
    fn from(v: AnchorHints) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkAxisFlags")]
    pub struct AxisFlags: u32 {
        #[doc(alias = "GDK_AXIS_FLAG_X")]
        const X = ffi::GDK_AXIS_FLAG_X as _;
        #[doc(alias = "GDK_AXIS_FLAG_Y")]
        const Y = ffi::GDK_AXIS_FLAG_Y as _;
        #[doc(alias = "GDK_AXIS_FLAG_PRESSURE")]
        const PRESSURE = ffi::GDK_AXIS_FLAG_PRESSURE as _;
        #[doc(alias = "GDK_AXIS_FLAG_XTILT")]
        const XTILT = ffi::GDK_AXIS_FLAG_XTILT as _;
        #[doc(alias = "GDK_AXIS_FLAG_YTILT")]
        const YTILT = ffi::GDK_AXIS_FLAG_YTILT as _;
        #[doc(alias = "GDK_AXIS_FLAG_WHEEL")]
        const WHEEL = ffi::GDK_AXIS_FLAG_WHEEL as _;
        #[doc(alias = "GDK_AXIS_FLAG_DISTANCE")]
        const DISTANCE = ffi::GDK_AXIS_FLAG_DISTANCE as _;
        #[doc(alias = "GDK_AXIS_FLAG_ROTATION")]
        const ROTATION = ffi::GDK_AXIS_FLAG_ROTATION as _;
        #[doc(alias = "GDK_AXIS_FLAG_SLIDER")]
        const SLIDER = ffi::GDK_AXIS_FLAG_SLIDER as _;
    }
}

impl fmt::Display for AxisFlags {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

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

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

#[doc(hidden)]
impl FromGlib<ffi::GdkAxisFlags> for AxisFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkAxisFlags) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for AxisFlags {
    #[inline]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::gdk_axis_flags_get_type()) }
    }
}

impl glib::HasParamSpec for AxisFlags {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name| Self::ParamSpec::builder(name)
    }
}

impl glib::value::ValueType for AxisFlags {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for AxisFlags {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for AxisFlags {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<AxisFlags> for glib::Value {
    #[inline]
    fn from(v: AxisFlags) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkDragAction")]
    pub struct DragAction: u32 {
        #[doc(alias = "GDK_ACTION_DEFAULT")]
        const DEFAULT = ffi::GDK_ACTION_DEFAULT as _;
        #[doc(alias = "GDK_ACTION_COPY")]
        const COPY = ffi::GDK_ACTION_COPY as _;
        #[doc(alias = "GDK_ACTION_MOVE")]
        const MOVE = ffi::GDK_ACTION_MOVE as _;
        #[doc(alias = "GDK_ACTION_LINK")]
        const LINK = ffi::GDK_ACTION_LINK as _;
        #[doc(alias = "GDK_ACTION_PRIVATE")]
        const PRIVATE = ffi::GDK_ACTION_PRIVATE as _;
        #[doc(alias = "GDK_ACTION_ASK")]
        const ASK = ffi::GDK_ACTION_ASK as _;
    }
}

impl fmt::Display for DragAction {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

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

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

#[doc(hidden)]
impl FromGlib<ffi::GdkDragAction> for DragAction {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkDragAction) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for DragAction {
    #[inline]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::gdk_drag_action_get_type()) }
    }
}

impl glib::HasParamSpec for DragAction {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name| Self::ParamSpec::builder(name)
    }
}

impl glib::value::ValueType for DragAction {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for DragAction {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for DragAction {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<DragAction> for glib::Value {
    #[inline]
    fn from(v: DragAction) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkEventMask")]
    pub struct EventMask: u32 {
        #[doc(alias = "GDK_EXPOSURE_MASK")]
        const EXPOSURE_MASK = ffi::GDK_EXPOSURE_MASK as _;
        #[doc(alias = "GDK_POINTER_MOTION_MASK")]
        const POINTER_MOTION_MASK = ffi::GDK_POINTER_MOTION_MASK as _;
        #[doc(alias = "GDK_POINTER_MOTION_HINT_MASK")]
        const POINTER_MOTION_HINT_MASK = ffi::GDK_POINTER_MOTION_HINT_MASK as _;
        #[doc(alias = "GDK_BUTTON_MOTION_MASK")]
        const BUTTON_MOTION_MASK = ffi::GDK_BUTTON_MOTION_MASK as _;
        #[doc(alias = "GDK_BUTTON1_MOTION_MASK")]
        const BUTTON1_MOTION_MASK = ffi::GDK_BUTTON1_MOTION_MASK as _;
        #[doc(alias = "GDK_BUTTON2_MOTION_MASK")]
        const BUTTON2_MOTION_MASK = ffi::GDK_BUTTON2_MOTION_MASK as _;
        #[doc(alias = "GDK_BUTTON3_MOTION_MASK")]
        const BUTTON3_MOTION_MASK = ffi::GDK_BUTTON3_MOTION_MASK as _;
        #[doc(alias = "GDK_BUTTON_PRESS_MASK")]
        const BUTTON_PRESS_MASK = ffi::GDK_BUTTON_PRESS_MASK as _;
        #[doc(alias = "GDK_BUTTON_RELEASE_MASK")]
        const BUTTON_RELEASE_MASK = ffi::GDK_BUTTON_RELEASE_MASK as _;
        #[doc(alias = "GDK_KEY_PRESS_MASK")]
        const KEY_PRESS_MASK = ffi::GDK_KEY_PRESS_MASK as _;
        #[doc(alias = "GDK_KEY_RELEASE_MASK")]
        const KEY_RELEASE_MASK = ffi::GDK_KEY_RELEASE_MASK as _;
        #[doc(alias = "GDK_ENTER_NOTIFY_MASK")]
        const ENTER_NOTIFY_MASK = ffi::GDK_ENTER_NOTIFY_MASK as _;
        #[doc(alias = "GDK_LEAVE_NOTIFY_MASK")]
        const LEAVE_NOTIFY_MASK = ffi::GDK_LEAVE_NOTIFY_MASK as _;
        #[doc(alias = "GDK_FOCUS_CHANGE_MASK")]
        const FOCUS_CHANGE_MASK = ffi::GDK_FOCUS_CHANGE_MASK as _;
        #[doc(alias = "GDK_STRUCTURE_MASK")]
        const STRUCTURE_MASK = ffi::GDK_STRUCTURE_MASK as _;
        #[doc(alias = "GDK_PROPERTY_CHANGE_MASK")]
        const PROPERTY_CHANGE_MASK = ffi::GDK_PROPERTY_CHANGE_MASK as _;
        #[doc(alias = "GDK_VISIBILITY_NOTIFY_MASK")]
        const VISIBILITY_NOTIFY_MASK = ffi::GDK_VISIBILITY_NOTIFY_MASK as _;
        #[doc(alias = "GDK_PROXIMITY_IN_MASK")]
        const PROXIMITY_IN_MASK = ffi::GDK_PROXIMITY_IN_MASK as _;
        #[doc(alias = "GDK_PROXIMITY_OUT_MASK")]
        const PROXIMITY_OUT_MASK = ffi::GDK_PROXIMITY_OUT_MASK as _;
        #[doc(alias = "GDK_SUBSTRUCTURE_MASK")]
        const SUBSTRUCTURE_MASK = ffi::GDK_SUBSTRUCTURE_MASK as _;
        #[doc(alias = "GDK_SCROLL_MASK")]
        const SCROLL_MASK = ffi::GDK_SCROLL_MASK as _;
        #[doc(alias = "GDK_TOUCH_MASK")]
        const TOUCH_MASK = ffi::GDK_TOUCH_MASK as _;
        #[doc(alias = "GDK_SMOOTH_SCROLL_MASK")]
        const SMOOTH_SCROLL_MASK = ffi::GDK_SMOOTH_SCROLL_MASK as _;
        #[doc(alias = "GDK_TOUCHPAD_GESTURE_MASK")]
        const TOUCHPAD_GESTURE_MASK = ffi::GDK_TOUCHPAD_GESTURE_MASK as _;
        #[doc(alias = "GDK_TABLET_PAD_MASK")]
        const TABLET_PAD_MASK = ffi::GDK_TABLET_PAD_MASK as _;
        #[doc(alias = "GDK_ALL_EVENTS_MASK")]
        const ALL_EVENTS_MASK = ffi::GDK_ALL_EVENTS_MASK as _;
    }
}

impl fmt::Display for EventMask {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

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

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

#[doc(hidden)]
impl FromGlib<ffi::GdkEventMask> for EventMask {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkEventMask) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for EventMask {
    #[inline]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::gdk_event_mask_get_type()) }
    }
}

impl glib::HasParamSpec for EventMask {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name| Self::ParamSpec::builder(name)
    }
}

impl glib::value::ValueType for EventMask {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for EventMask {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for EventMask {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<EventMask> for glib::Value {
    #[inline]
    fn from(v: EventMask) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkFrameClockPhase")]
    pub struct FrameClockPhase: u32 {
        #[doc(alias = "GDK_FRAME_CLOCK_PHASE_NONE")]
        const NONE = ffi::GDK_FRAME_CLOCK_PHASE_NONE as _;
        #[doc(alias = "GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS")]
        const FLUSH_EVENTS = ffi::GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS as _;
        #[doc(alias = "GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT")]
        const BEFORE_PAINT = ffi::GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT as _;
        #[doc(alias = "GDK_FRAME_CLOCK_PHASE_UPDATE")]
        const UPDATE = ffi::GDK_FRAME_CLOCK_PHASE_UPDATE as _;
        #[doc(alias = "GDK_FRAME_CLOCK_PHASE_LAYOUT")]
        const LAYOUT = ffi::GDK_FRAME_CLOCK_PHASE_LAYOUT as _;
        #[doc(alias = "GDK_FRAME_CLOCK_PHASE_PAINT")]
        const PAINT = ffi::GDK_FRAME_CLOCK_PHASE_PAINT as _;
        #[doc(alias = "GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS")]
        const RESUME_EVENTS = ffi::GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS as _;
        #[doc(alias = "GDK_FRAME_CLOCK_PHASE_AFTER_PAINT")]
        const AFTER_PAINT = ffi::GDK_FRAME_CLOCK_PHASE_AFTER_PAINT as _;
    }
}

impl fmt::Display for FrameClockPhase {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

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

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

#[doc(hidden)]
impl FromGlib<ffi::GdkFrameClockPhase> for FrameClockPhase {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkFrameClockPhase) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for FrameClockPhase {
    #[inline]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::gdk_frame_clock_phase_get_type()) }
    }
}

impl glib::HasParamSpec for FrameClockPhase {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name| Self::ParamSpec::builder(name)
    }
}

impl glib::value::ValueType for FrameClockPhase {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for FrameClockPhase {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for FrameClockPhase {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<FrameClockPhase> for glib::Value {
    #[inline]
    fn from(v: FrameClockPhase) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkModifierType")]
    pub struct ModifierType: u32 {
        #[doc(alias = "GDK_SHIFT_MASK")]
        const SHIFT_MASK = ffi::GDK_SHIFT_MASK as _;
        #[doc(alias = "GDK_LOCK_MASK")]
        const LOCK_MASK = ffi::GDK_LOCK_MASK as _;
        #[doc(alias = "GDK_CONTROL_MASK")]
        const CONTROL_MASK = ffi::GDK_CONTROL_MASK as _;
        #[doc(alias = "GDK_MOD1_MASK")]
        const MOD1_MASK = ffi::GDK_MOD1_MASK as _;
        #[doc(alias = "GDK_MOD2_MASK")]
        const MOD2_MASK = ffi::GDK_MOD2_MASK as _;
        #[doc(alias = "GDK_MOD3_MASK")]
        const MOD3_MASK = ffi::GDK_MOD3_MASK as _;
        #[doc(alias = "GDK_MOD4_MASK")]
        const MOD4_MASK = ffi::GDK_MOD4_MASK as _;
        #[doc(alias = "GDK_MOD5_MASK")]
        const MOD5_MASK = ffi::GDK_MOD5_MASK as _;
        #[doc(alias = "GDK_BUTTON1_MASK")]
        const BUTTON1_MASK = ffi::GDK_BUTTON1_MASK as _;
        #[doc(alias = "GDK_BUTTON2_MASK")]
        const BUTTON2_MASK = ffi::GDK_BUTTON2_MASK as _;
        #[doc(alias = "GDK_BUTTON3_MASK")]
        const BUTTON3_MASK = ffi::GDK_BUTTON3_MASK as _;
        #[doc(alias = "GDK_BUTTON4_MASK")]
        const BUTTON4_MASK = ffi::GDK_BUTTON4_MASK as _;
        #[doc(alias = "GDK_BUTTON5_MASK")]
        const BUTTON5_MASK = ffi::GDK_BUTTON5_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_13_MASK")]
        const MODIFIER_RESERVED_13_MASK = ffi::GDK_MODIFIER_RESERVED_13_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_14_MASK")]
        const MODIFIER_RESERVED_14_MASK = ffi::GDK_MODIFIER_RESERVED_14_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_15_MASK")]
        const MODIFIER_RESERVED_15_MASK = ffi::GDK_MODIFIER_RESERVED_15_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_16_MASK")]
        const MODIFIER_RESERVED_16_MASK = ffi::GDK_MODIFIER_RESERVED_16_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_17_MASK")]
        const MODIFIER_RESERVED_17_MASK = ffi::GDK_MODIFIER_RESERVED_17_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_18_MASK")]
        const MODIFIER_RESERVED_18_MASK = ffi::GDK_MODIFIER_RESERVED_18_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_19_MASK")]
        const MODIFIER_RESERVED_19_MASK = ffi::GDK_MODIFIER_RESERVED_19_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_20_MASK")]
        const MODIFIER_RESERVED_20_MASK = ffi::GDK_MODIFIER_RESERVED_20_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_21_MASK")]
        const MODIFIER_RESERVED_21_MASK = ffi::GDK_MODIFIER_RESERVED_21_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_22_MASK")]
        const MODIFIER_RESERVED_22_MASK = ffi::GDK_MODIFIER_RESERVED_22_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_23_MASK")]
        const MODIFIER_RESERVED_23_MASK = ffi::GDK_MODIFIER_RESERVED_23_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_24_MASK")]
        const MODIFIER_RESERVED_24_MASK = ffi::GDK_MODIFIER_RESERVED_24_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_25_MASK")]
        const MODIFIER_RESERVED_25_MASK = ffi::GDK_MODIFIER_RESERVED_25_MASK as _;
        #[doc(alias = "GDK_SUPER_MASK")]
        const SUPER_MASK = ffi::GDK_SUPER_MASK as _;
        #[doc(alias = "GDK_HYPER_MASK")]
        const HYPER_MASK = ffi::GDK_HYPER_MASK as _;
        #[doc(alias = "GDK_META_MASK")]
        const META_MASK = ffi::GDK_META_MASK as _;
        #[doc(alias = "GDK_MODIFIER_RESERVED_29_MASK")]
        const MODIFIER_RESERVED_29_MASK = ffi::GDK_MODIFIER_RESERVED_29_MASK as _;
        #[doc(alias = "GDK_RELEASE_MASK")]
        const RELEASE_MASK = ffi::GDK_RELEASE_MASK as _;
        #[doc(alias = "GDK_MODIFIER_MASK")]
        const MODIFIER_MASK = ffi::GDK_MODIFIER_MASK as _;
    }
}

impl fmt::Display for ModifierType {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

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

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

#[doc(hidden)]
impl FromGlib<ffi::GdkModifierType> for ModifierType {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkModifierType) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for ModifierType {
    #[inline]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::gdk_modifier_type_get_type()) }
    }
}

impl glib::HasParamSpec for ModifierType {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name| Self::ParamSpec::builder(name)
    }
}

impl glib::value::ValueType for ModifierType {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for ModifierType {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for ModifierType {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<ModifierType> for glib::Value {
    #[inline]
    fn from(v: ModifierType) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkSeatCapabilities")]
    pub struct SeatCapabilities: u32 {
        #[doc(alias = "GDK_SEAT_CAPABILITY_NONE")]
        const NONE = ffi::GDK_SEAT_CAPABILITY_NONE as _;
        #[doc(alias = "GDK_SEAT_CAPABILITY_POINTER")]
        const POINTER = ffi::GDK_SEAT_CAPABILITY_POINTER as _;
        #[doc(alias = "GDK_SEAT_CAPABILITY_TOUCH")]
        const TOUCH = ffi::GDK_SEAT_CAPABILITY_TOUCH as _;
        #[doc(alias = "GDK_SEAT_CAPABILITY_TABLET_STYLUS")]
        const TABLET_STYLUS = ffi::GDK_SEAT_CAPABILITY_TABLET_STYLUS as _;
        #[doc(alias = "GDK_SEAT_CAPABILITY_KEYBOARD")]
        const KEYBOARD = ffi::GDK_SEAT_CAPABILITY_KEYBOARD as _;
        #[doc(alias = "GDK_SEAT_CAPABILITY_ALL_POINTING")]
        const ALL_POINTING = ffi::GDK_SEAT_CAPABILITY_ALL_POINTING as _;
        #[doc(alias = "GDK_SEAT_CAPABILITY_ALL")]
        const ALL = ffi::GDK_SEAT_CAPABILITY_ALL as _;
    }
}

impl fmt::Display for SeatCapabilities {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

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

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

#[doc(hidden)]
impl FromGlib<ffi::GdkSeatCapabilities> for SeatCapabilities {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkSeatCapabilities) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for SeatCapabilities {
    #[inline]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::gdk_seat_capabilities_get_type()) }
    }
}

impl glib::HasParamSpec for SeatCapabilities {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name| Self::ParamSpec::builder(name)
    }
}

impl glib::value::ValueType for SeatCapabilities {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for SeatCapabilities {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for SeatCapabilities {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<SeatCapabilities> for glib::Value {
    #[inline]
    fn from(v: SeatCapabilities) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkWMDecoration")]
    pub struct WMDecoration: u32 {
        #[doc(alias = "GDK_DECOR_ALL")]
        const ALL = ffi::GDK_DECOR_ALL as _;
        #[doc(alias = "GDK_DECOR_BORDER")]
        const BORDER = ffi::GDK_DECOR_BORDER as _;
        #[doc(alias = "GDK_DECOR_RESIZEH")]
        const RESIZEH = ffi::GDK_DECOR_RESIZEH as _;
        #[doc(alias = "GDK_DECOR_TITLE")]
        const TITLE = ffi::GDK_DECOR_TITLE as _;
        #[doc(alias = "GDK_DECOR_MENU")]
        const MENU = ffi::GDK_DECOR_MENU as _;
        #[doc(alias = "GDK_DECOR_MINIMIZE")]
        const MINIMIZE = ffi::GDK_DECOR_MINIMIZE as _;
        #[doc(alias = "GDK_DECOR_MAXIMIZE")]
        const MAXIMIZE = ffi::GDK_DECOR_MAXIMIZE as _;
    }
}

impl fmt::Display for WMDecoration {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

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

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

#[doc(hidden)]
impl FromGlib<ffi::GdkWMDecoration> for WMDecoration {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkWMDecoration) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for WMDecoration {
    #[inline]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::gdk_wm_decoration_get_type()) }
    }
}

impl glib::HasParamSpec for WMDecoration {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name| Self::ParamSpec::builder(name)
    }
}

impl glib::value::ValueType for WMDecoration {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for WMDecoration {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for WMDecoration {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<WMDecoration> for glib::Value {
    #[inline]
    fn from(v: WMDecoration) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkWMFunction")]
    pub struct WMFunction: u32 {
        #[doc(alias = "GDK_FUNC_ALL")]
        const ALL = ffi::GDK_FUNC_ALL as _;
        #[doc(alias = "GDK_FUNC_RESIZE")]
        const RESIZE = ffi::GDK_FUNC_RESIZE as _;
        #[doc(alias = "GDK_FUNC_MOVE")]
        const MOVE = ffi::GDK_FUNC_MOVE as _;
        #[doc(alias = "GDK_FUNC_MINIMIZE")]
        const MINIMIZE = ffi::GDK_FUNC_MINIMIZE as _;
        #[doc(alias = "GDK_FUNC_MAXIMIZE")]
        const MAXIMIZE = ffi::GDK_FUNC_MAXIMIZE as _;
        #[doc(alias = "GDK_FUNC_CLOSE")]
        const CLOSE = ffi::GDK_FUNC_CLOSE as _;
    }
}

impl fmt::Display for WMFunction {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

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

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

#[doc(hidden)]
impl FromGlib<ffi::GdkWMFunction> for WMFunction {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkWMFunction) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for WMFunction {
    #[inline]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::gdk_wm_function_get_type()) }
    }
}

impl glib::HasParamSpec for WMFunction {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name| Self::ParamSpec::builder(name)
    }
}

impl glib::value::ValueType for WMFunction {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for WMFunction {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for WMFunction {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<WMFunction> for glib::Value {
    #[inline]
    fn from(v: WMFunction) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkWindowHints")]
    pub struct WindowHints: u32 {
        #[doc(alias = "GDK_HINT_POS")]
        const POS = ffi::GDK_HINT_POS as _;
        #[doc(alias = "GDK_HINT_MIN_SIZE")]
        const MIN_SIZE = ffi::GDK_HINT_MIN_SIZE as _;
        #[doc(alias = "GDK_HINT_MAX_SIZE")]
        const MAX_SIZE = ffi::GDK_HINT_MAX_SIZE as _;
        #[doc(alias = "GDK_HINT_BASE_SIZE")]
        const BASE_SIZE = ffi::GDK_HINT_BASE_SIZE as _;
        #[doc(alias = "GDK_HINT_ASPECT")]
        const ASPECT = ffi::GDK_HINT_ASPECT as _;
        #[doc(alias = "GDK_HINT_RESIZE_INC")]
        const RESIZE_INC = ffi::GDK_HINT_RESIZE_INC as _;
        #[doc(alias = "GDK_HINT_WIN_GRAVITY")]
        const WIN_GRAVITY = ffi::GDK_HINT_WIN_GRAVITY as _;
        #[doc(alias = "GDK_HINT_USER_POS")]
        const USER_POS = ffi::GDK_HINT_USER_POS as _;
        #[doc(alias = "GDK_HINT_USER_SIZE")]
        const USER_SIZE = ffi::GDK_HINT_USER_SIZE as _;
    }
}

impl fmt::Display for WindowHints {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

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

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

#[doc(hidden)]
impl FromGlib<ffi::GdkWindowHints> for WindowHints {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkWindowHints) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for WindowHints {
    #[inline]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::gdk_window_hints_get_type()) }
    }
}

impl glib::HasParamSpec for WindowHints {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name| Self::ParamSpec::builder(name)
    }
}

impl glib::value::ValueType for WindowHints {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for WindowHints {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for WindowHints {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<WindowHints> for glib::Value {
    #[inline]
    fn from(v: WindowHints) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "GdkWindowState")]
    pub struct WindowState: u32 {
        #[doc(alias = "GDK_WINDOW_STATE_WITHDRAWN")]
        const WITHDRAWN = ffi::GDK_WINDOW_STATE_WITHDRAWN as _;
        #[doc(alias = "GDK_WINDOW_STATE_ICONIFIED")]
        const ICONIFIED = ffi::GDK_WINDOW_STATE_ICONIFIED as _;
        #[doc(alias = "GDK_WINDOW_STATE_MAXIMIZED")]
        const MAXIMIZED = ffi::GDK_WINDOW_STATE_MAXIMIZED as _;
        #[doc(alias = "GDK_WINDOW_STATE_STICKY")]
        const STICKY = ffi::GDK_WINDOW_STATE_STICKY as _;
        #[doc(alias = "GDK_WINDOW_STATE_FULLSCREEN")]
        const FULLSCREEN = ffi::GDK_WINDOW_STATE_FULLSCREEN as _;
        #[doc(alias = "GDK_WINDOW_STATE_ABOVE")]
        const ABOVE = ffi::GDK_WINDOW_STATE_ABOVE as _;
        #[doc(alias = "GDK_WINDOW_STATE_BELOW")]
        const BELOW = ffi::GDK_WINDOW_STATE_BELOW as _;
        #[doc(alias = "GDK_WINDOW_STATE_FOCUSED")]
        const FOCUSED = ffi::GDK_WINDOW_STATE_FOCUSED as _;
        #[doc(alias = "GDK_WINDOW_STATE_TILED")]
        const TILED = ffi::GDK_WINDOW_STATE_TILED as _;
        #[doc(alias = "GDK_WINDOW_STATE_TOP_TILED")]
        const TOP_TILED = ffi::GDK_WINDOW_STATE_TOP_TILED as _;
        #[doc(alias = "GDK_WINDOW_STATE_TOP_RESIZABLE")]
        const TOP_RESIZABLE = ffi::GDK_WINDOW_STATE_TOP_RESIZABLE as _;
        #[doc(alias = "GDK_WINDOW_STATE_RIGHT_TILED")]
        const RIGHT_TILED = ffi::GDK_WINDOW_STATE_RIGHT_TILED as _;
        #[doc(alias = "GDK_WINDOW_STATE_RIGHT_RESIZABLE")]
        const RIGHT_RESIZABLE = ffi::GDK_WINDOW_STATE_RIGHT_RESIZABLE as _;
        #[doc(alias = "GDK_WINDOW_STATE_BOTTOM_TILED")]
        const BOTTOM_TILED = ffi::GDK_WINDOW_STATE_BOTTOM_TILED as _;
        #[doc(alias = "GDK_WINDOW_STATE_BOTTOM_RESIZABLE")]
        const BOTTOM_RESIZABLE = ffi::GDK_WINDOW_STATE_BOTTOM_RESIZABLE as _;
        #[doc(alias = "GDK_WINDOW_STATE_LEFT_TILED")]
        const LEFT_TILED = ffi::GDK_WINDOW_STATE_LEFT_TILED as _;
        #[doc(alias = "GDK_WINDOW_STATE_LEFT_RESIZABLE")]
        const LEFT_RESIZABLE = ffi::GDK_WINDOW_STATE_LEFT_RESIZABLE as _;
    }
}

impl fmt::Display for WindowState {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

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

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

#[doc(hidden)]
impl FromGlib<ffi::GdkWindowState> for WindowState {
    #[inline]
    unsafe fn from_glib(value: ffi::GdkWindowState) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for WindowState {
    #[inline]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::gdk_window_state_get_type()) }
    }
}

impl glib::HasParamSpec for WindowState {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name| Self::ParamSpec::builder(name)
    }
}

impl glib::value::ValueType for WindowState {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for WindowState {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for WindowState {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<WindowState> for glib::Value {
    #[inline]
    fn from(v: WindowState) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}
