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

use crate::ffi;
use glib::{prelude::*, translate::*};

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerActionLayerAction")]
pub enum ActionLayerAction {
    #[doc(alias = "POPPLER_ACTION_LAYER_ON")]
    On,
    #[doc(alias = "POPPLER_ACTION_LAYER_OFF")]
    Off,
    #[doc(alias = "POPPLER_ACTION_LAYER_TOGGLE")]
    Toggle,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerActionLayerAction {
        match self {
            Self::On => ffi::POPPLER_ACTION_LAYER_ON,
            Self::Off => ffi::POPPLER_ACTION_LAYER_OFF,
            Self::Toggle => ffi::POPPLER_ACTION_LAYER_TOGGLE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerActionLayerAction> for ActionLayerAction {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerActionLayerAction) -> Self {
        match value {
            ffi::POPPLER_ACTION_LAYER_ON => Self::On,
            ffi::POPPLER_ACTION_LAYER_OFF => Self::Off,
            ffi::POPPLER_ACTION_LAYER_TOGGLE => Self::Toggle,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for ActionLayerAction {
    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 ActionLayerAction {
    type Type = Self;
}

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

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

impl ToValue for ActionLayerAction {
    #[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<ActionLayerAction> for glib::Value {
    #[inline]
    fn from(v: ActionLayerAction) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerActionMovieOperation")]
pub enum ActionMovieOperation {
    #[doc(alias = "POPPLER_ACTION_MOVIE_PLAY")]
    Play,
    #[doc(alias = "POPPLER_ACTION_MOVIE_PAUSE")]
    Pause,
    #[doc(alias = "POPPLER_ACTION_MOVIE_RESUME")]
    Resume,
    #[doc(alias = "POPPLER_ACTION_MOVIE_STOP")]
    Stop,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerActionMovieOperation {
        match self {
            Self::Play => ffi::POPPLER_ACTION_MOVIE_PLAY,
            Self::Pause => ffi::POPPLER_ACTION_MOVIE_PAUSE,
            Self::Resume => ffi::POPPLER_ACTION_MOVIE_RESUME,
            Self::Stop => ffi::POPPLER_ACTION_MOVIE_STOP,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerActionMovieOperation> for ActionMovieOperation {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerActionMovieOperation) -> Self {
        match value {
            ffi::POPPLER_ACTION_MOVIE_PLAY => Self::Play,
            ffi::POPPLER_ACTION_MOVIE_PAUSE => Self::Pause,
            ffi::POPPLER_ACTION_MOVIE_RESUME => Self::Resume,
            ffi::POPPLER_ACTION_MOVIE_STOP => Self::Stop,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for ActionMovieOperation {
    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 ActionMovieOperation {
    type Type = Self;
}

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

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

impl ToValue for ActionMovieOperation {
    #[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<ActionMovieOperation> for glib::Value {
    #[inline]
    fn from(v: ActionMovieOperation) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerActionType")]
pub enum ActionType {
    #[doc(alias = "POPPLER_ACTION_UNKNOWN")]
    Unknown,
    #[doc(alias = "POPPLER_ACTION_NONE")]
    None,
    #[doc(alias = "POPPLER_ACTION_GOTO_DEST")]
    GotoDest,
    #[doc(alias = "POPPLER_ACTION_GOTO_REMOTE")]
    GotoRemote,
    #[doc(alias = "POPPLER_ACTION_LAUNCH")]
    Launch,
    #[doc(alias = "POPPLER_ACTION_URI")]
    Uri,
    #[doc(alias = "POPPLER_ACTION_NAMED")]
    Named,
    #[doc(alias = "POPPLER_ACTION_MOVIE")]
    Movie,
    #[doc(alias = "POPPLER_ACTION_RENDITION")]
    Rendition,
    #[doc(alias = "POPPLER_ACTION_OCG_STATE")]
    OcgState,
    #[doc(alias = "POPPLER_ACTION_JAVASCRIPT")]
    Javascript,
    #[doc(alias = "POPPLER_ACTION_RESET_FORM")]
    ResetForm,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerActionType {
        match self {
            Self::Unknown => ffi::POPPLER_ACTION_UNKNOWN,
            Self::None => ffi::POPPLER_ACTION_NONE,
            Self::GotoDest => ffi::POPPLER_ACTION_GOTO_DEST,
            Self::GotoRemote => ffi::POPPLER_ACTION_GOTO_REMOTE,
            Self::Launch => ffi::POPPLER_ACTION_LAUNCH,
            Self::Uri => ffi::POPPLER_ACTION_URI,
            Self::Named => ffi::POPPLER_ACTION_NAMED,
            Self::Movie => ffi::POPPLER_ACTION_MOVIE,
            Self::Rendition => ffi::POPPLER_ACTION_RENDITION,
            Self::OcgState => ffi::POPPLER_ACTION_OCG_STATE,
            Self::Javascript => ffi::POPPLER_ACTION_JAVASCRIPT,
            Self::ResetForm => ffi::POPPLER_ACTION_RESET_FORM,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerActionType> for ActionType {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerActionType) -> Self {
        match value {
            ffi::POPPLER_ACTION_UNKNOWN => Self::Unknown,
            ffi::POPPLER_ACTION_NONE => Self::None,
            ffi::POPPLER_ACTION_GOTO_DEST => Self::GotoDest,
            ffi::POPPLER_ACTION_GOTO_REMOTE => Self::GotoRemote,
            ffi::POPPLER_ACTION_LAUNCH => Self::Launch,
            ffi::POPPLER_ACTION_URI => Self::Uri,
            ffi::POPPLER_ACTION_NAMED => Self::Named,
            ffi::POPPLER_ACTION_MOVIE => Self::Movie,
            ffi::POPPLER_ACTION_RENDITION => Self::Rendition,
            ffi::POPPLER_ACTION_OCG_STATE => Self::OcgState,
            ffi::POPPLER_ACTION_JAVASCRIPT => Self::Javascript,
            ffi::POPPLER_ACTION_RESET_FORM => Self::ResetForm,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for ActionType {
    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 ActionType {
    type Type = Self;
}

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

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

impl ToValue for ActionType {
    #[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<ActionType> for glib::Value {
    #[inline]
    fn from(v: ActionType) -> Self {
        ToValue::to_value(&v)
    }
}

#[cfg(feature = "v0_72")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerAdditionalActionType")]
pub enum AdditionalActionType {
    #[doc(alias = "POPPLER_ADDITIONAL_ACTION_FIELD_MODIFIED")]
    FieldModified,
    #[doc(alias = "POPPLER_ADDITIONAL_ACTION_FORMAT_FIELD")]
    FormatField,
    #[doc(alias = "POPPLER_ADDITIONAL_ACTION_VALIDATE_FIELD")]
    ValidateField,
    #[doc(alias = "POPPLER_ADDITIONAL_ACTION_CALCULATE_FIELD")]
    CalculateField,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(feature = "v0_72")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))]
#[doc(hidden)]
impl IntoGlib for AdditionalActionType {
    type GlibType = ffi::PopplerAdditionalActionType;

    #[inline]
    fn into_glib(self) -> ffi::PopplerAdditionalActionType {
        match self {
            Self::FieldModified => ffi::POPPLER_ADDITIONAL_ACTION_FIELD_MODIFIED,
            Self::FormatField => ffi::POPPLER_ADDITIONAL_ACTION_FORMAT_FIELD,
            Self::ValidateField => ffi::POPPLER_ADDITIONAL_ACTION_VALIDATE_FIELD,
            Self::CalculateField => ffi::POPPLER_ADDITIONAL_ACTION_CALCULATE_FIELD,
            Self::__Unknown(value) => value,
        }
    }
}

#[cfg(feature = "v0_72")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))]
#[doc(hidden)]
impl FromGlib<ffi::PopplerAdditionalActionType> for AdditionalActionType {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerAdditionalActionType) -> Self {
        match value {
            ffi::POPPLER_ADDITIONAL_ACTION_FIELD_MODIFIED => Self::FieldModified,
            ffi::POPPLER_ADDITIONAL_ACTION_FORMAT_FIELD => Self::FormatField,
            ffi::POPPLER_ADDITIONAL_ACTION_VALIDATE_FIELD => Self::ValidateField,
            ffi::POPPLER_ADDITIONAL_ACTION_CALCULATE_FIELD => Self::CalculateField,
            value => Self::__Unknown(value),
        }
    }
}

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

#[cfg(feature = "v0_72")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))]
impl glib::HasParamSpec for AdditionalActionType {
    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 = "v0_72")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))]
impl glib::value::ValueType for AdditionalActionType {
    type Type = Self;
}

#[cfg(feature = "v0_72")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))]
unsafe impl<'a> glib::value::FromValue<'a> for AdditionalActionType {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

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

#[cfg(feature = "v0_72")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))]
impl ToValue for AdditionalActionType {
    #[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 = "v0_72")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))]
impl From<AdditionalActionType> for glib::Value {
    #[inline]
    fn from(v: AdditionalActionType) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerAnnotExternalDataType")]
pub enum AnnotExternalDataType {
    #[doc(alias = "POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D")]
    _3d,
    #[doc(alias = "POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN")]
    Unknown,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerAnnotExternalDataType {
        match self {
            Self::_3d => ffi::POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D,
            Self::Unknown => ffi::POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerAnnotExternalDataType> for AnnotExternalDataType {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerAnnotExternalDataType) -> Self {
        match value {
            ffi::POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D => Self::_3d,
            ffi::POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN => Self::Unknown,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for AnnotExternalDataType {
    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 AnnotExternalDataType {
    type Type = Self;
}

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

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

impl ToValue for AnnotExternalDataType {
    #[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<AnnotExternalDataType> for glib::Value {
    #[inline]
    fn from(v: AnnotExternalDataType) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerAnnotFreeTextQuadding")]
pub enum AnnotFreeTextQuadding {
    #[doc(alias = "POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED")]
    LeftJustified,
    #[doc(alias = "POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED")]
    Centered,
    #[doc(alias = "POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED")]
    RightJustified,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerAnnotFreeTextQuadding {
        match self {
            Self::LeftJustified => ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED,
            Self::Centered => ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED,
            Self::RightJustified => ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerAnnotFreeTextQuadding> for AnnotFreeTextQuadding {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerAnnotFreeTextQuadding) -> Self {
        match value {
            ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED => Self::LeftJustified,
            ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED => Self::Centered,
            ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED => Self::RightJustified,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for AnnotFreeTextQuadding {
    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 AnnotFreeTextQuadding {
    type Type = Self;
}

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

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

impl ToValue for AnnotFreeTextQuadding {
    #[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<AnnotFreeTextQuadding> for glib::Value {
    #[inline]
    fn from(v: AnnotFreeTextQuadding) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerAnnotMarkupReplyType")]
pub enum AnnotMarkupReplyType {
    #[doc(alias = "POPPLER_ANNOT_MARKUP_REPLY_TYPE_R")]
    R,
    #[doc(alias = "POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP")]
    Group,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerAnnotMarkupReplyType {
        match self {
            Self::R => ffi::POPPLER_ANNOT_MARKUP_REPLY_TYPE_R,
            Self::Group => ffi::POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerAnnotMarkupReplyType> for AnnotMarkupReplyType {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerAnnotMarkupReplyType) -> Self {
        match value {
            ffi::POPPLER_ANNOT_MARKUP_REPLY_TYPE_R => Self::R,
            ffi::POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP => Self::Group,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for AnnotMarkupReplyType {
    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 AnnotMarkupReplyType {
    type Type = Self;
}

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

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

impl ToValue for AnnotMarkupReplyType {
    #[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<AnnotMarkupReplyType> for glib::Value {
    #[inline]
    fn from(v: AnnotMarkupReplyType) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerAnnotTextState")]
pub enum AnnotTextState {
    #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_MARKED")]
    Marked,
    #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_UNMARKED")]
    Unmarked,
    #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_ACCEPTED")]
    Accepted,
    #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_REJECTED")]
    Rejected,
    #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_CANCELLED")]
    Cancelled,
    #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_COMPLETED")]
    Completed,
    #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_NONE")]
    None,
    #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_UNKNOWN")]
    Unknown,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerAnnotTextState {
        match self {
            Self::Marked => ffi::POPPLER_ANNOT_TEXT_STATE_MARKED,
            Self::Unmarked => ffi::POPPLER_ANNOT_TEXT_STATE_UNMARKED,
            Self::Accepted => ffi::POPPLER_ANNOT_TEXT_STATE_ACCEPTED,
            Self::Rejected => ffi::POPPLER_ANNOT_TEXT_STATE_REJECTED,
            Self::Cancelled => ffi::POPPLER_ANNOT_TEXT_STATE_CANCELLED,
            Self::Completed => ffi::POPPLER_ANNOT_TEXT_STATE_COMPLETED,
            Self::None => ffi::POPPLER_ANNOT_TEXT_STATE_NONE,
            Self::Unknown => ffi::POPPLER_ANNOT_TEXT_STATE_UNKNOWN,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerAnnotTextState> for AnnotTextState {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerAnnotTextState) -> Self {
        match value {
            ffi::POPPLER_ANNOT_TEXT_STATE_MARKED => Self::Marked,
            ffi::POPPLER_ANNOT_TEXT_STATE_UNMARKED => Self::Unmarked,
            ffi::POPPLER_ANNOT_TEXT_STATE_ACCEPTED => Self::Accepted,
            ffi::POPPLER_ANNOT_TEXT_STATE_REJECTED => Self::Rejected,
            ffi::POPPLER_ANNOT_TEXT_STATE_CANCELLED => Self::Cancelled,
            ffi::POPPLER_ANNOT_TEXT_STATE_COMPLETED => Self::Completed,
            ffi::POPPLER_ANNOT_TEXT_STATE_NONE => Self::None,
            ffi::POPPLER_ANNOT_TEXT_STATE_UNKNOWN => Self::Unknown,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for AnnotTextState {
    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 AnnotTextState {
    type Type = Self;
}

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

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

impl ToValue for AnnotTextState {
    #[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<AnnotTextState> for glib::Value {
    #[inline]
    fn from(v: AnnotTextState) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerAnnotType")]
pub enum AnnotType {
    #[doc(alias = "POPPLER_ANNOT_UNKNOWN")]
    Unknown,
    #[doc(alias = "POPPLER_ANNOT_TEXT")]
    Text,
    #[doc(alias = "POPPLER_ANNOT_LINK")]
    Link,
    #[doc(alias = "POPPLER_ANNOT_FREE_TEXT")]
    FreeText,
    #[doc(alias = "POPPLER_ANNOT_LINE")]
    Line,
    #[doc(alias = "POPPLER_ANNOT_SQUARE")]
    Square,
    #[doc(alias = "POPPLER_ANNOT_CIRCLE")]
    Circle,
    #[doc(alias = "POPPLER_ANNOT_POLYGON")]
    Polygon,
    #[doc(alias = "POPPLER_ANNOT_POLY_LINE")]
    PolyLine,
    #[doc(alias = "POPPLER_ANNOT_HIGHLIGHT")]
    Highlight,
    #[doc(alias = "POPPLER_ANNOT_UNDERLINE")]
    Underline,
    #[doc(alias = "POPPLER_ANNOT_SQUIGGLY")]
    Squiggly,
    #[doc(alias = "POPPLER_ANNOT_STRIKE_OUT")]
    StrikeOut,
    #[doc(alias = "POPPLER_ANNOT_STAMP")]
    Stamp,
    #[doc(alias = "POPPLER_ANNOT_CARET")]
    Caret,
    #[doc(alias = "POPPLER_ANNOT_INK")]
    Ink,
    #[doc(alias = "POPPLER_ANNOT_POPUP")]
    Popup,
    #[doc(alias = "POPPLER_ANNOT_FILE_ATTACHMENT")]
    FileAttachment,
    #[doc(alias = "POPPLER_ANNOT_SOUND")]
    Sound,
    #[doc(alias = "POPPLER_ANNOT_MOVIE")]
    Movie,
    #[doc(alias = "POPPLER_ANNOT_WIDGET")]
    Widget,
    #[doc(alias = "POPPLER_ANNOT_SCREEN")]
    Screen,
    #[doc(alias = "POPPLER_ANNOT_PRINTER_MARK")]
    PrinterMark,
    #[doc(alias = "POPPLER_ANNOT_TRAP_NET")]
    TrapNet,
    #[doc(alias = "POPPLER_ANNOT_WATERMARK")]
    Watermark,
    #[doc(alias = "POPPLER_ANNOT_3D")]
    _3d,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    fn into_glib(self) -> ffi::PopplerAnnotType {
        match self {
            Self::Unknown => ffi::POPPLER_ANNOT_UNKNOWN,
            Self::Text => ffi::POPPLER_ANNOT_TEXT,
            Self::Link => ffi::POPPLER_ANNOT_LINK,
            Self::FreeText => ffi::POPPLER_ANNOT_FREE_TEXT,
            Self::Line => ffi::POPPLER_ANNOT_LINE,
            Self::Square => ffi::POPPLER_ANNOT_SQUARE,
            Self::Circle => ffi::POPPLER_ANNOT_CIRCLE,
            Self::Polygon => ffi::POPPLER_ANNOT_POLYGON,
            Self::PolyLine => ffi::POPPLER_ANNOT_POLY_LINE,
            Self::Highlight => ffi::POPPLER_ANNOT_HIGHLIGHT,
            Self::Underline => ffi::POPPLER_ANNOT_UNDERLINE,
            Self::Squiggly => ffi::POPPLER_ANNOT_SQUIGGLY,
            Self::StrikeOut => ffi::POPPLER_ANNOT_STRIKE_OUT,
            Self::Stamp => ffi::POPPLER_ANNOT_STAMP,
            Self::Caret => ffi::POPPLER_ANNOT_CARET,
            Self::Ink => ffi::POPPLER_ANNOT_INK,
            Self::Popup => ffi::POPPLER_ANNOT_POPUP,
            Self::FileAttachment => ffi::POPPLER_ANNOT_FILE_ATTACHMENT,
            Self::Sound => ffi::POPPLER_ANNOT_SOUND,
            Self::Movie => ffi::POPPLER_ANNOT_MOVIE,
            Self::Widget => ffi::POPPLER_ANNOT_WIDGET,
            Self::Screen => ffi::POPPLER_ANNOT_SCREEN,
            Self::PrinterMark => ffi::POPPLER_ANNOT_PRINTER_MARK,
            Self::TrapNet => ffi::POPPLER_ANNOT_TRAP_NET,
            Self::Watermark => ffi::POPPLER_ANNOT_WATERMARK,
            Self::_3d => ffi::POPPLER_ANNOT_3D,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerAnnotType> for AnnotType {
    unsafe fn from_glib(value: ffi::PopplerAnnotType) -> Self {
        match value {
            ffi::POPPLER_ANNOT_UNKNOWN => Self::Unknown,
            ffi::POPPLER_ANNOT_TEXT => Self::Text,
            ffi::POPPLER_ANNOT_LINK => Self::Link,
            ffi::POPPLER_ANNOT_FREE_TEXT => Self::FreeText,
            ffi::POPPLER_ANNOT_LINE => Self::Line,
            ffi::POPPLER_ANNOT_SQUARE => Self::Square,
            ffi::POPPLER_ANNOT_CIRCLE => Self::Circle,
            ffi::POPPLER_ANNOT_POLYGON => Self::Polygon,
            ffi::POPPLER_ANNOT_POLY_LINE => Self::PolyLine,
            ffi::POPPLER_ANNOT_HIGHLIGHT => Self::Highlight,
            ffi::POPPLER_ANNOT_UNDERLINE => Self::Underline,
            ffi::POPPLER_ANNOT_SQUIGGLY => Self::Squiggly,
            ffi::POPPLER_ANNOT_STRIKE_OUT => Self::StrikeOut,
            ffi::POPPLER_ANNOT_STAMP => Self::Stamp,
            ffi::POPPLER_ANNOT_CARET => Self::Caret,
            ffi::POPPLER_ANNOT_INK => Self::Ink,
            ffi::POPPLER_ANNOT_POPUP => Self::Popup,
            ffi::POPPLER_ANNOT_FILE_ATTACHMENT => Self::FileAttachment,
            ffi::POPPLER_ANNOT_SOUND => Self::Sound,
            ffi::POPPLER_ANNOT_MOVIE => Self::Movie,
            ffi::POPPLER_ANNOT_WIDGET => Self::Widget,
            ffi::POPPLER_ANNOT_SCREEN => Self::Screen,
            ffi::POPPLER_ANNOT_PRINTER_MARK => Self::PrinterMark,
            ffi::POPPLER_ANNOT_TRAP_NET => Self::TrapNet,
            ffi::POPPLER_ANNOT_WATERMARK => Self::Watermark,
            ffi::POPPLER_ANNOT_3D => Self::_3d,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for AnnotType {
    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 AnnotType {
    type Type = Self;
}

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

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

impl ToValue for AnnotType {
    #[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<AnnotType> for glib::Value {
    #[inline]
    fn from(v: AnnotType) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerBackend")]
pub enum Backend {
    #[doc(alias = "POPPLER_BACKEND_UNKNOWN")]
    Unknown,
    #[doc(alias = "POPPLER_BACKEND_SPLASH")]
    Splash,
    #[doc(alias = "POPPLER_BACKEND_CAIRO")]
    Cairo,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerBackend {
        match self {
            Self::Unknown => ffi::POPPLER_BACKEND_UNKNOWN,
            Self::Splash => ffi::POPPLER_BACKEND_SPLASH,
            Self::Cairo => ffi::POPPLER_BACKEND_CAIRO,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerBackend> for Backend {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerBackend) -> Self {
        match value {
            ffi::POPPLER_BACKEND_UNKNOWN => Self::Unknown,
            ffi::POPPLER_BACKEND_SPLASH => Self::Splash,
            ffi::POPPLER_BACKEND_CAIRO => Self::Cairo,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for Backend {
    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 Backend {
    type Type = Self;
}

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

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

impl ToValue for Backend {
    #[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<Backend> for glib::Value {
    #[inline]
    fn from(v: Backend) -> Self {
        ToValue::to_value(&v)
    }
}

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerCertificateStatus")]
pub enum CertificateStatus {
    #[doc(alias = "POPPLER_CERTIFICATE_TRUSTED")]
    Trusted,
    #[doc(alias = "POPPLER_CERTIFICATE_UNTRUSTED_ISSUER")]
    UntrustedIssuer,
    #[doc(alias = "POPPLER_CERTIFICATE_UNKNOWN_ISSUER")]
    UnknownIssuer,
    #[doc(alias = "POPPLER_CERTIFICATE_REVOKED")]
    Revoked,
    #[doc(alias = "POPPLER_CERTIFICATE_EXPIRED")]
    Expired,
    #[doc(alias = "POPPLER_CERTIFICATE_GENERIC_ERROR")]
    GenericError,
    #[doc(alias = "POPPLER_CERTIFICATE_NOT_VERIFIED")]
    NotVerified,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
#[doc(hidden)]
impl IntoGlib for CertificateStatus {
    type GlibType = ffi::PopplerCertificateStatus;

    #[inline]
    fn into_glib(self) -> ffi::PopplerCertificateStatus {
        match self {
            Self::Trusted => ffi::POPPLER_CERTIFICATE_TRUSTED,
            Self::UntrustedIssuer => ffi::POPPLER_CERTIFICATE_UNTRUSTED_ISSUER,
            Self::UnknownIssuer => ffi::POPPLER_CERTIFICATE_UNKNOWN_ISSUER,
            Self::Revoked => ffi::POPPLER_CERTIFICATE_REVOKED,
            Self::Expired => ffi::POPPLER_CERTIFICATE_EXPIRED,
            Self::GenericError => ffi::POPPLER_CERTIFICATE_GENERIC_ERROR,
            Self::NotVerified => ffi::POPPLER_CERTIFICATE_NOT_VERIFIED,
            Self::__Unknown(value) => value,
        }
    }
}

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
#[doc(hidden)]
impl FromGlib<ffi::PopplerCertificateStatus> for CertificateStatus {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerCertificateStatus) -> Self {
        match value {
            ffi::POPPLER_CERTIFICATE_TRUSTED => Self::Trusted,
            ffi::POPPLER_CERTIFICATE_UNTRUSTED_ISSUER => Self::UntrustedIssuer,
            ffi::POPPLER_CERTIFICATE_UNKNOWN_ISSUER => Self::UnknownIssuer,
            ffi::POPPLER_CERTIFICATE_REVOKED => Self::Revoked,
            ffi::POPPLER_CERTIFICATE_EXPIRED => Self::Expired,
            ffi::POPPLER_CERTIFICATE_GENERIC_ERROR => Self::GenericError,
            ffi::POPPLER_CERTIFICATE_NOT_VERIFIED => Self::NotVerified,
            value => Self::__Unknown(value),
        }
    }
}

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

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
impl glib::HasParamSpec for CertificateStatus {
    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 = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
impl glib::value::ValueType for CertificateStatus {
    type Type = Self;
}

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
unsafe impl<'a> glib::value::FromValue<'a> for CertificateStatus {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

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

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
impl ToValue for CertificateStatus {
    #[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 = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
impl From<CertificateStatus> for glib::Value {
    #[inline]
    fn from(v: CertificateStatus) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerDestType")]
pub enum DestType {
    #[doc(alias = "POPPLER_DEST_UNKNOWN")]
    Unknown,
    #[doc(alias = "POPPLER_DEST_XYZ")]
    Xyz,
    #[doc(alias = "POPPLER_DEST_FIT")]
    Fit,
    #[doc(alias = "POPPLER_DEST_FITH")]
    Fith,
    #[doc(alias = "POPPLER_DEST_FITV")]
    Fitv,
    #[doc(alias = "POPPLER_DEST_FITR")]
    Fitr,
    #[doc(alias = "POPPLER_DEST_FITB")]
    Fitb,
    #[doc(alias = "POPPLER_DEST_FITBH")]
    Fitbh,
    #[doc(alias = "POPPLER_DEST_FITBV")]
    Fitbv,
    #[doc(alias = "POPPLER_DEST_NAMED")]
    Named,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerDestType {
        match self {
            Self::Unknown => ffi::POPPLER_DEST_UNKNOWN,
            Self::Xyz => ffi::POPPLER_DEST_XYZ,
            Self::Fit => ffi::POPPLER_DEST_FIT,
            Self::Fith => ffi::POPPLER_DEST_FITH,
            Self::Fitv => ffi::POPPLER_DEST_FITV,
            Self::Fitr => ffi::POPPLER_DEST_FITR,
            Self::Fitb => ffi::POPPLER_DEST_FITB,
            Self::Fitbh => ffi::POPPLER_DEST_FITBH,
            Self::Fitbv => ffi::POPPLER_DEST_FITBV,
            Self::Named => ffi::POPPLER_DEST_NAMED,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerDestType> for DestType {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerDestType) -> Self {
        match value {
            ffi::POPPLER_DEST_UNKNOWN => Self::Unknown,
            ffi::POPPLER_DEST_XYZ => Self::Xyz,
            ffi::POPPLER_DEST_FIT => Self::Fit,
            ffi::POPPLER_DEST_FITH => Self::Fith,
            ffi::POPPLER_DEST_FITV => Self::Fitv,
            ffi::POPPLER_DEST_FITR => Self::Fitr,
            ffi::POPPLER_DEST_FITB => Self::Fitb,
            ffi::POPPLER_DEST_FITBH => Self::Fitbh,
            ffi::POPPLER_DEST_FITBV => Self::Fitbv,
            ffi::POPPLER_DEST_NAMED => Self::Named,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for DestType {
    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 DestType {
    type Type = Self;
}

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

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

impl ToValue for DestType {
    #[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<DestType> for glib::Value {
    #[inline]
    fn from(v: DestType) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerError")]
pub enum Error {
    #[doc(alias = "POPPLER_ERROR_INVALID")]
    Invalid,
    #[doc(alias = "POPPLER_ERROR_ENCRYPTED")]
    Encrypted,
    #[doc(alias = "POPPLER_ERROR_OPEN_FILE")]
    OpenFile,
    #[doc(alias = "POPPLER_ERROR_BAD_CATALOG")]
    BadCatalog,
    #[doc(alias = "POPPLER_ERROR_DAMAGED")]
    Damaged,
    #[cfg(feature = "v23_7")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v23_7")))]
    #[doc(alias = "POPPLER_ERROR_SIGNING")]
    Signing,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerError {
        match self {
            Self::Invalid => ffi::POPPLER_ERROR_INVALID,
            Self::Encrypted => ffi::POPPLER_ERROR_ENCRYPTED,
            Self::OpenFile => ffi::POPPLER_ERROR_OPEN_FILE,
            Self::BadCatalog => ffi::POPPLER_ERROR_BAD_CATALOG,
            Self::Damaged => ffi::POPPLER_ERROR_DAMAGED,
            #[cfg(feature = "v23_7")]
            Self::Signing => ffi::POPPLER_ERROR_SIGNING,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerError> for Error {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerError) -> Self {
        match value {
            ffi::POPPLER_ERROR_INVALID => Self::Invalid,
            ffi::POPPLER_ERROR_ENCRYPTED => Self::Encrypted,
            ffi::POPPLER_ERROR_OPEN_FILE => Self::OpenFile,
            ffi::POPPLER_ERROR_BAD_CATALOG => Self::BadCatalog,
            ffi::POPPLER_ERROR_DAMAGED => Self::Damaged,
            #[cfg(feature = "v23_7")]
            ffi::POPPLER_ERROR_SIGNING => Self::Signing,
            value => Self::__Unknown(value),
        }
    }
}

impl glib::error::ErrorDomain for Error {
    #[inline]
    fn domain() -> glib::Quark {
        unsafe { from_glib(ffi::poppler_error_quark()) }
    }

    #[inline]
    fn code(self) -> i32 {
        self.into_glib()
    }

    #[inline]
    #[allow(clippy::match_single_binding)]
    fn from(code: i32) -> Option<Self> {
        match unsafe { from_glib(code) } {
            value => Some(value),
        }
    }
}

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

impl glib::HasParamSpec for Error {
    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 Error {
    type Type = Self;
}

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

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

impl ToValue for Error {
    #[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<Error> for glib::Value {
    #[inline]
    fn from(v: Error) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerFontType")]
pub enum FontType {
    #[doc(alias = "POPPLER_FONT_TYPE_UNKNOWN")]
    Unknown,
    #[doc(alias = "POPPLER_FONT_TYPE_TYPE1")]
    Type1,
    #[doc(alias = "POPPLER_FONT_TYPE_TYPE1C")]
    Type1c,
    #[doc(alias = "POPPLER_FONT_TYPE_TYPE1COT")]
    Type1cot,
    #[doc(alias = "POPPLER_FONT_TYPE_TYPE3")]
    Type3,
    #[doc(alias = "POPPLER_FONT_TYPE_TRUETYPE")]
    Truetype,
    #[doc(alias = "POPPLER_FONT_TYPE_TRUETYPEOT")]
    Truetypeot,
    #[doc(alias = "POPPLER_FONT_TYPE_CID_TYPE0")]
    CidType0,
    #[doc(alias = "POPPLER_FONT_TYPE_CID_TYPE0C")]
    CidType0c,
    #[doc(alias = "POPPLER_FONT_TYPE_CID_TYPE0COT")]
    CidType0cot,
    #[doc(alias = "POPPLER_FONT_TYPE_CID_TYPE2")]
    CidType2,
    #[doc(alias = "POPPLER_FONT_TYPE_CID_TYPE2OT")]
    CidType2ot,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerFontType {
        match self {
            Self::Unknown => ffi::POPPLER_FONT_TYPE_UNKNOWN,
            Self::Type1 => ffi::POPPLER_FONT_TYPE_TYPE1,
            Self::Type1c => ffi::POPPLER_FONT_TYPE_TYPE1C,
            Self::Type1cot => ffi::POPPLER_FONT_TYPE_TYPE1COT,
            Self::Type3 => ffi::POPPLER_FONT_TYPE_TYPE3,
            Self::Truetype => ffi::POPPLER_FONT_TYPE_TRUETYPE,
            Self::Truetypeot => ffi::POPPLER_FONT_TYPE_TRUETYPEOT,
            Self::CidType0 => ffi::POPPLER_FONT_TYPE_CID_TYPE0,
            Self::CidType0c => ffi::POPPLER_FONT_TYPE_CID_TYPE0C,
            Self::CidType0cot => ffi::POPPLER_FONT_TYPE_CID_TYPE0COT,
            Self::CidType2 => ffi::POPPLER_FONT_TYPE_CID_TYPE2,
            Self::CidType2ot => ffi::POPPLER_FONT_TYPE_CID_TYPE2OT,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerFontType> for FontType {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerFontType) -> Self {
        match value {
            ffi::POPPLER_FONT_TYPE_UNKNOWN => Self::Unknown,
            ffi::POPPLER_FONT_TYPE_TYPE1 => Self::Type1,
            ffi::POPPLER_FONT_TYPE_TYPE1C => Self::Type1c,
            ffi::POPPLER_FONT_TYPE_TYPE1COT => Self::Type1cot,
            ffi::POPPLER_FONT_TYPE_TYPE3 => Self::Type3,
            ffi::POPPLER_FONT_TYPE_TRUETYPE => Self::Truetype,
            ffi::POPPLER_FONT_TYPE_TRUETYPEOT => Self::Truetypeot,
            ffi::POPPLER_FONT_TYPE_CID_TYPE0 => Self::CidType0,
            ffi::POPPLER_FONT_TYPE_CID_TYPE0C => Self::CidType0c,
            ffi::POPPLER_FONT_TYPE_CID_TYPE0COT => Self::CidType0cot,
            ffi::POPPLER_FONT_TYPE_CID_TYPE2 => Self::CidType2,
            ffi::POPPLER_FONT_TYPE_CID_TYPE2OT => Self::CidType2ot,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for FontType {
    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 FontType {
    type Type = Self;
}

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

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

impl ToValue for FontType {
    #[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<FontType> for glib::Value {
    #[inline]
    fn from(v: FontType) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerFormButtonType")]
pub enum FormButtonType {
    #[doc(alias = "POPPLER_FORM_BUTTON_PUSH")]
    Push,
    #[doc(alias = "POPPLER_FORM_BUTTON_CHECK")]
    Check,
    #[doc(alias = "POPPLER_FORM_BUTTON_RADIO")]
    Radio,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerFormButtonType {
        match self {
            Self::Push => ffi::POPPLER_FORM_BUTTON_PUSH,
            Self::Check => ffi::POPPLER_FORM_BUTTON_CHECK,
            Self::Radio => ffi::POPPLER_FORM_BUTTON_RADIO,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerFormButtonType> for FormButtonType {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerFormButtonType) -> Self {
        match value {
            ffi::POPPLER_FORM_BUTTON_PUSH => Self::Push,
            ffi::POPPLER_FORM_BUTTON_CHECK => Self::Check,
            ffi::POPPLER_FORM_BUTTON_RADIO => Self::Radio,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for FormButtonType {
    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 FormButtonType {
    type Type = Self;
}

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

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

impl ToValue for FormButtonType {
    #[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<FormButtonType> for glib::Value {
    #[inline]
    fn from(v: FormButtonType) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerFormChoiceType")]
pub enum FormChoiceType {
    #[doc(alias = "POPPLER_FORM_CHOICE_COMBO")]
    Combo,
    #[doc(alias = "POPPLER_FORM_CHOICE_LIST")]
    List,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerFormChoiceType {
        match self {
            Self::Combo => ffi::POPPLER_FORM_CHOICE_COMBO,
            Self::List => ffi::POPPLER_FORM_CHOICE_LIST,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerFormChoiceType> for FormChoiceType {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerFormChoiceType) -> Self {
        match value {
            ffi::POPPLER_FORM_CHOICE_COMBO => Self::Combo,
            ffi::POPPLER_FORM_CHOICE_LIST => Self::List,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for FormChoiceType {
    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 FormChoiceType {
    type Type = Self;
}

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

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

impl ToValue for FormChoiceType {
    #[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<FormChoiceType> for glib::Value {
    #[inline]
    fn from(v: FormChoiceType) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerFormFieldType")]
pub enum FormFieldType {
    #[doc(alias = "POPPLER_FORM_FIELD_UNKNOWN")]
    Unknown,
    #[doc(alias = "POPPLER_FORM_FIELD_BUTTON")]
    Button,
    #[doc(alias = "POPPLER_FORM_FIELD_TEXT")]
    Text,
    #[doc(alias = "POPPLER_FORM_FIELD_CHOICE")]
    Choice,
    #[doc(alias = "POPPLER_FORM_FIELD_SIGNATURE")]
    Signature,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerFormFieldType {
        match self {
            Self::Unknown => ffi::POPPLER_FORM_FIELD_UNKNOWN,
            Self::Button => ffi::POPPLER_FORM_FIELD_BUTTON,
            Self::Text => ffi::POPPLER_FORM_FIELD_TEXT,
            Self::Choice => ffi::POPPLER_FORM_FIELD_CHOICE,
            Self::Signature => ffi::POPPLER_FORM_FIELD_SIGNATURE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerFormFieldType> for FormFieldType {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerFormFieldType) -> Self {
        match value {
            ffi::POPPLER_FORM_FIELD_UNKNOWN => Self::Unknown,
            ffi::POPPLER_FORM_FIELD_BUTTON => Self::Button,
            ffi::POPPLER_FORM_FIELD_TEXT => Self::Text,
            ffi::POPPLER_FORM_FIELD_CHOICE => Self::Choice,
            ffi::POPPLER_FORM_FIELD_SIGNATURE => Self::Signature,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for FormFieldType {
    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 FormFieldType {
    type Type = Self;
}

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

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

impl ToValue for FormFieldType {
    #[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<FormFieldType> for glib::Value {
    #[inline]
    fn from(v: FormFieldType) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerFormTextType")]
pub enum FormTextType {
    #[doc(alias = "POPPLER_FORM_TEXT_NORMAL")]
    Normal,
    #[doc(alias = "POPPLER_FORM_TEXT_MULTILINE")]
    Multiline,
    #[doc(alias = "POPPLER_FORM_TEXT_FILE_SELECT")]
    FileSelect,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerFormTextType {
        match self {
            Self::Normal => ffi::POPPLER_FORM_TEXT_NORMAL,
            Self::Multiline => ffi::POPPLER_FORM_TEXT_MULTILINE,
            Self::FileSelect => ffi::POPPLER_FORM_TEXT_FILE_SELECT,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerFormTextType> for FormTextType {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerFormTextType) -> Self {
        match value {
            ffi::POPPLER_FORM_TEXT_NORMAL => Self::Normal,
            ffi::POPPLER_FORM_TEXT_MULTILINE => Self::Multiline,
            ffi::POPPLER_FORM_TEXT_FILE_SELECT => Self::FileSelect,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for FormTextType {
    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 FormTextType {
    type Type = Self;
}

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

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

impl ToValue for FormTextType {
    #[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<FormTextType> for glib::Value {
    #[inline]
    fn from(v: FormTextType) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerMoviePlayMode")]
pub enum MoviePlayMode {
    #[doc(alias = "POPPLER_MOVIE_PLAY_MODE_ONCE")]
    Once,
    #[doc(alias = "POPPLER_MOVIE_PLAY_MODE_OPEN")]
    Open,
    #[doc(alias = "POPPLER_MOVIE_PLAY_MODE_REPEAT")]
    Repeat,
    #[doc(alias = "POPPLER_MOVIE_PLAY_MODE_PALINDROME")]
    Palindrome,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerMoviePlayMode {
        match self {
            Self::Once => ffi::POPPLER_MOVIE_PLAY_MODE_ONCE,
            Self::Open => ffi::POPPLER_MOVIE_PLAY_MODE_OPEN,
            Self::Repeat => ffi::POPPLER_MOVIE_PLAY_MODE_REPEAT,
            Self::Palindrome => ffi::POPPLER_MOVIE_PLAY_MODE_PALINDROME,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerMoviePlayMode> for MoviePlayMode {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerMoviePlayMode) -> Self {
        match value {
            ffi::POPPLER_MOVIE_PLAY_MODE_ONCE => Self::Once,
            ffi::POPPLER_MOVIE_PLAY_MODE_OPEN => Self::Open,
            ffi::POPPLER_MOVIE_PLAY_MODE_REPEAT => Self::Repeat,
            ffi::POPPLER_MOVIE_PLAY_MODE_PALINDROME => Self::Palindrome,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for MoviePlayMode {
    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 MoviePlayMode {
    type Type = Self;
}

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

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

impl ToValue for MoviePlayMode {
    #[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<MoviePlayMode> for glib::Value {
    #[inline]
    fn from(v: MoviePlayMode) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerPDFConformance")]
pub enum PDFConformance {
    #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_UNSET")]
    Unset,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_A")]
    A,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_B")]
    B,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_G")]
    G,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_N")]
    N,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_P")]
    P,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_PG")]
    Pg,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_U")]
    U,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_NONE")]
    None,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerPDFConformance {
        match self {
            Self::Unset => ffi::POPPLER_PDF_SUBTYPE_CONF_UNSET,
            Self::A => ffi::POPPLER_PDF_SUBTYPE_CONF_A,
            Self::B => ffi::POPPLER_PDF_SUBTYPE_CONF_B,
            Self::G => ffi::POPPLER_PDF_SUBTYPE_CONF_G,
            Self::N => ffi::POPPLER_PDF_SUBTYPE_CONF_N,
            Self::P => ffi::POPPLER_PDF_SUBTYPE_CONF_P,
            Self::Pg => ffi::POPPLER_PDF_SUBTYPE_CONF_PG,
            Self::U => ffi::POPPLER_PDF_SUBTYPE_CONF_U,
            Self::None => ffi::POPPLER_PDF_SUBTYPE_CONF_NONE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerPDFConformance> for PDFConformance {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerPDFConformance) -> Self {
        match value {
            ffi::POPPLER_PDF_SUBTYPE_CONF_UNSET => Self::Unset,
            ffi::POPPLER_PDF_SUBTYPE_CONF_A => Self::A,
            ffi::POPPLER_PDF_SUBTYPE_CONF_B => Self::B,
            ffi::POPPLER_PDF_SUBTYPE_CONF_G => Self::G,
            ffi::POPPLER_PDF_SUBTYPE_CONF_N => Self::N,
            ffi::POPPLER_PDF_SUBTYPE_CONF_P => Self::P,
            ffi::POPPLER_PDF_SUBTYPE_CONF_PG => Self::Pg,
            ffi::POPPLER_PDF_SUBTYPE_CONF_U => Self::U,
            ffi::POPPLER_PDF_SUBTYPE_CONF_NONE => Self::None,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for PDFConformance {
    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 PDFConformance {
    type Type = Self;
}

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

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

impl ToValue for PDFConformance {
    #[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<PDFConformance> for glib::Value {
    #[inline]
    fn from(v: PDFConformance) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerPDFPart")]
pub enum PDFPart {
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_UNSET")]
    Unset,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_1")]
    _1,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_2")]
    _2,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_3")]
    _3,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_4")]
    _4,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_5")]
    _5,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_6")]
    _6,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_7")]
    _7,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_8")]
    _8,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_NONE")]
    None,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerPDFPart {
        match self {
            Self::Unset => ffi::POPPLER_PDF_SUBTYPE_PART_UNSET,
            Self::_1 => ffi::POPPLER_PDF_SUBTYPE_PART_1,
            Self::_2 => ffi::POPPLER_PDF_SUBTYPE_PART_2,
            Self::_3 => ffi::POPPLER_PDF_SUBTYPE_PART_3,
            Self::_4 => ffi::POPPLER_PDF_SUBTYPE_PART_4,
            Self::_5 => ffi::POPPLER_PDF_SUBTYPE_PART_5,
            Self::_6 => ffi::POPPLER_PDF_SUBTYPE_PART_6,
            Self::_7 => ffi::POPPLER_PDF_SUBTYPE_PART_7,
            Self::_8 => ffi::POPPLER_PDF_SUBTYPE_PART_8,
            Self::None => ffi::POPPLER_PDF_SUBTYPE_PART_NONE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerPDFPart> for PDFPart {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerPDFPart) -> Self {
        match value {
            ffi::POPPLER_PDF_SUBTYPE_PART_UNSET => Self::Unset,
            ffi::POPPLER_PDF_SUBTYPE_PART_1 => Self::_1,
            ffi::POPPLER_PDF_SUBTYPE_PART_2 => Self::_2,
            ffi::POPPLER_PDF_SUBTYPE_PART_3 => Self::_3,
            ffi::POPPLER_PDF_SUBTYPE_PART_4 => Self::_4,
            ffi::POPPLER_PDF_SUBTYPE_PART_5 => Self::_5,
            ffi::POPPLER_PDF_SUBTYPE_PART_6 => Self::_6,
            ffi::POPPLER_PDF_SUBTYPE_PART_7 => Self::_7,
            ffi::POPPLER_PDF_SUBTYPE_PART_8 => Self::_8,
            ffi::POPPLER_PDF_SUBTYPE_PART_NONE => Self::None,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for PDFPart {
    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 PDFPart {
    type Type = Self;
}

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

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

impl ToValue for PDFPart {
    #[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<PDFPart> for glib::Value {
    #[inline]
    fn from(v: PDFPart) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerPDFSubtype")]
pub enum PDFSubtype {
    #[doc(alias = "POPPLER_PDF_SUBTYPE_UNSET")]
    Unset,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PDF_A")]
    PdfA,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PDF_E")]
    PdfE,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PDF_UA")]
    PdfUa,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PDF_VT")]
    PdfVt,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_PDF_X")]
    PdfX,
    #[doc(alias = "POPPLER_PDF_SUBTYPE_NONE")]
    None,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerPDFSubtype {
        match self {
            Self::Unset => ffi::POPPLER_PDF_SUBTYPE_UNSET,
            Self::PdfA => ffi::POPPLER_PDF_SUBTYPE_PDF_A,
            Self::PdfE => ffi::POPPLER_PDF_SUBTYPE_PDF_E,
            Self::PdfUa => ffi::POPPLER_PDF_SUBTYPE_PDF_UA,
            Self::PdfVt => ffi::POPPLER_PDF_SUBTYPE_PDF_VT,
            Self::PdfX => ffi::POPPLER_PDF_SUBTYPE_PDF_X,
            Self::None => ffi::POPPLER_PDF_SUBTYPE_NONE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerPDFSubtype> for PDFSubtype {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerPDFSubtype) -> Self {
        match value {
            ffi::POPPLER_PDF_SUBTYPE_UNSET => Self::Unset,
            ffi::POPPLER_PDF_SUBTYPE_PDF_A => Self::PdfA,
            ffi::POPPLER_PDF_SUBTYPE_PDF_E => Self::PdfE,
            ffi::POPPLER_PDF_SUBTYPE_PDF_UA => Self::PdfUa,
            ffi::POPPLER_PDF_SUBTYPE_PDF_VT => Self::PdfVt,
            ffi::POPPLER_PDF_SUBTYPE_PDF_X => Self::PdfX,
            ffi::POPPLER_PDF_SUBTYPE_NONE => Self::None,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for PDFSubtype {
    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 PDFSubtype {
    type Type = Self;
}

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

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

impl ToValue for PDFSubtype {
    #[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<PDFSubtype> for glib::Value {
    #[inline]
    fn from(v: PDFSubtype) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerPageLayout")]
pub enum PageLayout {
    #[doc(alias = "POPPLER_PAGE_LAYOUT_UNSET")]
    Unset,
    #[doc(alias = "POPPLER_PAGE_LAYOUT_SINGLE_PAGE")]
    SinglePage,
    #[doc(alias = "POPPLER_PAGE_LAYOUT_ONE_COLUMN")]
    OneColumn,
    #[doc(alias = "POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT")]
    TwoColumnLeft,
    #[doc(alias = "POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT")]
    TwoColumnRight,
    #[doc(alias = "POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT")]
    TwoPageLeft,
    #[doc(alias = "POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT")]
    TwoPageRight,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerPageLayout {
        match self {
            Self::Unset => ffi::POPPLER_PAGE_LAYOUT_UNSET,
            Self::SinglePage => ffi::POPPLER_PAGE_LAYOUT_SINGLE_PAGE,
            Self::OneColumn => ffi::POPPLER_PAGE_LAYOUT_ONE_COLUMN,
            Self::TwoColumnLeft => ffi::POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT,
            Self::TwoColumnRight => ffi::POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT,
            Self::TwoPageLeft => ffi::POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT,
            Self::TwoPageRight => ffi::POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerPageLayout> for PageLayout {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerPageLayout) -> Self {
        match value {
            ffi::POPPLER_PAGE_LAYOUT_UNSET => Self::Unset,
            ffi::POPPLER_PAGE_LAYOUT_SINGLE_PAGE => Self::SinglePage,
            ffi::POPPLER_PAGE_LAYOUT_ONE_COLUMN => Self::OneColumn,
            ffi::POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT => Self::TwoColumnLeft,
            ffi::POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT => Self::TwoColumnRight,
            ffi::POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT => Self::TwoPageLeft,
            ffi::POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT => Self::TwoPageRight,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for PageLayout {
    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 PageLayout {
    type Type = Self;
}

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

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

impl ToValue for PageLayout {
    #[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<PageLayout> for glib::Value {
    #[inline]
    fn from(v: PageLayout) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerPageMode")]
pub enum PageMode {
    #[doc(alias = "POPPLER_PAGE_MODE_UNSET")]
    Unset,
    #[doc(alias = "POPPLER_PAGE_MODE_NONE")]
    None,
    #[doc(alias = "POPPLER_PAGE_MODE_USE_OUTLINES")]
    UseOutlines,
    #[doc(alias = "POPPLER_PAGE_MODE_USE_THUMBS")]
    UseThumbs,
    #[doc(alias = "POPPLER_PAGE_MODE_FULL_SCREEN")]
    FullScreen,
    #[doc(alias = "POPPLER_PAGE_MODE_USE_OC")]
    UseOc,
    #[doc(alias = "POPPLER_PAGE_MODE_USE_ATTACHMENTS")]
    UseAttachments,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerPageMode {
        match self {
            Self::Unset => ffi::POPPLER_PAGE_MODE_UNSET,
            Self::None => ffi::POPPLER_PAGE_MODE_NONE,
            Self::UseOutlines => ffi::POPPLER_PAGE_MODE_USE_OUTLINES,
            Self::UseThumbs => ffi::POPPLER_PAGE_MODE_USE_THUMBS,
            Self::FullScreen => ffi::POPPLER_PAGE_MODE_FULL_SCREEN,
            Self::UseOc => ffi::POPPLER_PAGE_MODE_USE_OC,
            Self::UseAttachments => ffi::POPPLER_PAGE_MODE_USE_ATTACHMENTS,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerPageMode> for PageMode {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerPageMode) -> Self {
        match value {
            ffi::POPPLER_PAGE_MODE_UNSET => Self::Unset,
            ffi::POPPLER_PAGE_MODE_NONE => Self::None,
            ffi::POPPLER_PAGE_MODE_USE_OUTLINES => Self::UseOutlines,
            ffi::POPPLER_PAGE_MODE_USE_THUMBS => Self::UseThumbs,
            ffi::POPPLER_PAGE_MODE_FULL_SCREEN => Self::FullScreen,
            ffi::POPPLER_PAGE_MODE_USE_OC => Self::UseOc,
            ffi::POPPLER_PAGE_MODE_USE_ATTACHMENTS => Self::UseAttachments,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for PageMode {
    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 PageMode {
    type Type = Self;
}

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

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

impl ToValue for PageMode {
    #[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<PageMode> for glib::Value {
    #[inline]
    fn from(v: PageMode) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerPageTransitionAlignment")]
pub enum PageTransitionAlignment {
    #[doc(alias = "POPPLER_PAGE_TRANSITION_HORIZONTAL")]
    Horizontal,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_VERTICAL")]
    Vertical,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerPageTransitionAlignment {
        match self {
            Self::Horizontal => ffi::POPPLER_PAGE_TRANSITION_HORIZONTAL,
            Self::Vertical => ffi::POPPLER_PAGE_TRANSITION_VERTICAL,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerPageTransitionAlignment> for PageTransitionAlignment {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerPageTransitionAlignment) -> Self {
        match value {
            ffi::POPPLER_PAGE_TRANSITION_HORIZONTAL => Self::Horizontal,
            ffi::POPPLER_PAGE_TRANSITION_VERTICAL => Self::Vertical,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for PageTransitionAlignment {
    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 PageTransitionAlignment {
    type Type = Self;
}

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

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

impl ToValue for PageTransitionAlignment {
    #[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<PageTransitionAlignment> for glib::Value {
    #[inline]
    fn from(v: PageTransitionAlignment) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerPageTransitionDirection")]
pub enum PageTransitionDirection {
    #[doc(alias = "POPPLER_PAGE_TRANSITION_INWARD")]
    Inward,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_OUTWARD")]
    Outward,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerPageTransitionDirection {
        match self {
            Self::Inward => ffi::POPPLER_PAGE_TRANSITION_INWARD,
            Self::Outward => ffi::POPPLER_PAGE_TRANSITION_OUTWARD,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerPageTransitionDirection> for PageTransitionDirection {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerPageTransitionDirection) -> Self {
        match value {
            ffi::POPPLER_PAGE_TRANSITION_INWARD => Self::Inward,
            ffi::POPPLER_PAGE_TRANSITION_OUTWARD => Self::Outward,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for PageTransitionDirection {
    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 PageTransitionDirection {
    type Type = Self;
}

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

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

impl ToValue for PageTransitionDirection {
    #[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<PageTransitionDirection> for glib::Value {
    #[inline]
    fn from(v: PageTransitionDirection) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerPageTransitionType")]
pub enum PageTransitionType {
    #[doc(alias = "POPPLER_PAGE_TRANSITION_REPLACE")]
    Replace,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_SPLIT")]
    Split,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_BLINDS")]
    Blinds,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_BOX")]
    Box,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_WIPE")]
    Wipe,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_DISSOLVE")]
    Dissolve,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_GLITTER")]
    Glitter,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_FLY")]
    Fly,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_PUSH")]
    Push,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_COVER")]
    Cover,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_UNCOVER")]
    Uncover,
    #[doc(alias = "POPPLER_PAGE_TRANSITION_FADE")]
    Fade,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerPageTransitionType {
        match self {
            Self::Replace => ffi::POPPLER_PAGE_TRANSITION_REPLACE,
            Self::Split => ffi::POPPLER_PAGE_TRANSITION_SPLIT,
            Self::Blinds => ffi::POPPLER_PAGE_TRANSITION_BLINDS,
            Self::Box => ffi::POPPLER_PAGE_TRANSITION_BOX,
            Self::Wipe => ffi::POPPLER_PAGE_TRANSITION_WIPE,
            Self::Dissolve => ffi::POPPLER_PAGE_TRANSITION_DISSOLVE,
            Self::Glitter => ffi::POPPLER_PAGE_TRANSITION_GLITTER,
            Self::Fly => ffi::POPPLER_PAGE_TRANSITION_FLY,
            Self::Push => ffi::POPPLER_PAGE_TRANSITION_PUSH,
            Self::Cover => ffi::POPPLER_PAGE_TRANSITION_COVER,
            Self::Uncover => ffi::POPPLER_PAGE_TRANSITION_UNCOVER,
            Self::Fade => ffi::POPPLER_PAGE_TRANSITION_FADE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerPageTransitionType> for PageTransitionType {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerPageTransitionType) -> Self {
        match value {
            ffi::POPPLER_PAGE_TRANSITION_REPLACE => Self::Replace,
            ffi::POPPLER_PAGE_TRANSITION_SPLIT => Self::Split,
            ffi::POPPLER_PAGE_TRANSITION_BLINDS => Self::Blinds,
            ffi::POPPLER_PAGE_TRANSITION_BOX => Self::Box,
            ffi::POPPLER_PAGE_TRANSITION_WIPE => Self::Wipe,
            ffi::POPPLER_PAGE_TRANSITION_DISSOLVE => Self::Dissolve,
            ffi::POPPLER_PAGE_TRANSITION_GLITTER => Self::Glitter,
            ffi::POPPLER_PAGE_TRANSITION_FLY => Self::Fly,
            ffi::POPPLER_PAGE_TRANSITION_PUSH => Self::Push,
            ffi::POPPLER_PAGE_TRANSITION_COVER => Self::Cover,
            ffi::POPPLER_PAGE_TRANSITION_UNCOVER => Self::Uncover,
            ffi::POPPLER_PAGE_TRANSITION_FADE => Self::Fade,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for PageTransitionType {
    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 PageTransitionType {
    type Type = Self;
}

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

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

impl ToValue for PageTransitionType {
    #[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<PageTransitionType> for glib::Value {
    #[inline]
    fn from(v: PageTransitionType) -> Self {
        ToValue::to_value(&v)
    }
}

#[cfg(feature = "v0_80")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerPrintDuplex")]
pub enum PrintDuplex {
    #[doc(alias = "POPPLER_PRINT_DUPLEX_NONE")]
    None,
    #[doc(alias = "POPPLER_PRINT_DUPLEX_SIMPLEX")]
    Simplex,
    #[doc(alias = "POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_SHORT_EDGE")]
    DuplexFlipShortEdge,
    #[doc(alias = "POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_LONG_EDGE")]
    DuplexFlipLongEdge,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(feature = "v0_80")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))]
#[doc(hidden)]
impl IntoGlib for PrintDuplex {
    type GlibType = ffi::PopplerPrintDuplex;

    #[inline]
    fn into_glib(self) -> ffi::PopplerPrintDuplex {
        match self {
            Self::None => ffi::POPPLER_PRINT_DUPLEX_NONE,
            Self::Simplex => ffi::POPPLER_PRINT_DUPLEX_SIMPLEX,
            Self::DuplexFlipShortEdge => ffi::POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_SHORT_EDGE,
            Self::DuplexFlipLongEdge => ffi::POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_LONG_EDGE,
            Self::__Unknown(value) => value,
        }
    }
}

#[cfg(feature = "v0_80")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))]
#[doc(hidden)]
impl FromGlib<ffi::PopplerPrintDuplex> for PrintDuplex {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerPrintDuplex) -> Self {
        match value {
            ffi::POPPLER_PRINT_DUPLEX_NONE => Self::None,
            ffi::POPPLER_PRINT_DUPLEX_SIMPLEX => Self::Simplex,
            ffi::POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_SHORT_EDGE => Self::DuplexFlipShortEdge,
            ffi::POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_LONG_EDGE => Self::DuplexFlipLongEdge,
            value => Self::__Unknown(value),
        }
    }
}

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

#[cfg(feature = "v0_80")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))]
impl glib::HasParamSpec for PrintDuplex {
    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 = "v0_80")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))]
impl glib::value::ValueType for PrintDuplex {
    type Type = Self;
}

#[cfg(feature = "v0_80")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))]
unsafe impl<'a> glib::value::FromValue<'a> for PrintDuplex {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

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

#[cfg(feature = "v0_80")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))]
impl ToValue for PrintDuplex {
    #[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 = "v0_80")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))]
impl From<PrintDuplex> for glib::Value {
    #[inline]
    fn from(v: PrintDuplex) -> Self {
        ToValue::to_value(&v)
    }
}

#[cfg(feature = "v0_73")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerPrintScaling")]
pub enum PrintScaling {
    #[doc(alias = "POPPLER_PRINT_SCALING_APP_DEFAULT")]
    AppDefault,
    #[doc(alias = "POPPLER_PRINT_SCALING_NONE")]
    None,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(feature = "v0_73")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))]
#[doc(hidden)]
impl IntoGlib for PrintScaling {
    type GlibType = ffi::PopplerPrintScaling;

    #[inline]
    fn into_glib(self) -> ffi::PopplerPrintScaling {
        match self {
            Self::AppDefault => ffi::POPPLER_PRINT_SCALING_APP_DEFAULT,
            Self::None => ffi::POPPLER_PRINT_SCALING_NONE,
            Self::__Unknown(value) => value,
        }
    }
}

#[cfg(feature = "v0_73")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))]
#[doc(hidden)]
impl FromGlib<ffi::PopplerPrintScaling> for PrintScaling {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerPrintScaling) -> Self {
        match value {
            ffi::POPPLER_PRINT_SCALING_APP_DEFAULT => Self::AppDefault,
            ffi::POPPLER_PRINT_SCALING_NONE => Self::None,
            value => Self::__Unknown(value),
        }
    }
}

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

#[cfg(feature = "v0_73")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))]
impl glib::HasParamSpec for PrintScaling {
    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 = "v0_73")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))]
impl glib::value::ValueType for PrintScaling {
    type Type = Self;
}

#[cfg(feature = "v0_73")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))]
unsafe impl<'a> glib::value::FromValue<'a> for PrintScaling {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

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

#[cfg(feature = "v0_73")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))]
impl ToValue for PrintScaling {
    #[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 = "v0_73")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))]
impl From<PrintScaling> for glib::Value {
    #[inline]
    fn from(v: PrintScaling) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerSelectionStyle")]
pub enum SelectionStyle {
    #[doc(alias = "POPPLER_SELECTION_GLYPH")]
    Glyph,
    #[doc(alias = "POPPLER_SELECTION_WORD")]
    Word,
    #[doc(alias = "POPPLER_SELECTION_LINE")]
    Line,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerSelectionStyle {
        match self {
            Self::Glyph => ffi::POPPLER_SELECTION_GLYPH,
            Self::Word => ffi::POPPLER_SELECTION_WORD,
            Self::Line => ffi::POPPLER_SELECTION_LINE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerSelectionStyle> for SelectionStyle {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerSelectionStyle) -> Self {
        match value {
            ffi::POPPLER_SELECTION_GLYPH => Self::Glyph,
            ffi::POPPLER_SELECTION_WORD => Self::Word,
            ffi::POPPLER_SELECTION_LINE => Self::Line,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for SelectionStyle {
    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 SelectionStyle {
    type Type = Self;
}

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

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

impl ToValue for SelectionStyle {
    #[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<SelectionStyle> for glib::Value {
    #[inline]
    fn from(v: SelectionStyle) -> Self {
        ToValue::to_value(&v)
    }
}

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerSignatureStatus")]
pub enum SignatureStatus {
    #[doc(alias = "POPPLER_SIGNATURE_VALID")]
    Valid,
    #[doc(alias = "POPPLER_SIGNATURE_INVALID")]
    Invalid,
    #[doc(alias = "POPPLER_SIGNATURE_DIGEST_MISMATCH")]
    DigestMismatch,
    #[doc(alias = "POPPLER_SIGNATURE_DECODING_ERROR")]
    DecodingError,
    #[doc(alias = "POPPLER_SIGNATURE_GENERIC_ERROR")]
    GenericError,
    #[doc(alias = "POPPLER_SIGNATURE_NOT_FOUND")]
    NotFound,
    #[doc(alias = "POPPLER_SIGNATURE_NOT_VERIFIED")]
    NotVerified,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
#[doc(hidden)]
impl IntoGlib for SignatureStatus {
    type GlibType = ffi::PopplerSignatureStatus;

    #[inline]
    fn into_glib(self) -> ffi::PopplerSignatureStatus {
        match self {
            Self::Valid => ffi::POPPLER_SIGNATURE_VALID,
            Self::Invalid => ffi::POPPLER_SIGNATURE_INVALID,
            Self::DigestMismatch => ffi::POPPLER_SIGNATURE_DIGEST_MISMATCH,
            Self::DecodingError => ffi::POPPLER_SIGNATURE_DECODING_ERROR,
            Self::GenericError => ffi::POPPLER_SIGNATURE_GENERIC_ERROR,
            Self::NotFound => ffi::POPPLER_SIGNATURE_NOT_FOUND,
            Self::NotVerified => ffi::POPPLER_SIGNATURE_NOT_VERIFIED,
            Self::__Unknown(value) => value,
        }
    }
}

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
#[doc(hidden)]
impl FromGlib<ffi::PopplerSignatureStatus> for SignatureStatus {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerSignatureStatus) -> Self {
        match value {
            ffi::POPPLER_SIGNATURE_VALID => Self::Valid,
            ffi::POPPLER_SIGNATURE_INVALID => Self::Invalid,
            ffi::POPPLER_SIGNATURE_DIGEST_MISMATCH => Self::DigestMismatch,
            ffi::POPPLER_SIGNATURE_DECODING_ERROR => Self::DecodingError,
            ffi::POPPLER_SIGNATURE_GENERIC_ERROR => Self::GenericError,
            ffi::POPPLER_SIGNATURE_NOT_FOUND => Self::NotFound,
            ffi::POPPLER_SIGNATURE_NOT_VERIFIED => Self::NotVerified,
            value => Self::__Unknown(value),
        }
    }
}

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

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
impl glib::HasParamSpec for SignatureStatus {
    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 = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
impl glib::value::ValueType for SignatureStatus {
    type Type = Self;
}

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
unsafe impl<'a> glib::value::FromValue<'a> for SignatureStatus {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

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

#[cfg(feature = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
impl ToValue for SignatureStatus {
    #[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 = "v21_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))]
impl From<SignatureStatus> for glib::Value {
    #[inline]
    fn from(v: SignatureStatus) -> Self {
        ToValue::to_value(&v)
    }
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStretch")]
pub enum Stretch {
    #[doc(alias = "POPPLER_STRETCH_ULTRA_CONDENSED")]
    UltraCondensed,
    #[doc(alias = "POPPLER_STRETCH_EXTRA_CONDENSED")]
    ExtraCondensed,
    #[doc(alias = "POPPLER_STRETCH_CONDENSED")]
    Condensed,
    #[doc(alias = "POPPLER_STRETCH_SEMI_CONDENSED")]
    SemiCondensed,
    #[doc(alias = "POPPLER_STRETCH_NORMAL")]
    Normal,
    #[doc(alias = "POPPLER_STRETCH_SEMI_EXPANDED")]
    SemiExpanded,
    #[doc(alias = "POPPLER_STRETCH_EXPANDED")]
    Expanded,
    #[doc(alias = "POPPLER_STRETCH_EXTRA_EXPANDED")]
    ExtraExpanded,
    #[doc(alias = "POPPLER_STRETCH_ULTRA_EXPANDED")]
    UltraExpanded,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
#[doc(hidden)]
impl IntoGlib for Stretch {
    type GlibType = ffi::PopplerStretch;

    #[inline]
    fn into_glib(self) -> ffi::PopplerStretch {
        match self {
            Self::UltraCondensed => ffi::POPPLER_STRETCH_ULTRA_CONDENSED,
            Self::ExtraCondensed => ffi::POPPLER_STRETCH_EXTRA_CONDENSED,
            Self::Condensed => ffi::POPPLER_STRETCH_CONDENSED,
            Self::SemiCondensed => ffi::POPPLER_STRETCH_SEMI_CONDENSED,
            Self::Normal => ffi::POPPLER_STRETCH_NORMAL,
            Self::SemiExpanded => ffi::POPPLER_STRETCH_SEMI_EXPANDED,
            Self::Expanded => ffi::POPPLER_STRETCH_EXPANDED,
            Self::ExtraExpanded => ffi::POPPLER_STRETCH_EXTRA_EXPANDED,
            Self::UltraExpanded => ffi::POPPLER_STRETCH_ULTRA_EXPANDED,
            Self::__Unknown(value) => value,
        }
    }
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
#[doc(hidden)]
impl FromGlib<ffi::PopplerStretch> for Stretch {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStretch) -> Self {
        match value {
            ffi::POPPLER_STRETCH_ULTRA_CONDENSED => Self::UltraCondensed,
            ffi::POPPLER_STRETCH_EXTRA_CONDENSED => Self::ExtraCondensed,
            ffi::POPPLER_STRETCH_CONDENSED => Self::Condensed,
            ffi::POPPLER_STRETCH_SEMI_CONDENSED => Self::SemiCondensed,
            ffi::POPPLER_STRETCH_NORMAL => Self::Normal,
            ffi::POPPLER_STRETCH_SEMI_EXPANDED => Self::SemiExpanded,
            ffi::POPPLER_STRETCH_EXPANDED => Self::Expanded,
            ffi::POPPLER_STRETCH_EXTRA_EXPANDED => Self::ExtraExpanded,
            ffi::POPPLER_STRETCH_ULTRA_EXPANDED => Self::UltraExpanded,
            value => Self::__Unknown(value),
        }
    }
}

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

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl glib::HasParamSpec for Stretch {
    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 = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl glib::value::ValueType for Stretch {
    type Type = Self;
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
unsafe impl<'a> glib::value::FromValue<'a> for Stretch {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

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

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl ToValue for Stretch {
    #[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 = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl From<Stretch> for glib::Value {
    #[inline]
    fn from(v: Stretch) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureBlockAlign")]
pub enum StructureBlockAlign {
    #[doc(alias = "POPPLER_STRUCTURE_BLOCK_ALIGN_BEFORE")]
    Before,
    #[doc(alias = "POPPLER_STRUCTURE_BLOCK_ALIGN_MIDDLE")]
    Middle,
    #[doc(alias = "POPPLER_STRUCTURE_BLOCK_ALIGN_AFTER")]
    After,
    #[doc(alias = "POPPLER_STRUCTURE_BLOCK_ALIGN_JUSTIFY")]
    Justify,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureBlockAlign {
        match self {
            Self::Before => ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_BEFORE,
            Self::Middle => ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_MIDDLE,
            Self::After => ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_AFTER,
            Self::Justify => ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_JUSTIFY,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureBlockAlign> for StructureBlockAlign {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureBlockAlign) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_BEFORE => Self::Before,
            ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_MIDDLE => Self::Middle,
            ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_AFTER => Self::After,
            ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_JUSTIFY => Self::Justify,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureBlockAlign {
    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 StructureBlockAlign {
    type Type = Self;
}

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

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

impl ToValue for StructureBlockAlign {
    #[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<StructureBlockAlign> for glib::Value {
    #[inline]
    fn from(v: StructureBlockAlign) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureBorderStyle")]
pub enum StructureBorderStyle {
    #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_NONE")]
    None,
    #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_HIDDEN")]
    Hidden,
    #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_DOTTED")]
    Dotted,
    #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_DASHED")]
    Dashed,
    #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_SOLID")]
    Solid,
    #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_DOUBLE")]
    Double,
    #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_GROOVE")]
    Groove,
    #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_INSET")]
    Inset,
    #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_OUTSET")]
    Outset,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureBorderStyle {
        match self {
            Self::None => ffi::POPPLER_STRUCTURE_BORDER_STYLE_NONE,
            Self::Hidden => ffi::POPPLER_STRUCTURE_BORDER_STYLE_HIDDEN,
            Self::Dotted => ffi::POPPLER_STRUCTURE_BORDER_STYLE_DOTTED,
            Self::Dashed => ffi::POPPLER_STRUCTURE_BORDER_STYLE_DASHED,
            Self::Solid => ffi::POPPLER_STRUCTURE_BORDER_STYLE_SOLID,
            Self::Double => ffi::POPPLER_STRUCTURE_BORDER_STYLE_DOUBLE,
            Self::Groove => ffi::POPPLER_STRUCTURE_BORDER_STYLE_GROOVE,
            Self::Inset => ffi::POPPLER_STRUCTURE_BORDER_STYLE_INSET,
            Self::Outset => ffi::POPPLER_STRUCTURE_BORDER_STYLE_OUTSET,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureBorderStyle> for StructureBorderStyle {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureBorderStyle) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_BORDER_STYLE_NONE => Self::None,
            ffi::POPPLER_STRUCTURE_BORDER_STYLE_HIDDEN => Self::Hidden,
            ffi::POPPLER_STRUCTURE_BORDER_STYLE_DOTTED => Self::Dotted,
            ffi::POPPLER_STRUCTURE_BORDER_STYLE_DASHED => Self::Dashed,
            ffi::POPPLER_STRUCTURE_BORDER_STYLE_SOLID => Self::Solid,
            ffi::POPPLER_STRUCTURE_BORDER_STYLE_DOUBLE => Self::Double,
            ffi::POPPLER_STRUCTURE_BORDER_STYLE_GROOVE => Self::Groove,
            ffi::POPPLER_STRUCTURE_BORDER_STYLE_INSET => Self::Inset,
            ffi::POPPLER_STRUCTURE_BORDER_STYLE_OUTSET => Self::Outset,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureBorderStyle {
    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 StructureBorderStyle {
    type Type = Self;
}

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

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

impl ToValue for StructureBorderStyle {
    #[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<StructureBorderStyle> for glib::Value {
    #[inline]
    fn from(v: StructureBorderStyle) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureElementKind")]
pub enum StructureElementKind {
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_CONTENT")]
    Content,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_OBJECT_REFERENCE")]
    ObjectReference,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_DOCUMENT")]
    Document,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_PART")]
    Part,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_ARTICLE")]
    Article,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_SECTION")]
    Section,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_DIV")]
    Div,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_SPAN")]
    Span,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_QUOTE")]
    Quote,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_NOTE")]
    Note,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_REFERENCE")]
    Reference,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_BIBENTRY")]
    Bibentry,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_CODE")]
    Code,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_LINK")]
    Link,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_ANNOT")]
    Annot,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_BLOCKQUOTE")]
    Blockquote,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_CAPTION")]
    Caption,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_NONSTRUCT")]
    Nonstruct,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TOC")]
    Toc,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TOC_ITEM")]
    TocItem,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_INDEX")]
    Index,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_PRIVATE")]
    Private,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_PARAGRAPH")]
    Paragraph,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING")]
    Heading,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_1")]
    Heading1,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_2")]
    Heading2,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_3")]
    Heading3,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_4")]
    Heading4,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_5")]
    Heading5,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_6")]
    Heading6,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_LIST")]
    List,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_LIST_ITEM")]
    ListItem,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_LIST_LABEL")]
    ListLabel,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_LIST_BODY")]
    ListBody,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE")]
    Table,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_ROW")]
    TableRow,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_HEADING")]
    TableHeading,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_DATA")]
    TableData,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_HEADER")]
    TableHeader,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_FOOTER")]
    TableFooter,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_BODY")]
    TableBody,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_RUBY")]
    Ruby,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_RUBY_BASE_TEXT")]
    RubyBaseText,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_RUBY_ANNOT_TEXT")]
    RubyAnnotText,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_RUBY_PUNCTUATION")]
    RubyPunctuation,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_WARICHU")]
    Warichu,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_WARICHU_TEXT")]
    WarichuText,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_WARICHU_PUNCTUATION")]
    WarichuPunctuation,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_FIGURE")]
    Figure,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_FORMULA")]
    Formula,
    #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_FORM")]
    Form,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    fn into_glib(self) -> ffi::PopplerStructureElementKind {
        match self {
            Self::Content => ffi::POPPLER_STRUCTURE_ELEMENT_CONTENT,
            Self::ObjectReference => ffi::POPPLER_STRUCTURE_ELEMENT_OBJECT_REFERENCE,
            Self::Document => ffi::POPPLER_STRUCTURE_ELEMENT_DOCUMENT,
            Self::Part => ffi::POPPLER_STRUCTURE_ELEMENT_PART,
            Self::Article => ffi::POPPLER_STRUCTURE_ELEMENT_ARTICLE,
            Self::Section => ffi::POPPLER_STRUCTURE_ELEMENT_SECTION,
            Self::Div => ffi::POPPLER_STRUCTURE_ELEMENT_DIV,
            Self::Span => ffi::POPPLER_STRUCTURE_ELEMENT_SPAN,
            Self::Quote => ffi::POPPLER_STRUCTURE_ELEMENT_QUOTE,
            Self::Note => ffi::POPPLER_STRUCTURE_ELEMENT_NOTE,
            Self::Reference => ffi::POPPLER_STRUCTURE_ELEMENT_REFERENCE,
            Self::Bibentry => ffi::POPPLER_STRUCTURE_ELEMENT_BIBENTRY,
            Self::Code => ffi::POPPLER_STRUCTURE_ELEMENT_CODE,
            Self::Link => ffi::POPPLER_STRUCTURE_ELEMENT_LINK,
            Self::Annot => ffi::POPPLER_STRUCTURE_ELEMENT_ANNOT,
            Self::Blockquote => ffi::POPPLER_STRUCTURE_ELEMENT_BLOCKQUOTE,
            Self::Caption => ffi::POPPLER_STRUCTURE_ELEMENT_CAPTION,
            Self::Nonstruct => ffi::POPPLER_STRUCTURE_ELEMENT_NONSTRUCT,
            Self::Toc => ffi::POPPLER_STRUCTURE_ELEMENT_TOC,
            Self::TocItem => ffi::POPPLER_STRUCTURE_ELEMENT_TOC_ITEM,
            Self::Index => ffi::POPPLER_STRUCTURE_ELEMENT_INDEX,
            Self::Private => ffi::POPPLER_STRUCTURE_ELEMENT_PRIVATE,
            Self::Paragraph => ffi::POPPLER_STRUCTURE_ELEMENT_PARAGRAPH,
            Self::Heading => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING,
            Self::Heading1 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_1,
            Self::Heading2 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_2,
            Self::Heading3 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_3,
            Self::Heading4 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_4,
            Self::Heading5 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_5,
            Self::Heading6 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_6,
            Self::List => ffi::POPPLER_STRUCTURE_ELEMENT_LIST,
            Self::ListItem => ffi::POPPLER_STRUCTURE_ELEMENT_LIST_ITEM,
            Self::ListLabel => ffi::POPPLER_STRUCTURE_ELEMENT_LIST_LABEL,
            Self::ListBody => ffi::POPPLER_STRUCTURE_ELEMENT_LIST_BODY,
            Self::Table => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE,
            Self::TableRow => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_ROW,
            Self::TableHeading => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_HEADING,
            Self::TableData => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_DATA,
            Self::TableHeader => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_HEADER,
            Self::TableFooter => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_FOOTER,
            Self::TableBody => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_BODY,
            Self::Ruby => ffi::POPPLER_STRUCTURE_ELEMENT_RUBY,
            Self::RubyBaseText => ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_BASE_TEXT,
            Self::RubyAnnotText => ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_ANNOT_TEXT,
            Self::RubyPunctuation => ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_PUNCTUATION,
            Self::Warichu => ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU,
            Self::WarichuText => ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU_TEXT,
            Self::WarichuPunctuation => ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU_PUNCTUATION,
            Self::Figure => ffi::POPPLER_STRUCTURE_ELEMENT_FIGURE,
            Self::Formula => ffi::POPPLER_STRUCTURE_ELEMENT_FORMULA,
            Self::Form => ffi::POPPLER_STRUCTURE_ELEMENT_FORM,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureElementKind> for StructureElementKind {
    unsafe fn from_glib(value: ffi::PopplerStructureElementKind) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_ELEMENT_CONTENT => Self::Content,
            ffi::POPPLER_STRUCTURE_ELEMENT_OBJECT_REFERENCE => Self::ObjectReference,
            ffi::POPPLER_STRUCTURE_ELEMENT_DOCUMENT => Self::Document,
            ffi::POPPLER_STRUCTURE_ELEMENT_PART => Self::Part,
            ffi::POPPLER_STRUCTURE_ELEMENT_ARTICLE => Self::Article,
            ffi::POPPLER_STRUCTURE_ELEMENT_SECTION => Self::Section,
            ffi::POPPLER_STRUCTURE_ELEMENT_DIV => Self::Div,
            ffi::POPPLER_STRUCTURE_ELEMENT_SPAN => Self::Span,
            ffi::POPPLER_STRUCTURE_ELEMENT_QUOTE => Self::Quote,
            ffi::POPPLER_STRUCTURE_ELEMENT_NOTE => Self::Note,
            ffi::POPPLER_STRUCTURE_ELEMENT_REFERENCE => Self::Reference,
            ffi::POPPLER_STRUCTURE_ELEMENT_BIBENTRY => Self::Bibentry,
            ffi::POPPLER_STRUCTURE_ELEMENT_CODE => Self::Code,
            ffi::POPPLER_STRUCTURE_ELEMENT_LINK => Self::Link,
            ffi::POPPLER_STRUCTURE_ELEMENT_ANNOT => Self::Annot,
            ffi::POPPLER_STRUCTURE_ELEMENT_BLOCKQUOTE => Self::Blockquote,
            ffi::POPPLER_STRUCTURE_ELEMENT_CAPTION => Self::Caption,
            ffi::POPPLER_STRUCTURE_ELEMENT_NONSTRUCT => Self::Nonstruct,
            ffi::POPPLER_STRUCTURE_ELEMENT_TOC => Self::Toc,
            ffi::POPPLER_STRUCTURE_ELEMENT_TOC_ITEM => Self::TocItem,
            ffi::POPPLER_STRUCTURE_ELEMENT_INDEX => Self::Index,
            ffi::POPPLER_STRUCTURE_ELEMENT_PRIVATE => Self::Private,
            ffi::POPPLER_STRUCTURE_ELEMENT_PARAGRAPH => Self::Paragraph,
            ffi::POPPLER_STRUCTURE_ELEMENT_HEADING => Self::Heading,
            ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_1 => Self::Heading1,
            ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_2 => Self::Heading2,
            ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_3 => Self::Heading3,
            ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_4 => Self::Heading4,
            ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_5 => Self::Heading5,
            ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_6 => Self::Heading6,
            ffi::POPPLER_STRUCTURE_ELEMENT_LIST => Self::List,
            ffi::POPPLER_STRUCTURE_ELEMENT_LIST_ITEM => Self::ListItem,
            ffi::POPPLER_STRUCTURE_ELEMENT_LIST_LABEL => Self::ListLabel,
            ffi::POPPLER_STRUCTURE_ELEMENT_LIST_BODY => Self::ListBody,
            ffi::POPPLER_STRUCTURE_ELEMENT_TABLE => Self::Table,
            ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_ROW => Self::TableRow,
            ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_HEADING => Self::TableHeading,
            ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_DATA => Self::TableData,
            ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_HEADER => Self::TableHeader,
            ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_FOOTER => Self::TableFooter,
            ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_BODY => Self::TableBody,
            ffi::POPPLER_STRUCTURE_ELEMENT_RUBY => Self::Ruby,
            ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_BASE_TEXT => Self::RubyBaseText,
            ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_ANNOT_TEXT => Self::RubyAnnotText,
            ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_PUNCTUATION => Self::RubyPunctuation,
            ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU => Self::Warichu,
            ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU_TEXT => Self::WarichuText,
            ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU_PUNCTUATION => Self::WarichuPunctuation,
            ffi::POPPLER_STRUCTURE_ELEMENT_FIGURE => Self::Figure,
            ffi::POPPLER_STRUCTURE_ELEMENT_FORMULA => Self::Formula,
            ffi::POPPLER_STRUCTURE_ELEMENT_FORM => Self::Form,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureElementKind {
    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 StructureElementKind {
    type Type = Self;
}

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

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

impl ToValue for StructureElementKind {
    #[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<StructureElementKind> for glib::Value {
    #[inline]
    fn from(v: StructureElementKind) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureFormRole")]
pub enum StructureFormRole {
    #[doc(alias = "POPPLER_STRUCTURE_FORM_ROLE_UNDEFINED")]
    Undefined,
    #[doc(alias = "POPPLER_STRUCTURE_FORM_ROLE_RADIO_BUTTON")]
    RadioButton,
    #[doc(alias = "POPPLER_STRUCTURE_FORM_ROLE_PUSH_BUTTON")]
    PushButton,
    #[doc(alias = "POPPLER_STRUCTURE_FORM_ROLE_TEXT_VALUE")]
    TextValue,
    #[doc(alias = "POPPLER_STRUCTURE_FORM_ROLE_CHECKBOX")]
    Checkbox,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureFormRole {
        match self {
            Self::Undefined => ffi::POPPLER_STRUCTURE_FORM_ROLE_UNDEFINED,
            Self::RadioButton => ffi::POPPLER_STRUCTURE_FORM_ROLE_RADIO_BUTTON,
            Self::PushButton => ffi::POPPLER_STRUCTURE_FORM_ROLE_PUSH_BUTTON,
            Self::TextValue => ffi::POPPLER_STRUCTURE_FORM_ROLE_TEXT_VALUE,
            Self::Checkbox => ffi::POPPLER_STRUCTURE_FORM_ROLE_CHECKBOX,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureFormRole> for StructureFormRole {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureFormRole) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_FORM_ROLE_UNDEFINED => Self::Undefined,
            ffi::POPPLER_STRUCTURE_FORM_ROLE_RADIO_BUTTON => Self::RadioButton,
            ffi::POPPLER_STRUCTURE_FORM_ROLE_PUSH_BUTTON => Self::PushButton,
            ffi::POPPLER_STRUCTURE_FORM_ROLE_TEXT_VALUE => Self::TextValue,
            ffi::POPPLER_STRUCTURE_FORM_ROLE_CHECKBOX => Self::Checkbox,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureFormRole {
    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 StructureFormRole {
    type Type = Self;
}

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

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

impl ToValue for StructureFormRole {
    #[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<StructureFormRole> for glib::Value {
    #[inline]
    fn from(v: StructureFormRole) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureFormState")]
pub enum StructureFormState {
    #[doc(alias = "POPPLER_STRUCTURE_FORM_STATE_ON")]
    On,
    #[doc(alias = "POPPLER_STRUCTURE_FORM_STATE_OFF")]
    Off,
    #[doc(alias = "POPPLER_STRUCTURE_FORM_STATE_NEUTRAL")]
    Neutral,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureFormState {
        match self {
            Self::On => ffi::POPPLER_STRUCTURE_FORM_STATE_ON,
            Self::Off => ffi::POPPLER_STRUCTURE_FORM_STATE_OFF,
            Self::Neutral => ffi::POPPLER_STRUCTURE_FORM_STATE_NEUTRAL,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureFormState> for StructureFormState {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureFormState) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_FORM_STATE_ON => Self::On,
            ffi::POPPLER_STRUCTURE_FORM_STATE_OFF => Self::Off,
            ffi::POPPLER_STRUCTURE_FORM_STATE_NEUTRAL => Self::Neutral,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureFormState {
    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 StructureFormState {
    type Type = Self;
}

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

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

impl ToValue for StructureFormState {
    #[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<StructureFormState> for glib::Value {
    #[inline]
    fn from(v: StructureFormState) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureGlyphOrientation")]
pub enum StructureGlyphOrientation {
    #[doc(alias = "POPPLER_STRUCTURE_GLYPH_ORIENTATION_AUTO")]
    Auto,
    #[doc(alias = "POPPLER_STRUCTURE_GLYPH_ORIENTATION_90")]
    _90,
    #[doc(alias = "POPPLER_STRUCTURE_GLYPH_ORIENTATION_180")]
    _180,
    #[doc(alias = "POPPLER_STRUCTURE_GLYPH_ORIENTATION_270")]
    _270,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureGlyphOrientation {
        match self {
            Self::Auto => ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_AUTO,
            Self::_90 => ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_90,
            Self::_180 => ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_180,
            Self::_270 => ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_270,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureGlyphOrientation> for StructureGlyphOrientation {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureGlyphOrientation) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_AUTO => Self::Auto,
            ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_90 => Self::_90,
            ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_180 => Self::_180,
            ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_270 => Self::_270,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureGlyphOrientation {
    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 StructureGlyphOrientation {
    type Type = Self;
}

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

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

impl ToValue for StructureGlyphOrientation {
    #[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<StructureGlyphOrientation> for glib::Value {
    #[inline]
    fn from(v: StructureGlyphOrientation) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureInlineAlign")]
pub enum StructureInlineAlign {
    #[doc(alias = "POPPLER_STRUCTURE_INLINE_ALIGN_START")]
    Start,
    #[doc(alias = "POPPLER_STRUCTURE_INLINE_ALIGN_CENTER")]
    Center,
    #[doc(alias = "POPPLER_STRUCTURE_INLINE_ALIGN_END")]
    End,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureInlineAlign {
        match self {
            Self::Start => ffi::POPPLER_STRUCTURE_INLINE_ALIGN_START,
            Self::Center => ffi::POPPLER_STRUCTURE_INLINE_ALIGN_CENTER,
            Self::End => ffi::POPPLER_STRUCTURE_INLINE_ALIGN_END,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureInlineAlign> for StructureInlineAlign {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureInlineAlign) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_INLINE_ALIGN_START => Self::Start,
            ffi::POPPLER_STRUCTURE_INLINE_ALIGN_CENTER => Self::Center,
            ffi::POPPLER_STRUCTURE_INLINE_ALIGN_END => Self::End,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureInlineAlign {
    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 StructureInlineAlign {
    type Type = Self;
}

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

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

impl ToValue for StructureInlineAlign {
    #[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<StructureInlineAlign> for glib::Value {
    #[inline]
    fn from(v: StructureInlineAlign) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureListNumbering")]
pub enum StructureListNumbering {
    #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_NONE")]
    None,
    #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_DISC")]
    Disc,
    #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_CIRCLE")]
    Circle,
    #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_SQUARE")]
    Square,
    #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_DECIMAL")]
    Decimal,
    #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ROMAN")]
    UpperRoman,
    #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ROMAN")]
    LowerRoman,
    #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ALPHA")]
    UpperAlpha,
    #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ALPHA")]
    LowerAlpha,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureListNumbering {
        match self {
            Self::None => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_NONE,
            Self::Disc => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_DISC,
            Self::Circle => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_CIRCLE,
            Self::Square => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_SQUARE,
            Self::Decimal => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_DECIMAL,
            Self::UpperRoman => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ROMAN,
            Self::LowerRoman => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ROMAN,
            Self::UpperAlpha => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ALPHA,
            Self::LowerAlpha => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ALPHA,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureListNumbering> for StructureListNumbering {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureListNumbering) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_LIST_NUMBERING_NONE => Self::None,
            ffi::POPPLER_STRUCTURE_LIST_NUMBERING_DISC => Self::Disc,
            ffi::POPPLER_STRUCTURE_LIST_NUMBERING_CIRCLE => Self::Circle,
            ffi::POPPLER_STRUCTURE_LIST_NUMBERING_SQUARE => Self::Square,
            ffi::POPPLER_STRUCTURE_LIST_NUMBERING_DECIMAL => Self::Decimal,
            ffi::POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ROMAN => Self::UpperRoman,
            ffi::POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ROMAN => Self::LowerRoman,
            ffi::POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ALPHA => Self::UpperAlpha,
            ffi::POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ALPHA => Self::LowerAlpha,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureListNumbering {
    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 StructureListNumbering {
    type Type = Self;
}

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

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

impl ToValue for StructureListNumbering {
    #[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<StructureListNumbering> for glib::Value {
    #[inline]
    fn from(v: StructureListNumbering) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructurePlacement")]
pub enum StructurePlacement {
    #[doc(alias = "POPPLER_STRUCTURE_PLACEMENT_BLOCK")]
    Block,
    #[doc(alias = "POPPLER_STRUCTURE_PLACEMENT_INLINE")]
    Inline,
    #[doc(alias = "POPPLER_STRUCTURE_PLACEMENT_BEFORE")]
    Before,
    #[doc(alias = "POPPLER_STRUCTURE_PLACEMENT_START")]
    Start,
    #[doc(alias = "POPPLER_STRUCTURE_PLACEMENT_END")]
    End,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructurePlacement {
        match self {
            Self::Block => ffi::POPPLER_STRUCTURE_PLACEMENT_BLOCK,
            Self::Inline => ffi::POPPLER_STRUCTURE_PLACEMENT_INLINE,
            Self::Before => ffi::POPPLER_STRUCTURE_PLACEMENT_BEFORE,
            Self::Start => ffi::POPPLER_STRUCTURE_PLACEMENT_START,
            Self::End => ffi::POPPLER_STRUCTURE_PLACEMENT_END,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructurePlacement> for StructurePlacement {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructurePlacement) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_PLACEMENT_BLOCK => Self::Block,
            ffi::POPPLER_STRUCTURE_PLACEMENT_INLINE => Self::Inline,
            ffi::POPPLER_STRUCTURE_PLACEMENT_BEFORE => Self::Before,
            ffi::POPPLER_STRUCTURE_PLACEMENT_START => Self::Start,
            ffi::POPPLER_STRUCTURE_PLACEMENT_END => Self::End,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructurePlacement {
    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 StructurePlacement {
    type Type = Self;
}

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

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

impl ToValue for StructurePlacement {
    #[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<StructurePlacement> for glib::Value {
    #[inline]
    fn from(v: StructurePlacement) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureRubyAlign")]
pub enum StructureRubyAlign {
    #[doc(alias = "POPPLER_STRUCTURE_RUBY_ALIGN_START")]
    Start,
    #[doc(alias = "POPPLER_STRUCTURE_RUBY_ALIGN_CENTER")]
    Center,
    #[doc(alias = "POPPLER_STRUCTURE_RUBY_ALIGN_END")]
    End,
    #[doc(alias = "POPPLER_STRUCTURE_RUBY_ALIGN_JUSTIFY")]
    Justify,
    #[doc(alias = "POPPLER_STRUCTURE_RUBY_ALIGN_DISTRIBUTE")]
    Distribute,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureRubyAlign {
        match self {
            Self::Start => ffi::POPPLER_STRUCTURE_RUBY_ALIGN_START,
            Self::Center => ffi::POPPLER_STRUCTURE_RUBY_ALIGN_CENTER,
            Self::End => ffi::POPPLER_STRUCTURE_RUBY_ALIGN_END,
            Self::Justify => ffi::POPPLER_STRUCTURE_RUBY_ALIGN_JUSTIFY,
            Self::Distribute => ffi::POPPLER_STRUCTURE_RUBY_ALIGN_DISTRIBUTE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureRubyAlign> for StructureRubyAlign {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureRubyAlign) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_RUBY_ALIGN_START => Self::Start,
            ffi::POPPLER_STRUCTURE_RUBY_ALIGN_CENTER => Self::Center,
            ffi::POPPLER_STRUCTURE_RUBY_ALIGN_END => Self::End,
            ffi::POPPLER_STRUCTURE_RUBY_ALIGN_JUSTIFY => Self::Justify,
            ffi::POPPLER_STRUCTURE_RUBY_ALIGN_DISTRIBUTE => Self::Distribute,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureRubyAlign {
    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 StructureRubyAlign {
    type Type = Self;
}

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

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

impl ToValue for StructureRubyAlign {
    #[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<StructureRubyAlign> for glib::Value {
    #[inline]
    fn from(v: StructureRubyAlign) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureRubyPosition")]
pub enum StructureRubyPosition {
    #[doc(alias = "POPPLER_STRUCTURE_RUBY_POSITION_BEFORE")]
    Before,
    #[doc(alias = "POPPLER_STRUCTURE_RUBY_POSITION_AFTER")]
    After,
    #[doc(alias = "POPPLER_STRUCTURE_RUBY_POSITION_WARICHU")]
    Warichu,
    #[doc(alias = "POPPLER_STRUCTURE_RUBY_POSITION_INLINE")]
    Inline,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureRubyPosition {
        match self {
            Self::Before => ffi::POPPLER_STRUCTURE_RUBY_POSITION_BEFORE,
            Self::After => ffi::POPPLER_STRUCTURE_RUBY_POSITION_AFTER,
            Self::Warichu => ffi::POPPLER_STRUCTURE_RUBY_POSITION_WARICHU,
            Self::Inline => ffi::POPPLER_STRUCTURE_RUBY_POSITION_INLINE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureRubyPosition> for StructureRubyPosition {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureRubyPosition) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_RUBY_POSITION_BEFORE => Self::Before,
            ffi::POPPLER_STRUCTURE_RUBY_POSITION_AFTER => Self::After,
            ffi::POPPLER_STRUCTURE_RUBY_POSITION_WARICHU => Self::Warichu,
            ffi::POPPLER_STRUCTURE_RUBY_POSITION_INLINE => Self::Inline,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureRubyPosition {
    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 StructureRubyPosition {
    type Type = Self;
}

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

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

impl ToValue for StructureRubyPosition {
    #[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<StructureRubyPosition> for glib::Value {
    #[inline]
    fn from(v: StructureRubyPosition) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureTableScope")]
pub enum StructureTableScope {
    #[doc(alias = "POPPLER_STRUCTURE_TABLE_SCOPE_ROW")]
    Row,
    #[doc(alias = "POPPLER_STRUCTURE_TABLE_SCOPE_COLUMN")]
    Column,
    #[doc(alias = "POPPLER_STRUCTURE_TABLE_SCOPE_BOTH")]
    Both,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureTableScope {
        match self {
            Self::Row => ffi::POPPLER_STRUCTURE_TABLE_SCOPE_ROW,
            Self::Column => ffi::POPPLER_STRUCTURE_TABLE_SCOPE_COLUMN,
            Self::Both => ffi::POPPLER_STRUCTURE_TABLE_SCOPE_BOTH,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureTableScope> for StructureTableScope {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureTableScope) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_TABLE_SCOPE_ROW => Self::Row,
            ffi::POPPLER_STRUCTURE_TABLE_SCOPE_COLUMN => Self::Column,
            ffi::POPPLER_STRUCTURE_TABLE_SCOPE_BOTH => Self::Both,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureTableScope {
    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 StructureTableScope {
    type Type = Self;
}

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

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

impl ToValue for StructureTableScope {
    #[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<StructureTableScope> for glib::Value {
    #[inline]
    fn from(v: StructureTableScope) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureTextAlign")]
pub enum StructureTextAlign {
    #[doc(alias = "POPPLER_STRUCTURE_TEXT_ALIGN_START")]
    Start,
    #[doc(alias = "POPPLER_STRUCTURE_TEXT_ALIGN_CENTER")]
    Center,
    #[doc(alias = "POPPLER_STRUCTURE_TEXT_ALIGN_END")]
    End,
    #[doc(alias = "POPPLER_STRUCTURE_TEXT_ALIGN_JUSTIFY")]
    Justify,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureTextAlign {
        match self {
            Self::Start => ffi::POPPLER_STRUCTURE_TEXT_ALIGN_START,
            Self::Center => ffi::POPPLER_STRUCTURE_TEXT_ALIGN_CENTER,
            Self::End => ffi::POPPLER_STRUCTURE_TEXT_ALIGN_END,
            Self::Justify => ffi::POPPLER_STRUCTURE_TEXT_ALIGN_JUSTIFY,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureTextAlign> for StructureTextAlign {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureTextAlign) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_TEXT_ALIGN_START => Self::Start,
            ffi::POPPLER_STRUCTURE_TEXT_ALIGN_CENTER => Self::Center,
            ffi::POPPLER_STRUCTURE_TEXT_ALIGN_END => Self::End,
            ffi::POPPLER_STRUCTURE_TEXT_ALIGN_JUSTIFY => Self::Justify,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureTextAlign {
    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 StructureTextAlign {
    type Type = Self;
}

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

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

impl ToValue for StructureTextAlign {
    #[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<StructureTextAlign> for glib::Value {
    #[inline]
    fn from(v: StructureTextAlign) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureTextDecoration")]
pub enum StructureTextDecoration {
    #[doc(alias = "POPPLER_STRUCTURE_TEXT_DECORATION_NONE")]
    None,
    #[doc(alias = "POPPLER_STRUCTURE_TEXT_DECORATION_UNDERLINE")]
    Underline,
    #[doc(alias = "POPPLER_STRUCTURE_TEXT_DECORATION_OVERLINE")]
    Overline,
    #[doc(alias = "POPPLER_STRUCTURE_TEXT_DECORATION_LINETHROUGH")]
    Linethrough,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureTextDecoration {
        match self {
            Self::None => ffi::POPPLER_STRUCTURE_TEXT_DECORATION_NONE,
            Self::Underline => ffi::POPPLER_STRUCTURE_TEXT_DECORATION_UNDERLINE,
            Self::Overline => ffi::POPPLER_STRUCTURE_TEXT_DECORATION_OVERLINE,
            Self::Linethrough => ffi::POPPLER_STRUCTURE_TEXT_DECORATION_LINETHROUGH,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureTextDecoration> for StructureTextDecoration {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureTextDecoration) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_TEXT_DECORATION_NONE => Self::None,
            ffi::POPPLER_STRUCTURE_TEXT_DECORATION_UNDERLINE => Self::Underline,
            ffi::POPPLER_STRUCTURE_TEXT_DECORATION_OVERLINE => Self::Overline,
            ffi::POPPLER_STRUCTURE_TEXT_DECORATION_LINETHROUGH => Self::Linethrough,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureTextDecoration {
    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 StructureTextDecoration {
    type Type = Self;
}

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

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

impl ToValue for StructureTextDecoration {
    #[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<StructureTextDecoration> for glib::Value {
    #[inline]
    fn from(v: StructureTextDecoration) -> Self {
        ToValue::to_value(&v)
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStructureWritingMode")]
pub enum StructureWritingMode {
    #[doc(alias = "POPPLER_STRUCTURE_WRITING_MODE_LR_TB")]
    LrTb,
    #[doc(alias = "POPPLER_STRUCTURE_WRITING_MODE_RL_TB")]
    RlTb,
    #[doc(alias = "POPPLER_STRUCTURE_WRITING_MODE_TB_RL")]
    TbRl,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    #[inline]
    fn into_glib(self) -> ffi::PopplerStructureWritingMode {
        match self {
            Self::LrTb => ffi::POPPLER_STRUCTURE_WRITING_MODE_LR_TB,
            Self::RlTb => ffi::POPPLER_STRUCTURE_WRITING_MODE_RL_TB,
            Self::TbRl => ffi::POPPLER_STRUCTURE_WRITING_MODE_TB_RL,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::PopplerStructureWritingMode> for StructureWritingMode {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStructureWritingMode) -> Self {
        match value {
            ffi::POPPLER_STRUCTURE_WRITING_MODE_LR_TB => Self::LrTb,
            ffi::POPPLER_STRUCTURE_WRITING_MODE_RL_TB => Self::RlTb,
            ffi::POPPLER_STRUCTURE_WRITING_MODE_TB_RL => Self::TbRl,
            value => Self::__Unknown(value),
        }
    }
}

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

impl glib::HasParamSpec for StructureWritingMode {
    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 StructureWritingMode {
    type Type = Self;
}

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

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

impl ToValue for StructureWritingMode {
    #[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<StructureWritingMode> for glib::Value {
    #[inline]
    fn from(v: StructureWritingMode) -> Self {
        ToValue::to_value(&v)
    }
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerStyle")]
pub enum Style {
    #[doc(alias = "POPPLER_STYLE_NORMAL")]
    Normal,
    #[doc(alias = "POPPLER_STYLE_OBLIQUE")]
    Oblique,
    #[doc(alias = "POPPLER_STYLE_ITALIC")]
    Italic,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
#[doc(hidden)]
impl IntoGlib for Style {
    type GlibType = ffi::PopplerStyle;

    #[inline]
    fn into_glib(self) -> ffi::PopplerStyle {
        match self {
            Self::Normal => ffi::POPPLER_STYLE_NORMAL,
            Self::Oblique => ffi::POPPLER_STYLE_OBLIQUE,
            Self::Italic => ffi::POPPLER_STYLE_ITALIC,
            Self::__Unknown(value) => value,
        }
    }
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
#[doc(hidden)]
impl FromGlib<ffi::PopplerStyle> for Style {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerStyle) -> Self {
        match value {
            ffi::POPPLER_STYLE_NORMAL => Self::Normal,
            ffi::POPPLER_STYLE_OBLIQUE => Self::Oblique,
            ffi::POPPLER_STYLE_ITALIC => Self::Italic,
            value => Self::__Unknown(value),
        }
    }
}

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

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl glib::HasParamSpec for Style {
    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 = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl glib::value::ValueType for Style {
    type Type = Self;
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
unsafe impl<'a> glib::value::FromValue<'a> for Style {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

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

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl ToValue for Style {
    #[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 = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl From<Style> for glib::Value {
    #[inline]
    fn from(v: Style) -> Self {
        ToValue::to_value(&v)
    }
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PopplerWeight")]
pub enum Weight {
    #[doc(alias = "POPPLER_WEIGHT_THIN")]
    Thin,
    #[doc(alias = "POPPLER_WEIGHT_ULTRALIGHT")]
    Ultralight,
    #[doc(alias = "POPPLER_WEIGHT_LIGHT")]
    Light,
    #[doc(alias = "POPPLER_WEIGHT_NORMAL")]
    Normal,
    #[doc(alias = "POPPLER_WEIGHT_MEDIUM")]
    Medium,
    #[doc(alias = "POPPLER_WEIGHT_SEMIBOLD")]
    Semibold,
    #[doc(alias = "POPPLER_WEIGHT_BOLD")]
    Bold,
    #[doc(alias = "POPPLER_WEIGHT_ULTRABOLD")]
    Ultrabold,
    #[doc(alias = "POPPLER_WEIGHT_HEAVY")]
    Heavy,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
#[doc(hidden)]
impl IntoGlib for Weight {
    type GlibType = ffi::PopplerWeight;

    #[inline]
    fn into_glib(self) -> ffi::PopplerWeight {
        match self {
            Self::Thin => ffi::POPPLER_WEIGHT_THIN,
            Self::Ultralight => ffi::POPPLER_WEIGHT_ULTRALIGHT,
            Self::Light => ffi::POPPLER_WEIGHT_LIGHT,
            Self::Normal => ffi::POPPLER_WEIGHT_NORMAL,
            Self::Medium => ffi::POPPLER_WEIGHT_MEDIUM,
            Self::Semibold => ffi::POPPLER_WEIGHT_SEMIBOLD,
            Self::Bold => ffi::POPPLER_WEIGHT_BOLD,
            Self::Ultrabold => ffi::POPPLER_WEIGHT_ULTRABOLD,
            Self::Heavy => ffi::POPPLER_WEIGHT_HEAVY,
            Self::__Unknown(value) => value,
        }
    }
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
#[doc(hidden)]
impl FromGlib<ffi::PopplerWeight> for Weight {
    #[inline]
    unsafe fn from_glib(value: ffi::PopplerWeight) -> Self {
        match value {
            ffi::POPPLER_WEIGHT_THIN => Self::Thin,
            ffi::POPPLER_WEIGHT_ULTRALIGHT => Self::Ultralight,
            ffi::POPPLER_WEIGHT_LIGHT => Self::Light,
            ffi::POPPLER_WEIGHT_NORMAL => Self::Normal,
            ffi::POPPLER_WEIGHT_MEDIUM => Self::Medium,
            ffi::POPPLER_WEIGHT_SEMIBOLD => Self::Semibold,
            ffi::POPPLER_WEIGHT_BOLD => Self::Bold,
            ffi::POPPLER_WEIGHT_ULTRABOLD => Self::Ultrabold,
            ffi::POPPLER_WEIGHT_HEAVY => Self::Heavy,
            value => Self::__Unknown(value),
        }
    }
}

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

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl glib::HasParamSpec for Weight {
    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 = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl glib::value::ValueType for Weight {
    type Type = Self;
}

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
unsafe impl<'a> glib::value::FromValue<'a> for Weight {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

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

#[cfg(feature = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl ToValue for Weight {
    #[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 = "v24_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))]
impl From<Weight> for glib::Value {
    #[inline]
    fn from(v: Weight) -> Self {
        ToValue::to_value(&v)
    }
}
