use crate::ffi;
use glib::{prelude::*, translate::*};
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessibleAnnouncementPriority")]
pub enum AccessibleAnnouncementPriority {
#[doc(alias = "GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_LOW")]
Low,
#[doc(alias = "GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_MEDIUM")]
Medium,
#[doc(alias = "GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_HIGH")]
High,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(hidden)]
impl IntoGlib for AccessibleAnnouncementPriority {
type GlibType = ffi::GtkAccessibleAnnouncementPriority;
#[inline]
fn into_glib(self) -> ffi::GtkAccessibleAnnouncementPriority {
match self {
Self::Low => ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_LOW,
Self::Medium => ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_MEDIUM,
Self::High => ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_HIGH,
Self::__Unknown(value) => value,
}
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessibleAnnouncementPriority> for AccessibleAnnouncementPriority {
#[inline]
unsafe fn from_glib(value: ffi::GtkAccessibleAnnouncementPriority) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_LOW => Self::Low,
ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_MEDIUM => Self::Medium,
ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_HIGH => Self::High,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl StaticType for AccessibleAnnouncementPriority {
#[inline]
#[doc(alias = "gtk_accessible_announcement_priority_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_announcement_priority_get_type()) }
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl glib::HasParamSpec for AccessibleAnnouncementPriority {
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 = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl glib::value::ValueType for AccessibleAnnouncementPriority {
type Type = Self;
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
unsafe impl<'a> glib::value::FromValue<'a> for AccessibleAnnouncementPriority {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl ToValue for AccessibleAnnouncementPriority {
#[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 = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl From<AccessibleAnnouncementPriority> for glib::Value {
#[inline]
fn from(v: AccessibleAnnouncementPriority) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessibleAutocomplete")]
pub enum AccessibleAutocomplete {
#[doc(alias = "GTK_ACCESSIBLE_AUTOCOMPLETE_NONE")]
None,
#[doc(alias = "GTK_ACCESSIBLE_AUTOCOMPLETE_INLINE")]
Inline,
#[doc(alias = "GTK_ACCESSIBLE_AUTOCOMPLETE_LIST")]
List,
#[doc(alias = "GTK_ACCESSIBLE_AUTOCOMPLETE_BOTH")]
Both,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for AccessibleAutocomplete {
type GlibType = ffi::GtkAccessibleAutocomplete;
#[inline]
fn into_glib(self) -> ffi::GtkAccessibleAutocomplete {
match self {
Self::None => ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_NONE,
Self::Inline => ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_INLINE,
Self::List => ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_LIST,
Self::Both => ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_BOTH,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessibleAutocomplete> for AccessibleAutocomplete {
#[inline]
unsafe fn from_glib(value: ffi::GtkAccessibleAutocomplete) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_NONE => Self::None,
ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_INLINE => Self::Inline,
ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_LIST => Self::List,
ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_BOTH => Self::Both,
value => Self::__Unknown(value),
}
}
}
impl StaticType for AccessibleAutocomplete {
#[inline]
#[doc(alias = "gtk_accessible_autocomplete_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_autocomplete_get_type()) }
}
}
impl glib::HasParamSpec for AccessibleAutocomplete {
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 AccessibleAutocomplete {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for AccessibleAutocomplete {
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 AccessibleAutocomplete {
#[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<AccessibleAutocomplete> for glib::Value {
#[inline]
fn from(v: AccessibleAutocomplete) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessibleInvalidState")]
pub enum AccessibleInvalidState {
#[doc(alias = "GTK_ACCESSIBLE_INVALID_FALSE")]
False,
#[doc(alias = "GTK_ACCESSIBLE_INVALID_TRUE")]
True,
#[doc(alias = "GTK_ACCESSIBLE_INVALID_GRAMMAR")]
Grammar,
#[doc(alias = "GTK_ACCESSIBLE_INVALID_SPELLING")]
Spelling,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for AccessibleInvalidState {
type GlibType = ffi::GtkAccessibleInvalidState;
#[inline]
fn into_glib(self) -> ffi::GtkAccessibleInvalidState {
match self {
Self::False => ffi::GTK_ACCESSIBLE_INVALID_FALSE,
Self::True => ffi::GTK_ACCESSIBLE_INVALID_TRUE,
Self::Grammar => ffi::GTK_ACCESSIBLE_INVALID_GRAMMAR,
Self::Spelling => ffi::GTK_ACCESSIBLE_INVALID_SPELLING,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessibleInvalidState> for AccessibleInvalidState {
#[inline]
unsafe fn from_glib(value: ffi::GtkAccessibleInvalidState) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_INVALID_FALSE => Self::False,
ffi::GTK_ACCESSIBLE_INVALID_TRUE => Self::True,
ffi::GTK_ACCESSIBLE_INVALID_GRAMMAR => Self::Grammar,
ffi::GTK_ACCESSIBLE_INVALID_SPELLING => Self::Spelling,
value => Self::__Unknown(value),
}
}
}
impl StaticType for AccessibleInvalidState {
#[inline]
#[doc(alias = "gtk_accessible_invalid_state_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_invalid_state_get_type()) }
}
}
impl glib::HasParamSpec for AccessibleInvalidState {
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 AccessibleInvalidState {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for AccessibleInvalidState {
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 AccessibleInvalidState {
#[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<AccessibleInvalidState> for glib::Value {
#[inline]
fn from(v: AccessibleInvalidState) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessiblePlatformState")]
pub enum AccessiblePlatformState {
#[doc(alias = "GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE")]
Focusable,
#[doc(alias = "GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED")]
Focused,
#[doc(alias = "GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE")]
Active,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[doc(hidden)]
impl IntoGlib for AccessiblePlatformState {
type GlibType = ffi::GtkAccessiblePlatformState;
#[inline]
fn into_glib(self) -> ffi::GtkAccessiblePlatformState {
match self {
Self::Focusable => ffi::GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE,
Self::Focused => ffi::GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED,
Self::Active => ffi::GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE,
Self::__Unknown(value) => value,
}
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessiblePlatformState> for AccessiblePlatformState {
#[inline]
unsafe fn from_glib(value: ffi::GtkAccessiblePlatformState) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE => Self::Focusable,
ffi::GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED => Self::Focused,
ffi::GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE => Self::Active,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl StaticType for AccessiblePlatformState {
#[inline]
#[doc(alias = "gtk_accessible_platform_state_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_platform_state_get_type()) }
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl glib::HasParamSpec for AccessiblePlatformState {
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 = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl glib::value::ValueType for AccessiblePlatformState {
type Type = Self;
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
unsafe impl<'a> glib::value::FromValue<'a> for AccessiblePlatformState {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl ToValue for AccessiblePlatformState {
#[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 = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl From<AccessiblePlatformState> for glib::Value {
#[inline]
fn from(v: AccessiblePlatformState) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessibleProperty")]
pub enum AccessibleProperty {
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE")]
Autocomplete,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_DESCRIPTION")]
Description,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_HAS_POPUP")]
HasPopup,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS")]
KeyShortcuts,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_LABEL")]
Label,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_LEVEL")]
Level,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_MODAL")]
Modal,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_MULTI_LINE")]
MultiLine,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE")]
MultiSelectable,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_ORIENTATION")]
Orientation,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER")]
Placeholder,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_READ_ONLY")]
ReadOnly,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_REQUIRED")]
Required,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_ROLE_DESCRIPTION")]
RoleDescription,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_SORT")]
Sort,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_VALUE_MAX")]
ValueMax,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_VALUE_MIN")]
ValueMin,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_VALUE_NOW")]
ValueNow,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT")]
ValueText,
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_HELP_TEXT")]
HelpText,
#[doc(hidden)]
__Unknown(i32),
}
impl AccessibleProperty {
#[doc(alias = "gtk_accessible_property_init_value")]
pub fn init_value(self, value: &mut glib::Value) {
assert_initialized_main_thread!();
unsafe {
ffi::gtk_accessible_property_init_value(self.into_glib(), value.to_glib_none_mut().0);
}
}
}
#[doc(hidden)]
impl IntoGlib for AccessibleProperty {
type GlibType = ffi::GtkAccessibleProperty;
fn into_glib(self) -> ffi::GtkAccessibleProperty {
match self {
Self::Autocomplete => ffi::GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE,
Self::Description => ffi::GTK_ACCESSIBLE_PROPERTY_DESCRIPTION,
Self::HasPopup => ffi::GTK_ACCESSIBLE_PROPERTY_HAS_POPUP,
Self::KeyShortcuts => ffi::GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS,
Self::Label => ffi::GTK_ACCESSIBLE_PROPERTY_LABEL,
Self::Level => ffi::GTK_ACCESSIBLE_PROPERTY_LEVEL,
Self::Modal => ffi::GTK_ACCESSIBLE_PROPERTY_MODAL,
Self::MultiLine => ffi::GTK_ACCESSIBLE_PROPERTY_MULTI_LINE,
Self::MultiSelectable => ffi::GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE,
Self::Orientation => ffi::GTK_ACCESSIBLE_PROPERTY_ORIENTATION,
Self::Placeholder => ffi::GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER,
Self::ReadOnly => ffi::GTK_ACCESSIBLE_PROPERTY_READ_ONLY,
Self::Required => ffi::GTK_ACCESSIBLE_PROPERTY_REQUIRED,
Self::RoleDescription => ffi::GTK_ACCESSIBLE_PROPERTY_ROLE_DESCRIPTION,
Self::Sort => ffi::GTK_ACCESSIBLE_PROPERTY_SORT,
Self::ValueMax => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MAX,
Self::ValueMin => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MIN,
Self::ValueNow => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_NOW,
Self::ValueText => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT,
#[cfg(feature = "v4_16")]
Self::HelpText => ffi::GTK_ACCESSIBLE_PROPERTY_HELP_TEXT,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessibleProperty> for AccessibleProperty {
unsafe fn from_glib(value: ffi::GtkAccessibleProperty) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE => Self::Autocomplete,
ffi::GTK_ACCESSIBLE_PROPERTY_DESCRIPTION => Self::Description,
ffi::GTK_ACCESSIBLE_PROPERTY_HAS_POPUP => Self::HasPopup,
ffi::GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS => Self::KeyShortcuts,
ffi::GTK_ACCESSIBLE_PROPERTY_LABEL => Self::Label,
ffi::GTK_ACCESSIBLE_PROPERTY_LEVEL => Self::Level,
ffi::GTK_ACCESSIBLE_PROPERTY_MODAL => Self::Modal,
ffi::GTK_ACCESSIBLE_PROPERTY_MULTI_LINE => Self::MultiLine,
ffi::GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE => Self::MultiSelectable,
ffi::GTK_ACCESSIBLE_PROPERTY_ORIENTATION => Self::Orientation,
ffi::GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER => Self::Placeholder,
ffi::GTK_ACCESSIBLE_PROPERTY_READ_ONLY => Self::ReadOnly,
ffi::GTK_ACCESSIBLE_PROPERTY_REQUIRED => Self::Required,
ffi::GTK_ACCESSIBLE_PROPERTY_ROLE_DESCRIPTION => Self::RoleDescription,
ffi::GTK_ACCESSIBLE_PROPERTY_SORT => Self::Sort,
ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MAX => Self::ValueMax,
ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MIN => Self::ValueMin,
ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_NOW => Self::ValueNow,
ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT => Self::ValueText,
#[cfg(feature = "v4_16")]
ffi::GTK_ACCESSIBLE_PROPERTY_HELP_TEXT => Self::HelpText,
value => Self::__Unknown(value),
}
}
}
impl StaticType for AccessibleProperty {
#[inline]
#[doc(alias = "gtk_accessible_property_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_property_get_type()) }
}
}
impl glib::HasParamSpec for AccessibleProperty {
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 AccessibleProperty {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for AccessibleProperty {
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 AccessibleProperty {
#[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<AccessibleProperty> for glib::Value {
#[inline]
fn from(v: AccessibleProperty) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessibleRelation")]
pub enum AccessibleRelation {
#[doc(alias = "GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT")]
ActiveDescendant,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_COL_COUNT")]
ColCount,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_COL_INDEX")]
ColIndex,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT")]
ColIndexText,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_COL_SPAN")]
ColSpan,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_CONTROLS")]
Controls,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_DESCRIBED_BY")]
DescribedBy,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_DETAILS")]
Details,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE")]
ErrorMessage,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_FLOW_TO")]
FlowTo,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_LABELLED_BY")]
LabelledBy,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_OWNS")]
Owns,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_POS_IN_SET")]
PosInSet,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_ROW_COUNT")]
RowCount,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_ROW_INDEX")]
RowIndex,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_ROW_INDEX_TEXT")]
RowIndexText,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_ROW_SPAN")]
RowSpan,
#[doc(alias = "GTK_ACCESSIBLE_RELATION_SET_SIZE")]
SetSize,
#[doc(hidden)]
__Unknown(i32),
}
impl AccessibleRelation {
#[doc(alias = "gtk_accessible_relation_init_value")]
pub fn init_value(self, value: &mut glib::Value) {
assert_initialized_main_thread!();
unsafe {
ffi::gtk_accessible_relation_init_value(self.into_glib(), value.to_glib_none_mut().0);
}
}
}
#[doc(hidden)]
impl IntoGlib for AccessibleRelation {
type GlibType = ffi::GtkAccessibleRelation;
fn into_glib(self) -> ffi::GtkAccessibleRelation {
match self {
Self::ActiveDescendant => ffi::GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT,
Self::ColCount => ffi::GTK_ACCESSIBLE_RELATION_COL_COUNT,
Self::ColIndex => ffi::GTK_ACCESSIBLE_RELATION_COL_INDEX,
Self::ColIndexText => ffi::GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT,
Self::ColSpan => ffi::GTK_ACCESSIBLE_RELATION_COL_SPAN,
Self::Controls => ffi::GTK_ACCESSIBLE_RELATION_CONTROLS,
Self::DescribedBy => ffi::GTK_ACCESSIBLE_RELATION_DESCRIBED_BY,
Self::Details => ffi::GTK_ACCESSIBLE_RELATION_DETAILS,
Self::ErrorMessage => ffi::GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE,
Self::FlowTo => ffi::GTK_ACCESSIBLE_RELATION_FLOW_TO,
Self::LabelledBy => ffi::GTK_ACCESSIBLE_RELATION_LABELLED_BY,
Self::Owns => ffi::GTK_ACCESSIBLE_RELATION_OWNS,
Self::PosInSet => ffi::GTK_ACCESSIBLE_RELATION_POS_IN_SET,
Self::RowCount => ffi::GTK_ACCESSIBLE_RELATION_ROW_COUNT,
Self::RowIndex => ffi::GTK_ACCESSIBLE_RELATION_ROW_INDEX,
Self::RowIndexText => ffi::GTK_ACCESSIBLE_RELATION_ROW_INDEX_TEXT,
Self::RowSpan => ffi::GTK_ACCESSIBLE_RELATION_ROW_SPAN,
Self::SetSize => ffi::GTK_ACCESSIBLE_RELATION_SET_SIZE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessibleRelation> for AccessibleRelation {
unsafe fn from_glib(value: ffi::GtkAccessibleRelation) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT => Self::ActiveDescendant,
ffi::GTK_ACCESSIBLE_RELATION_COL_COUNT => Self::ColCount,
ffi::GTK_ACCESSIBLE_RELATION_COL_INDEX => Self::ColIndex,
ffi::GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT => Self::ColIndexText,
ffi::GTK_ACCESSIBLE_RELATION_COL_SPAN => Self::ColSpan,
ffi::GTK_ACCESSIBLE_RELATION_CONTROLS => Self::Controls,
ffi::GTK_ACCESSIBLE_RELATION_DESCRIBED_BY => Self::DescribedBy,
ffi::GTK_ACCESSIBLE_RELATION_DETAILS => Self::Details,
ffi::GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE => Self::ErrorMessage,
ffi::GTK_ACCESSIBLE_RELATION_FLOW_TO => Self::FlowTo,
ffi::GTK_ACCESSIBLE_RELATION_LABELLED_BY => Self::LabelledBy,
ffi::GTK_ACCESSIBLE_RELATION_OWNS => Self::Owns,
ffi::GTK_ACCESSIBLE_RELATION_POS_IN_SET => Self::PosInSet,
ffi::GTK_ACCESSIBLE_RELATION_ROW_COUNT => Self::RowCount,
ffi::GTK_ACCESSIBLE_RELATION_ROW_INDEX => Self::RowIndex,
ffi::GTK_ACCESSIBLE_RELATION_ROW_INDEX_TEXT => Self::RowIndexText,
ffi::GTK_ACCESSIBLE_RELATION_ROW_SPAN => Self::RowSpan,
ffi::GTK_ACCESSIBLE_RELATION_SET_SIZE => Self::SetSize,
value => Self::__Unknown(value),
}
}
}
impl StaticType for AccessibleRelation {
#[inline]
#[doc(alias = "gtk_accessible_relation_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_relation_get_type()) }
}
}
impl glib::HasParamSpec for AccessibleRelation {
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 AccessibleRelation {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for AccessibleRelation {
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 AccessibleRelation {
#[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<AccessibleRelation> for glib::Value {
#[inline]
fn from(v: AccessibleRelation) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessibleRole")]
pub enum AccessibleRole {
#[doc(alias = "GTK_ACCESSIBLE_ROLE_ALERT")]
Alert,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_ALERT_DIALOG")]
AlertDialog,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_BANNER")]
Banner,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_BUTTON")]
Button,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_CAPTION")]
Caption,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_CELL")]
Cell,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_CHECKBOX")]
Checkbox,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_COLUMN_HEADER")]
ColumnHeader,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_COMBO_BOX")]
ComboBox,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_COMMAND")]
Command,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_COMPOSITE")]
Composite,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_DIALOG")]
Dialog,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_DOCUMENT")]
Document,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_FEED")]
Feed,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_FORM")]
Form,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_GENERIC")]
Generic,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_GRID")]
Grid,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_GRID_CELL")]
GridCell,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_GROUP")]
Group,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_HEADING")]
Heading,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_IMG")]
Img,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_INPUT")]
Input,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_LABEL")]
Label,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_LANDMARK")]
Landmark,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_LEGEND")]
Legend,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_LINK")]
Link,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_LIST")]
List,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_LIST_BOX")]
ListBox,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_LIST_ITEM")]
ListItem,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_LOG")]
Log,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_MAIN")]
Main,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_MARQUEE")]
Marquee,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_MATH")]
Math,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_METER")]
Meter,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_MENU")]
Menu,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_MENU_BAR")]
MenuBar,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_MENU_ITEM")]
MenuItem,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_MENU_ITEM_CHECKBOX")]
MenuItemCheckbox,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_MENU_ITEM_RADIO")]
MenuItemRadio,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_NAVIGATION")]
Navigation,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_NONE")]
None,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_NOTE")]
Note,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_OPTION")]
Option,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_PRESENTATION")]
Presentation,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_PROGRESS_BAR")]
ProgressBar,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_RADIO")]
Radio,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_RADIO_GROUP")]
RadioGroup,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_RANGE")]
Range,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_REGION")]
Region,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_ROW")]
Row,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_ROW_GROUP")]
RowGroup,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_ROW_HEADER")]
RowHeader,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_SCROLLBAR")]
Scrollbar,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_SEARCH")]
Search,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_SEARCH_BOX")]
SearchBox,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_SECTION")]
Section,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_SECTION_HEAD")]
SectionHead,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_SELECT")]
Select,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_SEPARATOR")]
Separator,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_SLIDER")]
Slider,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_SPIN_BUTTON")]
SpinButton,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_STATUS")]
Status,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_STRUCTURE")]
Structure,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_SWITCH")]
Switch,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TAB")]
Tab,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TABLE")]
Table,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TAB_LIST")]
TabList,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TAB_PANEL")]
TabPanel,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TEXT_BOX")]
TextBox,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TIME")]
Time,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TIMER")]
Timer,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TOOLBAR")]
Toolbar,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TOOLTIP")]
Tooltip,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TREE")]
Tree,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TREE_GRID")]
TreeGrid,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TREE_ITEM")]
TreeItem,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_WIDGET")]
Widget,
#[doc(alias = "GTK_ACCESSIBLE_ROLE_WINDOW")]
Window,
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON")]
ToggleButton,
#[cfg(feature = "v4_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
#[doc(alias = "GTK_ACCESSIBLE_ROLE_APPLICATION")]
Application,
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(alias = "GTK_ACCESSIBLE_ROLE_PARAGRAPH")]
Paragraph,
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(alias = "GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE")]
BlockQuote,
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(alias = "GTK_ACCESSIBLE_ROLE_ARTICLE")]
Article,
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(alias = "GTK_ACCESSIBLE_ROLE_COMMENT")]
Comment,
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(alias = "GTK_ACCESSIBLE_ROLE_TERMINAL")]
Terminal,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for AccessibleRole {
type GlibType = ffi::GtkAccessibleRole;
fn into_glib(self) -> ffi::GtkAccessibleRole {
match self {
Self::Alert => ffi::GTK_ACCESSIBLE_ROLE_ALERT,
Self::AlertDialog => ffi::GTK_ACCESSIBLE_ROLE_ALERT_DIALOG,
Self::Banner => ffi::GTK_ACCESSIBLE_ROLE_BANNER,
Self::Button => ffi::GTK_ACCESSIBLE_ROLE_BUTTON,
Self::Caption => ffi::GTK_ACCESSIBLE_ROLE_CAPTION,
Self::Cell => ffi::GTK_ACCESSIBLE_ROLE_CELL,
Self::Checkbox => ffi::GTK_ACCESSIBLE_ROLE_CHECKBOX,
Self::ColumnHeader => ffi::GTK_ACCESSIBLE_ROLE_COLUMN_HEADER,
Self::ComboBox => ffi::GTK_ACCESSIBLE_ROLE_COMBO_BOX,
Self::Command => ffi::GTK_ACCESSIBLE_ROLE_COMMAND,
Self::Composite => ffi::GTK_ACCESSIBLE_ROLE_COMPOSITE,
Self::Dialog => ffi::GTK_ACCESSIBLE_ROLE_DIALOG,
Self::Document => ffi::GTK_ACCESSIBLE_ROLE_DOCUMENT,
Self::Feed => ffi::GTK_ACCESSIBLE_ROLE_FEED,
Self::Form => ffi::GTK_ACCESSIBLE_ROLE_FORM,
Self::Generic => ffi::GTK_ACCESSIBLE_ROLE_GENERIC,
Self::Grid => ffi::GTK_ACCESSIBLE_ROLE_GRID,
Self::GridCell => ffi::GTK_ACCESSIBLE_ROLE_GRID_CELL,
Self::Group => ffi::GTK_ACCESSIBLE_ROLE_GROUP,
Self::Heading => ffi::GTK_ACCESSIBLE_ROLE_HEADING,
Self::Img => ffi::GTK_ACCESSIBLE_ROLE_IMG,
Self::Input => ffi::GTK_ACCESSIBLE_ROLE_INPUT,
Self::Label => ffi::GTK_ACCESSIBLE_ROLE_LABEL,
Self::Landmark => ffi::GTK_ACCESSIBLE_ROLE_LANDMARK,
Self::Legend => ffi::GTK_ACCESSIBLE_ROLE_LEGEND,
Self::Link => ffi::GTK_ACCESSIBLE_ROLE_LINK,
Self::List => ffi::GTK_ACCESSIBLE_ROLE_LIST,
Self::ListBox => ffi::GTK_ACCESSIBLE_ROLE_LIST_BOX,
Self::ListItem => ffi::GTK_ACCESSIBLE_ROLE_LIST_ITEM,
Self::Log => ffi::GTK_ACCESSIBLE_ROLE_LOG,
Self::Main => ffi::GTK_ACCESSIBLE_ROLE_MAIN,
Self::Marquee => ffi::GTK_ACCESSIBLE_ROLE_MARQUEE,
Self::Math => ffi::GTK_ACCESSIBLE_ROLE_MATH,
Self::Meter => ffi::GTK_ACCESSIBLE_ROLE_METER,
Self::Menu => ffi::GTK_ACCESSIBLE_ROLE_MENU,
Self::MenuBar => ffi::GTK_ACCESSIBLE_ROLE_MENU_BAR,
Self::MenuItem => ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM,
Self::MenuItemCheckbox => ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM_CHECKBOX,
Self::MenuItemRadio => ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM_RADIO,
Self::Navigation => ffi::GTK_ACCESSIBLE_ROLE_NAVIGATION,
Self::None => ffi::GTK_ACCESSIBLE_ROLE_NONE,
Self::Note => ffi::GTK_ACCESSIBLE_ROLE_NOTE,
Self::Option => ffi::GTK_ACCESSIBLE_ROLE_OPTION,
Self::Presentation => ffi::GTK_ACCESSIBLE_ROLE_PRESENTATION,
Self::ProgressBar => ffi::GTK_ACCESSIBLE_ROLE_PROGRESS_BAR,
Self::Radio => ffi::GTK_ACCESSIBLE_ROLE_RADIO,
Self::RadioGroup => ffi::GTK_ACCESSIBLE_ROLE_RADIO_GROUP,
Self::Range => ffi::GTK_ACCESSIBLE_ROLE_RANGE,
Self::Region => ffi::GTK_ACCESSIBLE_ROLE_REGION,
Self::Row => ffi::GTK_ACCESSIBLE_ROLE_ROW,
Self::RowGroup => ffi::GTK_ACCESSIBLE_ROLE_ROW_GROUP,
Self::RowHeader => ffi::GTK_ACCESSIBLE_ROLE_ROW_HEADER,
Self::Scrollbar => ffi::GTK_ACCESSIBLE_ROLE_SCROLLBAR,
Self::Search => ffi::GTK_ACCESSIBLE_ROLE_SEARCH,
Self::SearchBox => ffi::GTK_ACCESSIBLE_ROLE_SEARCH_BOX,
Self::Section => ffi::GTK_ACCESSIBLE_ROLE_SECTION,
Self::SectionHead => ffi::GTK_ACCESSIBLE_ROLE_SECTION_HEAD,
Self::Select => ffi::GTK_ACCESSIBLE_ROLE_SELECT,
Self::Separator => ffi::GTK_ACCESSIBLE_ROLE_SEPARATOR,
Self::Slider => ffi::GTK_ACCESSIBLE_ROLE_SLIDER,
Self::SpinButton => ffi::GTK_ACCESSIBLE_ROLE_SPIN_BUTTON,
Self::Status => ffi::GTK_ACCESSIBLE_ROLE_STATUS,
Self::Structure => ffi::GTK_ACCESSIBLE_ROLE_STRUCTURE,
Self::Switch => ffi::GTK_ACCESSIBLE_ROLE_SWITCH,
Self::Tab => ffi::GTK_ACCESSIBLE_ROLE_TAB,
Self::Table => ffi::GTK_ACCESSIBLE_ROLE_TABLE,
Self::TabList => ffi::GTK_ACCESSIBLE_ROLE_TAB_LIST,
Self::TabPanel => ffi::GTK_ACCESSIBLE_ROLE_TAB_PANEL,
Self::TextBox => ffi::GTK_ACCESSIBLE_ROLE_TEXT_BOX,
Self::Time => ffi::GTK_ACCESSIBLE_ROLE_TIME,
Self::Timer => ffi::GTK_ACCESSIBLE_ROLE_TIMER,
Self::Toolbar => ffi::GTK_ACCESSIBLE_ROLE_TOOLBAR,
Self::Tooltip => ffi::GTK_ACCESSIBLE_ROLE_TOOLTIP,
Self::Tree => ffi::GTK_ACCESSIBLE_ROLE_TREE,
Self::TreeGrid => ffi::GTK_ACCESSIBLE_ROLE_TREE_GRID,
Self::TreeItem => ffi::GTK_ACCESSIBLE_ROLE_TREE_ITEM,
Self::Widget => ffi::GTK_ACCESSIBLE_ROLE_WIDGET,
Self::Window => ffi::GTK_ACCESSIBLE_ROLE_WINDOW,
#[cfg(feature = "v4_10")]
Self::ToggleButton => ffi::GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON,
#[cfg(feature = "v4_12")]
Self::Application => ffi::GTK_ACCESSIBLE_ROLE_APPLICATION,
#[cfg(feature = "v4_14")]
Self::Paragraph => ffi::GTK_ACCESSIBLE_ROLE_PARAGRAPH,
#[cfg(feature = "v4_14")]
Self::BlockQuote => ffi::GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE,
#[cfg(feature = "v4_14")]
Self::Article => ffi::GTK_ACCESSIBLE_ROLE_ARTICLE,
#[cfg(feature = "v4_14")]
Self::Comment => ffi::GTK_ACCESSIBLE_ROLE_COMMENT,
#[cfg(feature = "v4_14")]
Self::Terminal => ffi::GTK_ACCESSIBLE_ROLE_TERMINAL,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessibleRole> for AccessibleRole {
unsafe fn from_glib(value: ffi::GtkAccessibleRole) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_ROLE_ALERT => Self::Alert,
ffi::GTK_ACCESSIBLE_ROLE_ALERT_DIALOG => Self::AlertDialog,
ffi::GTK_ACCESSIBLE_ROLE_BANNER => Self::Banner,
ffi::GTK_ACCESSIBLE_ROLE_BUTTON => Self::Button,
ffi::GTK_ACCESSIBLE_ROLE_CAPTION => Self::Caption,
ffi::GTK_ACCESSIBLE_ROLE_CELL => Self::Cell,
ffi::GTK_ACCESSIBLE_ROLE_CHECKBOX => Self::Checkbox,
ffi::GTK_ACCESSIBLE_ROLE_COLUMN_HEADER => Self::ColumnHeader,
ffi::GTK_ACCESSIBLE_ROLE_COMBO_BOX => Self::ComboBox,
ffi::GTK_ACCESSIBLE_ROLE_COMMAND => Self::Command,
ffi::GTK_ACCESSIBLE_ROLE_COMPOSITE => Self::Composite,
ffi::GTK_ACCESSIBLE_ROLE_DIALOG => Self::Dialog,
ffi::GTK_ACCESSIBLE_ROLE_DOCUMENT => Self::Document,
ffi::GTK_ACCESSIBLE_ROLE_FEED => Self::Feed,
ffi::GTK_ACCESSIBLE_ROLE_FORM => Self::Form,
ffi::GTK_ACCESSIBLE_ROLE_GENERIC => Self::Generic,
ffi::GTK_ACCESSIBLE_ROLE_GRID => Self::Grid,
ffi::GTK_ACCESSIBLE_ROLE_GRID_CELL => Self::GridCell,
ffi::GTK_ACCESSIBLE_ROLE_GROUP => Self::Group,
ffi::GTK_ACCESSIBLE_ROLE_HEADING => Self::Heading,
ffi::GTK_ACCESSIBLE_ROLE_IMG => Self::Img,
ffi::GTK_ACCESSIBLE_ROLE_INPUT => Self::Input,
ffi::GTK_ACCESSIBLE_ROLE_LABEL => Self::Label,
ffi::GTK_ACCESSIBLE_ROLE_LANDMARK => Self::Landmark,
ffi::GTK_ACCESSIBLE_ROLE_LEGEND => Self::Legend,
ffi::GTK_ACCESSIBLE_ROLE_LINK => Self::Link,
ffi::GTK_ACCESSIBLE_ROLE_LIST => Self::List,
ffi::GTK_ACCESSIBLE_ROLE_LIST_BOX => Self::ListBox,
ffi::GTK_ACCESSIBLE_ROLE_LIST_ITEM => Self::ListItem,
ffi::GTK_ACCESSIBLE_ROLE_LOG => Self::Log,
ffi::GTK_ACCESSIBLE_ROLE_MAIN => Self::Main,
ffi::GTK_ACCESSIBLE_ROLE_MARQUEE => Self::Marquee,
ffi::GTK_ACCESSIBLE_ROLE_MATH => Self::Math,
ffi::GTK_ACCESSIBLE_ROLE_METER => Self::Meter,
ffi::GTK_ACCESSIBLE_ROLE_MENU => Self::Menu,
ffi::GTK_ACCESSIBLE_ROLE_MENU_BAR => Self::MenuBar,
ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM => Self::MenuItem,
ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM_CHECKBOX => Self::MenuItemCheckbox,
ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM_RADIO => Self::MenuItemRadio,
ffi::GTK_ACCESSIBLE_ROLE_NAVIGATION => Self::Navigation,
ffi::GTK_ACCESSIBLE_ROLE_NONE => Self::None,
ffi::GTK_ACCESSIBLE_ROLE_NOTE => Self::Note,
ffi::GTK_ACCESSIBLE_ROLE_OPTION => Self::Option,
ffi::GTK_ACCESSIBLE_ROLE_PRESENTATION => Self::Presentation,
ffi::GTK_ACCESSIBLE_ROLE_PROGRESS_BAR => Self::ProgressBar,
ffi::GTK_ACCESSIBLE_ROLE_RADIO => Self::Radio,
ffi::GTK_ACCESSIBLE_ROLE_RADIO_GROUP => Self::RadioGroup,
ffi::GTK_ACCESSIBLE_ROLE_RANGE => Self::Range,
ffi::GTK_ACCESSIBLE_ROLE_REGION => Self::Region,
ffi::GTK_ACCESSIBLE_ROLE_ROW => Self::Row,
ffi::GTK_ACCESSIBLE_ROLE_ROW_GROUP => Self::RowGroup,
ffi::GTK_ACCESSIBLE_ROLE_ROW_HEADER => Self::RowHeader,
ffi::GTK_ACCESSIBLE_ROLE_SCROLLBAR => Self::Scrollbar,
ffi::GTK_ACCESSIBLE_ROLE_SEARCH => Self::Search,
ffi::GTK_ACCESSIBLE_ROLE_SEARCH_BOX => Self::SearchBox,
ffi::GTK_ACCESSIBLE_ROLE_SECTION => Self::Section,
ffi::GTK_ACCESSIBLE_ROLE_SECTION_HEAD => Self::SectionHead,
ffi::GTK_ACCESSIBLE_ROLE_SELECT => Self::Select,
ffi::GTK_ACCESSIBLE_ROLE_SEPARATOR => Self::Separator,
ffi::GTK_ACCESSIBLE_ROLE_SLIDER => Self::Slider,
ffi::GTK_ACCESSIBLE_ROLE_SPIN_BUTTON => Self::SpinButton,
ffi::GTK_ACCESSIBLE_ROLE_STATUS => Self::Status,
ffi::GTK_ACCESSIBLE_ROLE_STRUCTURE => Self::Structure,
ffi::GTK_ACCESSIBLE_ROLE_SWITCH => Self::Switch,
ffi::GTK_ACCESSIBLE_ROLE_TAB => Self::Tab,
ffi::GTK_ACCESSIBLE_ROLE_TABLE => Self::Table,
ffi::GTK_ACCESSIBLE_ROLE_TAB_LIST => Self::TabList,
ffi::GTK_ACCESSIBLE_ROLE_TAB_PANEL => Self::TabPanel,
ffi::GTK_ACCESSIBLE_ROLE_TEXT_BOX => Self::TextBox,
ffi::GTK_ACCESSIBLE_ROLE_TIME => Self::Time,
ffi::GTK_ACCESSIBLE_ROLE_TIMER => Self::Timer,
ffi::GTK_ACCESSIBLE_ROLE_TOOLBAR => Self::Toolbar,
ffi::GTK_ACCESSIBLE_ROLE_TOOLTIP => Self::Tooltip,
ffi::GTK_ACCESSIBLE_ROLE_TREE => Self::Tree,
ffi::GTK_ACCESSIBLE_ROLE_TREE_GRID => Self::TreeGrid,
ffi::GTK_ACCESSIBLE_ROLE_TREE_ITEM => Self::TreeItem,
ffi::GTK_ACCESSIBLE_ROLE_WIDGET => Self::Widget,
ffi::GTK_ACCESSIBLE_ROLE_WINDOW => Self::Window,
#[cfg(feature = "v4_10")]
ffi::GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON => Self::ToggleButton,
#[cfg(feature = "v4_12")]
ffi::GTK_ACCESSIBLE_ROLE_APPLICATION => Self::Application,
#[cfg(feature = "v4_14")]
ffi::GTK_ACCESSIBLE_ROLE_PARAGRAPH => Self::Paragraph,
#[cfg(feature = "v4_14")]
ffi::GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE => Self::BlockQuote,
#[cfg(feature = "v4_14")]
ffi::GTK_ACCESSIBLE_ROLE_ARTICLE => Self::Article,
#[cfg(feature = "v4_14")]
ffi::GTK_ACCESSIBLE_ROLE_COMMENT => Self::Comment,
#[cfg(feature = "v4_14")]
ffi::GTK_ACCESSIBLE_ROLE_TERMINAL => Self::Terminal,
value => Self::__Unknown(value),
}
}
}
impl StaticType for AccessibleRole {
#[inline]
#[doc(alias = "gtk_accessible_role_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_role_get_type()) }
}
}
impl glib::HasParamSpec for AccessibleRole {
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 AccessibleRole {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for AccessibleRole {
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 AccessibleRole {
#[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<AccessibleRole> for glib::Value {
#[inline]
fn from(v: AccessibleRole) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessibleSort")]
pub enum AccessibleSort {
#[doc(alias = "GTK_ACCESSIBLE_SORT_NONE")]
None,
#[doc(alias = "GTK_ACCESSIBLE_SORT_ASCENDING")]
Ascending,
#[doc(alias = "GTK_ACCESSIBLE_SORT_DESCENDING")]
Descending,
#[doc(alias = "GTK_ACCESSIBLE_SORT_OTHER")]
Other,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for AccessibleSort {
type GlibType = ffi::GtkAccessibleSort;
#[inline]
fn into_glib(self) -> ffi::GtkAccessibleSort {
match self {
Self::None => ffi::GTK_ACCESSIBLE_SORT_NONE,
Self::Ascending => ffi::GTK_ACCESSIBLE_SORT_ASCENDING,
Self::Descending => ffi::GTK_ACCESSIBLE_SORT_DESCENDING,
Self::Other => ffi::GTK_ACCESSIBLE_SORT_OTHER,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessibleSort> for AccessibleSort {
#[inline]
unsafe fn from_glib(value: ffi::GtkAccessibleSort) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_SORT_NONE => Self::None,
ffi::GTK_ACCESSIBLE_SORT_ASCENDING => Self::Ascending,
ffi::GTK_ACCESSIBLE_SORT_DESCENDING => Self::Descending,
ffi::GTK_ACCESSIBLE_SORT_OTHER => Self::Other,
value => Self::__Unknown(value),
}
}
}
impl StaticType for AccessibleSort {
#[inline]
#[doc(alias = "gtk_accessible_sort_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_sort_get_type()) }
}
}
impl glib::HasParamSpec for AccessibleSort {
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 AccessibleSort {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for AccessibleSort {
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 AccessibleSort {
#[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<AccessibleSort> for glib::Value {
#[inline]
fn from(v: AccessibleSort) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessibleState")]
pub enum AccessibleState {
#[doc(alias = "GTK_ACCESSIBLE_STATE_BUSY")]
Busy,
#[doc(alias = "GTK_ACCESSIBLE_STATE_CHECKED")]
Checked,
#[doc(alias = "GTK_ACCESSIBLE_STATE_DISABLED")]
Disabled,
#[doc(alias = "GTK_ACCESSIBLE_STATE_EXPANDED")]
Expanded,
#[doc(alias = "GTK_ACCESSIBLE_STATE_HIDDEN")]
Hidden,
#[doc(alias = "GTK_ACCESSIBLE_STATE_INVALID")]
Invalid,
#[doc(alias = "GTK_ACCESSIBLE_STATE_PRESSED")]
Pressed,
#[doc(alias = "GTK_ACCESSIBLE_STATE_SELECTED")]
Selected,
#[cfg(feature = "v4_12")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
#[doc(alias = "GTK_ACCESSIBLE_STATE_VISITED")]
Visited,
#[doc(hidden)]
__Unknown(i32),
}
impl AccessibleState {
#[doc(alias = "gtk_accessible_state_init_value")]
pub fn init_value(self, value: &mut glib::Value) {
assert_initialized_main_thread!();
unsafe {
ffi::gtk_accessible_state_init_value(self.into_glib(), value.to_glib_none_mut().0);
}
}
}
#[doc(hidden)]
impl IntoGlib for AccessibleState {
type GlibType = ffi::GtkAccessibleState;
#[inline]
fn into_glib(self) -> ffi::GtkAccessibleState {
match self {
Self::Busy => ffi::GTK_ACCESSIBLE_STATE_BUSY,
Self::Checked => ffi::GTK_ACCESSIBLE_STATE_CHECKED,
Self::Disabled => ffi::GTK_ACCESSIBLE_STATE_DISABLED,
Self::Expanded => ffi::GTK_ACCESSIBLE_STATE_EXPANDED,
Self::Hidden => ffi::GTK_ACCESSIBLE_STATE_HIDDEN,
Self::Invalid => ffi::GTK_ACCESSIBLE_STATE_INVALID,
Self::Pressed => ffi::GTK_ACCESSIBLE_STATE_PRESSED,
Self::Selected => ffi::GTK_ACCESSIBLE_STATE_SELECTED,
#[cfg(feature = "v4_12")]
Self::Visited => ffi::GTK_ACCESSIBLE_STATE_VISITED,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessibleState> for AccessibleState {
#[inline]
unsafe fn from_glib(value: ffi::GtkAccessibleState) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_STATE_BUSY => Self::Busy,
ffi::GTK_ACCESSIBLE_STATE_CHECKED => Self::Checked,
ffi::GTK_ACCESSIBLE_STATE_DISABLED => Self::Disabled,
ffi::GTK_ACCESSIBLE_STATE_EXPANDED => Self::Expanded,
ffi::GTK_ACCESSIBLE_STATE_HIDDEN => Self::Hidden,
ffi::GTK_ACCESSIBLE_STATE_INVALID => Self::Invalid,
ffi::GTK_ACCESSIBLE_STATE_PRESSED => Self::Pressed,
ffi::GTK_ACCESSIBLE_STATE_SELECTED => Self::Selected,
#[cfg(feature = "v4_12")]
ffi::GTK_ACCESSIBLE_STATE_VISITED => Self::Visited,
value => Self::__Unknown(value),
}
}
}
impl StaticType for AccessibleState {
#[inline]
#[doc(alias = "gtk_accessible_state_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_state_get_type()) }
}
}
impl glib::HasParamSpec for AccessibleState {
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 AccessibleState {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for AccessibleState {
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 AccessibleState {
#[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<AccessibleState> for glib::Value {
#[inline]
fn from(v: AccessibleState) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessibleTextContentChange")]
pub enum AccessibleTextContentChange {
#[doc(alias = "GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT")]
Insert,
#[doc(alias = "GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE")]
Remove,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(hidden)]
impl IntoGlib for AccessibleTextContentChange {
type GlibType = ffi::GtkAccessibleTextContentChange;
#[inline]
fn into_glib(self) -> ffi::GtkAccessibleTextContentChange {
match self {
Self::Insert => ffi::GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT,
Self::Remove => ffi::GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE,
Self::__Unknown(value) => value,
}
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessibleTextContentChange> for AccessibleTextContentChange {
#[inline]
unsafe fn from_glib(value: ffi::GtkAccessibleTextContentChange) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT => Self::Insert,
ffi::GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE => Self::Remove,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl StaticType for AccessibleTextContentChange {
#[inline]
#[doc(alias = "gtk_accessible_text_content_change_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_text_content_change_get_type()) }
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl glib::HasParamSpec for AccessibleTextContentChange {
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 = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl glib::value::ValueType for AccessibleTextContentChange {
type Type = Self;
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
unsafe impl<'a> glib::value::FromValue<'a> for AccessibleTextContentChange {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl ToValue for AccessibleTextContentChange {
#[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 = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl From<AccessibleTextContentChange> for glib::Value {
#[inline]
fn from(v: AccessibleTextContentChange) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessibleTextGranularity")]
pub enum AccessibleTextGranularity {
#[doc(alias = "GTK_ACCESSIBLE_TEXT_GRANULARITY_CHARACTER")]
Character,
#[doc(alias = "GTK_ACCESSIBLE_TEXT_GRANULARITY_WORD")]
Word,
#[doc(alias = "GTK_ACCESSIBLE_TEXT_GRANULARITY_SENTENCE")]
Sentence,
#[doc(alias = "GTK_ACCESSIBLE_TEXT_GRANULARITY_LINE")]
Line,
#[doc(alias = "GTK_ACCESSIBLE_TEXT_GRANULARITY_PARAGRAPH")]
Paragraph,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(hidden)]
impl IntoGlib for AccessibleTextGranularity {
type GlibType = ffi::GtkAccessibleTextGranularity;
#[inline]
fn into_glib(self) -> ffi::GtkAccessibleTextGranularity {
match self {
Self::Character => ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_CHARACTER,
Self::Word => ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_WORD,
Self::Sentence => ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_SENTENCE,
Self::Line => ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_LINE,
Self::Paragraph => ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_PARAGRAPH,
Self::__Unknown(value) => value,
}
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessibleTextGranularity> for AccessibleTextGranularity {
#[inline]
unsafe fn from_glib(value: ffi::GtkAccessibleTextGranularity) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_CHARACTER => Self::Character,
ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_WORD => Self::Word,
ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_SENTENCE => Self::Sentence,
ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_LINE => Self::Line,
ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_PARAGRAPH => Self::Paragraph,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl StaticType for AccessibleTextGranularity {
#[inline]
#[doc(alias = "gtk_accessible_text_granularity_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_text_granularity_get_type()) }
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl glib::HasParamSpec for AccessibleTextGranularity {
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 = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl glib::value::ValueType for AccessibleTextGranularity {
type Type = Self;
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
unsafe impl<'a> glib::value::FromValue<'a> for AccessibleTextGranularity {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl ToValue for AccessibleTextGranularity {
#[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 = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl From<AccessibleTextGranularity> for glib::Value {
#[inline]
fn from(v: AccessibleTextGranularity) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAccessibleTristate")]
pub enum AccessibleTristate {
#[doc(alias = "GTK_ACCESSIBLE_TRISTATE_FALSE")]
False,
#[doc(alias = "GTK_ACCESSIBLE_TRISTATE_TRUE")]
True,
#[doc(alias = "GTK_ACCESSIBLE_TRISTATE_MIXED")]
Mixed,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for AccessibleTristate {
type GlibType = ffi::GtkAccessibleTristate;
#[inline]
fn into_glib(self) -> ffi::GtkAccessibleTristate {
match self {
Self::False => ffi::GTK_ACCESSIBLE_TRISTATE_FALSE,
Self::True => ffi::GTK_ACCESSIBLE_TRISTATE_TRUE,
Self::Mixed => ffi::GTK_ACCESSIBLE_TRISTATE_MIXED,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkAccessibleTristate> for AccessibleTristate {
#[inline]
unsafe fn from_glib(value: ffi::GtkAccessibleTristate) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ACCESSIBLE_TRISTATE_FALSE => Self::False,
ffi::GTK_ACCESSIBLE_TRISTATE_TRUE => Self::True,
ffi::GTK_ACCESSIBLE_TRISTATE_MIXED => Self::Mixed,
value => Self::__Unknown(value),
}
}
}
impl StaticType for AccessibleTristate {
#[inline]
#[doc(alias = "gtk_accessible_tristate_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_accessible_tristate_get_type()) }
}
}
impl glib::HasParamSpec for AccessibleTristate {
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 AccessibleTristate {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for AccessibleTristate {
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 AccessibleTristate {
#[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<AccessibleTristate> for glib::Value {
#[inline]
fn from(v: AccessibleTristate) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkArrowType")]
pub enum ArrowType {
#[doc(alias = "GTK_ARROW_UP")]
Up,
#[doc(alias = "GTK_ARROW_DOWN")]
Down,
#[doc(alias = "GTK_ARROW_LEFT")]
Left,
#[doc(alias = "GTK_ARROW_RIGHT")]
Right,
#[doc(alias = "GTK_ARROW_NONE")]
None,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for ArrowType {
type GlibType = ffi::GtkArrowType;
#[inline]
fn into_glib(self) -> ffi::GtkArrowType {
match self {
Self::Up => ffi::GTK_ARROW_UP,
Self::Down => ffi::GTK_ARROW_DOWN,
Self::Left => ffi::GTK_ARROW_LEFT,
Self::Right => ffi::GTK_ARROW_RIGHT,
Self::None => ffi::GTK_ARROW_NONE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkArrowType> for ArrowType {
#[inline]
unsafe fn from_glib(value: ffi::GtkArrowType) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ARROW_UP => Self::Up,
ffi::GTK_ARROW_DOWN => Self::Down,
ffi::GTK_ARROW_LEFT => Self::Left,
ffi::GTK_ARROW_RIGHT => Self::Right,
ffi::GTK_ARROW_NONE => Self::None,
value => Self::__Unknown(value),
}
}
}
impl StaticType for ArrowType {
#[inline]
#[doc(alias = "gtk_arrow_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_arrow_type_get_type()) }
}
}
impl glib::HasParamSpec for ArrowType {
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 ArrowType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for ArrowType {
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 ArrowType {
#[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<ArrowType> for glib::Value {
#[inline]
fn from(v: ArrowType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkAssistantPageType")]
pub enum AssistantPageType {
#[doc(alias = "GTK_ASSISTANT_PAGE_CONTENT")]
Content,
#[doc(alias = "GTK_ASSISTANT_PAGE_INTRO")]
Intro,
#[doc(alias = "GTK_ASSISTANT_PAGE_CONFIRM")]
Confirm,
#[doc(alias = "GTK_ASSISTANT_PAGE_SUMMARY")]
Summary,
#[doc(alias = "GTK_ASSISTANT_PAGE_PROGRESS")]
Progress,
#[doc(alias = "GTK_ASSISTANT_PAGE_CUSTOM")]
Custom,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for AssistantPageType {
type GlibType = ffi::GtkAssistantPageType;
#[inline]
fn into_glib(self) -> ffi::GtkAssistantPageType {
match self {
Self::Content => ffi::GTK_ASSISTANT_PAGE_CONTENT,
Self::Intro => ffi::GTK_ASSISTANT_PAGE_INTRO,
Self::Confirm => ffi::GTK_ASSISTANT_PAGE_CONFIRM,
Self::Summary => ffi::GTK_ASSISTANT_PAGE_SUMMARY,
Self::Progress => ffi::GTK_ASSISTANT_PAGE_PROGRESS,
Self::Custom => ffi::GTK_ASSISTANT_PAGE_CUSTOM,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkAssistantPageType> for AssistantPageType {
#[inline]
unsafe fn from_glib(value: ffi::GtkAssistantPageType) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ASSISTANT_PAGE_CONTENT => Self::Content,
ffi::GTK_ASSISTANT_PAGE_INTRO => Self::Intro,
ffi::GTK_ASSISTANT_PAGE_CONFIRM => Self::Confirm,
ffi::GTK_ASSISTANT_PAGE_SUMMARY => Self::Summary,
ffi::GTK_ASSISTANT_PAGE_PROGRESS => Self::Progress,
ffi::GTK_ASSISTANT_PAGE_CUSTOM => Self::Custom,
value => Self::__Unknown(value),
}
}
}
impl StaticType for AssistantPageType {
#[inline]
#[doc(alias = "gtk_assistant_page_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_assistant_page_type_get_type()) }
}
}
impl glib::HasParamSpec for AssistantPageType {
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 AssistantPageType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for AssistantPageType {
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 AssistantPageType {
#[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<AssistantPageType> for glib::Value {
#[inline]
fn from(v: AssistantPageType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkBaselinePosition")]
pub enum BaselinePosition {
#[doc(alias = "GTK_BASELINE_POSITION_TOP")]
Top,
#[doc(alias = "GTK_BASELINE_POSITION_CENTER")]
Center,
#[doc(alias = "GTK_BASELINE_POSITION_BOTTOM")]
Bottom,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for BaselinePosition {
type GlibType = ffi::GtkBaselinePosition;
#[inline]
fn into_glib(self) -> ffi::GtkBaselinePosition {
match self {
Self::Top => ffi::GTK_BASELINE_POSITION_TOP,
Self::Center => ffi::GTK_BASELINE_POSITION_CENTER,
Self::Bottom => ffi::GTK_BASELINE_POSITION_BOTTOM,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkBaselinePosition> for BaselinePosition {
#[inline]
unsafe fn from_glib(value: ffi::GtkBaselinePosition) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_BASELINE_POSITION_TOP => Self::Top,
ffi::GTK_BASELINE_POSITION_CENTER => Self::Center,
ffi::GTK_BASELINE_POSITION_BOTTOM => Self::Bottom,
value => Self::__Unknown(value),
}
}
}
impl StaticType for BaselinePosition {
#[inline]
#[doc(alias = "gtk_baseline_position_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_baseline_position_get_type()) }
}
}
impl glib::HasParamSpec for BaselinePosition {
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 BaselinePosition {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for BaselinePosition {
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 BaselinePosition {
#[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<BaselinePosition> for glib::Value {
#[inline]
fn from(v: BaselinePosition) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkBorderStyle")]
pub enum BorderStyle {
#[doc(alias = "GTK_BORDER_STYLE_NONE")]
None,
#[doc(alias = "GTK_BORDER_STYLE_HIDDEN")]
Hidden,
#[doc(alias = "GTK_BORDER_STYLE_SOLID")]
Solid,
#[doc(alias = "GTK_BORDER_STYLE_INSET")]
Inset,
#[doc(alias = "GTK_BORDER_STYLE_OUTSET")]
Outset,
#[doc(alias = "GTK_BORDER_STYLE_DOTTED")]
Dotted,
#[doc(alias = "GTK_BORDER_STYLE_DASHED")]
Dashed,
#[doc(alias = "GTK_BORDER_STYLE_DOUBLE")]
Double,
#[doc(alias = "GTK_BORDER_STYLE_GROOVE")]
Groove,
#[doc(alias = "GTK_BORDER_STYLE_RIDGE")]
Ridge,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for BorderStyle {
type GlibType = ffi::GtkBorderStyle;
#[inline]
fn into_glib(self) -> ffi::GtkBorderStyle {
match self {
Self::None => ffi::GTK_BORDER_STYLE_NONE,
Self::Hidden => ffi::GTK_BORDER_STYLE_HIDDEN,
Self::Solid => ffi::GTK_BORDER_STYLE_SOLID,
Self::Inset => ffi::GTK_BORDER_STYLE_INSET,
Self::Outset => ffi::GTK_BORDER_STYLE_OUTSET,
Self::Dotted => ffi::GTK_BORDER_STYLE_DOTTED,
Self::Dashed => ffi::GTK_BORDER_STYLE_DASHED,
Self::Double => ffi::GTK_BORDER_STYLE_DOUBLE,
Self::Groove => ffi::GTK_BORDER_STYLE_GROOVE,
Self::Ridge => ffi::GTK_BORDER_STYLE_RIDGE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkBorderStyle> for BorderStyle {
#[inline]
unsafe fn from_glib(value: ffi::GtkBorderStyle) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_BORDER_STYLE_NONE => Self::None,
ffi::GTK_BORDER_STYLE_HIDDEN => Self::Hidden,
ffi::GTK_BORDER_STYLE_SOLID => Self::Solid,
ffi::GTK_BORDER_STYLE_INSET => Self::Inset,
ffi::GTK_BORDER_STYLE_OUTSET => Self::Outset,
ffi::GTK_BORDER_STYLE_DOTTED => Self::Dotted,
ffi::GTK_BORDER_STYLE_DASHED => Self::Dashed,
ffi::GTK_BORDER_STYLE_DOUBLE => Self::Double,
ffi::GTK_BORDER_STYLE_GROOVE => Self::Groove,
ffi::GTK_BORDER_STYLE_RIDGE => Self::Ridge,
value => Self::__Unknown(value),
}
}
}
impl StaticType for BorderStyle {
#[inline]
#[doc(alias = "gtk_border_style_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_border_style_get_type()) }
}
}
impl glib::HasParamSpec for BorderStyle {
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 BorderStyle {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for BorderStyle {
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 BorderStyle {
#[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<BorderStyle> for glib::Value {
#[inline]
fn from(v: BorderStyle) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkBuilderError")]
pub enum BuilderError {
#[doc(alias = "GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION")]
InvalidTypeFunction,
#[doc(alias = "GTK_BUILDER_ERROR_UNHANDLED_TAG")]
UnhandledTag,
#[doc(alias = "GTK_BUILDER_ERROR_MISSING_ATTRIBUTE")]
MissingAttribute,
#[doc(alias = "GTK_BUILDER_ERROR_INVALID_ATTRIBUTE")]
InvalidAttribute,
#[doc(alias = "GTK_BUILDER_ERROR_INVALID_TAG")]
InvalidTag,
#[doc(alias = "GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE")]
MissingPropertyValue,
#[doc(alias = "GTK_BUILDER_ERROR_INVALID_VALUE")]
InvalidValue,
#[doc(alias = "GTK_BUILDER_ERROR_VERSION_MISMATCH")]
VersionMismatch,
#[doc(alias = "GTK_BUILDER_ERROR_DUPLICATE_ID")]
DuplicateId,
#[doc(alias = "GTK_BUILDER_ERROR_OBJECT_TYPE_REFUSED")]
ObjectTypeRefused,
#[doc(alias = "GTK_BUILDER_ERROR_TEMPLATE_MISMATCH")]
TemplateMismatch,
#[doc(alias = "GTK_BUILDER_ERROR_INVALID_PROPERTY")]
InvalidProperty,
#[doc(alias = "GTK_BUILDER_ERROR_INVALID_SIGNAL")]
InvalidSignal,
#[doc(alias = "GTK_BUILDER_ERROR_INVALID_ID")]
InvalidId,
#[doc(alias = "GTK_BUILDER_ERROR_INVALID_FUNCTION")]
InvalidFunction,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for BuilderError {
type GlibType = ffi::GtkBuilderError;
fn into_glib(self) -> ffi::GtkBuilderError {
match self {
Self::InvalidTypeFunction => ffi::GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION,
Self::UnhandledTag => ffi::GTK_BUILDER_ERROR_UNHANDLED_TAG,
Self::MissingAttribute => ffi::GTK_BUILDER_ERROR_MISSING_ATTRIBUTE,
Self::InvalidAttribute => ffi::GTK_BUILDER_ERROR_INVALID_ATTRIBUTE,
Self::InvalidTag => ffi::GTK_BUILDER_ERROR_INVALID_TAG,
Self::MissingPropertyValue => ffi::GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE,
Self::InvalidValue => ffi::GTK_BUILDER_ERROR_INVALID_VALUE,
Self::VersionMismatch => ffi::GTK_BUILDER_ERROR_VERSION_MISMATCH,
Self::DuplicateId => ffi::GTK_BUILDER_ERROR_DUPLICATE_ID,
Self::ObjectTypeRefused => ffi::GTK_BUILDER_ERROR_OBJECT_TYPE_REFUSED,
Self::TemplateMismatch => ffi::GTK_BUILDER_ERROR_TEMPLATE_MISMATCH,
Self::InvalidProperty => ffi::GTK_BUILDER_ERROR_INVALID_PROPERTY,
Self::InvalidSignal => ffi::GTK_BUILDER_ERROR_INVALID_SIGNAL,
Self::InvalidId => ffi::GTK_BUILDER_ERROR_INVALID_ID,
Self::InvalidFunction => ffi::GTK_BUILDER_ERROR_INVALID_FUNCTION,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkBuilderError> for BuilderError {
unsafe fn from_glib(value: ffi::GtkBuilderError) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION => Self::InvalidTypeFunction,
ffi::GTK_BUILDER_ERROR_UNHANDLED_TAG => Self::UnhandledTag,
ffi::GTK_BUILDER_ERROR_MISSING_ATTRIBUTE => Self::MissingAttribute,
ffi::GTK_BUILDER_ERROR_INVALID_ATTRIBUTE => Self::InvalidAttribute,
ffi::GTK_BUILDER_ERROR_INVALID_TAG => Self::InvalidTag,
ffi::GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE => Self::MissingPropertyValue,
ffi::GTK_BUILDER_ERROR_INVALID_VALUE => Self::InvalidValue,
ffi::GTK_BUILDER_ERROR_VERSION_MISMATCH => Self::VersionMismatch,
ffi::GTK_BUILDER_ERROR_DUPLICATE_ID => Self::DuplicateId,
ffi::GTK_BUILDER_ERROR_OBJECT_TYPE_REFUSED => Self::ObjectTypeRefused,
ffi::GTK_BUILDER_ERROR_TEMPLATE_MISMATCH => Self::TemplateMismatch,
ffi::GTK_BUILDER_ERROR_INVALID_PROPERTY => Self::InvalidProperty,
ffi::GTK_BUILDER_ERROR_INVALID_SIGNAL => Self::InvalidSignal,
ffi::GTK_BUILDER_ERROR_INVALID_ID => Self::InvalidId,
ffi::GTK_BUILDER_ERROR_INVALID_FUNCTION => Self::InvalidFunction,
value => Self::__Unknown(value),
}
}
}
impl glib::error::ErrorDomain for BuilderError {
#[inline]
fn domain() -> glib::Quark {
skip_assert_initialized!();
unsafe { from_glib(ffi::gtk_builder_error_quark()) }
}
#[inline]
fn code(self) -> i32 {
self.into_glib()
}
#[inline]
#[allow(clippy::match_single_binding)]
fn from(code: i32) -> Option<Self> {
skip_assert_initialized!();
match unsafe { from_glib(code) } {
value => Some(value),
}
}
}
impl StaticType for BuilderError {
#[inline]
#[doc(alias = "gtk_builder_error_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_builder_error_get_type()) }
}
}
impl glib::HasParamSpec for BuilderError {
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 BuilderError {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for BuilderError {
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 BuilderError {
#[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<BuilderError> for glib::Value {
#[inline]
fn from(v: BuilderError) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkButtonsType")]
pub enum ButtonsType {
#[doc(alias = "GTK_BUTTONS_NONE")]
None,
#[doc(alias = "GTK_BUTTONS_OK")]
Ok,
#[doc(alias = "GTK_BUTTONS_CLOSE")]
Close,
#[doc(alias = "GTK_BUTTONS_CANCEL")]
Cancel,
#[doc(alias = "GTK_BUTTONS_YES_NO")]
YesNo,
#[doc(alias = "GTK_BUTTONS_OK_CANCEL")]
OkCancel,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for ButtonsType {
type GlibType = ffi::GtkButtonsType;
#[inline]
fn into_glib(self) -> ffi::GtkButtonsType {
match self {
Self::None => ffi::GTK_BUTTONS_NONE,
Self::Ok => ffi::GTK_BUTTONS_OK,
Self::Close => ffi::GTK_BUTTONS_CLOSE,
Self::Cancel => ffi::GTK_BUTTONS_CANCEL,
Self::YesNo => ffi::GTK_BUTTONS_YES_NO,
Self::OkCancel => ffi::GTK_BUTTONS_OK_CANCEL,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkButtonsType> for ButtonsType {
#[inline]
unsafe fn from_glib(value: ffi::GtkButtonsType) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_BUTTONS_NONE => Self::None,
ffi::GTK_BUTTONS_OK => Self::Ok,
ffi::GTK_BUTTONS_CLOSE => Self::Close,
ffi::GTK_BUTTONS_CANCEL => Self::Cancel,
ffi::GTK_BUTTONS_YES_NO => Self::YesNo,
ffi::GTK_BUTTONS_OK_CANCEL => Self::OkCancel,
value => Self::__Unknown(value),
}
}
}
impl StaticType for ButtonsType {
#[inline]
#[doc(alias = "gtk_buttons_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_buttons_type_get_type()) }
}
}
impl glib::HasParamSpec for ButtonsType {
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 ButtonsType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for ButtonsType {
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 ButtonsType {
#[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<ButtonsType> for glib::Value {
#[inline]
fn from(v: ButtonsType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkCellRendererAccelMode")]
pub enum CellRendererAccelMode {
#[doc(alias = "GTK_CELL_RENDERER_ACCEL_MODE_GTK")]
Gtk,
#[doc(alias = "GTK_CELL_RENDERER_ACCEL_MODE_OTHER")]
Other,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for CellRendererAccelMode {
type GlibType = ffi::GtkCellRendererAccelMode;
#[inline]
fn into_glib(self) -> ffi::GtkCellRendererAccelMode {
match self {
Self::Gtk => ffi::GTK_CELL_RENDERER_ACCEL_MODE_GTK,
Self::Other => ffi::GTK_CELL_RENDERER_ACCEL_MODE_OTHER,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkCellRendererAccelMode> for CellRendererAccelMode {
#[inline]
unsafe fn from_glib(value: ffi::GtkCellRendererAccelMode) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_CELL_RENDERER_ACCEL_MODE_GTK => Self::Gtk,
ffi::GTK_CELL_RENDERER_ACCEL_MODE_OTHER => Self::Other,
value => Self::__Unknown(value),
}
}
}
impl StaticType for CellRendererAccelMode {
#[inline]
#[doc(alias = "gtk_cell_renderer_accel_mode_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_cell_renderer_accel_mode_get_type()) }
}
}
impl glib::HasParamSpec for CellRendererAccelMode {
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 CellRendererAccelMode {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for CellRendererAccelMode {
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 CellRendererAccelMode {
#[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<CellRendererAccelMode> for glib::Value {
#[inline]
fn from(v: CellRendererAccelMode) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkCellRendererMode")]
pub enum CellRendererMode {
#[doc(alias = "GTK_CELL_RENDERER_MODE_INERT")]
Inert,
#[doc(alias = "GTK_CELL_RENDERER_MODE_ACTIVATABLE")]
Activatable,
#[doc(alias = "GTK_CELL_RENDERER_MODE_EDITABLE")]
Editable,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for CellRendererMode {
type GlibType = ffi::GtkCellRendererMode;
#[inline]
fn into_glib(self) -> ffi::GtkCellRendererMode {
match self {
Self::Inert => ffi::GTK_CELL_RENDERER_MODE_INERT,
Self::Activatable => ffi::GTK_CELL_RENDERER_MODE_ACTIVATABLE,
Self::Editable => ffi::GTK_CELL_RENDERER_MODE_EDITABLE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkCellRendererMode> for CellRendererMode {
#[inline]
unsafe fn from_glib(value: ffi::GtkCellRendererMode) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_CELL_RENDERER_MODE_INERT => Self::Inert,
ffi::GTK_CELL_RENDERER_MODE_ACTIVATABLE => Self::Activatable,
ffi::GTK_CELL_RENDERER_MODE_EDITABLE => Self::Editable,
value => Self::__Unknown(value),
}
}
}
impl StaticType for CellRendererMode {
#[inline]
#[doc(alias = "gtk_cell_renderer_mode_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_cell_renderer_mode_get_type()) }
}
}
impl glib::HasParamSpec for CellRendererMode {
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 CellRendererMode {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for CellRendererMode {
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 CellRendererMode {
#[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<CellRendererMode> for glib::Value {
#[inline]
fn from(v: CellRendererMode) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkCollation")]
pub enum Collation {
#[doc(alias = "GTK_COLLATION_NONE")]
None,
#[doc(alias = "GTK_COLLATION_UNICODE")]
Unicode,
#[doc(alias = "GTK_COLLATION_FILENAME")]
Filename,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[doc(hidden)]
impl IntoGlib for Collation {
type GlibType = ffi::GtkCollation;
#[inline]
fn into_glib(self) -> ffi::GtkCollation {
match self {
Self::None => ffi::GTK_COLLATION_NONE,
Self::Unicode => ffi::GTK_COLLATION_UNICODE,
Self::Filename => ffi::GTK_COLLATION_FILENAME,
Self::__Unknown(value) => value,
}
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[doc(hidden)]
impl FromGlib<ffi::GtkCollation> for Collation {
#[inline]
unsafe fn from_glib(value: ffi::GtkCollation) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_COLLATION_NONE => Self::None,
ffi::GTK_COLLATION_UNICODE => Self::Unicode,
ffi::GTK_COLLATION_FILENAME => Self::Filename,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl StaticType for Collation {
#[inline]
#[doc(alias = "gtk_collation_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_collation_get_type()) }
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl glib::HasParamSpec for Collation {
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 = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl glib::value::ValueType for Collation {
type Type = Self;
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
unsafe impl<'a> glib::value::FromValue<'a> for Collation {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl ToValue for Collation {
#[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 = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl From<Collation> for glib::Value {
#[inline]
fn from(v: Collation) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkConstraintAttribute")]
pub enum ConstraintAttribute {
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_NONE")]
None,
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_LEFT")]
Left,
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_RIGHT")]
Right,
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_TOP")]
Top,
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_BOTTOM")]
Bottom,
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_START")]
Start,
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_END")]
End,
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_WIDTH")]
Width,
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_HEIGHT")]
Height,
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_CENTER_X")]
CenterX,
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_CENTER_Y")]
CenterY,
#[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_BASELINE")]
Baseline,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for ConstraintAttribute {
type GlibType = ffi::GtkConstraintAttribute;
#[inline]
fn into_glib(self) -> ffi::GtkConstraintAttribute {
match self {
Self::None => ffi::GTK_CONSTRAINT_ATTRIBUTE_NONE,
Self::Left => ffi::GTK_CONSTRAINT_ATTRIBUTE_LEFT,
Self::Right => ffi::GTK_CONSTRAINT_ATTRIBUTE_RIGHT,
Self::Top => ffi::GTK_CONSTRAINT_ATTRIBUTE_TOP,
Self::Bottom => ffi::GTK_CONSTRAINT_ATTRIBUTE_BOTTOM,
Self::Start => ffi::GTK_CONSTRAINT_ATTRIBUTE_START,
Self::End => ffi::GTK_CONSTRAINT_ATTRIBUTE_END,
Self::Width => ffi::GTK_CONSTRAINT_ATTRIBUTE_WIDTH,
Self::Height => ffi::GTK_CONSTRAINT_ATTRIBUTE_HEIGHT,
Self::CenterX => ffi::GTK_CONSTRAINT_ATTRIBUTE_CENTER_X,
Self::CenterY => ffi::GTK_CONSTRAINT_ATTRIBUTE_CENTER_Y,
Self::Baseline => ffi::GTK_CONSTRAINT_ATTRIBUTE_BASELINE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkConstraintAttribute> for ConstraintAttribute {
#[inline]
unsafe fn from_glib(value: ffi::GtkConstraintAttribute) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_CONSTRAINT_ATTRIBUTE_NONE => Self::None,
ffi::GTK_CONSTRAINT_ATTRIBUTE_LEFT => Self::Left,
ffi::GTK_CONSTRAINT_ATTRIBUTE_RIGHT => Self::Right,
ffi::GTK_CONSTRAINT_ATTRIBUTE_TOP => Self::Top,
ffi::GTK_CONSTRAINT_ATTRIBUTE_BOTTOM => Self::Bottom,
ffi::GTK_CONSTRAINT_ATTRIBUTE_START => Self::Start,
ffi::GTK_CONSTRAINT_ATTRIBUTE_END => Self::End,
ffi::GTK_CONSTRAINT_ATTRIBUTE_WIDTH => Self::Width,
ffi::GTK_CONSTRAINT_ATTRIBUTE_HEIGHT => Self::Height,
ffi::GTK_CONSTRAINT_ATTRIBUTE_CENTER_X => Self::CenterX,
ffi::GTK_CONSTRAINT_ATTRIBUTE_CENTER_Y => Self::CenterY,
ffi::GTK_CONSTRAINT_ATTRIBUTE_BASELINE => Self::Baseline,
value => Self::__Unknown(value),
}
}
}
impl StaticType for ConstraintAttribute {
#[inline]
#[doc(alias = "gtk_constraint_attribute_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_constraint_attribute_get_type()) }
}
}
impl glib::HasParamSpec for ConstraintAttribute {
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 ConstraintAttribute {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for ConstraintAttribute {
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 ConstraintAttribute {
#[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<ConstraintAttribute> for glib::Value {
#[inline]
fn from(v: ConstraintAttribute) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkConstraintRelation")]
pub enum ConstraintRelation {
#[doc(alias = "GTK_CONSTRAINT_RELATION_LE")]
Le,
#[doc(alias = "GTK_CONSTRAINT_RELATION_EQ")]
Eq,
#[doc(alias = "GTK_CONSTRAINT_RELATION_GE")]
Ge,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for ConstraintRelation {
type GlibType = ffi::GtkConstraintRelation;
#[inline]
fn into_glib(self) -> ffi::GtkConstraintRelation {
match self {
Self::Le => ffi::GTK_CONSTRAINT_RELATION_LE,
Self::Eq => ffi::GTK_CONSTRAINT_RELATION_EQ,
Self::Ge => ffi::GTK_CONSTRAINT_RELATION_GE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkConstraintRelation> for ConstraintRelation {
#[inline]
unsafe fn from_glib(value: ffi::GtkConstraintRelation) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_CONSTRAINT_RELATION_LE => Self::Le,
ffi::GTK_CONSTRAINT_RELATION_EQ => Self::Eq,
ffi::GTK_CONSTRAINT_RELATION_GE => Self::Ge,
value => Self::__Unknown(value),
}
}
}
impl StaticType for ConstraintRelation {
#[inline]
#[doc(alias = "gtk_constraint_relation_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_constraint_relation_get_type()) }
}
}
impl glib::HasParamSpec for ConstraintRelation {
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 ConstraintRelation {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for ConstraintRelation {
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 ConstraintRelation {
#[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<ConstraintRelation> for glib::Value {
#[inline]
fn from(v: ConstraintRelation) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkConstraintStrength")]
pub enum ConstraintStrength {
#[doc(alias = "GTK_CONSTRAINT_STRENGTH_REQUIRED")]
Required,
#[doc(alias = "GTK_CONSTRAINT_STRENGTH_STRONG")]
Strong,
#[doc(alias = "GTK_CONSTRAINT_STRENGTH_MEDIUM")]
Medium,
#[doc(alias = "GTK_CONSTRAINT_STRENGTH_WEAK")]
Weak,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for ConstraintStrength {
type GlibType = ffi::GtkConstraintStrength;
#[inline]
fn into_glib(self) -> ffi::GtkConstraintStrength {
match self {
Self::Required => ffi::GTK_CONSTRAINT_STRENGTH_REQUIRED,
Self::Strong => ffi::GTK_CONSTRAINT_STRENGTH_STRONG,
Self::Medium => ffi::GTK_CONSTRAINT_STRENGTH_MEDIUM,
Self::Weak => ffi::GTK_CONSTRAINT_STRENGTH_WEAK,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkConstraintStrength> for ConstraintStrength {
#[inline]
unsafe fn from_glib(value: ffi::GtkConstraintStrength) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_CONSTRAINT_STRENGTH_REQUIRED => Self::Required,
ffi::GTK_CONSTRAINT_STRENGTH_STRONG => Self::Strong,
ffi::GTK_CONSTRAINT_STRENGTH_MEDIUM => Self::Medium,
ffi::GTK_CONSTRAINT_STRENGTH_WEAK => Self::Weak,
value => Self::__Unknown(value),
}
}
}
impl StaticType for ConstraintStrength {
#[inline]
#[doc(alias = "gtk_constraint_strength_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_constraint_strength_get_type()) }
}
}
impl glib::HasParamSpec for ConstraintStrength {
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 ConstraintStrength {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for ConstraintStrength {
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 ConstraintStrength {
#[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<ConstraintStrength> for glib::Value {
#[inline]
fn from(v: ConstraintStrength) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkConstraintVflParserError")]
pub enum ConstraintVflParserError {
#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL")]
Symbol,
#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE")]
Attribute,
#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW")]
View,
#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC")]
Metric,
#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY")]
Priority,
#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION")]
Relation,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for ConstraintVflParserError {
type GlibType = ffi::GtkConstraintVflParserError;
#[inline]
fn into_glib(self) -> ffi::GtkConstraintVflParserError {
match self {
Self::Symbol => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL,
Self::Attribute => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE,
Self::View => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW,
Self::Metric => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC,
Self::Priority => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY,
Self::Relation => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkConstraintVflParserError> for ConstraintVflParserError {
#[inline]
unsafe fn from_glib(value: ffi::GtkConstraintVflParserError) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL => Self::Symbol,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE => Self::Attribute,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW => Self::View,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC => Self::Metric,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY => Self::Priority,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION => Self::Relation,
value => Self::__Unknown(value),
}
}
}
impl glib::error::ErrorDomain for ConstraintVflParserError {
#[inline]
fn domain() -> glib::Quark {
skip_assert_initialized!();
unsafe { from_glib(ffi::gtk_constraint_vfl_parser_error_quark()) }
}
#[inline]
fn code(self) -> i32 {
self.into_glib()
}
#[inline]
#[allow(clippy::match_single_binding)]
fn from(code: i32) -> Option<Self> {
skip_assert_initialized!();
match unsafe { from_glib(code) } {
value => Some(value),
}
}
}
impl StaticType for ConstraintVflParserError {
#[inline]
#[doc(alias = "gtk_constraint_vfl_parser_error_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_constraint_vfl_parser_error_get_type()) }
}
}
impl glib::HasParamSpec for ConstraintVflParserError {
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 ConstraintVflParserError {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for ConstraintVflParserError {
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 ConstraintVflParserError {
#[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<ConstraintVflParserError> for glib::Value {
#[inline]
fn from(v: ConstraintVflParserError) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkContentFit")]
pub enum ContentFit {
#[doc(alias = "GTK_CONTENT_FIT_FILL")]
Fill,
#[doc(alias = "GTK_CONTENT_FIT_CONTAIN")]
Contain,
#[doc(alias = "GTK_CONTENT_FIT_COVER")]
Cover,
#[doc(alias = "GTK_CONTENT_FIT_SCALE_DOWN")]
ScaleDown,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
#[doc(hidden)]
impl IntoGlib for ContentFit {
type GlibType = ffi::GtkContentFit;
#[inline]
fn into_glib(self) -> ffi::GtkContentFit {
match self {
Self::Fill => ffi::GTK_CONTENT_FIT_FILL,
Self::Contain => ffi::GTK_CONTENT_FIT_CONTAIN,
Self::Cover => ffi::GTK_CONTENT_FIT_COVER,
Self::ScaleDown => ffi::GTK_CONTENT_FIT_SCALE_DOWN,
Self::__Unknown(value) => value,
}
}
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
#[doc(hidden)]
impl FromGlib<ffi::GtkContentFit> for ContentFit {
#[inline]
unsafe fn from_glib(value: ffi::GtkContentFit) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_CONTENT_FIT_FILL => Self::Fill,
ffi::GTK_CONTENT_FIT_CONTAIN => Self::Contain,
ffi::GTK_CONTENT_FIT_COVER => Self::Cover,
ffi::GTK_CONTENT_FIT_SCALE_DOWN => Self::ScaleDown,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
impl StaticType for ContentFit {
#[inline]
#[doc(alias = "gtk_content_fit_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_content_fit_get_type()) }
}
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
impl glib::HasParamSpec for ContentFit {
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 = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
impl glib::value::ValueType for ContentFit {
type Type = Self;
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
unsafe impl<'a> glib::value::FromValue<'a> for ContentFit {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
impl ToValue for ContentFit {
#[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 = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
impl From<ContentFit> for glib::Value {
#[inline]
fn from(v: ContentFit) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkCornerType")]
pub enum CornerType {
#[doc(alias = "GTK_CORNER_TOP_LEFT")]
TopLeft,
#[doc(alias = "GTK_CORNER_BOTTOM_LEFT")]
BottomLeft,
#[doc(alias = "GTK_CORNER_TOP_RIGHT")]
TopRight,
#[doc(alias = "GTK_CORNER_BOTTOM_RIGHT")]
BottomRight,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for CornerType {
type GlibType = ffi::GtkCornerType;
#[inline]
fn into_glib(self) -> ffi::GtkCornerType {
match self {
Self::TopLeft => ffi::GTK_CORNER_TOP_LEFT,
Self::BottomLeft => ffi::GTK_CORNER_BOTTOM_LEFT,
Self::TopRight => ffi::GTK_CORNER_TOP_RIGHT,
Self::BottomRight => ffi::GTK_CORNER_BOTTOM_RIGHT,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkCornerType> for CornerType {
#[inline]
unsafe fn from_glib(value: ffi::GtkCornerType) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_CORNER_TOP_LEFT => Self::TopLeft,
ffi::GTK_CORNER_BOTTOM_LEFT => Self::BottomLeft,
ffi::GTK_CORNER_TOP_RIGHT => Self::TopRight,
ffi::GTK_CORNER_BOTTOM_RIGHT => Self::BottomRight,
value => Self::__Unknown(value),
}
}
}
impl StaticType for CornerType {
#[inline]
#[doc(alias = "gtk_corner_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_corner_type_get_type()) }
}
}
impl glib::HasParamSpec for CornerType {
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 CornerType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for CornerType {
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 CornerType {
#[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<CornerType> for glib::Value {
#[inline]
fn from(v: CornerType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkCssParserError")]
pub enum CssParserError {
#[doc(alias = "GTK_CSS_PARSER_ERROR_FAILED")]
Failed,
#[doc(alias = "GTK_CSS_PARSER_ERROR_SYNTAX")]
Syntax,
#[doc(alias = "GTK_CSS_PARSER_ERROR_IMPORT")]
Import,
#[doc(alias = "GTK_CSS_PARSER_ERROR_NAME")]
Name,
#[doc(alias = "GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE")]
UnknownValue,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for CssParserError {
type GlibType = ffi::GtkCssParserError;
#[inline]
fn into_glib(self) -> ffi::GtkCssParserError {
match self {
Self::Failed => ffi::GTK_CSS_PARSER_ERROR_FAILED,
Self::Syntax => ffi::GTK_CSS_PARSER_ERROR_SYNTAX,
Self::Import => ffi::GTK_CSS_PARSER_ERROR_IMPORT,
Self::Name => ffi::GTK_CSS_PARSER_ERROR_NAME,
Self::UnknownValue => ffi::GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkCssParserError> for CssParserError {
#[inline]
unsafe fn from_glib(value: ffi::GtkCssParserError) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_CSS_PARSER_ERROR_FAILED => Self::Failed,
ffi::GTK_CSS_PARSER_ERROR_SYNTAX => Self::Syntax,
ffi::GTK_CSS_PARSER_ERROR_IMPORT => Self::Import,
ffi::GTK_CSS_PARSER_ERROR_NAME => Self::Name,
ffi::GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE => Self::UnknownValue,
value => Self::__Unknown(value),
}
}
}
impl glib::error::ErrorDomain for CssParserError {
#[inline]
fn domain() -> glib::Quark {
skip_assert_initialized!();
unsafe { from_glib(ffi::gtk_css_parser_error_quark()) }
}
#[inline]
fn code(self) -> i32 {
self.into_glib()
}
#[inline]
#[allow(clippy::match_single_binding)]
fn from(code: i32) -> Option<Self> {
skip_assert_initialized!();
match unsafe { from_glib(code) } {
Self::__Unknown(_) => Some(Self::Failed),
value => Some(value),
}
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkCssParserWarning")]
pub enum CssParserWarning {
#[doc(alias = "GTK_CSS_PARSER_WARNING_DEPRECATED")]
Deprecated,
#[doc(alias = "GTK_CSS_PARSER_WARNING_SYNTAX")]
Syntax,
#[doc(alias = "GTK_CSS_PARSER_WARNING_UNIMPLEMENTED")]
Unimplemented,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for CssParserWarning {
type GlibType = ffi::GtkCssParserWarning;
#[inline]
fn into_glib(self) -> ffi::GtkCssParserWarning {
match self {
Self::Deprecated => ffi::GTK_CSS_PARSER_WARNING_DEPRECATED,
Self::Syntax => ffi::GTK_CSS_PARSER_WARNING_SYNTAX,
Self::Unimplemented => ffi::GTK_CSS_PARSER_WARNING_UNIMPLEMENTED,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkCssParserWarning> for CssParserWarning {
#[inline]
unsafe fn from_glib(value: ffi::GtkCssParserWarning) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_CSS_PARSER_WARNING_DEPRECATED => Self::Deprecated,
ffi::GTK_CSS_PARSER_WARNING_SYNTAX => Self::Syntax,
ffi::GTK_CSS_PARSER_WARNING_UNIMPLEMENTED => Self::Unimplemented,
value => Self::__Unknown(value),
}
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkDeleteType")]
pub enum DeleteType {
#[doc(alias = "GTK_DELETE_CHARS")]
Chars,
#[doc(alias = "GTK_DELETE_WORD_ENDS")]
WordEnds,
#[doc(alias = "GTK_DELETE_WORDS")]
Words,
#[doc(alias = "GTK_DELETE_DISPLAY_LINES")]
DisplayLines,
#[doc(alias = "GTK_DELETE_DISPLAY_LINE_ENDS")]
DisplayLineEnds,
#[doc(alias = "GTK_DELETE_PARAGRAPH_ENDS")]
ParagraphEnds,
#[doc(alias = "GTK_DELETE_PARAGRAPHS")]
Paragraphs,
#[doc(alias = "GTK_DELETE_WHITESPACE")]
Whitespace,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for DeleteType {
type GlibType = ffi::GtkDeleteType;
#[inline]
fn into_glib(self) -> ffi::GtkDeleteType {
match self {
Self::Chars => ffi::GTK_DELETE_CHARS,
Self::WordEnds => ffi::GTK_DELETE_WORD_ENDS,
Self::Words => ffi::GTK_DELETE_WORDS,
Self::DisplayLines => ffi::GTK_DELETE_DISPLAY_LINES,
Self::DisplayLineEnds => ffi::GTK_DELETE_DISPLAY_LINE_ENDS,
Self::ParagraphEnds => ffi::GTK_DELETE_PARAGRAPH_ENDS,
Self::Paragraphs => ffi::GTK_DELETE_PARAGRAPHS,
Self::Whitespace => ffi::GTK_DELETE_WHITESPACE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkDeleteType> for DeleteType {
#[inline]
unsafe fn from_glib(value: ffi::GtkDeleteType) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_DELETE_CHARS => Self::Chars,
ffi::GTK_DELETE_WORD_ENDS => Self::WordEnds,
ffi::GTK_DELETE_WORDS => Self::Words,
ffi::GTK_DELETE_DISPLAY_LINES => Self::DisplayLines,
ffi::GTK_DELETE_DISPLAY_LINE_ENDS => Self::DisplayLineEnds,
ffi::GTK_DELETE_PARAGRAPH_ENDS => Self::ParagraphEnds,
ffi::GTK_DELETE_PARAGRAPHS => Self::Paragraphs,
ffi::GTK_DELETE_WHITESPACE => Self::Whitespace,
value => Self::__Unknown(value),
}
}
}
impl StaticType for DeleteType {
#[inline]
#[doc(alias = "gtk_delete_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_delete_type_get_type()) }
}
}
impl glib::HasParamSpec for DeleteType {
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 DeleteType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for DeleteType {
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 DeleteType {
#[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<DeleteType> for glib::Value {
#[inline]
fn from(v: DeleteType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkDialogError")]
pub enum DialogError {
#[doc(alias = "GTK_DIALOG_ERROR_FAILED")]
Failed,
#[doc(alias = "GTK_DIALOG_ERROR_CANCELLED")]
Cancelled,
#[doc(alias = "GTK_DIALOG_ERROR_DISMISSED")]
Dismissed,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[doc(hidden)]
impl IntoGlib for DialogError {
type GlibType = ffi::GtkDialogError;
#[inline]
fn into_glib(self) -> ffi::GtkDialogError {
match self {
Self::Failed => ffi::GTK_DIALOG_ERROR_FAILED,
Self::Cancelled => ffi::GTK_DIALOG_ERROR_CANCELLED,
Self::Dismissed => ffi::GTK_DIALOG_ERROR_DISMISSED,
Self::__Unknown(value) => value,
}
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[doc(hidden)]
impl FromGlib<ffi::GtkDialogError> for DialogError {
#[inline]
unsafe fn from_glib(value: ffi::GtkDialogError) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_DIALOG_ERROR_FAILED => Self::Failed,
ffi::GTK_DIALOG_ERROR_CANCELLED => Self::Cancelled,
ffi::GTK_DIALOG_ERROR_DISMISSED => Self::Dismissed,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl glib::error::ErrorDomain for DialogError {
#[inline]
fn domain() -> glib::Quark {
skip_assert_initialized!();
unsafe { from_glib(ffi::gtk_dialog_error_quark()) }
}
#[inline]
fn code(self) -> i32 {
self.into_glib()
}
#[inline]
#[allow(clippy::match_single_binding)]
fn from(code: i32) -> Option<Self> {
skip_assert_initialized!();
match unsafe { from_glib(code) } {
Self::__Unknown(_) => Some(Self::Failed),
value => Some(value),
}
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl StaticType for DialogError {
#[inline]
#[doc(alias = "gtk_dialog_error_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_dialog_error_get_type()) }
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl glib::HasParamSpec for DialogError {
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 = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl glib::value::ValueType for DialogError {
type Type = Self;
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
unsafe impl<'a> glib::value::FromValue<'a> for DialogError {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl ToValue for DialogError {
#[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 = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl From<DialogError> for glib::Value {
#[inline]
fn from(v: DialogError) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkDirectionType")]
pub enum DirectionType {
#[doc(alias = "GTK_DIR_TAB_FORWARD")]
TabForward,
#[doc(alias = "GTK_DIR_TAB_BACKWARD")]
TabBackward,
#[doc(alias = "GTK_DIR_UP")]
Up,
#[doc(alias = "GTK_DIR_DOWN")]
Down,
#[doc(alias = "GTK_DIR_LEFT")]
Left,
#[doc(alias = "GTK_DIR_RIGHT")]
Right,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for DirectionType {
type GlibType = ffi::GtkDirectionType;
#[inline]
fn into_glib(self) -> ffi::GtkDirectionType {
match self {
Self::TabForward => ffi::GTK_DIR_TAB_FORWARD,
Self::TabBackward => ffi::GTK_DIR_TAB_BACKWARD,
Self::Up => ffi::GTK_DIR_UP,
Self::Down => ffi::GTK_DIR_DOWN,
Self::Left => ffi::GTK_DIR_LEFT,
Self::Right => ffi::GTK_DIR_RIGHT,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkDirectionType> for DirectionType {
#[inline]
unsafe fn from_glib(value: ffi::GtkDirectionType) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_DIR_TAB_FORWARD => Self::TabForward,
ffi::GTK_DIR_TAB_BACKWARD => Self::TabBackward,
ffi::GTK_DIR_UP => Self::Up,
ffi::GTK_DIR_DOWN => Self::Down,
ffi::GTK_DIR_LEFT => Self::Left,
ffi::GTK_DIR_RIGHT => Self::Right,
value => Self::__Unknown(value),
}
}
}
impl StaticType for DirectionType {
#[inline]
#[doc(alias = "gtk_direction_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_direction_type_get_type()) }
}
}
impl glib::HasParamSpec for DirectionType {
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 DirectionType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for DirectionType {
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 DirectionType {
#[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<DirectionType> for glib::Value {
#[inline]
fn from(v: DirectionType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkEditableProperties")]
pub enum EditableProperties {
#[doc(alias = "GTK_EDITABLE_PROP_TEXT")]
PropText,
#[doc(alias = "GTK_EDITABLE_PROP_CURSOR_POSITION")]
PropCursorPosition,
#[doc(alias = "GTK_EDITABLE_PROP_SELECTION_BOUND")]
PropSelectionBound,
#[doc(alias = "GTK_EDITABLE_PROP_EDITABLE")]
PropEditable,
#[doc(alias = "GTK_EDITABLE_PROP_WIDTH_CHARS")]
PropWidthChars,
#[doc(alias = "GTK_EDITABLE_PROP_MAX_WIDTH_CHARS")]
PropMaxWidthChars,
#[doc(alias = "GTK_EDITABLE_PROP_XALIGN")]
PropXalign,
#[doc(alias = "GTK_EDITABLE_PROP_ENABLE_UNDO")]
PropEnableUndo,
#[doc(alias = "GTK_EDITABLE_NUM_PROPERTIES")]
NumProperties,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for EditableProperties {
type GlibType = ffi::GtkEditableProperties;
#[inline]
fn into_glib(self) -> ffi::GtkEditableProperties {
match self {
Self::PropText => ffi::GTK_EDITABLE_PROP_TEXT,
Self::PropCursorPosition => ffi::GTK_EDITABLE_PROP_CURSOR_POSITION,
Self::PropSelectionBound => ffi::GTK_EDITABLE_PROP_SELECTION_BOUND,
Self::PropEditable => ffi::GTK_EDITABLE_PROP_EDITABLE,
Self::PropWidthChars => ffi::GTK_EDITABLE_PROP_WIDTH_CHARS,
Self::PropMaxWidthChars => ffi::GTK_EDITABLE_PROP_MAX_WIDTH_CHARS,
Self::PropXalign => ffi::GTK_EDITABLE_PROP_XALIGN,
Self::PropEnableUndo => ffi::GTK_EDITABLE_PROP_ENABLE_UNDO,
Self::NumProperties => ffi::GTK_EDITABLE_NUM_PROPERTIES,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkEditableProperties> for EditableProperties {
#[inline]
unsafe fn from_glib(value: ffi::GtkEditableProperties) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_EDITABLE_PROP_TEXT => Self::PropText,
ffi::GTK_EDITABLE_PROP_CURSOR_POSITION => Self::PropCursorPosition,
ffi::GTK_EDITABLE_PROP_SELECTION_BOUND => Self::PropSelectionBound,
ffi::GTK_EDITABLE_PROP_EDITABLE => Self::PropEditable,
ffi::GTK_EDITABLE_PROP_WIDTH_CHARS => Self::PropWidthChars,
ffi::GTK_EDITABLE_PROP_MAX_WIDTH_CHARS => Self::PropMaxWidthChars,
ffi::GTK_EDITABLE_PROP_XALIGN => Self::PropXalign,
ffi::GTK_EDITABLE_PROP_ENABLE_UNDO => Self::PropEnableUndo,
ffi::GTK_EDITABLE_NUM_PROPERTIES => Self::NumProperties,
value => Self::__Unknown(value),
}
}
}
impl StaticType for EditableProperties {
#[inline]
#[doc(alias = "gtk_editable_properties_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_editable_properties_get_type()) }
}
}
impl glib::HasParamSpec for EditableProperties {
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 EditableProperties {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for EditableProperties {
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 EditableProperties {
#[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<EditableProperties> for glib::Value {
#[inline]
fn from(v: EditableProperties) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkEntryIconPosition")]
pub enum EntryIconPosition {
#[doc(alias = "GTK_ENTRY_ICON_PRIMARY")]
Primary,
#[doc(alias = "GTK_ENTRY_ICON_SECONDARY")]
Secondary,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for EntryIconPosition {
type GlibType = ffi::GtkEntryIconPosition;
#[inline]
fn into_glib(self) -> ffi::GtkEntryIconPosition {
match self {
Self::Primary => ffi::GTK_ENTRY_ICON_PRIMARY,
Self::Secondary => ffi::GTK_ENTRY_ICON_SECONDARY,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkEntryIconPosition> for EntryIconPosition {
#[inline]
unsafe fn from_glib(value: ffi::GtkEntryIconPosition) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ENTRY_ICON_PRIMARY => Self::Primary,
ffi::GTK_ENTRY_ICON_SECONDARY => Self::Secondary,
value => Self::__Unknown(value),
}
}
}
impl StaticType for EntryIconPosition {
#[inline]
#[doc(alias = "gtk_entry_icon_position_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_entry_icon_position_get_type()) }
}
}
impl glib::HasParamSpec for EntryIconPosition {
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 EntryIconPosition {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for EntryIconPosition {
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 EntryIconPosition {
#[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<EntryIconPosition> for glib::Value {
#[inline]
fn from(v: EntryIconPosition) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkEventSequenceState")]
pub enum EventSequenceState {
#[doc(alias = "GTK_EVENT_SEQUENCE_NONE")]
None,
#[doc(alias = "GTK_EVENT_SEQUENCE_CLAIMED")]
Claimed,
#[doc(alias = "GTK_EVENT_SEQUENCE_DENIED")]
Denied,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for EventSequenceState {
type GlibType = ffi::GtkEventSequenceState;
#[inline]
fn into_glib(self) -> ffi::GtkEventSequenceState {
match self {
Self::None => ffi::GTK_EVENT_SEQUENCE_NONE,
Self::Claimed => ffi::GTK_EVENT_SEQUENCE_CLAIMED,
Self::Denied => ffi::GTK_EVENT_SEQUENCE_DENIED,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkEventSequenceState> for EventSequenceState {
#[inline]
unsafe fn from_glib(value: ffi::GtkEventSequenceState) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_EVENT_SEQUENCE_NONE => Self::None,
ffi::GTK_EVENT_SEQUENCE_CLAIMED => Self::Claimed,
ffi::GTK_EVENT_SEQUENCE_DENIED => Self::Denied,
value => Self::__Unknown(value),
}
}
}
impl StaticType for EventSequenceState {
#[inline]
#[doc(alias = "gtk_event_sequence_state_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_event_sequence_state_get_type()) }
}
}
impl glib::HasParamSpec for EventSequenceState {
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 EventSequenceState {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for EventSequenceState {
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 EventSequenceState {
#[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<EventSequenceState> for glib::Value {
#[inline]
fn from(v: EventSequenceState) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkFileChooserAction")]
pub enum FileChooserAction {
#[doc(alias = "GTK_FILE_CHOOSER_ACTION_OPEN")]
Open,
#[doc(alias = "GTK_FILE_CHOOSER_ACTION_SAVE")]
Save,
#[doc(alias = "GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER")]
SelectFolder,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for FileChooserAction {
type GlibType = ffi::GtkFileChooserAction;
#[inline]
fn into_glib(self) -> ffi::GtkFileChooserAction {
match self {
Self::Open => ffi::GTK_FILE_CHOOSER_ACTION_OPEN,
Self::Save => ffi::GTK_FILE_CHOOSER_ACTION_SAVE,
Self::SelectFolder => ffi::GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkFileChooserAction> for FileChooserAction {
#[inline]
unsafe fn from_glib(value: ffi::GtkFileChooserAction) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_FILE_CHOOSER_ACTION_OPEN => Self::Open,
ffi::GTK_FILE_CHOOSER_ACTION_SAVE => Self::Save,
ffi::GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER => Self::SelectFolder,
value => Self::__Unknown(value),
}
}
}
impl StaticType for FileChooserAction {
#[inline]
#[doc(alias = "gtk_file_chooser_action_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_file_chooser_action_get_type()) }
}
}
impl glib::HasParamSpec for FileChooserAction {
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 FileChooserAction {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for FileChooserAction {
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 FileChooserAction {
#[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<FileChooserAction> for glib::Value {
#[inline]
fn from(v: FileChooserAction) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkFileChooserError")]
pub enum FileChooserError {
#[doc(alias = "GTK_FILE_CHOOSER_ERROR_NONEXISTENT")]
Nonexistent,
#[doc(alias = "GTK_FILE_CHOOSER_ERROR_BAD_FILENAME")]
BadFilename,
#[doc(alias = "GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS")]
AlreadyExists,
#[doc(alias = "GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME")]
IncompleteHostname,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for FileChooserError {
type GlibType = ffi::GtkFileChooserError;
#[inline]
fn into_glib(self) -> ffi::GtkFileChooserError {
match self {
Self::Nonexistent => ffi::GTK_FILE_CHOOSER_ERROR_NONEXISTENT,
Self::BadFilename => ffi::GTK_FILE_CHOOSER_ERROR_BAD_FILENAME,
Self::AlreadyExists => ffi::GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS,
Self::IncompleteHostname => ffi::GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkFileChooserError> for FileChooserError {
#[inline]
unsafe fn from_glib(value: ffi::GtkFileChooserError) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_FILE_CHOOSER_ERROR_NONEXISTENT => Self::Nonexistent,
ffi::GTK_FILE_CHOOSER_ERROR_BAD_FILENAME => Self::BadFilename,
ffi::GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS => Self::AlreadyExists,
ffi::GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME => Self::IncompleteHostname,
value => Self::__Unknown(value),
}
}
}
impl glib::error::ErrorDomain for FileChooserError {
#[inline]
fn domain() -> glib::Quark {
skip_assert_initialized!();
unsafe { from_glib(ffi::gtk_file_chooser_error_quark()) }
}
#[inline]
fn code(self) -> i32 {
self.into_glib()
}
#[inline]
#[allow(clippy::match_single_binding)]
fn from(code: i32) -> Option<Self> {
skip_assert_initialized!();
match unsafe { from_glib(code) } {
value => Some(value),
}
}
}
impl StaticType for FileChooserError {
#[inline]
#[doc(alias = "gtk_file_chooser_error_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_file_chooser_error_get_type()) }
}
}
impl glib::HasParamSpec for FileChooserError {
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 FileChooserError {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for FileChooserError {
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 FileChooserError {
#[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<FileChooserError> for glib::Value {
#[inline]
fn from(v: FileChooserError) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkFilterChange")]
pub enum FilterChange {
#[doc(alias = "GTK_FILTER_CHANGE_DIFFERENT")]
Different,
#[doc(alias = "GTK_FILTER_CHANGE_LESS_STRICT")]
LessStrict,
#[doc(alias = "GTK_FILTER_CHANGE_MORE_STRICT")]
MoreStrict,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for FilterChange {
type GlibType = ffi::GtkFilterChange;
#[inline]
fn into_glib(self) -> ffi::GtkFilterChange {
match self {
Self::Different => ffi::GTK_FILTER_CHANGE_DIFFERENT,
Self::LessStrict => ffi::GTK_FILTER_CHANGE_LESS_STRICT,
Self::MoreStrict => ffi::GTK_FILTER_CHANGE_MORE_STRICT,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkFilterChange> for FilterChange {
#[inline]
unsafe fn from_glib(value: ffi::GtkFilterChange) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_FILTER_CHANGE_DIFFERENT => Self::Different,
ffi::GTK_FILTER_CHANGE_LESS_STRICT => Self::LessStrict,
ffi::GTK_FILTER_CHANGE_MORE_STRICT => Self::MoreStrict,
value => Self::__Unknown(value),
}
}
}
impl StaticType for FilterChange {
#[inline]
#[doc(alias = "gtk_filter_change_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_filter_change_get_type()) }
}
}
impl glib::HasParamSpec for FilterChange {
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 FilterChange {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for FilterChange {
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 FilterChange {
#[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<FilterChange> for glib::Value {
#[inline]
fn from(v: FilterChange) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkFilterMatch")]
pub enum FilterMatch {
#[doc(alias = "GTK_FILTER_MATCH_SOME")]
Some,
#[doc(alias = "GTK_FILTER_MATCH_NONE")]
None,
#[doc(alias = "GTK_FILTER_MATCH_ALL")]
All,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for FilterMatch {
type GlibType = ffi::GtkFilterMatch;
#[inline]
fn into_glib(self) -> ffi::GtkFilterMatch {
match self {
Self::Some => ffi::GTK_FILTER_MATCH_SOME,
Self::None => ffi::GTK_FILTER_MATCH_NONE,
Self::All => ffi::GTK_FILTER_MATCH_ALL,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkFilterMatch> for FilterMatch {
#[inline]
unsafe fn from_glib(value: ffi::GtkFilterMatch) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_FILTER_MATCH_SOME => Self::Some,
ffi::GTK_FILTER_MATCH_NONE => Self::None,
ffi::GTK_FILTER_MATCH_ALL => Self::All,
value => Self::__Unknown(value),
}
}
}
impl StaticType for FilterMatch {
#[inline]
#[doc(alias = "gtk_filter_match_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_filter_match_get_type()) }
}
}
impl glib::HasParamSpec for FilterMatch {
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 FilterMatch {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for FilterMatch {
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 FilterMatch {
#[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<FilterMatch> for glib::Value {
#[inline]
fn from(v: FilterMatch) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkFontLevel")]
pub enum FontLevel {
#[doc(alias = "GTK_FONT_LEVEL_FAMILY")]
Family,
#[doc(alias = "GTK_FONT_LEVEL_FACE")]
Face,
#[doc(alias = "GTK_FONT_LEVEL_FONT")]
Font,
#[doc(alias = "GTK_FONT_LEVEL_FEATURES")]
Features,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[doc(hidden)]
impl IntoGlib for FontLevel {
type GlibType = ffi::GtkFontLevel;
#[inline]
fn into_glib(self) -> ffi::GtkFontLevel {
match self {
Self::Family => ffi::GTK_FONT_LEVEL_FAMILY,
Self::Face => ffi::GTK_FONT_LEVEL_FACE,
Self::Font => ffi::GTK_FONT_LEVEL_FONT,
Self::Features => ffi::GTK_FONT_LEVEL_FEATURES,
Self::__Unknown(value) => value,
}
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
#[doc(hidden)]
impl FromGlib<ffi::GtkFontLevel> for FontLevel {
#[inline]
unsafe fn from_glib(value: ffi::GtkFontLevel) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_FONT_LEVEL_FAMILY => Self::Family,
ffi::GTK_FONT_LEVEL_FACE => Self::Face,
ffi::GTK_FONT_LEVEL_FONT => Self::Font,
ffi::GTK_FONT_LEVEL_FEATURES => Self::Features,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl StaticType for FontLevel {
#[inline]
#[doc(alias = "gtk_font_level_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_font_level_get_type()) }
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl glib::HasParamSpec for FontLevel {
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 = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl glib::value::ValueType for FontLevel {
type Type = Self;
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
unsafe impl<'a> glib::value::FromValue<'a> for FontLevel {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(feature = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl ToValue for FontLevel {
#[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 = "v4_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
impl From<FontLevel> for glib::Value {
#[inline]
fn from(v: FontLevel) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkFontRendering")]
pub enum FontRendering {
#[doc(alias = "GTK_FONT_RENDERING_AUTOMATIC")]
Automatic,
#[doc(alias = "GTK_FONT_RENDERING_MANUAL")]
Manual,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[doc(hidden)]
impl IntoGlib for FontRendering {
type GlibType = ffi::GtkFontRendering;
#[inline]
fn into_glib(self) -> ffi::GtkFontRendering {
match self {
Self::Automatic => ffi::GTK_FONT_RENDERING_AUTOMATIC,
Self::Manual => ffi::GTK_FONT_RENDERING_MANUAL,
Self::__Unknown(value) => value,
}
}
}
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[doc(hidden)]
impl FromGlib<ffi::GtkFontRendering> for FontRendering {
#[inline]
unsafe fn from_glib(value: ffi::GtkFontRendering) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_FONT_RENDERING_AUTOMATIC => Self::Automatic,
ffi::GTK_FONT_RENDERING_MANUAL => Self::Manual,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
impl StaticType for FontRendering {
#[inline]
#[doc(alias = "gtk_font_rendering_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_font_rendering_get_type()) }
}
}
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
impl glib::HasParamSpec for FontRendering {
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 = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
impl glib::value::ValueType for FontRendering {
type Type = Self;
}
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
unsafe impl<'a> glib::value::FromValue<'a> for FontRendering {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
impl ToValue for FontRendering {
#[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 = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
impl From<FontRendering> for glib::Value {
#[inline]
fn from(v: FontRendering) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkGraphicsOffloadEnabled")]
pub enum GraphicsOffloadEnabled {
#[doc(alias = "GTK_GRAPHICS_OFFLOAD_ENABLED")]
Enabled,
#[doc(alias = "GTK_GRAPHICS_OFFLOAD_DISABLED")]
Disabled,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(hidden)]
impl IntoGlib for GraphicsOffloadEnabled {
type GlibType = ffi::GtkGraphicsOffloadEnabled;
#[inline]
fn into_glib(self) -> ffi::GtkGraphicsOffloadEnabled {
match self {
Self::Enabled => ffi::GTK_GRAPHICS_OFFLOAD_ENABLED,
Self::Disabled => ffi::GTK_GRAPHICS_OFFLOAD_DISABLED,
Self::__Unknown(value) => value,
}
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(hidden)]
impl FromGlib<ffi::GtkGraphicsOffloadEnabled> for GraphicsOffloadEnabled {
#[inline]
unsafe fn from_glib(value: ffi::GtkGraphicsOffloadEnabled) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_GRAPHICS_OFFLOAD_ENABLED => Self::Enabled,
ffi::GTK_GRAPHICS_OFFLOAD_DISABLED => Self::Disabled,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl StaticType for GraphicsOffloadEnabled {
#[inline]
#[doc(alias = "gtk_graphics_offload_enabled_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_graphics_offload_enabled_get_type()) }
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl glib::HasParamSpec for GraphicsOffloadEnabled {
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 = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl glib::value::ValueType for GraphicsOffloadEnabled {
type Type = Self;
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
unsafe impl<'a> glib::value::FromValue<'a> for GraphicsOffloadEnabled {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl ToValue for GraphicsOffloadEnabled {
#[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 = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
impl From<GraphicsOffloadEnabled> for glib::Value {
#[inline]
fn from(v: GraphicsOffloadEnabled) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkIconSize")]
pub enum IconSize {
#[doc(alias = "GTK_ICON_SIZE_INHERIT")]
Inherit,
#[doc(alias = "GTK_ICON_SIZE_NORMAL")]
Normal,
#[doc(alias = "GTK_ICON_SIZE_LARGE")]
Large,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for IconSize {
type GlibType = ffi::GtkIconSize;
#[inline]
fn into_glib(self) -> ffi::GtkIconSize {
match self {
Self::Inherit => ffi::GTK_ICON_SIZE_INHERIT,
Self::Normal => ffi::GTK_ICON_SIZE_NORMAL,
Self::Large => ffi::GTK_ICON_SIZE_LARGE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkIconSize> for IconSize {
#[inline]
unsafe fn from_glib(value: ffi::GtkIconSize) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ICON_SIZE_INHERIT => Self::Inherit,
ffi::GTK_ICON_SIZE_NORMAL => Self::Normal,
ffi::GTK_ICON_SIZE_LARGE => Self::Large,
value => Self::__Unknown(value),
}
}
}
impl StaticType for IconSize {
#[inline]
#[doc(alias = "gtk_icon_size_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_icon_size_get_type()) }
}
}
impl glib::HasParamSpec for IconSize {
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 IconSize {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for IconSize {
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 IconSize {
#[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<IconSize> for glib::Value {
#[inline]
fn from(v: IconSize) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkIconThemeError")]
pub enum IconThemeError {
#[doc(alias = "GTK_ICON_THEME_NOT_FOUND")]
NotFound,
#[doc(alias = "GTK_ICON_THEME_FAILED")]
Failed,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for IconThemeError {
type GlibType = ffi::GtkIconThemeError;
#[inline]
fn into_glib(self) -> ffi::GtkIconThemeError {
match self {
Self::NotFound => ffi::GTK_ICON_THEME_NOT_FOUND,
Self::Failed => ffi::GTK_ICON_THEME_FAILED,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkIconThemeError> for IconThemeError {
#[inline]
unsafe fn from_glib(value: ffi::GtkIconThemeError) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ICON_THEME_NOT_FOUND => Self::NotFound,
ffi::GTK_ICON_THEME_FAILED => Self::Failed,
value => Self::__Unknown(value),
}
}
}
impl glib::error::ErrorDomain for IconThemeError {
#[inline]
fn domain() -> glib::Quark {
skip_assert_initialized!();
unsafe { from_glib(ffi::gtk_icon_theme_error_quark()) }
}
#[inline]
fn code(self) -> i32 {
self.into_glib()
}
#[inline]
#[allow(clippy::match_single_binding)]
fn from(code: i32) -> Option<Self> {
skip_assert_initialized!();
match unsafe { from_glib(code) } {
Self::__Unknown(_) => Some(Self::Failed),
value => Some(value),
}
}
}
impl StaticType for IconThemeError {
#[inline]
#[doc(alias = "gtk_icon_theme_error_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_icon_theme_error_get_type()) }
}
}
impl glib::HasParamSpec for IconThemeError {
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 IconThemeError {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for IconThemeError {
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 IconThemeError {
#[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<IconThemeError> for glib::Value {
#[inline]
fn from(v: IconThemeError) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkIconViewDropPosition")]
pub enum IconViewDropPosition {
#[doc(alias = "GTK_ICON_VIEW_NO_DROP")]
NoDrop,
#[doc(alias = "GTK_ICON_VIEW_DROP_INTO")]
DropInto,
#[doc(alias = "GTK_ICON_VIEW_DROP_LEFT")]
DropLeft,
#[doc(alias = "GTK_ICON_VIEW_DROP_RIGHT")]
DropRight,
#[doc(alias = "GTK_ICON_VIEW_DROP_ABOVE")]
DropAbove,
#[doc(alias = "GTK_ICON_VIEW_DROP_BELOW")]
DropBelow,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for IconViewDropPosition {
type GlibType = ffi::GtkIconViewDropPosition;
#[inline]
fn into_glib(self) -> ffi::GtkIconViewDropPosition {
match self {
Self::NoDrop => ffi::GTK_ICON_VIEW_NO_DROP,
Self::DropInto => ffi::GTK_ICON_VIEW_DROP_INTO,
Self::DropLeft => ffi::GTK_ICON_VIEW_DROP_LEFT,
Self::DropRight => ffi::GTK_ICON_VIEW_DROP_RIGHT,
Self::DropAbove => ffi::GTK_ICON_VIEW_DROP_ABOVE,
Self::DropBelow => ffi::GTK_ICON_VIEW_DROP_BELOW,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkIconViewDropPosition> for IconViewDropPosition {
#[inline]
unsafe fn from_glib(value: ffi::GtkIconViewDropPosition) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_ICON_VIEW_NO_DROP => Self::NoDrop,
ffi::GTK_ICON_VIEW_DROP_INTO => Self::DropInto,
ffi::GTK_ICON_VIEW_DROP_LEFT => Self::DropLeft,
ffi::GTK_ICON_VIEW_DROP_RIGHT => Self::DropRight,
ffi::GTK_ICON_VIEW_DROP_ABOVE => Self::DropAbove,
ffi::GTK_ICON_VIEW_DROP_BELOW => Self::DropBelow,
value => Self::__Unknown(value),
}
}
}
impl StaticType for IconViewDropPosition {
#[inline]
#[doc(alias = "gtk_icon_view_drop_position_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_icon_view_drop_position_get_type()) }
}
}
impl glib::HasParamSpec for IconViewDropPosition {
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 IconViewDropPosition {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for IconViewDropPosition {
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 IconViewDropPosition {
#[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<IconViewDropPosition> for glib::Value {
#[inline]
fn from(v: IconViewDropPosition) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkImageType")]
pub enum ImageType {
#[doc(alias = "GTK_IMAGE_EMPTY")]
Empty,
#[doc(alias = "GTK_IMAGE_ICON_NAME")]
IconName,
#[doc(alias = "GTK_IMAGE_GICON")]
Gicon,
#[doc(alias = "GTK_IMAGE_PAINTABLE")]
Paintable,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for ImageType {
type GlibType = ffi::GtkImageType;
#[inline]
fn into_glib(self) -> ffi::GtkImageType {
match self {
Self::Empty => ffi::GTK_IMAGE_EMPTY,
Self::IconName => ffi::GTK_IMAGE_ICON_NAME,
Self::Gicon => ffi::GTK_IMAGE_GICON,
Self::Paintable => ffi::GTK_IMAGE_PAINTABLE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkImageType> for ImageType {
#[inline]
unsafe fn from_glib(value: ffi::GtkImageType) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_IMAGE_EMPTY => Self::Empty,
ffi::GTK_IMAGE_ICON_NAME => Self::IconName,
ffi::GTK_IMAGE_GICON => Self::Gicon,
ffi::GTK_IMAGE_PAINTABLE => Self::Paintable,
value => Self::__Unknown(value),
}
}
}
impl StaticType for ImageType {
#[inline]
#[doc(alias = "gtk_image_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_image_type_get_type()) }
}
}
impl glib::HasParamSpec for ImageType {
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 ImageType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for ImageType {
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 ImageType {
#[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<ImageType> for glib::Value {
#[inline]
fn from(v: ImageType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkInputPurpose")]
pub enum InputPurpose {
#[doc(alias = "GTK_INPUT_PURPOSE_FREE_FORM")]
FreeForm,
#[doc(alias = "GTK_INPUT_PURPOSE_ALPHA")]
Alpha,
#[doc(alias = "GTK_INPUT_PURPOSE_DIGITS")]
Digits,
#[doc(alias = "GTK_INPUT_PURPOSE_NUMBER")]
Number,
#[doc(alias = "GTK_INPUT_PURPOSE_PHONE")]
Phone,
#[doc(alias = "GTK_INPUT_PURPOSE_URL")]
Url,
#[doc(alias = "GTK_INPUT_PURPOSE_EMAIL")]
Email,
#[doc(alias = "GTK_INPUT_PURPOSE_NAME")]
Name,
#[doc(alias = "GTK_INPUT_PURPOSE_PASSWORD")]
Password,
#[doc(alias = "GTK_INPUT_PURPOSE_PIN")]
Pin,
#[doc(alias = "GTK_INPUT_PURPOSE_TERMINAL")]
Terminal,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for InputPurpose {
type GlibType = ffi::GtkInputPurpose;
#[inline]
fn into_glib(self) -> ffi::GtkInputPurpose {
match self {
Self::FreeForm => ffi::GTK_INPUT_PURPOSE_FREE_FORM,
Self::Alpha => ffi::GTK_INPUT_PURPOSE_ALPHA,
Self::Digits => ffi::GTK_INPUT_PURPOSE_DIGITS,
Self::Number => ffi::GTK_INPUT_PURPOSE_NUMBER,
Self::Phone => ffi::GTK_INPUT_PURPOSE_PHONE,
Self::Url => ffi::GTK_INPUT_PURPOSE_URL,
Self::Email => ffi::GTK_INPUT_PURPOSE_EMAIL,
Self::Name => ffi::GTK_INPUT_PURPOSE_NAME,
Self::Password => ffi::GTK_INPUT_PURPOSE_PASSWORD,
Self::Pin => ffi::GTK_INPUT_PURPOSE_PIN,
Self::Terminal => ffi::GTK_INPUT_PURPOSE_TERMINAL,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkInputPurpose> for InputPurpose {
#[inline]
unsafe fn from_glib(value: ffi::GtkInputPurpose) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_INPUT_PURPOSE_FREE_FORM => Self::FreeForm,
ffi::GTK_INPUT_PURPOSE_ALPHA => Self::Alpha,
ffi::GTK_INPUT_PURPOSE_DIGITS => Self::Digits,
ffi::GTK_INPUT_PURPOSE_NUMBER => Self::Number,
ffi::GTK_INPUT_PURPOSE_PHONE => Self::Phone,
ffi::GTK_INPUT_PURPOSE_URL => Self::Url,
ffi::GTK_INPUT_PURPOSE_EMAIL => Self::Email,
ffi::GTK_INPUT_PURPOSE_NAME => Self::Name,
ffi::GTK_INPUT_PURPOSE_PASSWORD => Self::Password,
ffi::GTK_INPUT_PURPOSE_PIN => Self::Pin,
ffi::GTK_INPUT_PURPOSE_TERMINAL => Self::Terminal,
value => Self::__Unknown(value),
}
}
}
impl StaticType for InputPurpose {
#[inline]
#[doc(alias = "gtk_input_purpose_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_input_purpose_get_type()) }
}
}
impl glib::HasParamSpec for InputPurpose {
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 InputPurpose {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for InputPurpose {
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 InputPurpose {
#[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<InputPurpose> for glib::Value {
#[inline]
fn from(v: InputPurpose) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkInscriptionOverflow")]
pub enum InscriptionOverflow {
#[doc(alias = "GTK_INSCRIPTION_OVERFLOW_CLIP")]
Clip,
#[doc(alias = "GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START")]
EllipsizeStart,
#[doc(alias = "GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE")]
EllipsizeMiddle,
#[doc(alias = "GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END")]
EllipsizeEnd,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
#[doc(hidden)]
impl IntoGlib for InscriptionOverflow {
type GlibType = ffi::GtkInscriptionOverflow;
#[inline]
fn into_glib(self) -> ffi::GtkInscriptionOverflow {
match self {
Self::Clip => ffi::GTK_INSCRIPTION_OVERFLOW_CLIP,
Self::EllipsizeStart => ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START,
Self::EllipsizeMiddle => ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE,
Self::EllipsizeEnd => ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END,
Self::__Unknown(value) => value,
}
}
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
#[doc(hidden)]
impl FromGlib<ffi::GtkInscriptionOverflow> for InscriptionOverflow {
#[inline]
unsafe fn from_glib(value: ffi::GtkInscriptionOverflow) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_INSCRIPTION_OVERFLOW_CLIP => Self::Clip,
ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START => Self::EllipsizeStart,
ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE => Self::EllipsizeMiddle,
ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END => Self::EllipsizeEnd,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
impl StaticType for InscriptionOverflow {
#[inline]
#[doc(alias = "gtk_inscription_overflow_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_inscription_overflow_get_type()) }
}
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
impl glib::HasParamSpec for InscriptionOverflow {
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 = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
impl glib::value::ValueType for InscriptionOverflow {
type Type = Self;
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
unsafe impl<'a> glib::value::FromValue<'a> for InscriptionOverflow {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
impl ToValue for InscriptionOverflow {
#[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 = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
impl From<InscriptionOverflow> for glib::Value {
#[inline]
fn from(v: InscriptionOverflow) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkJustification")]
pub enum Justification {
#[doc(alias = "GTK_JUSTIFY_LEFT")]
Left,
#[doc(alias = "GTK_JUSTIFY_RIGHT")]
Right,
#[doc(alias = "GTK_JUSTIFY_CENTER")]
Center,
#[doc(alias = "GTK_JUSTIFY_FILL")]
Fill,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for Justification {
type GlibType = ffi::GtkJustification;
#[inline]
fn into_glib(self) -> ffi::GtkJustification {
match self {
Self::Left => ffi::GTK_JUSTIFY_LEFT,
Self::Right => ffi::GTK_JUSTIFY_RIGHT,
Self::Center => ffi::GTK_JUSTIFY_CENTER,
Self::Fill => ffi::GTK_JUSTIFY_FILL,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GtkJustification> for Justification {
#[inline]
unsafe fn from_glib(value: ffi::GtkJustification) -> Self {
skip_assert_initialized!();
match value {
ffi::GTK_JUSTIFY_LEFT => Self::Left,
ffi::GTK_JUSTIFY_RIGHT => Self::Right,
ffi::GTK_JUSTIFY_CENTER => Self::Center,
ffi::GTK_JUSTIFY_FILL => Self::Fill,
value => Self::__Unknown(value),
}
}
}
impl StaticType for Justification {
#[inline]
#[doc(alias = "gtk_justification_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gtk_justification_get_type()) }
}
}
impl glib::HasParamSpec for Justification {
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 Justification {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for Justification {
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 Justification {
#[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.