// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files.git)
// DO NOT EDIT

use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type};
use std::fmt;

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwAnimationState")]
pub enum AnimationState {
    #[doc(alias = "ADW_ANIMATION_IDLE")]
    Idle,
    #[doc(alias = "ADW_ANIMATION_PAUSED")]
    Paused,
    #[doc(alias = "ADW_ANIMATION_PLAYING")]
    Playing,
    #[doc(alias = "ADW_ANIMATION_FINISHED")]
    Finished,
    #[doc(hidden)]
    __Unknown(i32),
}

impl fmt::Display for AnimationState {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "AnimationState::{}",
            match *self {
                Self::Idle => "Idle",
                Self::Paused => "Paused",
                Self::Playing => "Playing",
                Self::Finished => "Finished",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::AdwAnimationState {
        match self {
            Self::Idle => ffi::ADW_ANIMATION_IDLE,
            Self::Paused => ffi::ADW_ANIMATION_PAUSED,
            Self::Playing => ffi::ADW_ANIMATION_PLAYING,
            Self::Finished => ffi::ADW_ANIMATION_FINISHED,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::ADW_ANIMATION_IDLE => Self::Idle,
            ffi::ADW_ANIMATION_PAUSED => Self::Paused,
            ffi::ADW_ANIMATION_PLAYING => Self::Playing,
            ffi::ADW_ANIMATION_FINISHED => Self::Finished,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for AnimationState {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for AnimationState {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwCenteringPolicy")]
pub enum CenteringPolicy {
    #[doc(alias = "ADW_CENTERING_POLICY_LOOSE")]
    Loose,
    #[doc(alias = "ADW_CENTERING_POLICY_STRICT")]
    Strict,
    #[doc(hidden)]
    __Unknown(i32),
}

impl fmt::Display for CenteringPolicy {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "CenteringPolicy::{}",
            match *self {
                Self::Loose => "Loose",
                Self::Strict => "Strict",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::AdwCenteringPolicy {
        match self {
            Self::Loose => ffi::ADW_CENTERING_POLICY_LOOSE,
            Self::Strict => ffi::ADW_CENTERING_POLICY_STRICT,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::ADW_CENTERING_POLICY_LOOSE => Self::Loose,
            ffi::ADW_CENTERING_POLICY_STRICT => Self::Strict,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for CenteringPolicy {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for CenteringPolicy {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwColorScheme")]
pub enum ColorScheme {
    #[doc(alias = "ADW_COLOR_SCHEME_DEFAULT")]
    Default,
    #[doc(alias = "ADW_COLOR_SCHEME_FORCE_LIGHT")]
    ForceLight,
    #[doc(alias = "ADW_COLOR_SCHEME_PREFER_LIGHT")]
    PreferLight,
    #[doc(alias = "ADW_COLOR_SCHEME_PREFER_DARK")]
    PreferDark,
    #[doc(alias = "ADW_COLOR_SCHEME_FORCE_DARK")]
    ForceDark,
    #[doc(hidden)]
    __Unknown(i32),
}

impl fmt::Display for ColorScheme {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "ColorScheme::{}",
            match *self {
                Self::Default => "Default",
                Self::ForceLight => "ForceLight",
                Self::PreferLight => "PreferLight",
                Self::PreferDark => "PreferDark",
                Self::ForceDark => "ForceDark",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::AdwColorScheme {
        match self {
            Self::Default => ffi::ADW_COLOR_SCHEME_DEFAULT,
            Self::ForceLight => ffi::ADW_COLOR_SCHEME_FORCE_LIGHT,
            Self::PreferLight => ffi::ADW_COLOR_SCHEME_PREFER_LIGHT,
            Self::PreferDark => ffi::ADW_COLOR_SCHEME_PREFER_DARK,
            Self::ForceDark => ffi::ADW_COLOR_SCHEME_FORCE_DARK,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::ADW_COLOR_SCHEME_DEFAULT => Self::Default,
            ffi::ADW_COLOR_SCHEME_FORCE_LIGHT => Self::ForceLight,
            ffi::ADW_COLOR_SCHEME_PREFER_LIGHT => Self::PreferLight,
            ffi::ADW_COLOR_SCHEME_PREFER_DARK => Self::PreferDark,
            ffi::ADW_COLOR_SCHEME_FORCE_DARK => Self::ForceDark,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for ColorScheme {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for ColorScheme {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwEasing")]
pub enum Easing {
    #[doc(alias = "ADW_LINEAR")]
    Linear,
    #[doc(alias = "ADW_EASE_IN_QUAD")]
    EaseInQuad,
    #[doc(alias = "ADW_EASE_OUT_QUAD")]
    EaseOutQuad,
    #[doc(alias = "ADW_EASE_IN_OUT_QUAD")]
    EaseInOutQuad,
    #[doc(alias = "ADW_EASE_IN_CUBIC")]
    EaseInCubic,
    #[doc(alias = "ADW_EASE_OUT_CUBIC")]
    EaseOutCubic,
    #[doc(alias = "ADW_EASE_IN_OUT_CUBIC")]
    EaseInOutCubic,
    #[doc(alias = "ADW_EASE_IN_QUART")]
    EaseInQuart,
    #[doc(alias = "ADW_EASE_OUT_QUART")]
    EaseOutQuart,
    #[doc(alias = "ADW_EASE_IN_OUT_QUART")]
    EaseInOutQuart,
    #[doc(alias = "ADW_EASE_IN_QUINT")]
    EaseInQuint,
    #[doc(alias = "ADW_EASE_OUT_QUINT")]
    EaseOutQuint,
    #[doc(alias = "ADW_EASE_IN_OUT_QUINT")]
    EaseInOutQuint,
    #[doc(alias = "ADW_EASE_IN_SINE")]
    EaseInSine,
    #[doc(alias = "ADW_EASE_OUT_SINE")]
    EaseOutSine,
    #[doc(alias = "ADW_EASE_IN_OUT_SINE")]
    EaseInOutSine,
    #[doc(alias = "ADW_EASE_IN_EXPO")]
    EaseInExpo,
    #[doc(alias = "ADW_EASE_OUT_EXPO")]
    EaseOutExpo,
    #[doc(alias = "ADW_EASE_IN_OUT_EXPO")]
    EaseInOutExpo,
    #[doc(alias = "ADW_EASE_IN_CIRC")]
    EaseInCirc,
    #[doc(alias = "ADW_EASE_OUT_CIRC")]
    EaseOutCirc,
    #[doc(alias = "ADW_EASE_IN_OUT_CIRC")]
    EaseInOutCirc,
    #[doc(alias = "ADW_EASE_IN_ELASTIC")]
    EaseInElastic,
    #[doc(alias = "ADW_EASE_OUT_ELASTIC")]
    EaseOutElastic,
    #[doc(alias = "ADW_EASE_IN_OUT_ELASTIC")]
    EaseInOutElastic,
    #[doc(alias = "ADW_EASE_IN_BACK")]
    EaseInBack,
    #[doc(alias = "ADW_EASE_OUT_BACK")]
    EaseOutBack,
    #[doc(alias = "ADW_EASE_IN_OUT_BACK")]
    EaseInOutBack,
    #[doc(alias = "ADW_EASE_IN_BOUNCE")]
    EaseInBounce,
    #[doc(alias = "ADW_EASE_OUT_BOUNCE")]
    EaseOutBounce,
    #[doc(alias = "ADW_EASE_IN_OUT_BOUNCE")]
    EaseInOutBounce,
    #[doc(hidden)]
    __Unknown(i32),
}

impl Easing {
    #[doc(alias = "adw_easing_ease")]
    pub fn ease(self, value: f64) -> f64 {
        assert_initialized_main_thread!();
        unsafe { ffi::adw_easing_ease(self.into_glib(), value) }
    }
}

impl fmt::Display for Easing {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "Easing::{}",
            match *self {
                Self::Linear => "Linear",
                Self::EaseInQuad => "EaseInQuad",
                Self::EaseOutQuad => "EaseOutQuad",
                Self::EaseInOutQuad => "EaseInOutQuad",
                Self::EaseInCubic => "EaseInCubic",
                Self::EaseOutCubic => "EaseOutCubic",
                Self::EaseInOutCubic => "EaseInOutCubic",
                Self::EaseInQuart => "EaseInQuart",
                Self::EaseOutQuart => "EaseOutQuart",
                Self::EaseInOutQuart => "EaseInOutQuart",
                Self::EaseInQuint => "EaseInQuint",
                Self::EaseOutQuint => "EaseOutQuint",
                Self::EaseInOutQuint => "EaseInOutQuint",
                Self::EaseInSine => "EaseInSine",
                Self::EaseOutSine => "EaseOutSine",
                Self::EaseInOutSine => "EaseInOutSine",
                Self::EaseInExpo => "EaseInExpo",
                Self::EaseOutExpo => "EaseOutExpo",
                Self::EaseInOutExpo => "EaseInOutExpo",
                Self::EaseInCirc => "EaseInCirc",
                Self::EaseOutCirc => "EaseOutCirc",
                Self::EaseInOutCirc => "EaseInOutCirc",
                Self::EaseInElastic => "EaseInElastic",
                Self::EaseOutElastic => "EaseOutElastic",
                Self::EaseInOutElastic => "EaseInOutElastic",
                Self::EaseInBack => "EaseInBack",
                Self::EaseOutBack => "EaseOutBack",
                Self::EaseInOutBack => "EaseInOutBack",
                Self::EaseInBounce => "EaseInBounce",
                Self::EaseOutBounce => "EaseOutBounce",
                Self::EaseInOutBounce => "EaseInOutBounce",
                _ => "Unknown",
            }
        )
    }
}

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

    fn into_glib(self) -> ffi::AdwEasing {
        match self {
            Self::Linear => ffi::ADW_LINEAR,
            Self::EaseInQuad => ffi::ADW_EASE_IN_QUAD,
            Self::EaseOutQuad => ffi::ADW_EASE_OUT_QUAD,
            Self::EaseInOutQuad => ffi::ADW_EASE_IN_OUT_QUAD,
            Self::EaseInCubic => ffi::ADW_EASE_IN_CUBIC,
            Self::EaseOutCubic => ffi::ADW_EASE_OUT_CUBIC,
            Self::EaseInOutCubic => ffi::ADW_EASE_IN_OUT_CUBIC,
            Self::EaseInQuart => ffi::ADW_EASE_IN_QUART,
            Self::EaseOutQuart => ffi::ADW_EASE_OUT_QUART,
            Self::EaseInOutQuart => ffi::ADW_EASE_IN_OUT_QUART,
            Self::EaseInQuint => ffi::ADW_EASE_IN_QUINT,
            Self::EaseOutQuint => ffi::ADW_EASE_OUT_QUINT,
            Self::EaseInOutQuint => ffi::ADW_EASE_IN_OUT_QUINT,
            Self::EaseInSine => ffi::ADW_EASE_IN_SINE,
            Self::EaseOutSine => ffi::ADW_EASE_OUT_SINE,
            Self::EaseInOutSine => ffi::ADW_EASE_IN_OUT_SINE,
            Self::EaseInExpo => ffi::ADW_EASE_IN_EXPO,
            Self::EaseOutExpo => ffi::ADW_EASE_OUT_EXPO,
            Self::EaseInOutExpo => ffi::ADW_EASE_IN_OUT_EXPO,
            Self::EaseInCirc => ffi::ADW_EASE_IN_CIRC,
            Self::EaseOutCirc => ffi::ADW_EASE_OUT_CIRC,
            Self::EaseInOutCirc => ffi::ADW_EASE_IN_OUT_CIRC,
            Self::EaseInElastic => ffi::ADW_EASE_IN_ELASTIC,
            Self::EaseOutElastic => ffi::ADW_EASE_OUT_ELASTIC,
            Self::EaseInOutElastic => ffi::ADW_EASE_IN_OUT_ELASTIC,
            Self::EaseInBack => ffi::ADW_EASE_IN_BACK,
            Self::EaseOutBack => ffi::ADW_EASE_OUT_BACK,
            Self::EaseInOutBack => ffi::ADW_EASE_IN_OUT_BACK,
            Self::EaseInBounce => ffi::ADW_EASE_IN_BOUNCE,
            Self::EaseOutBounce => ffi::ADW_EASE_OUT_BOUNCE,
            Self::EaseInOutBounce => ffi::ADW_EASE_IN_OUT_BOUNCE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::AdwEasing> for Easing {
    unsafe fn from_glib(value: ffi::AdwEasing) -> Self {
        skip_assert_initialized!();

        match value {
            ffi::ADW_LINEAR => Self::Linear,
            ffi::ADW_EASE_IN_QUAD => Self::EaseInQuad,
            ffi::ADW_EASE_OUT_QUAD => Self::EaseOutQuad,
            ffi::ADW_EASE_IN_OUT_QUAD => Self::EaseInOutQuad,
            ffi::ADW_EASE_IN_CUBIC => Self::EaseInCubic,
            ffi::ADW_EASE_OUT_CUBIC => Self::EaseOutCubic,
            ffi::ADW_EASE_IN_OUT_CUBIC => Self::EaseInOutCubic,
            ffi::ADW_EASE_IN_QUART => Self::EaseInQuart,
            ffi::ADW_EASE_OUT_QUART => Self::EaseOutQuart,
            ffi::ADW_EASE_IN_OUT_QUART => Self::EaseInOutQuart,
            ffi::ADW_EASE_IN_QUINT => Self::EaseInQuint,
            ffi::ADW_EASE_OUT_QUINT => Self::EaseOutQuint,
            ffi::ADW_EASE_IN_OUT_QUINT => Self::EaseInOutQuint,
            ffi::ADW_EASE_IN_SINE => Self::EaseInSine,
            ffi::ADW_EASE_OUT_SINE => Self::EaseOutSine,
            ffi::ADW_EASE_IN_OUT_SINE => Self::EaseInOutSine,
            ffi::ADW_EASE_IN_EXPO => Self::EaseInExpo,
            ffi::ADW_EASE_OUT_EXPO => Self::EaseOutExpo,
            ffi::ADW_EASE_IN_OUT_EXPO => Self::EaseInOutExpo,
            ffi::ADW_EASE_IN_CIRC => Self::EaseInCirc,
            ffi::ADW_EASE_OUT_CIRC => Self::EaseOutCirc,
            ffi::ADW_EASE_IN_OUT_CIRC => Self::EaseInOutCirc,
            ffi::ADW_EASE_IN_ELASTIC => Self::EaseInElastic,
            ffi::ADW_EASE_OUT_ELASTIC => Self::EaseOutElastic,
            ffi::ADW_EASE_IN_OUT_ELASTIC => Self::EaseInOutElastic,
            ffi::ADW_EASE_IN_BACK => Self::EaseInBack,
            ffi::ADW_EASE_OUT_BACK => Self::EaseOutBack,
            ffi::ADW_EASE_IN_OUT_BACK => Self::EaseInOutBack,
            ffi::ADW_EASE_IN_BOUNCE => Self::EaseInBounce,
            ffi::ADW_EASE_OUT_BOUNCE => Self::EaseOutBounce,
            ffi::ADW_EASE_IN_OUT_BOUNCE => Self::EaseInOutBounce,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for Easing {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for Easing {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwFlapFoldPolicy")]
pub enum FlapFoldPolicy {
    #[doc(alias = "ADW_FLAP_FOLD_POLICY_NEVER")]
    Never,
    #[doc(alias = "ADW_FLAP_FOLD_POLICY_ALWAYS")]
    Always,
    #[doc(alias = "ADW_FLAP_FOLD_POLICY_AUTO")]
    Auto,
    #[doc(hidden)]
    __Unknown(i32),
}

impl fmt::Display for FlapFoldPolicy {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "FlapFoldPolicy::{}",
            match *self {
                Self::Never => "Never",
                Self::Always => "Always",
                Self::Auto => "Auto",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::AdwFlapFoldPolicy {
        match self {
            Self::Never => ffi::ADW_FLAP_FOLD_POLICY_NEVER,
            Self::Always => ffi::ADW_FLAP_FOLD_POLICY_ALWAYS,
            Self::Auto => ffi::ADW_FLAP_FOLD_POLICY_AUTO,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::ADW_FLAP_FOLD_POLICY_NEVER => Self::Never,
            ffi::ADW_FLAP_FOLD_POLICY_ALWAYS => Self::Always,
            ffi::ADW_FLAP_FOLD_POLICY_AUTO => Self::Auto,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for FlapFoldPolicy {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for FlapFoldPolicy {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwFlapTransitionType")]
pub enum FlapTransitionType {
    #[doc(alias = "ADW_FLAP_TRANSITION_TYPE_OVER")]
    Over,
    #[doc(alias = "ADW_FLAP_TRANSITION_TYPE_UNDER")]
    Under,
    #[doc(alias = "ADW_FLAP_TRANSITION_TYPE_SLIDE")]
    Slide,
    #[doc(hidden)]
    __Unknown(i32),
}

impl fmt::Display for FlapTransitionType {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "FlapTransitionType::{}",
            match *self {
                Self::Over => "Over",
                Self::Under => "Under",
                Self::Slide => "Slide",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::AdwFlapTransitionType {
        match self {
            Self::Over => ffi::ADW_FLAP_TRANSITION_TYPE_OVER,
            Self::Under => ffi::ADW_FLAP_TRANSITION_TYPE_UNDER,
            Self::Slide => ffi::ADW_FLAP_TRANSITION_TYPE_SLIDE,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::ADW_FLAP_TRANSITION_TYPE_OVER => Self::Over,
            ffi::ADW_FLAP_TRANSITION_TYPE_UNDER => Self::Under,
            ffi::ADW_FLAP_TRANSITION_TYPE_SLIDE => Self::Slide,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for FlapTransitionType {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for FlapTransitionType {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwFoldThresholdPolicy")]
pub enum FoldThresholdPolicy {
    #[doc(alias = "ADW_FOLD_THRESHOLD_POLICY_MINIMUM")]
    Minimum,
    #[doc(alias = "ADW_FOLD_THRESHOLD_POLICY_NATURAL")]
    Natural,
    #[doc(hidden)]
    __Unknown(i32),
}

impl fmt::Display for FoldThresholdPolicy {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "FoldThresholdPolicy::{}",
            match *self {
                Self::Minimum => "Minimum",
                Self::Natural => "Natural",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::AdwFoldThresholdPolicy {
        match self {
            Self::Minimum => ffi::ADW_FOLD_THRESHOLD_POLICY_MINIMUM,
            Self::Natural => ffi::ADW_FOLD_THRESHOLD_POLICY_NATURAL,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::ADW_FOLD_THRESHOLD_POLICY_MINIMUM => Self::Minimum,
            ffi::ADW_FOLD_THRESHOLD_POLICY_NATURAL => Self::Natural,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for FoldThresholdPolicy {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for FoldThresholdPolicy {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwLeafletTransitionType")]
pub enum LeafletTransitionType {
    #[doc(alias = "ADW_LEAFLET_TRANSITION_TYPE_OVER")]
    Over,
    #[doc(alias = "ADW_LEAFLET_TRANSITION_TYPE_UNDER")]
    Under,
    #[doc(alias = "ADW_LEAFLET_TRANSITION_TYPE_SLIDE")]
    Slide,
    #[doc(hidden)]
    __Unknown(i32),
}

impl fmt::Display for LeafletTransitionType {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "LeafletTransitionType::{}",
            match *self {
                Self::Over => "Over",
                Self::Under => "Under",
                Self::Slide => "Slide",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::AdwLeafletTransitionType {
        match self {
            Self::Over => ffi::ADW_LEAFLET_TRANSITION_TYPE_OVER,
            Self::Under => ffi::ADW_LEAFLET_TRANSITION_TYPE_UNDER,
            Self::Slide => ffi::ADW_LEAFLET_TRANSITION_TYPE_SLIDE,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::ADW_LEAFLET_TRANSITION_TYPE_OVER => Self::Over,
            ffi::ADW_LEAFLET_TRANSITION_TYPE_UNDER => Self::Under,
            ffi::ADW_LEAFLET_TRANSITION_TYPE_SLIDE => Self::Slide,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for LeafletTransitionType {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for LeafletTransitionType {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwNavigationDirection")]
pub enum NavigationDirection {
    #[doc(alias = "ADW_NAVIGATION_DIRECTION_BACK")]
    Back,
    #[doc(alias = "ADW_NAVIGATION_DIRECTION_FORWARD")]
    Forward,
    #[doc(hidden)]
    __Unknown(i32),
}

impl fmt::Display for NavigationDirection {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "NavigationDirection::{}",
            match *self {
                Self::Back => "Back",
                Self::Forward => "Forward",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::AdwNavigationDirection {
        match self {
            Self::Back => ffi::ADW_NAVIGATION_DIRECTION_BACK,
            Self::Forward => ffi::ADW_NAVIGATION_DIRECTION_FORWARD,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::ADW_NAVIGATION_DIRECTION_BACK => Self::Back,
            ffi::ADW_NAVIGATION_DIRECTION_FORWARD => Self::Forward,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for NavigationDirection {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for NavigationDirection {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwResponseAppearance")]
pub enum ResponseAppearance {
    #[doc(alias = "ADW_RESPONSE_DEFAULT")]
    Default,
    #[doc(alias = "ADW_RESPONSE_SUGGESTED")]
    Suggested,
    #[doc(alias = "ADW_RESPONSE_DESTRUCTIVE")]
    Destructive,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
impl fmt::Display for ResponseAppearance {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "ResponseAppearance::{}",
            match *self {
                Self::Default => "Default",
                Self::Suggested => "Suggested",
                Self::Destructive => "Destructive",
                _ => "Unknown",
            }
        )
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
#[doc(hidden)]
impl IntoGlib for ResponseAppearance {
    type GlibType = ffi::AdwResponseAppearance;

    #[inline]
    fn into_glib(self) -> ffi::AdwResponseAppearance {
        match self {
            Self::Default => ffi::ADW_RESPONSE_DEFAULT,
            Self::Suggested => ffi::ADW_RESPONSE_SUGGESTED,
            Self::Destructive => ffi::ADW_RESPONSE_DESTRUCTIVE,
            Self::__Unknown(value) => value,
        }
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
#[doc(hidden)]
impl FromGlib<ffi::AdwResponseAppearance> for ResponseAppearance {
    #[inline]
    unsafe fn from_glib(value: ffi::AdwResponseAppearance) -> Self {
        skip_assert_initialized!();

        match value {
            ffi::ADW_RESPONSE_DEFAULT => Self::Default,
            ffi::ADW_RESPONSE_SUGGESTED => Self::Suggested,
            ffi::ADW_RESPONSE_DESTRUCTIVE => Self::Destructive,
            value => Self::__Unknown(value),
        }
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
impl StaticType for ResponseAppearance {
    #[inline]
    fn static_type() -> Type {
        unsafe { from_glib(ffi::adw_response_appearance_get_type()) }
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
impl glib::HasParamSpec for ResponseAppearance {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
impl glib::value::ValueType for ResponseAppearance {
    type Type = Self;
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
unsafe impl<'a> FromValue<'a> for ResponseAppearance {
    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_enum(value.to_glib_none().0))
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
impl ToValue for ResponseAppearance {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

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

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
impl From<ResponseAppearance> for glib::Value {
    #[inline]
    fn from(v: ResponseAppearance) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwSqueezerTransitionType")]
pub enum SqueezerTransitionType {
    #[doc(alias = "ADW_SQUEEZER_TRANSITION_TYPE_NONE")]
    None,
    #[doc(alias = "ADW_SQUEEZER_TRANSITION_TYPE_CROSSFADE")]
    Crossfade,
    #[doc(hidden)]
    __Unknown(i32),
}

impl fmt::Display for SqueezerTransitionType {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "SqueezerTransitionType::{}",
            match *self {
                Self::None => "None",
                Self::Crossfade => "Crossfade",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::AdwSqueezerTransitionType {
        match self {
            Self::None => ffi::ADW_SQUEEZER_TRANSITION_TYPE_NONE,
            Self::Crossfade => ffi::ADW_SQUEEZER_TRANSITION_TYPE_CROSSFADE,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::ADW_SQUEEZER_TRANSITION_TYPE_NONE => Self::None,
            ffi::ADW_SQUEEZER_TRANSITION_TYPE_CROSSFADE => Self::Crossfade,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for SqueezerTransitionType {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for SqueezerTransitionType {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwToastPriority")]
pub enum ToastPriority {
    #[doc(alias = "ADW_TOAST_PRIORITY_NORMAL")]
    Normal,
    #[doc(alias = "ADW_TOAST_PRIORITY_HIGH")]
    High,
    #[doc(hidden)]
    __Unknown(i32),
}

impl fmt::Display for ToastPriority {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "ToastPriority::{}",
            match *self {
                Self::Normal => "Normal",
                Self::High => "High",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::AdwToastPriority {
        match self {
            Self::Normal => ffi::ADW_TOAST_PRIORITY_NORMAL,
            Self::High => ffi::ADW_TOAST_PRIORITY_HIGH,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::ADW_TOAST_PRIORITY_NORMAL => Self::Normal,
            ffi::ADW_TOAST_PRIORITY_HIGH => Self::High,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for ToastPriority {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for ToastPriority {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "AdwViewSwitcherPolicy")]
pub enum ViewSwitcherPolicy {
    #[doc(alias = "ADW_VIEW_SWITCHER_POLICY_NARROW")]
    Narrow,
    #[doc(alias = "ADW_VIEW_SWITCHER_POLICY_WIDE")]
    Wide,
    #[doc(hidden)]
    __Unknown(i32),
}

impl fmt::Display for ViewSwitcherPolicy {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(
            f,
            "ViewSwitcherPolicy::{}",
            match *self {
                Self::Narrow => "Narrow",
                Self::Wide => "Wide",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::AdwViewSwitcherPolicy {
        match self {
            Self::Narrow => ffi::ADW_VIEW_SWITCHER_POLICY_NARROW,
            Self::Wide => ffi::ADW_VIEW_SWITCHER_POLICY_WIDE,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::ADW_VIEW_SWITCHER_POLICY_NARROW => Self::Narrow,
            ffi::ADW_VIEW_SWITCHER_POLICY_WIDE => Self::Wide,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for ViewSwitcherPolicy {
    type ParamSpec = glib::ParamSpecEnum;
    type SetValue = Self;
    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        |name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
    }
}

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

unsafe impl<'a> FromValue<'a> for ViewSwitcherPolicy {
    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_enum(value.to_glib_none().0))
    }
}

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

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

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