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

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HdyCenteringPolicy")]
pub enum CenteringPolicy {
    #[doc(alias = "HDY_CENTERING_POLICY_LOOSE")]
    Loose,
    #[doc(alias = "HDY_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::HdyCenteringPolicy;

    #[inline]
    fn into_glib(self) -> ffi::HdyCenteringPolicy {
        match self {
            Self::Loose => ffi::HDY_CENTERING_POLICY_LOOSE,
            Self::Strict => ffi::HDY_CENTERING_POLICY_STRICT,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::HDY_CENTERING_POLICY_LOOSE => Self::Loose,
            ffi::HDY_CENTERING_POLICY_STRICT => Self::Strict,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for CenteringPolicy {
    #[inline]
    #[doc(alias = "hdy_centering_policy_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::hdy_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 {
        Self::ParamSpec::builder_with_default
    }
}

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

unsafe impl<'a> glib::value::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)
    }
}

#[cfg(feature = "v1_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HdyColorScheme")]
pub enum ColorScheme {
    #[doc(alias = "HDY_COLOR_SCHEME_DEFAULT")]
    Default,
    #[doc(alias = "HDY_COLOR_SCHEME_FORCE_LIGHT")]
    ForceLight,
    #[doc(alias = "HDY_COLOR_SCHEME_PREFER_LIGHT")]
    PreferLight,
    #[doc(alias = "HDY_COLOR_SCHEME_PREFER_DARK")]
    PreferDark,
    #[doc(alias = "HDY_COLOR_SCHEME_FORCE_DARK")]
    ForceDark,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(feature = "v1_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
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",
            }
        )
    }
}

#[cfg(feature = "v1_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
#[doc(hidden)]
impl IntoGlib for ColorScheme {
    type GlibType = ffi::HdyColorScheme;

    #[inline]
    fn into_glib(self) -> ffi::HdyColorScheme {
        match self {
            Self::Default => ffi::HDY_COLOR_SCHEME_DEFAULT,
            Self::ForceLight => ffi::HDY_COLOR_SCHEME_FORCE_LIGHT,
            Self::PreferLight => ffi::HDY_COLOR_SCHEME_PREFER_LIGHT,
            Self::PreferDark => ffi::HDY_COLOR_SCHEME_PREFER_DARK,
            Self::ForceDark => ffi::HDY_COLOR_SCHEME_FORCE_DARK,
            Self::__Unknown(value) => value,
        }
    }
}

#[cfg(feature = "v1_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
#[doc(hidden)]
impl FromGlib<ffi::HdyColorScheme> for ColorScheme {
    #[inline]
    unsafe fn from_glib(value: ffi::HdyColorScheme) -> Self {
        skip_assert_initialized!();

        match value {
            ffi::HDY_COLOR_SCHEME_DEFAULT => Self::Default,
            ffi::HDY_COLOR_SCHEME_FORCE_LIGHT => Self::ForceLight,
            ffi::HDY_COLOR_SCHEME_PREFER_LIGHT => Self::PreferLight,
            ffi::HDY_COLOR_SCHEME_PREFER_DARK => Self::PreferDark,
            ffi::HDY_COLOR_SCHEME_FORCE_DARK => Self::ForceDark,
            value => Self::__Unknown(value),
        }
    }
}

#[cfg(feature = "v1_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
impl StaticType for ColorScheme {
    #[inline]
    #[doc(alias = "hdy_color_scheme_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::hdy_color_scheme_get_type()) }
    }
}

#[cfg(feature = "v1_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
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 {
        Self::ParamSpec::builder_with_default
    }
}

#[cfg(feature = "v1_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
impl glib::value::ValueType for ColorScheme {
    type Type = Self;
}

#[cfg(feature = "v1_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
unsafe impl<'a> glib::value::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))
    }
}

#[cfg(feature = "v1_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
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()
    }
}

#[cfg(feature = "v1_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
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 = "HdyDeckTransitionType")]
pub enum DeckTransitionType {
    #[doc(alias = "HDY_DECK_TRANSITION_TYPE_OVER")]
    Over,
    #[doc(alias = "HDY_DECK_TRANSITION_TYPE_UNDER")]
    Under,
    #[doc(alias = "HDY_DECK_TRANSITION_TYPE_SLIDE")]
    Slide,
    #[doc(hidden)]
    __Unknown(i32),
}

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

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

    #[inline]
    fn into_glib(self) -> ffi::HdyDeckTransitionType {
        match self {
            Self::Over => ffi::HDY_DECK_TRANSITION_TYPE_OVER,
            Self::Under => ffi::HDY_DECK_TRANSITION_TYPE_UNDER,
            Self::Slide => ffi::HDY_DECK_TRANSITION_TYPE_SLIDE,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::HDY_DECK_TRANSITION_TYPE_OVER => Self::Over,
            ffi::HDY_DECK_TRANSITION_TYPE_UNDER => Self::Under,
            ffi::HDY_DECK_TRANSITION_TYPE_SLIDE => Self::Slide,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for DeckTransitionType {
    #[inline]
    #[doc(alias = "hdy_deck_transition_type_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::hdy_deck_transition_type_get_type()) }
    }
}

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

    fn param_spec_builder() -> Self::BuilderFn {
        Self::ParamSpec::builder_with_default
    }
}

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

unsafe impl<'a> glib::value::FromValue<'a> for DeckTransitionType {
    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 DeckTransitionType {
    #[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<DeckTransitionType> for glib::Value {
    #[inline]
    fn from(v: DeckTransitionType) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HdyFlapFoldPolicy")]
pub enum FlapFoldPolicy {
    #[doc(alias = "HDY_FLAP_FOLD_POLICY_NEVER")]
    Never,
    #[doc(alias = "HDY_FLAP_FOLD_POLICY_ALWAYS")]
    Always,
    #[doc(alias = "HDY_FLAP_FOLD_POLICY_AUTO")]
    Auto,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
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",
            }
        )
    }
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
#[doc(hidden)]
impl IntoGlib for FlapFoldPolicy {
    type GlibType = ffi::HdyFlapFoldPolicy;

    #[inline]
    fn into_glib(self) -> ffi::HdyFlapFoldPolicy {
        match self {
            Self::Never => ffi::HDY_FLAP_FOLD_POLICY_NEVER,
            Self::Always => ffi::HDY_FLAP_FOLD_POLICY_ALWAYS,
            Self::Auto => ffi::HDY_FLAP_FOLD_POLICY_AUTO,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::HDY_FLAP_FOLD_POLICY_NEVER => Self::Never,
            ffi::HDY_FLAP_FOLD_POLICY_ALWAYS => Self::Always,
            ffi::HDY_FLAP_FOLD_POLICY_AUTO => Self::Auto,
            value => Self::__Unknown(value),
        }
    }
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
impl StaticType for FlapFoldPolicy {
    #[inline]
    #[doc(alias = "hdy_flap_fold_policy_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::hdy_flap_fold_policy_get_type()) }
    }
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
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 {
        Self::ParamSpec::builder_with_default
    }
}

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

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
unsafe impl<'a> glib::value::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))
    }
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
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()
    }
}

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

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HdyFlapTransitionType")]
pub enum FlapTransitionType {
    #[doc(alias = "HDY_FLAP_TRANSITION_TYPE_OVER")]
    Over,
    #[doc(alias = "HDY_FLAP_TRANSITION_TYPE_UNDER")]
    Under,
    #[doc(alias = "HDY_FLAP_TRANSITION_TYPE_SLIDE")]
    Slide,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
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",
            }
        )
    }
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
#[doc(hidden)]
impl IntoGlib for FlapTransitionType {
    type GlibType = ffi::HdyFlapTransitionType;

    #[inline]
    fn into_glib(self) -> ffi::HdyFlapTransitionType {
        match self {
            Self::Over => ffi::HDY_FLAP_TRANSITION_TYPE_OVER,
            Self::Under => ffi::HDY_FLAP_TRANSITION_TYPE_UNDER,
            Self::Slide => ffi::HDY_FLAP_TRANSITION_TYPE_SLIDE,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::HDY_FLAP_TRANSITION_TYPE_OVER => Self::Over,
            ffi::HDY_FLAP_TRANSITION_TYPE_UNDER => Self::Under,
            ffi::HDY_FLAP_TRANSITION_TYPE_SLIDE => Self::Slide,
            value => Self::__Unknown(value),
        }
    }
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
impl StaticType for FlapTransitionType {
    #[inline]
    #[doc(alias = "hdy_flap_transition_type_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::hdy_flap_transition_type_get_type()) }
    }
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
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 {
        Self::ParamSpec::builder_with_default
    }
}

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

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
unsafe impl<'a> glib::value::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))
    }
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
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()
    }
}

#[cfg(feature = "v1_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
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 = "HdyHeaderGroupChildType")]
pub enum HeaderGroupChildType {
    #[doc(alias = "HDY_HEADER_GROUP_CHILD_TYPE_HEADER_BAR")]
    HeaderBar,
    #[doc(alias = "HDY_HEADER_GROUP_CHILD_TYPE_GTK_HEADER_BAR")]
    GtkHeaderBar,
    #[doc(alias = "HDY_HEADER_GROUP_CHILD_TYPE_HEADER_GROUP")]
    HeaderGroup,
    #[doc(hidden)]
    __Unknown(i32),
}

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

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

    #[inline]
    fn into_glib(self) -> ffi::HdyHeaderGroupChildType {
        match self {
            Self::HeaderBar => ffi::HDY_HEADER_GROUP_CHILD_TYPE_HEADER_BAR,
            Self::GtkHeaderBar => ffi::HDY_HEADER_GROUP_CHILD_TYPE_GTK_HEADER_BAR,
            Self::HeaderGroup => ffi::HDY_HEADER_GROUP_CHILD_TYPE_HEADER_GROUP,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::HDY_HEADER_GROUP_CHILD_TYPE_HEADER_BAR => Self::HeaderBar,
            ffi::HDY_HEADER_GROUP_CHILD_TYPE_GTK_HEADER_BAR => Self::GtkHeaderBar,
            ffi::HDY_HEADER_GROUP_CHILD_TYPE_HEADER_GROUP => Self::HeaderGroup,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for HeaderGroupChildType {
    #[inline]
    #[doc(alias = "hdy_header_group_child_type_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::hdy_header_group_child_type_get_type()) }
    }
}

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

    fn param_spec_builder() -> Self::BuilderFn {
        Self::ParamSpec::builder_with_default
    }
}

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

unsafe impl<'a> glib::value::FromValue<'a> for HeaderGroupChildType {
    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 HeaderGroupChildType {
    #[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<HeaderGroupChildType> for glib::Value {
    #[inline]
    fn from(v: HeaderGroupChildType) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HdyLeafletTransitionType")]
pub enum LeafletTransitionType {
    #[doc(alias = "HDY_LEAFLET_TRANSITION_TYPE_OVER")]
    Over,
    #[doc(alias = "HDY_LEAFLET_TRANSITION_TYPE_UNDER")]
    Under,
    #[doc(alias = "HDY_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::HdyLeafletTransitionType;

    #[inline]
    fn into_glib(self) -> ffi::HdyLeafletTransitionType {
        match self {
            Self::Over => ffi::HDY_LEAFLET_TRANSITION_TYPE_OVER,
            Self::Under => ffi::HDY_LEAFLET_TRANSITION_TYPE_UNDER,
            Self::Slide => ffi::HDY_LEAFLET_TRANSITION_TYPE_SLIDE,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::HDY_LEAFLET_TRANSITION_TYPE_OVER => Self::Over,
            ffi::HDY_LEAFLET_TRANSITION_TYPE_UNDER => Self::Under,
            ffi::HDY_LEAFLET_TRANSITION_TYPE_SLIDE => Self::Slide,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for LeafletTransitionType {
    #[inline]
    #[doc(alias = "hdy_leaflet_transition_type_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::hdy_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 {
        Self::ParamSpec::builder_with_default
    }
}

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

unsafe impl<'a> glib::value::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 = "HdyNavigationDirection")]
pub enum NavigationDirection {
    #[doc(alias = "HDY_NAVIGATION_DIRECTION_BACK")]
    Back,
    #[doc(alias = "HDY_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::HdyNavigationDirection;

    #[inline]
    fn into_glib(self) -> ffi::HdyNavigationDirection {
        match self {
            Self::Back => ffi::HDY_NAVIGATION_DIRECTION_BACK,
            Self::Forward => ffi::HDY_NAVIGATION_DIRECTION_FORWARD,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::HDY_NAVIGATION_DIRECTION_BACK => Self::Back,
            ffi::HDY_NAVIGATION_DIRECTION_FORWARD => Self::Forward,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for NavigationDirection {
    #[inline]
    #[doc(alias = "hdy_navigation_direction_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::hdy_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 {
        Self::ParamSpec::builder_with_default
    }
}

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

unsafe impl<'a> glib::value::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)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HdySqueezerTransitionType")]
pub enum SqueezerTransitionType {
    #[doc(alias = "HDY_SQUEEZER_TRANSITION_TYPE_NONE")]
    None,
    #[doc(alias = "HDY_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::HdySqueezerTransitionType;

    #[inline]
    fn into_glib(self) -> ffi::HdySqueezerTransitionType {
        match self {
            Self::None => ffi::HDY_SQUEEZER_TRANSITION_TYPE_NONE,
            Self::Crossfade => ffi::HDY_SQUEEZER_TRANSITION_TYPE_CROSSFADE,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::HDY_SQUEEZER_TRANSITION_TYPE_NONE => Self::None,
            ffi::HDY_SQUEEZER_TRANSITION_TYPE_CROSSFADE => Self::Crossfade,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for SqueezerTransitionType {
    #[inline]
    #[doc(alias = "hdy_squeezer_transition_type_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::hdy_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 {
        Self::ParamSpec::builder_with_default
    }
}

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

unsafe impl<'a> glib::value::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 = "HdyViewSwitcherPolicy")]
pub enum ViewSwitcherPolicy {
    #[doc(alias = "HDY_VIEW_SWITCHER_POLICY_AUTO")]
    Auto,
    #[doc(alias = "HDY_VIEW_SWITCHER_POLICY_NARROW")]
    Narrow,
    #[doc(alias = "HDY_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::Auto => "Auto",
                Self::Narrow => "Narrow",
                Self::Wide => "Wide",
                _ => "Unknown",
            }
        )
    }
}

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

    #[inline]
    fn into_glib(self) -> ffi::HdyViewSwitcherPolicy {
        match self {
            Self::Auto => ffi::HDY_VIEW_SWITCHER_POLICY_AUTO,
            Self::Narrow => ffi::HDY_VIEW_SWITCHER_POLICY_NARROW,
            Self::Wide => ffi::HDY_VIEW_SWITCHER_POLICY_WIDE,
            Self::__Unknown(value) => value,
        }
    }
}

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

        match value {
            ffi::HDY_VIEW_SWITCHER_POLICY_AUTO => Self::Auto,
            ffi::HDY_VIEW_SWITCHER_POLICY_NARROW => Self::Narrow,
            ffi::HDY_VIEW_SWITCHER_POLICY_WIDE => Self::Wide,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for ViewSwitcherPolicy {
    #[inline]
    #[doc(alias = "hdy_view_switcher_policy_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::hdy_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 {
        Self::ParamSpec::builder_with_default
    }
}

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

unsafe impl<'a> glib::value::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)
    }
}
