use crate::ffi;
use glib::{prelude::*, translate::*};
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeAboutWindowLicenses")]
pub enum AboutWindowLicenses {
#[doc(alias = "HE_ABOUT_WINDOW_LICENSES_GPLV3")]
Gplv3,
#[doc(alias = "HE_ABOUT_WINDOW_LICENSES_MIT")]
Mit,
#[doc(alias = "HE_ABOUT_WINDOW_LICENSES_MPLV2")]
Mplv2,
#[doc(alias = "HE_ABOUT_WINDOW_LICENSES_UNLICENSE")]
Unlicense,
#[doc(alias = "HE_ABOUT_WINDOW_LICENSES_APACHEV2")]
Apachev2,
#[doc(alias = "HE_ABOUT_WINDOW_LICENSES_WTFPL")]
Wtfpl,
#[doc(alias = "HE_ABOUT_WINDOW_LICENSES_PROPRIETARY")]
Proprietary,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for AboutWindowLicenses {
type GlibType = ffi::HeAboutWindowLicenses;
#[inline]
fn into_glib(self) -> ffi::HeAboutWindowLicenses {
match self {
Self::Gplv3 => ffi::HE_ABOUT_WINDOW_LICENSES_GPLV3,
Self::Mit => ffi::HE_ABOUT_WINDOW_LICENSES_MIT,
Self::Mplv2 => ffi::HE_ABOUT_WINDOW_LICENSES_MPLV2,
Self::Unlicense => ffi::HE_ABOUT_WINDOW_LICENSES_UNLICENSE,
Self::Apachev2 => ffi::HE_ABOUT_WINDOW_LICENSES_APACHEV2,
Self::Wtfpl => ffi::HE_ABOUT_WINDOW_LICENSES_WTFPL,
Self::Proprietary => ffi::HE_ABOUT_WINDOW_LICENSES_PROPRIETARY,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeAboutWindowLicenses> for AboutWindowLicenses {
#[inline]
unsafe fn from_glib(value: ffi::HeAboutWindowLicenses) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_ABOUT_WINDOW_LICENSES_GPLV3 => Self::Gplv3,
ffi::HE_ABOUT_WINDOW_LICENSES_MIT => Self::Mit,
ffi::HE_ABOUT_WINDOW_LICENSES_MPLV2 => Self::Mplv2,
ffi::HE_ABOUT_WINDOW_LICENSES_UNLICENSE => Self::Unlicense,
ffi::HE_ABOUT_WINDOW_LICENSES_APACHEV2 => Self::Apachev2,
ffi::HE_ABOUT_WINDOW_LICENSES_WTFPL => Self::Wtfpl,
ffi::HE_ABOUT_WINDOW_LICENSES_PROPRIETARY => Self::Proprietary,
value => Self::__Unknown(value),
}
}
}
impl StaticType for AboutWindowLicenses {
#[inline]
#[doc(alias = "he_about_window_licenses_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_about_window_licenses_get_type()) }
}
}
impl glib::HasParamSpec for AboutWindowLicenses {
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 AboutWindowLicenses {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for AboutWindowLicenses {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for AboutWindowLicenses {
#[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<AboutWindowLicenses> for glib::Value {
#[inline]
fn from(v: AboutWindowLicenses) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeAnimationState")]
pub enum AnimationState {
#[doc(alias = "HE_ANIMATION_STATE_IDLE")]
Idle,
#[doc(alias = "HE_ANIMATION_STATE_PAUSED")]
Paused,
#[doc(alias = "HE_ANIMATION_STATE_PLAYING")]
Playing,
#[doc(alias = "HE_ANIMATION_STATE_FINISHED")]
Finished,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for AnimationState {
type GlibType = ffi::HeAnimationState;
#[inline]
fn into_glib(self) -> ffi::HeAnimationState {
match self {
Self::Idle => ffi::HE_ANIMATION_STATE_IDLE,
Self::Paused => ffi::HE_ANIMATION_STATE_PAUSED,
Self::Playing => ffi::HE_ANIMATION_STATE_PLAYING,
Self::Finished => ffi::HE_ANIMATION_STATE_FINISHED,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeAnimationState> for AnimationState {
#[inline]
unsafe fn from_glib(value: ffi::HeAnimationState) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_ANIMATION_STATE_IDLE => Self::Idle,
ffi::HE_ANIMATION_STATE_PAUSED => Self::Paused,
ffi::HE_ANIMATION_STATE_PLAYING => Self::Playing,
ffi::HE_ANIMATION_STATE_FINISHED => Self::Finished,
value => Self::__Unknown(value),
}
}
}
impl StaticType for AnimationState {
#[inline]
#[doc(alias = "he_animation_state_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_animation_state_get_type()) }
}
}
impl glib::HasParamSpec for AnimationState {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for AnimationState {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for AnimationState {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for AnimationState {
#[inline]
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
}
value
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<AnimationState> for glib::Value {
#[inline]
fn from(v: AnimationState) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeBannerStyle")]
pub enum BannerStyle {
#[doc(alias = "HE_BANNER_STYLE_INFO")]
Info,
#[doc(alias = "HE_BANNER_STYLE_WARNING")]
Warning,
#[doc(alias = "HE_BANNER_STYLE_ERROR")]
Error,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for BannerStyle {
type GlibType = ffi::HeBannerStyle;
#[inline]
fn into_glib(self) -> ffi::HeBannerStyle {
match self {
Self::Info => ffi::HE_BANNER_STYLE_INFO,
Self::Warning => ffi::HE_BANNER_STYLE_WARNING,
Self::Error => ffi::HE_BANNER_STYLE_ERROR,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeBannerStyle> for BannerStyle {
#[inline]
unsafe fn from_glib(value: ffi::HeBannerStyle) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_BANNER_STYLE_INFO => Self::Info,
ffi::HE_BANNER_STYLE_WARNING => Self::Warning,
ffi::HE_BANNER_STYLE_ERROR => Self::Error,
value => Self::__Unknown(value),
}
}
}
impl StaticType for BannerStyle {
#[inline]
#[doc(alias = "he_banner_style_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_banner_style_get_type()) }
}
}
impl glib::HasParamSpec for BannerStyle {
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 BannerStyle {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for BannerStyle {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for BannerStyle {
#[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<BannerStyle> for glib::Value {
#[inline]
fn from(v: BannerStyle) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeBottomBarPosition")]
pub enum BottomBarPosition {
#[doc(alias = "HE_BOTTOM_BAR_POSITION_LEFT")]
Left,
#[doc(alias = "HE_BOTTOM_BAR_POSITION_RIGHT")]
Right,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for BottomBarPosition {
type GlibType = ffi::HeBottomBarPosition;
#[inline]
fn into_glib(self) -> ffi::HeBottomBarPosition {
match self {
Self::Left => ffi::HE_BOTTOM_BAR_POSITION_LEFT,
Self::Right => ffi::HE_BOTTOM_BAR_POSITION_RIGHT,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeBottomBarPosition> for BottomBarPosition {
#[inline]
unsafe fn from_glib(value: ffi::HeBottomBarPosition) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_BOTTOM_BAR_POSITION_LEFT => Self::Left,
ffi::HE_BOTTOM_BAR_POSITION_RIGHT => Self::Right,
value => Self::__Unknown(value),
}
}
}
impl StaticType for BottomBarPosition {
#[inline]
#[doc(alias = "he_bottom_bar_position_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_bottom_bar_position_get_type()) }
}
}
impl glib::HasParamSpec for BottomBarPosition {
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 BottomBarPosition {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for BottomBarPosition {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for BottomBarPosition {
#[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<BottomBarPosition> for glib::Value {
#[inline]
fn from(v: BottomBarPosition) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeColors")]
pub enum Colors {
#[doc(alias = "HE_COLORS_NONE")]
None,
#[doc(alias = "HE_COLORS_RED")]
Red,
#[doc(alias = "HE_COLORS_ORANGE")]
Orange,
#[doc(alias = "HE_COLORS_YELLOW")]
Yellow,
#[doc(alias = "HE_COLORS_GREEN")]
Green,
#[doc(alias = "HE_COLORS_BLUE")]
Blue,
#[doc(alias = "HE_COLORS_INDIGO")]
Indigo,
#[doc(alias = "HE_COLORS_PURPLE")]
Purple,
#[doc(alias = "HE_COLORS_PINK")]
Pink,
#[doc(alias = "HE_COLORS_MINT")]
Mint,
#[doc(alias = "HE_COLORS_BROWN")]
Brown,
#[doc(alias = "HE_COLORS_LIGHT")]
Light,
#[doc(alias = "HE_COLORS_DARK")]
Dark,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for Colors {
type GlibType = ffi::HeColors;
fn into_glib(self) -> ffi::HeColors {
match self {
Self::None => ffi::HE_COLORS_NONE,
Self::Red => ffi::HE_COLORS_RED,
Self::Orange => ffi::HE_COLORS_ORANGE,
Self::Yellow => ffi::HE_COLORS_YELLOW,
Self::Green => ffi::HE_COLORS_GREEN,
Self::Blue => ffi::HE_COLORS_BLUE,
Self::Indigo => ffi::HE_COLORS_INDIGO,
Self::Purple => ffi::HE_COLORS_PURPLE,
Self::Pink => ffi::HE_COLORS_PINK,
Self::Mint => ffi::HE_COLORS_MINT,
Self::Brown => ffi::HE_COLORS_BROWN,
Self::Light => ffi::HE_COLORS_LIGHT,
Self::Dark => ffi::HE_COLORS_DARK,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeColors> for Colors {
unsafe fn from_glib(value: ffi::HeColors) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_COLORS_NONE => Self::None,
ffi::HE_COLORS_RED => Self::Red,
ffi::HE_COLORS_ORANGE => Self::Orange,
ffi::HE_COLORS_YELLOW => Self::Yellow,
ffi::HE_COLORS_GREEN => Self::Green,
ffi::HE_COLORS_BLUE => Self::Blue,
ffi::HE_COLORS_INDIGO => Self::Indigo,
ffi::HE_COLORS_PURPLE => Self::Purple,
ffi::HE_COLORS_PINK => Self::Pink,
ffi::HE_COLORS_MINT => Self::Mint,
ffi::HE_COLORS_BROWN => Self::Brown,
ffi::HE_COLORS_LIGHT => Self::Light,
ffi::HE_COLORS_DARK => Self::Dark,
value => Self::__Unknown(value),
}
}
}
impl StaticType for Colors {
#[inline]
#[doc(alias = "he_colors_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_colors_get_type()) }
}
}
impl glib::HasParamSpec for Colors {
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 Colors {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for Colors {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for Colors {
#[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<Colors> for glib::Value {
#[inline]
fn from(v: Colors) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeContentBlockImageClusterImagePosition")]
pub enum ContentBlockImageClusterImagePosition {
#[doc(alias = "HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_TOP_LEFT")]
TopLeft,
#[doc(alias = "HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_BOTTOM_LEFT")]
BottomLeft,
#[doc(alias = "HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_TOP_RIGHT")]
TopRight,
#[doc(alias = "HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_BOTTOM_RIGHT")]
BottomRight,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for ContentBlockImageClusterImagePosition {
type GlibType = ffi::HeContentBlockImageClusterImagePosition;
#[inline]
fn into_glib(self) -> ffi::HeContentBlockImageClusterImagePosition {
match self {
Self::TopLeft => ffi::HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_TOP_LEFT,
Self::BottomLeft => ffi::HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_BOTTOM_LEFT,
Self::TopRight => ffi::HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_TOP_RIGHT,
Self::BottomRight => ffi::HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_BOTTOM_RIGHT,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeContentBlockImageClusterImagePosition>
for ContentBlockImageClusterImagePosition
{
#[inline]
unsafe fn from_glib(value: ffi::HeContentBlockImageClusterImagePosition) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_TOP_LEFT => Self::TopLeft,
ffi::HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_BOTTOM_LEFT => Self::BottomLeft,
ffi::HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_TOP_RIGHT => Self::TopRight,
ffi::HE_CONTENT_BLOCK_IMAGE_CLUSTER_IMAGE_POSITION_BOTTOM_RIGHT => Self::BottomRight,
value => Self::__Unknown(value),
}
}
}
impl StaticType for ContentBlockImageClusterImagePosition {
#[inline]
#[doc(alias = "he_content_block_image_cluster_image_position_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_content_block_image_cluster_image_position_get_type()) }
}
}
impl glib::HasParamSpec for ContentBlockImageClusterImagePosition {
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 ContentBlockImageClusterImagePosition {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for ContentBlockImageClusterImagePosition {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for ContentBlockImageClusterImagePosition {
#[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<ContentBlockImageClusterImagePosition> for glib::Value {
#[inline]
fn from(v: ContentBlockImageClusterImagePosition) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeEasing")]
pub enum Easing {
#[doc(alias = "HE_EASING_LINEAR")]
Linear,
#[doc(alias = "HE_EASING_EASE_OUT_CUBIC")]
EaseOutCubic,
#[doc(alias = "HE_EASING_EASE_IN_OUT_BOUNCE")]
EaseInOutBounce,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for Easing {
type GlibType = ffi::HeEasing;
#[inline]
fn into_glib(self) -> ffi::HeEasing {
match self {
Self::Linear => ffi::HE_EASING_LINEAR,
Self::EaseOutCubic => ffi::HE_EASING_EASE_OUT_CUBIC,
Self::EaseInOutBounce => ffi::HE_EASING_EASE_IN_OUT_BOUNCE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeEasing> for Easing {
#[inline]
unsafe fn from_glib(value: ffi::HeEasing) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_EASING_LINEAR => Self::Linear,
ffi::HE_EASING_EASE_OUT_CUBIC => Self::EaseOutCubic,
ffi::HE_EASING_EASE_IN_OUT_BOUNCE => Self::EaseInOutBounce,
value => Self::__Unknown(value),
}
}
}
impl StaticType for Easing {
#[inline]
#[doc(alias = "he_easing_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_easing_get_type()) }
}
}
impl glib::HasParamSpec for Easing {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for Easing {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for Easing {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for Easing {
#[inline]
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
}
value
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<Easing> for glib::Value {
#[inline]
fn from(v: Easing) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeModifierBadgeAlignment")]
pub enum ModifierBadgeAlignment {
#[doc(alias = "HE_MODIFIER_BADGE_ALIGNMENT_LEFT")]
Left,
#[doc(alias = "HE_MODIFIER_BADGE_ALIGNMENT_CENTER")]
Center,
#[doc(alias = "HE_MODIFIER_BADGE_ALIGNMENT_RIGHT")]
Right,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for ModifierBadgeAlignment {
type GlibType = ffi::HeModifierBadgeAlignment;
#[inline]
fn into_glib(self) -> ffi::HeModifierBadgeAlignment {
match self {
Self::Left => ffi::HE_MODIFIER_BADGE_ALIGNMENT_LEFT,
Self::Center => ffi::HE_MODIFIER_BADGE_ALIGNMENT_CENTER,
Self::Right => ffi::HE_MODIFIER_BADGE_ALIGNMENT_RIGHT,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeModifierBadgeAlignment> for ModifierBadgeAlignment {
#[inline]
unsafe fn from_glib(value: ffi::HeModifierBadgeAlignment) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_MODIFIER_BADGE_ALIGNMENT_LEFT => Self::Left,
ffi::HE_MODIFIER_BADGE_ALIGNMENT_CENTER => Self::Center,
ffi::HE_MODIFIER_BADGE_ALIGNMENT_RIGHT => Self::Right,
value => Self::__Unknown(value),
}
}
}
impl StaticType for ModifierBadgeAlignment {
#[inline]
#[doc(alias = "he_modifier_badge_alignment_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_modifier_badge_alignment_get_type()) }
}
}
impl glib::HasParamSpec for ModifierBadgeAlignment {
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 ModifierBadgeAlignment {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for ModifierBadgeAlignment {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for ModifierBadgeAlignment {
#[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<ModifierBadgeAlignment> for glib::Value {
#[inline]
fn from(v: ModifierBadgeAlignment) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeOverlayButtonAlignment")]
pub enum OverlayButtonAlignment {
#[doc(alias = "HE_OVERLAY_BUTTON_ALIGNMENT_LEFT")]
Left,
#[doc(alias = "HE_OVERLAY_BUTTON_ALIGNMENT_CENTER")]
Center,
#[doc(alias = "HE_OVERLAY_BUTTON_ALIGNMENT_RIGHT")]
Right,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for OverlayButtonAlignment {
type GlibType = ffi::HeOverlayButtonAlignment;
#[inline]
fn into_glib(self) -> ffi::HeOverlayButtonAlignment {
match self {
Self::Left => ffi::HE_OVERLAY_BUTTON_ALIGNMENT_LEFT,
Self::Center => ffi::HE_OVERLAY_BUTTON_ALIGNMENT_CENTER,
Self::Right => ffi::HE_OVERLAY_BUTTON_ALIGNMENT_RIGHT,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeOverlayButtonAlignment> for OverlayButtonAlignment {
#[inline]
unsafe fn from_glib(value: ffi::HeOverlayButtonAlignment) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_OVERLAY_BUTTON_ALIGNMENT_LEFT => Self::Left,
ffi::HE_OVERLAY_BUTTON_ALIGNMENT_CENTER => Self::Center,
ffi::HE_OVERLAY_BUTTON_ALIGNMENT_RIGHT => Self::Right,
value => Self::__Unknown(value),
}
}
}
impl StaticType for OverlayButtonAlignment {
#[inline]
#[doc(alias = "he_overlay_button_alignment_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_overlay_button_alignment_get_type()) }
}
}
impl glib::HasParamSpec for OverlayButtonAlignment {
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 OverlayButtonAlignment {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for OverlayButtonAlignment {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for OverlayButtonAlignment {
#[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<OverlayButtonAlignment> for glib::Value {
#[inline]
fn from(v: OverlayButtonAlignment) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeOverlayButtonSize")]
pub enum OverlayButtonSize {
#[doc(alias = "HE_OVERLAY_BUTTON_SIZE_SMALL")]
Small,
#[doc(alias = "HE_OVERLAY_BUTTON_SIZE_MEDIUM")]
Medium,
#[doc(alias = "HE_OVERLAY_BUTTON_SIZE_LARGE")]
Large,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for OverlayButtonSize {
type GlibType = ffi::HeOverlayButtonSize;
#[inline]
fn into_glib(self) -> ffi::HeOverlayButtonSize {
match self {
Self::Small => ffi::HE_OVERLAY_BUTTON_SIZE_SMALL,
Self::Medium => ffi::HE_OVERLAY_BUTTON_SIZE_MEDIUM,
Self::Large => ffi::HE_OVERLAY_BUTTON_SIZE_LARGE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeOverlayButtonSize> for OverlayButtonSize {
#[inline]
unsafe fn from_glib(value: ffi::HeOverlayButtonSize) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_OVERLAY_BUTTON_SIZE_SMALL => Self::Small,
ffi::HE_OVERLAY_BUTTON_SIZE_MEDIUM => Self::Medium,
ffi::HE_OVERLAY_BUTTON_SIZE_LARGE => Self::Large,
value => Self::__Unknown(value),
}
}
}
impl StaticType for OverlayButtonSize {
#[inline]
#[doc(alias = "he_overlay_button_size_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_overlay_button_size_get_type()) }
}
}
impl glib::HasParamSpec for OverlayButtonSize {
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 OverlayButtonSize {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for OverlayButtonSize {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for OverlayButtonSize {
#[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<OverlayButtonSize> for glib::Value {
#[inline]
fn from(v: OverlayButtonSize) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeOverlayButtonTypeButton")]
pub enum OverlayButtonTypeButton {
#[doc(alias = "HE_OVERLAY_BUTTON_TYPE_BUTTON_SURFACE")]
Surface,
#[doc(alias = "HE_OVERLAY_BUTTON_TYPE_BUTTON_PRIMARY")]
Primary,
#[doc(alias = "HE_OVERLAY_BUTTON_TYPE_BUTTON_SECONDARY")]
Secondary,
#[doc(alias = "HE_OVERLAY_BUTTON_TYPE_BUTTON_TERTIARY")]
Tertiary,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for OverlayButtonTypeButton {
type GlibType = ffi::HeOverlayButtonTypeButton;
#[inline]
fn into_glib(self) -> ffi::HeOverlayButtonTypeButton {
match self {
Self::Surface => ffi::HE_OVERLAY_BUTTON_TYPE_BUTTON_SURFACE,
Self::Primary => ffi::HE_OVERLAY_BUTTON_TYPE_BUTTON_PRIMARY,
Self::Secondary => ffi::HE_OVERLAY_BUTTON_TYPE_BUTTON_SECONDARY,
Self::Tertiary => ffi::HE_OVERLAY_BUTTON_TYPE_BUTTON_TERTIARY,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeOverlayButtonTypeButton> for OverlayButtonTypeButton {
#[inline]
unsafe fn from_glib(value: ffi::HeOverlayButtonTypeButton) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_OVERLAY_BUTTON_TYPE_BUTTON_SURFACE => Self::Surface,
ffi::HE_OVERLAY_BUTTON_TYPE_BUTTON_PRIMARY => Self::Primary,
ffi::HE_OVERLAY_BUTTON_TYPE_BUTTON_SECONDARY => Self::Secondary,
ffi::HE_OVERLAY_BUTTON_TYPE_BUTTON_TERTIARY => Self::Tertiary,
value => Self::__Unknown(value),
}
}
}
impl StaticType for OverlayButtonTypeButton {
#[inline]
#[doc(alias = "he_overlay_button_type_button_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_overlay_button_type_button_get_type()) }
}
}
impl glib::HasParamSpec for OverlayButtonTypeButton {
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 OverlayButtonTypeButton {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for OverlayButtonTypeButton {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for OverlayButtonTypeButton {
#[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<OverlayButtonTypeButton> for glib::Value {
#[inline]
fn from(v: OverlayButtonTypeButton) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeTabSwitcherTabBarBehavior")]
pub enum TabSwitcherTabBarBehavior {
#[doc(alias = "HE_TAB_SWITCHER_TAB_BAR_BEHAVIOR_ALWAYS")]
Always,
#[doc(alias = "HE_TAB_SWITCHER_TAB_BAR_BEHAVIOR_SINGLE")]
Single,
#[doc(alias = "HE_TAB_SWITCHER_TAB_BAR_BEHAVIOR_NEVER")]
Never,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for TabSwitcherTabBarBehavior {
type GlibType = ffi::HeTabSwitcherTabBarBehavior;
#[inline]
fn into_glib(self) -> ffi::HeTabSwitcherTabBarBehavior {
match self {
Self::Always => ffi::HE_TAB_SWITCHER_TAB_BAR_BEHAVIOR_ALWAYS,
Self::Single => ffi::HE_TAB_SWITCHER_TAB_BAR_BEHAVIOR_SINGLE,
Self::Never => ffi::HE_TAB_SWITCHER_TAB_BAR_BEHAVIOR_NEVER,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeTabSwitcherTabBarBehavior> for TabSwitcherTabBarBehavior {
#[inline]
unsafe fn from_glib(value: ffi::HeTabSwitcherTabBarBehavior) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_TAB_SWITCHER_TAB_BAR_BEHAVIOR_ALWAYS => Self::Always,
ffi::HE_TAB_SWITCHER_TAB_BAR_BEHAVIOR_SINGLE => Self::Single,
ffi::HE_TAB_SWITCHER_TAB_BAR_BEHAVIOR_NEVER => Self::Never,
value => Self::__Unknown(value),
}
}
}
impl StaticType for TabSwitcherTabBarBehavior {
#[inline]
#[doc(alias = "he_tab_switcher_tab_bar_behavior_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_tab_switcher_tab_bar_behavior_get_type()) }
}
}
impl glib::HasParamSpec for TabSwitcherTabBarBehavior {
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 TabSwitcherTabBarBehavior {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for TabSwitcherTabBarBehavior {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for TabSwitcherTabBarBehavior {
#[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<TabSwitcherTabBarBehavior> for glib::Value {
#[inline]
fn from(v: TabSwitcherTabBarBehavior) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HeTipViewStyle")]
pub enum TipViewStyle {
#[doc(alias = "HE_TIP_VIEW_STYLE_NONE")]
None,
#[doc(alias = "HE_TIP_VIEW_STYLE_POPUP")]
Popup,
#[doc(alias = "HE_TIP_VIEW_STYLE_VIEW")]
View,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for TipViewStyle {
type GlibType = ffi::HeTipViewStyle;
#[inline]
fn into_glib(self) -> ffi::HeTipViewStyle {
match self {
Self::None => ffi::HE_TIP_VIEW_STYLE_NONE,
Self::Popup => ffi::HE_TIP_VIEW_STYLE_POPUP,
Self::View => ffi::HE_TIP_VIEW_STYLE_VIEW,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::HeTipViewStyle> for TipViewStyle {
#[inline]
unsafe fn from_glib(value: ffi::HeTipViewStyle) -> Self {
skip_assert_initialized!();
match value {
ffi::HE_TIP_VIEW_STYLE_NONE => Self::None,
ffi::HE_TIP_VIEW_STYLE_POPUP => Self::Popup,
ffi::HE_TIP_VIEW_STYLE_VIEW => Self::View,
value => Self::__Unknown(value),
}
}
}
impl StaticType for TipViewStyle {
#[inline]
#[doc(alias = "he_tip_view_style_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::he_tip_view_style_get_type()) }
}
}
impl glib::HasParamSpec for TipViewStyle {
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 TipViewStyle {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for TipViewStyle {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl ToValue for TipViewStyle {
#[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<TipViewStyle> for glib::Value {
#[inline]
fn from(v: TipViewStyle) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}