gtk4/auto/
enums.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::ffi;
6use glib::{prelude::*, translate::*};
7
8/// The priority of an accessibility announcement.
9#[cfg(feature = "v4_14")]
10#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
11#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
12#[non_exhaustive]
13#[doc(alias = "GtkAccessibleAnnouncementPriority")]
14pub enum AccessibleAnnouncementPriority {
15    /// The announcement is low priority,
16    ///   and might be read only on the user's request.
17    #[doc(alias = "GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_LOW")]
18    Low,
19    /// The announcement is of medium
20    ///   priority, and is usually spoken at the next opportunity, such as at the
21    ///   end of speaking the current sentence or when the user pauses typing.
22    #[doc(alias = "GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_MEDIUM")]
23    Medium,
24    /// The announcement is of high
25    ///   priority, and is usually spoken immediately. Because an interruption
26    ///   might disorient users or cause them to not complete their current task,
27    ///   authors SHOULD NOT use high priority announcements unless the
28    ///   interruption is imperative. An example would be a notification about a
29    ///   critical battery power level.
30    #[doc(alias = "GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_HIGH")]
31    High,
32    #[doc(hidden)]
33    __Unknown(i32),
34}
35
36#[cfg(feature = "v4_14")]
37#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
38#[doc(hidden)]
39impl IntoGlib for AccessibleAnnouncementPriority {
40    type GlibType = ffi::GtkAccessibleAnnouncementPriority;
41
42    #[inline]
43    fn into_glib(self) -> ffi::GtkAccessibleAnnouncementPriority {
44        match self {
45            Self::Low => ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_LOW,
46            Self::Medium => ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_MEDIUM,
47            Self::High => ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_HIGH,
48            Self::__Unknown(value) => value,
49        }
50    }
51}
52
53#[cfg(feature = "v4_14")]
54#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
55#[doc(hidden)]
56impl FromGlib<ffi::GtkAccessibleAnnouncementPriority> for AccessibleAnnouncementPriority {
57    #[inline]
58    unsafe fn from_glib(value: ffi::GtkAccessibleAnnouncementPriority) -> Self {
59        skip_assert_initialized!();
60
61        match value {
62            ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_LOW => Self::Low,
63            ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_MEDIUM => Self::Medium,
64            ffi::GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_HIGH => Self::High,
65            value => Self::__Unknown(value),
66        }
67    }
68}
69
70#[cfg(feature = "v4_14")]
71#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
72impl StaticType for AccessibleAnnouncementPriority {
73    #[inline]
74    #[doc(alias = "gtk_accessible_announcement_priority_get_type")]
75    fn static_type() -> glib::Type {
76        unsafe { from_glib(ffi::gtk_accessible_announcement_priority_get_type()) }
77    }
78}
79
80#[cfg(feature = "v4_14")]
81#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
82impl glib::HasParamSpec for AccessibleAnnouncementPriority {
83    type ParamSpec = glib::ParamSpecEnum;
84    type SetValue = Self;
85    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
86
87    fn param_spec_builder() -> Self::BuilderFn {
88        Self::ParamSpec::builder_with_default
89    }
90}
91
92#[cfg(feature = "v4_14")]
93#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
94impl glib::value::ValueType for AccessibleAnnouncementPriority {
95    type Type = Self;
96}
97
98#[cfg(feature = "v4_14")]
99#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
100unsafe impl<'a> glib::value::FromValue<'a> for AccessibleAnnouncementPriority {
101    type Checker = glib::value::GenericValueTypeChecker<Self>;
102
103    #[inline]
104    unsafe fn from_value(value: &'a glib::Value) -> Self {
105        skip_assert_initialized!();
106        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
107    }
108}
109
110#[cfg(feature = "v4_14")]
111#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
112impl ToValue for AccessibleAnnouncementPriority {
113    #[inline]
114    fn to_value(&self) -> glib::Value {
115        let mut value = glib::Value::for_value_type::<Self>();
116        unsafe {
117            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
118        }
119        value
120    }
121
122    #[inline]
123    fn value_type(&self) -> glib::Type {
124        Self::static_type()
125    }
126}
127
128#[cfg(feature = "v4_14")]
129#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
130impl From<AccessibleAnnouncementPriority> for glib::Value {
131    #[inline]
132    fn from(v: AccessibleAnnouncementPriority) -> Self {
133        skip_assert_initialized!();
134        ToValue::to_value(&v)
135    }
136}
137
138/// The possible values for the [`AccessibleProperty::Autocomplete`][crate::AccessibleProperty::Autocomplete]
139/// accessible property.
140#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
141#[non_exhaustive]
142#[doc(alias = "GtkAccessibleAutocomplete")]
143pub enum AccessibleAutocomplete {
144    /// Automatic suggestions are not displayed.
145    #[doc(alias = "GTK_ACCESSIBLE_AUTOCOMPLETE_NONE")]
146    None,
147    /// When a user is providing input, text
148    ///    suggesting one way to complete the provided input may be dynamically
149    ///    inserted after the caret.
150    #[doc(alias = "GTK_ACCESSIBLE_AUTOCOMPLETE_INLINE")]
151    Inline,
152    /// When a user is providing input, an element
153    ///    containing a collection of values that could complete the provided input
154    ///    may be displayed.
155    #[doc(alias = "GTK_ACCESSIBLE_AUTOCOMPLETE_LIST")]
156    List,
157    /// When a user is providing input, an element
158    ///    containing a collection of values that could complete the provided input
159    ///    may be displayed. If displayed, one value in the collection is automatically
160    ///    selected, and the text needed to complete the automatically selected value
161    ///    appears after the caret in the input.
162    #[doc(alias = "GTK_ACCESSIBLE_AUTOCOMPLETE_BOTH")]
163    Both,
164    #[doc(hidden)]
165    __Unknown(i32),
166}
167
168#[doc(hidden)]
169impl IntoGlib for AccessibleAutocomplete {
170    type GlibType = ffi::GtkAccessibleAutocomplete;
171
172    #[inline]
173    fn into_glib(self) -> ffi::GtkAccessibleAutocomplete {
174        match self {
175            Self::None => ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_NONE,
176            Self::Inline => ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_INLINE,
177            Self::List => ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_LIST,
178            Self::Both => ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_BOTH,
179            Self::__Unknown(value) => value,
180        }
181    }
182}
183
184#[doc(hidden)]
185impl FromGlib<ffi::GtkAccessibleAutocomplete> for AccessibleAutocomplete {
186    #[inline]
187    unsafe fn from_glib(value: ffi::GtkAccessibleAutocomplete) -> Self {
188        skip_assert_initialized!();
189
190        match value {
191            ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_NONE => Self::None,
192            ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_INLINE => Self::Inline,
193            ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_LIST => Self::List,
194            ffi::GTK_ACCESSIBLE_AUTOCOMPLETE_BOTH => Self::Both,
195            value => Self::__Unknown(value),
196        }
197    }
198}
199
200impl StaticType for AccessibleAutocomplete {
201    #[inline]
202    #[doc(alias = "gtk_accessible_autocomplete_get_type")]
203    fn static_type() -> glib::Type {
204        unsafe { from_glib(ffi::gtk_accessible_autocomplete_get_type()) }
205    }
206}
207
208impl glib::HasParamSpec for AccessibleAutocomplete {
209    type ParamSpec = glib::ParamSpecEnum;
210    type SetValue = Self;
211    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
212
213    fn param_spec_builder() -> Self::BuilderFn {
214        Self::ParamSpec::builder_with_default
215    }
216}
217
218impl glib::value::ValueType for AccessibleAutocomplete {
219    type Type = Self;
220}
221
222unsafe impl<'a> glib::value::FromValue<'a> for AccessibleAutocomplete {
223    type Checker = glib::value::GenericValueTypeChecker<Self>;
224
225    #[inline]
226    unsafe fn from_value(value: &'a glib::Value) -> Self {
227        skip_assert_initialized!();
228        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
229    }
230}
231
232impl ToValue for AccessibleAutocomplete {
233    #[inline]
234    fn to_value(&self) -> glib::Value {
235        let mut value = glib::Value::for_value_type::<Self>();
236        unsafe {
237            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
238        }
239        value
240    }
241
242    #[inline]
243    fn value_type(&self) -> glib::Type {
244        Self::static_type()
245    }
246}
247
248impl From<AccessibleAutocomplete> for glib::Value {
249    #[inline]
250    fn from(v: AccessibleAutocomplete) -> Self {
251        skip_assert_initialized!();
252        ToValue::to_value(&v)
253    }
254}
255
256/// The possible values for the [`AccessibleState::Invalid`][crate::AccessibleState::Invalid]
257/// accessible state.
258///
259/// Note that the [`False`][Self::False] and
260/// [`True`][Self::True] have the same values
261/// as [`false`] and [`true`].
262#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
263#[non_exhaustive]
264#[doc(alias = "GtkAccessibleInvalidState")]
265pub enum AccessibleInvalidState {
266    /// There are no detected errors in the value
267    #[doc(alias = "GTK_ACCESSIBLE_INVALID_FALSE")]
268    False,
269    /// The value entered by the user has failed validation
270    #[doc(alias = "GTK_ACCESSIBLE_INVALID_TRUE")]
271    True,
272    /// A grammatical error was detected
273    #[doc(alias = "GTK_ACCESSIBLE_INVALID_GRAMMAR")]
274    Grammar,
275    /// A spelling error was detected
276    #[doc(alias = "GTK_ACCESSIBLE_INVALID_SPELLING")]
277    Spelling,
278    #[doc(hidden)]
279    __Unknown(i32),
280}
281
282#[doc(hidden)]
283impl IntoGlib for AccessibleInvalidState {
284    type GlibType = ffi::GtkAccessibleInvalidState;
285
286    #[inline]
287    fn into_glib(self) -> ffi::GtkAccessibleInvalidState {
288        match self {
289            Self::False => ffi::GTK_ACCESSIBLE_INVALID_FALSE,
290            Self::True => ffi::GTK_ACCESSIBLE_INVALID_TRUE,
291            Self::Grammar => ffi::GTK_ACCESSIBLE_INVALID_GRAMMAR,
292            Self::Spelling => ffi::GTK_ACCESSIBLE_INVALID_SPELLING,
293            Self::__Unknown(value) => value,
294        }
295    }
296}
297
298#[doc(hidden)]
299impl FromGlib<ffi::GtkAccessibleInvalidState> for AccessibleInvalidState {
300    #[inline]
301    unsafe fn from_glib(value: ffi::GtkAccessibleInvalidState) -> Self {
302        skip_assert_initialized!();
303
304        match value {
305            ffi::GTK_ACCESSIBLE_INVALID_FALSE => Self::False,
306            ffi::GTK_ACCESSIBLE_INVALID_TRUE => Self::True,
307            ffi::GTK_ACCESSIBLE_INVALID_GRAMMAR => Self::Grammar,
308            ffi::GTK_ACCESSIBLE_INVALID_SPELLING => Self::Spelling,
309            value => Self::__Unknown(value),
310        }
311    }
312}
313
314impl StaticType for AccessibleInvalidState {
315    #[inline]
316    #[doc(alias = "gtk_accessible_invalid_state_get_type")]
317    fn static_type() -> glib::Type {
318        unsafe { from_glib(ffi::gtk_accessible_invalid_state_get_type()) }
319    }
320}
321
322impl glib::HasParamSpec for AccessibleInvalidState {
323    type ParamSpec = glib::ParamSpecEnum;
324    type SetValue = Self;
325    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
326
327    fn param_spec_builder() -> Self::BuilderFn {
328        Self::ParamSpec::builder_with_default
329    }
330}
331
332impl glib::value::ValueType for AccessibleInvalidState {
333    type Type = Self;
334}
335
336unsafe impl<'a> glib::value::FromValue<'a> for AccessibleInvalidState {
337    type Checker = glib::value::GenericValueTypeChecker<Self>;
338
339    #[inline]
340    unsafe fn from_value(value: &'a glib::Value) -> Self {
341        skip_assert_initialized!();
342        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
343    }
344}
345
346impl ToValue for AccessibleInvalidState {
347    #[inline]
348    fn to_value(&self) -> glib::Value {
349        let mut value = glib::Value::for_value_type::<Self>();
350        unsafe {
351            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
352        }
353        value
354    }
355
356    #[inline]
357    fn value_type(&self) -> glib::Type {
358        Self::static_type()
359    }
360}
361
362impl From<AccessibleInvalidState> for glib::Value {
363    #[inline]
364    fn from(v: AccessibleInvalidState) -> Self {
365        skip_assert_initialized!();
366        ToValue::to_value(&v)
367    }
368}
369
370/// The various platform states which can be queried
371/// using [`AccessibleExt::platform_state()`][crate::prelude::AccessibleExt::platform_state()].
372#[cfg(feature = "v4_10")]
373#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
374#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
375#[non_exhaustive]
376#[doc(alias = "GtkAccessiblePlatformState")]
377pub enum AccessiblePlatformState {
378    /// whether the accessible can be focused
379    #[doc(alias = "GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE")]
380    Focusable,
381    /// whether the accessible has focus
382    #[doc(alias = "GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED")]
383    Focused,
384    /// whether the accessible is active
385    #[doc(alias = "GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE")]
386    Active,
387    #[doc(hidden)]
388    __Unknown(i32),
389}
390
391#[cfg(feature = "v4_10")]
392#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
393#[doc(hidden)]
394impl IntoGlib for AccessiblePlatformState {
395    type GlibType = ffi::GtkAccessiblePlatformState;
396
397    #[inline]
398    fn into_glib(self) -> ffi::GtkAccessiblePlatformState {
399        match self {
400            Self::Focusable => ffi::GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE,
401            Self::Focused => ffi::GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED,
402            Self::Active => ffi::GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE,
403            Self::__Unknown(value) => value,
404        }
405    }
406}
407
408#[cfg(feature = "v4_10")]
409#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
410#[doc(hidden)]
411impl FromGlib<ffi::GtkAccessiblePlatformState> for AccessiblePlatformState {
412    #[inline]
413    unsafe fn from_glib(value: ffi::GtkAccessiblePlatformState) -> Self {
414        skip_assert_initialized!();
415
416        match value {
417            ffi::GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE => Self::Focusable,
418            ffi::GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED => Self::Focused,
419            ffi::GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE => Self::Active,
420            value => Self::__Unknown(value),
421        }
422    }
423}
424
425#[cfg(feature = "v4_10")]
426#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
427impl StaticType for AccessiblePlatformState {
428    #[inline]
429    #[doc(alias = "gtk_accessible_platform_state_get_type")]
430    fn static_type() -> glib::Type {
431        unsafe { from_glib(ffi::gtk_accessible_platform_state_get_type()) }
432    }
433}
434
435#[cfg(feature = "v4_10")]
436#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
437impl glib::HasParamSpec for AccessiblePlatformState {
438    type ParamSpec = glib::ParamSpecEnum;
439    type SetValue = Self;
440    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
441
442    fn param_spec_builder() -> Self::BuilderFn {
443        Self::ParamSpec::builder_with_default
444    }
445}
446
447#[cfg(feature = "v4_10")]
448#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
449impl glib::value::ValueType for AccessiblePlatformState {
450    type Type = Self;
451}
452
453#[cfg(feature = "v4_10")]
454#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
455unsafe impl<'a> glib::value::FromValue<'a> for AccessiblePlatformState {
456    type Checker = glib::value::GenericValueTypeChecker<Self>;
457
458    #[inline]
459    unsafe fn from_value(value: &'a glib::Value) -> Self {
460        skip_assert_initialized!();
461        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
462    }
463}
464
465#[cfg(feature = "v4_10")]
466#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
467impl ToValue for AccessiblePlatformState {
468    #[inline]
469    fn to_value(&self) -> glib::Value {
470        let mut value = glib::Value::for_value_type::<Self>();
471        unsafe {
472            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
473        }
474        value
475    }
476
477    #[inline]
478    fn value_type(&self) -> glib::Type {
479        Self::static_type()
480    }
481}
482
483#[cfg(feature = "v4_10")]
484#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
485impl From<AccessiblePlatformState> for glib::Value {
486    #[inline]
487    fn from(v: AccessiblePlatformState) -> Self {
488        skip_assert_initialized!();
489        ToValue::to_value(&v)
490    }
491}
492
493/// The possible accessible properties of a [`Accessible`][crate::Accessible].
494#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
495#[non_exhaustive]
496#[doc(alias = "GtkAccessibleProperty")]
497pub enum AccessibleProperty {
498    /// Indicates whether inputting text
499    ///    could trigger display of one or more predictions of the user's intended
500    ///    value for a combobox, searchbox, or textbox and specifies how predictions
501    ///    would be presented if they were made. Value type: [`AccessibleAutocomplete`][crate::AccessibleAutocomplete]
502    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE")]
503    Autocomplete,
504    /// Defines a string value that describes
505    ///    or annotates the current element. Value type: string
506    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_DESCRIPTION")]
507    Description,
508    /// Indicates the availability and type of
509    ///    interactive popup element, such as menu or dialog, that can be triggered
510    ///    by an element.
511    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_HAS_POPUP")]
512    HasPopup,
513    /// Indicates keyboard shortcuts that an
514    ///    author has implemented to activate or give focus to an element. Value type:
515    ///    string. The format of the value is a space-separated list of shortcuts, with
516    ///    each shortcut consisting of one or more modifiers (`Control`, `Alt` or `Shift`),
517    ///    followed by a non-modifier key, all separated by `+`.
518    ///    Examples: `F2`, `Alt-F`, `Control+Shift+N`
519    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS")]
520    KeyShortcuts,
521    /// Defines a string value that labels the current
522    ///    element. Value type: string
523    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_LABEL")]
524    Label,
525    /// Defines the hierarchical level of an element
526    ///    within a structure. Value type: integer
527    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_LEVEL")]
528    Level,
529    /// Indicates whether an element is modal when
530    ///    displayed. Value type: boolean
531    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_MODAL")]
532    Modal,
533    /// Indicates whether a text box accepts
534    ///    multiple lines of input or only a single line. Value type: boolean
535    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_MULTI_LINE")]
536    MultiLine,
537    /// Indicates that the user may select
538    ///    more than one item from the current selectable descendants. Value type:
539    ///    boolean
540    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE")]
541    MultiSelectable,
542    /// Indicates whether the element's
543    ///    orientation is horizontal, vertical, or unknown/ambiguous. Value type:
544    ///    [`Orientation`][crate::Orientation]
545    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_ORIENTATION")]
546    Orientation,
547    /// Defines a short hint (a word or short
548    ///    phrase) intended to aid the user with data entry when the control has no
549    ///    value. A hint could be a sample value or a brief description of the expected
550    ///    format. Value type: string
551    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER")]
552    Placeholder,
553    /// Indicates that the element is not editable,
554    ///    but is otherwise operable. Value type: boolean
555    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_READ_ONLY")]
556    ReadOnly,
557    /// Indicates that user input is required on
558    ///    the element before a form may be submitted. Value type: boolean
559    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_REQUIRED")]
560    Required,
561    /// Defines a human-readable,
562    ///    author-localized description for the role of an element. Value type: string
563    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_ROLE_DESCRIPTION")]
564    RoleDescription,
565    /// Indicates if items in a table or grid are
566    ///    sorted in ascending or descending order. Value type: [`AccessibleSort`][crate::AccessibleSort]
567    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_SORT")]
568    Sort,
569    /// Defines the maximum allowed value for a
570    ///    range widget. Value type: double
571    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_VALUE_MAX")]
572    ValueMax,
573    /// Defines the minimum allowed value for a
574    ///    range widget. Value type: double
575    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_VALUE_MIN")]
576    ValueMin,
577    /// Defines the current value for a range widget.
578    ///    Value type: double
579    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_VALUE_NOW")]
580    ValueNow,
581    /// Defines the human readable text alternative
582    ///    of aria-valuenow for a range widget. Value type: string
583    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT")]
584    ValueText,
585    /// Defines a string value that provides a description of non-standard keyboard
586    /// interactions of the current element. Value type: string
587    #[cfg(feature = "v4_16")]
588    #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
589    #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_HELP_TEXT")]
590    HelpText,
591    #[doc(hidden)]
592    __Unknown(i32),
593}
594
595impl AccessibleProperty {
596    #[doc(alias = "gtk_accessible_property_init_value")]
597    pub fn init_value(self, value: &mut glib::Value) {
598        assert_initialized_main_thread!();
599        unsafe {
600            ffi::gtk_accessible_property_init_value(self.into_glib(), value.to_glib_none_mut().0);
601        }
602    }
603}
604
605#[doc(hidden)]
606impl IntoGlib for AccessibleProperty {
607    type GlibType = ffi::GtkAccessibleProperty;
608
609    fn into_glib(self) -> ffi::GtkAccessibleProperty {
610        match self {
611            Self::Autocomplete => ffi::GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE,
612            Self::Description => ffi::GTK_ACCESSIBLE_PROPERTY_DESCRIPTION,
613            Self::HasPopup => ffi::GTK_ACCESSIBLE_PROPERTY_HAS_POPUP,
614            Self::KeyShortcuts => ffi::GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS,
615            Self::Label => ffi::GTK_ACCESSIBLE_PROPERTY_LABEL,
616            Self::Level => ffi::GTK_ACCESSIBLE_PROPERTY_LEVEL,
617            Self::Modal => ffi::GTK_ACCESSIBLE_PROPERTY_MODAL,
618            Self::MultiLine => ffi::GTK_ACCESSIBLE_PROPERTY_MULTI_LINE,
619            Self::MultiSelectable => ffi::GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE,
620            Self::Orientation => ffi::GTK_ACCESSIBLE_PROPERTY_ORIENTATION,
621            Self::Placeholder => ffi::GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER,
622            Self::ReadOnly => ffi::GTK_ACCESSIBLE_PROPERTY_READ_ONLY,
623            Self::Required => ffi::GTK_ACCESSIBLE_PROPERTY_REQUIRED,
624            Self::RoleDescription => ffi::GTK_ACCESSIBLE_PROPERTY_ROLE_DESCRIPTION,
625            Self::Sort => ffi::GTK_ACCESSIBLE_PROPERTY_SORT,
626            Self::ValueMax => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MAX,
627            Self::ValueMin => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MIN,
628            Self::ValueNow => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_NOW,
629            Self::ValueText => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT,
630            #[cfg(feature = "v4_16")]
631            Self::HelpText => ffi::GTK_ACCESSIBLE_PROPERTY_HELP_TEXT,
632            Self::__Unknown(value) => value,
633        }
634    }
635}
636
637#[doc(hidden)]
638impl FromGlib<ffi::GtkAccessibleProperty> for AccessibleProperty {
639    unsafe fn from_glib(value: ffi::GtkAccessibleProperty) -> Self {
640        skip_assert_initialized!();
641
642        match value {
643            ffi::GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE => Self::Autocomplete,
644            ffi::GTK_ACCESSIBLE_PROPERTY_DESCRIPTION => Self::Description,
645            ffi::GTK_ACCESSIBLE_PROPERTY_HAS_POPUP => Self::HasPopup,
646            ffi::GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS => Self::KeyShortcuts,
647            ffi::GTK_ACCESSIBLE_PROPERTY_LABEL => Self::Label,
648            ffi::GTK_ACCESSIBLE_PROPERTY_LEVEL => Self::Level,
649            ffi::GTK_ACCESSIBLE_PROPERTY_MODAL => Self::Modal,
650            ffi::GTK_ACCESSIBLE_PROPERTY_MULTI_LINE => Self::MultiLine,
651            ffi::GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE => Self::MultiSelectable,
652            ffi::GTK_ACCESSIBLE_PROPERTY_ORIENTATION => Self::Orientation,
653            ffi::GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER => Self::Placeholder,
654            ffi::GTK_ACCESSIBLE_PROPERTY_READ_ONLY => Self::ReadOnly,
655            ffi::GTK_ACCESSIBLE_PROPERTY_REQUIRED => Self::Required,
656            ffi::GTK_ACCESSIBLE_PROPERTY_ROLE_DESCRIPTION => Self::RoleDescription,
657            ffi::GTK_ACCESSIBLE_PROPERTY_SORT => Self::Sort,
658            ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MAX => Self::ValueMax,
659            ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MIN => Self::ValueMin,
660            ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_NOW => Self::ValueNow,
661            ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT => Self::ValueText,
662            #[cfg(feature = "v4_16")]
663            ffi::GTK_ACCESSIBLE_PROPERTY_HELP_TEXT => Self::HelpText,
664            value => Self::__Unknown(value),
665        }
666    }
667}
668
669impl StaticType for AccessibleProperty {
670    #[inline]
671    #[doc(alias = "gtk_accessible_property_get_type")]
672    fn static_type() -> glib::Type {
673        unsafe { from_glib(ffi::gtk_accessible_property_get_type()) }
674    }
675}
676
677impl glib::HasParamSpec for AccessibleProperty {
678    type ParamSpec = glib::ParamSpecEnum;
679    type SetValue = Self;
680    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
681
682    fn param_spec_builder() -> Self::BuilderFn {
683        Self::ParamSpec::builder_with_default
684    }
685}
686
687impl glib::value::ValueType for AccessibleProperty {
688    type Type = Self;
689}
690
691unsafe impl<'a> glib::value::FromValue<'a> for AccessibleProperty {
692    type Checker = glib::value::GenericValueTypeChecker<Self>;
693
694    #[inline]
695    unsafe fn from_value(value: &'a glib::Value) -> Self {
696        skip_assert_initialized!();
697        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
698    }
699}
700
701impl ToValue for AccessibleProperty {
702    #[inline]
703    fn to_value(&self) -> glib::Value {
704        let mut value = glib::Value::for_value_type::<Self>();
705        unsafe {
706            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
707        }
708        value
709    }
710
711    #[inline]
712    fn value_type(&self) -> glib::Type {
713        Self::static_type()
714    }
715}
716
717impl From<AccessibleProperty> for glib::Value {
718    #[inline]
719    fn from(v: AccessibleProperty) -> Self {
720        skip_assert_initialized!();
721        ToValue::to_value(&v)
722    }
723}
724
725/// The possible accessible relations of a [`Accessible`][crate::Accessible].
726///
727/// Accessible relations can be references to other widgets,
728/// integers or strings.
729#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
730#[non_exhaustive]
731#[doc(alias = "GtkAccessibleRelation")]
732pub enum AccessibleRelation {
733    /// Identifies the currently active
734    ///    element when focus is on a composite widget, combobox, textbox, group,
735    ///    or application. Value type: reference
736    #[doc(alias = "GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT")]
737    ActiveDescendant,
738    /// Defines the total number of columns
739    ///    in a table, grid, or treegrid. Value type: integer
740    #[doc(alias = "GTK_ACCESSIBLE_RELATION_COL_COUNT")]
741    ColCount,
742    /// Defines an element's column index or
743    ///    position with respect to the total number of columns within a table,
744    ///    grid, or treegrid. Value type: integer
745    #[doc(alias = "GTK_ACCESSIBLE_RELATION_COL_INDEX")]
746    ColIndex,
747    /// Defines a human readable text
748    ///   alternative of [`ColIndex`][Self::ColIndex]. Value type: string
749    #[doc(alias = "GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT")]
750    ColIndexText,
751    /// Defines the number of columns spanned
752    ///   by a cell or gridcell within a table, grid, or treegrid. Value type: integer
753    #[doc(alias = "GTK_ACCESSIBLE_RELATION_COL_SPAN")]
754    ColSpan,
755    /// Identifies the element (or elements) whose
756    ///    contents or presence are controlled by the current element. Value type: reference
757    #[doc(alias = "GTK_ACCESSIBLE_RELATION_CONTROLS")]
758    Controls,
759    /// Identifies the element (or elements)
760    ///    that describes the object. Value type: reference
761    #[doc(alias = "GTK_ACCESSIBLE_RELATION_DESCRIBED_BY")]
762    DescribedBy,
763    /// Identifies the element (or elements) that
764    ///    provide additional information related to the object. Value type: reference
765    #[doc(alias = "GTK_ACCESSIBLE_RELATION_DETAILS")]
766    Details,
767    /// Identifies the element (or elements) that
768    ///    provide an error message for an object. Value type: reference
769    #[doc(alias = "GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE")]
770    ErrorMessage,
771    /// Identifies the next element (or elements)
772    ///    in an alternate reading order of content which, at the user's discretion,
773    ///    allows assistive technology to override the general default of reading in
774    ///    document source order. Value type: reference
775    #[doc(alias = "GTK_ACCESSIBLE_RELATION_FLOW_TO")]
776    FlowTo,
777    /// Identifies the element (or elements)
778    ///    that labels the current element. Value type: reference
779    #[doc(alias = "GTK_ACCESSIBLE_RELATION_LABELLED_BY")]
780    LabelledBy,
781    /// Identifies an element (or elements) in order
782    ///    to define a visual, functional, or contextual parent/child relationship
783    ///    between elements where the widget hierarchy cannot be used to represent
784    ///    the relationship. Value type: reference
785    #[doc(alias = "GTK_ACCESSIBLE_RELATION_OWNS")]
786    Owns,
787    /// Defines an element's number or position
788    ///    in the current set of listitems or treeitems. Value type: integer
789    #[doc(alias = "GTK_ACCESSIBLE_RELATION_POS_IN_SET")]
790    PosInSet,
791    /// Defines the total number of rows in a table,
792    ///    grid, or treegrid. Value type: integer
793    #[doc(alias = "GTK_ACCESSIBLE_RELATION_ROW_COUNT")]
794    RowCount,
795    /// Defines an element's row index or position
796    ///    with respect to the total number of rows within a table, grid, or treegrid.
797    ///    Value type: integer
798    #[doc(alias = "GTK_ACCESSIBLE_RELATION_ROW_INDEX")]
799    RowIndex,
800    /// Defines a human readable text
801    ///    alternative of aria-rowindex. Value type: string
802    #[doc(alias = "GTK_ACCESSIBLE_RELATION_ROW_INDEX_TEXT")]
803    RowIndexText,
804    /// Defines the number of rows spanned by a
805    ///    cell or gridcell within a table, grid, or treegrid. Value type: integer
806    #[doc(alias = "GTK_ACCESSIBLE_RELATION_ROW_SPAN")]
807    RowSpan,
808    /// Defines the number of items in the current
809    ///    set of listitems or treeitems. Value type: integer
810    #[doc(alias = "GTK_ACCESSIBLE_RELATION_SET_SIZE")]
811    SetSize,
812    /// Identifies the element (or elements) that are labeled by the
813    /// current element. Value type: reference
814    ///
815    /// This relation is managed by GTK and should not be set from application code.
816    #[cfg(feature = "v4_18")]
817    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
818    #[doc(alias = "GTK_ACCESSIBLE_RELATION_LABEL_FOR")]
819    LabelFor,
820    /// Identifies the element (or elements) that are described by
821    /// the current element. Value type: reference
822    ///
823    /// This relation is managed by GTK and should not be set from application code.
824    #[cfg(feature = "v4_18")]
825    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
826    #[doc(alias = "GTK_ACCESSIBLE_RELATION_DESCRIPTION_FOR")]
827    DescriptionFor,
828    /// Identifies the element (or elements) that the current
829    /// element is controlled by. Value type: reference
830    ///
831    /// This relation is managed by GTK and should not be set from application code.
832    #[cfg(feature = "v4_18")]
833    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
834    #[doc(alias = "GTK_ACCESSIBLE_RELATION_CONTROLLED_BY")]
835    ControlledBy,
836    /// Identifies the element (or elements) for which the current
837    /// element provides additional information. Value type: reference
838    ///
839    /// This relation is managed by GTK and should not be set from application code.
840    #[cfg(feature = "v4_18")]
841    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
842    #[doc(alias = "GTK_ACCESSIBLE_RELATION_DETAILS_FOR")]
843    DetailsFor,
844    /// Identifies the element (or elements) for which the current
845    /// element provides an error message. Value type: reference
846    ///
847    /// This relation is managed by GTK and should not be set from application code.
848    #[cfg(feature = "v4_18")]
849    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
850    #[doc(alias = "GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE_FOR")]
851    ErrorMessageFor,
852    /// Identifies the previous element (or elements) in an alternate
853    /// reading order of content which, at the user's discretion, allows
854    /// assistive technology to override the general default of reading in
855    /// document source order. Value type: reference
856    ///
857    /// This relation is managed by GTK and should not be set from application code.
858    #[cfg(feature = "v4_18")]
859    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
860    #[doc(alias = "GTK_ACCESSIBLE_RELATION_FLOW_FROM")]
861    FlowFrom,
862    #[doc(hidden)]
863    __Unknown(i32),
864}
865
866impl AccessibleRelation {
867    #[doc(alias = "gtk_accessible_relation_init_value")]
868    pub fn init_value(self, value: &mut glib::Value) {
869        assert_initialized_main_thread!();
870        unsafe {
871            ffi::gtk_accessible_relation_init_value(self.into_glib(), value.to_glib_none_mut().0);
872        }
873    }
874}
875
876#[doc(hidden)]
877impl IntoGlib for AccessibleRelation {
878    type GlibType = ffi::GtkAccessibleRelation;
879
880    fn into_glib(self) -> ffi::GtkAccessibleRelation {
881        match self {
882            Self::ActiveDescendant => ffi::GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT,
883            Self::ColCount => ffi::GTK_ACCESSIBLE_RELATION_COL_COUNT,
884            Self::ColIndex => ffi::GTK_ACCESSIBLE_RELATION_COL_INDEX,
885            Self::ColIndexText => ffi::GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT,
886            Self::ColSpan => ffi::GTK_ACCESSIBLE_RELATION_COL_SPAN,
887            Self::Controls => ffi::GTK_ACCESSIBLE_RELATION_CONTROLS,
888            Self::DescribedBy => ffi::GTK_ACCESSIBLE_RELATION_DESCRIBED_BY,
889            Self::Details => ffi::GTK_ACCESSIBLE_RELATION_DETAILS,
890            Self::ErrorMessage => ffi::GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE,
891            Self::FlowTo => ffi::GTK_ACCESSIBLE_RELATION_FLOW_TO,
892            Self::LabelledBy => ffi::GTK_ACCESSIBLE_RELATION_LABELLED_BY,
893            Self::Owns => ffi::GTK_ACCESSIBLE_RELATION_OWNS,
894            Self::PosInSet => ffi::GTK_ACCESSIBLE_RELATION_POS_IN_SET,
895            Self::RowCount => ffi::GTK_ACCESSIBLE_RELATION_ROW_COUNT,
896            Self::RowIndex => ffi::GTK_ACCESSIBLE_RELATION_ROW_INDEX,
897            Self::RowIndexText => ffi::GTK_ACCESSIBLE_RELATION_ROW_INDEX_TEXT,
898            Self::RowSpan => ffi::GTK_ACCESSIBLE_RELATION_ROW_SPAN,
899            Self::SetSize => ffi::GTK_ACCESSIBLE_RELATION_SET_SIZE,
900            #[cfg(feature = "v4_18")]
901            Self::LabelFor => ffi::GTK_ACCESSIBLE_RELATION_LABEL_FOR,
902            #[cfg(feature = "v4_18")]
903            Self::DescriptionFor => ffi::GTK_ACCESSIBLE_RELATION_DESCRIPTION_FOR,
904            #[cfg(feature = "v4_18")]
905            Self::ControlledBy => ffi::GTK_ACCESSIBLE_RELATION_CONTROLLED_BY,
906            #[cfg(feature = "v4_18")]
907            Self::DetailsFor => ffi::GTK_ACCESSIBLE_RELATION_DETAILS_FOR,
908            #[cfg(feature = "v4_18")]
909            Self::ErrorMessageFor => ffi::GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE_FOR,
910            #[cfg(feature = "v4_18")]
911            Self::FlowFrom => ffi::GTK_ACCESSIBLE_RELATION_FLOW_FROM,
912            Self::__Unknown(value) => value,
913        }
914    }
915}
916
917#[doc(hidden)]
918impl FromGlib<ffi::GtkAccessibleRelation> for AccessibleRelation {
919    unsafe fn from_glib(value: ffi::GtkAccessibleRelation) -> Self {
920        skip_assert_initialized!();
921
922        match value {
923            ffi::GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT => Self::ActiveDescendant,
924            ffi::GTK_ACCESSIBLE_RELATION_COL_COUNT => Self::ColCount,
925            ffi::GTK_ACCESSIBLE_RELATION_COL_INDEX => Self::ColIndex,
926            ffi::GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT => Self::ColIndexText,
927            ffi::GTK_ACCESSIBLE_RELATION_COL_SPAN => Self::ColSpan,
928            ffi::GTK_ACCESSIBLE_RELATION_CONTROLS => Self::Controls,
929            ffi::GTK_ACCESSIBLE_RELATION_DESCRIBED_BY => Self::DescribedBy,
930            ffi::GTK_ACCESSIBLE_RELATION_DETAILS => Self::Details,
931            ffi::GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE => Self::ErrorMessage,
932            ffi::GTK_ACCESSIBLE_RELATION_FLOW_TO => Self::FlowTo,
933            ffi::GTK_ACCESSIBLE_RELATION_LABELLED_BY => Self::LabelledBy,
934            ffi::GTK_ACCESSIBLE_RELATION_OWNS => Self::Owns,
935            ffi::GTK_ACCESSIBLE_RELATION_POS_IN_SET => Self::PosInSet,
936            ffi::GTK_ACCESSIBLE_RELATION_ROW_COUNT => Self::RowCount,
937            ffi::GTK_ACCESSIBLE_RELATION_ROW_INDEX => Self::RowIndex,
938            ffi::GTK_ACCESSIBLE_RELATION_ROW_INDEX_TEXT => Self::RowIndexText,
939            ffi::GTK_ACCESSIBLE_RELATION_ROW_SPAN => Self::RowSpan,
940            ffi::GTK_ACCESSIBLE_RELATION_SET_SIZE => Self::SetSize,
941            #[cfg(feature = "v4_18")]
942            ffi::GTK_ACCESSIBLE_RELATION_LABEL_FOR => Self::LabelFor,
943            #[cfg(feature = "v4_18")]
944            ffi::GTK_ACCESSIBLE_RELATION_DESCRIPTION_FOR => Self::DescriptionFor,
945            #[cfg(feature = "v4_18")]
946            ffi::GTK_ACCESSIBLE_RELATION_CONTROLLED_BY => Self::ControlledBy,
947            #[cfg(feature = "v4_18")]
948            ffi::GTK_ACCESSIBLE_RELATION_DETAILS_FOR => Self::DetailsFor,
949            #[cfg(feature = "v4_18")]
950            ffi::GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE_FOR => Self::ErrorMessageFor,
951            #[cfg(feature = "v4_18")]
952            ffi::GTK_ACCESSIBLE_RELATION_FLOW_FROM => Self::FlowFrom,
953            value => Self::__Unknown(value),
954        }
955    }
956}
957
958impl StaticType for AccessibleRelation {
959    #[inline]
960    #[doc(alias = "gtk_accessible_relation_get_type")]
961    fn static_type() -> glib::Type {
962        unsafe { from_glib(ffi::gtk_accessible_relation_get_type()) }
963    }
964}
965
966impl glib::HasParamSpec for AccessibleRelation {
967    type ParamSpec = glib::ParamSpecEnum;
968    type SetValue = Self;
969    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
970
971    fn param_spec_builder() -> Self::BuilderFn {
972        Self::ParamSpec::builder_with_default
973    }
974}
975
976impl glib::value::ValueType for AccessibleRelation {
977    type Type = Self;
978}
979
980unsafe impl<'a> glib::value::FromValue<'a> for AccessibleRelation {
981    type Checker = glib::value::GenericValueTypeChecker<Self>;
982
983    #[inline]
984    unsafe fn from_value(value: &'a glib::Value) -> Self {
985        skip_assert_initialized!();
986        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
987    }
988}
989
990impl ToValue for AccessibleRelation {
991    #[inline]
992    fn to_value(&self) -> glib::Value {
993        let mut value = glib::Value::for_value_type::<Self>();
994        unsafe {
995            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
996        }
997        value
998    }
999
1000    #[inline]
1001    fn value_type(&self) -> glib::Type {
1002        Self::static_type()
1003    }
1004}
1005
1006impl From<AccessibleRelation> for glib::Value {
1007    #[inline]
1008    fn from(v: AccessibleRelation) -> Self {
1009        skip_assert_initialized!();
1010        ToValue::to_value(&v)
1011    }
1012}
1013
1014/// The accessible role for a [`Accessible`][crate::Accessible] implementation.
1015///
1016/// Abstract roles are only used as part of the ontology; application
1017/// developers must not use abstract roles in their code.
1018#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1019#[non_exhaustive]
1020#[doc(alias = "GtkAccessibleRole")]
1021pub enum AccessibleRole {
1022    /// An element with important, and usually
1023    ///   time-sensitive, information
1024    #[doc(alias = "GTK_ACCESSIBLE_ROLE_ALERT")]
1025    Alert,
1026    /// A type of dialog that contains an
1027    ///   alert message
1028    #[doc(alias = "GTK_ACCESSIBLE_ROLE_ALERT_DIALOG")]
1029    AlertDialog,
1030    /// Unused
1031    #[doc(alias = "GTK_ACCESSIBLE_ROLE_BANNER")]
1032    Banner,
1033    /// An input element that allows for
1034    ///   user-triggered actions when clicked or pressed
1035    #[doc(alias = "GTK_ACCESSIBLE_ROLE_BUTTON")]
1036    Button,
1037    /// Unused
1038    #[doc(alias = "GTK_ACCESSIBLE_ROLE_CAPTION")]
1039    Caption,
1040    /// Unused
1041    #[doc(alias = "GTK_ACCESSIBLE_ROLE_CELL")]
1042    Cell,
1043    /// A checkable input element that has
1044    ///   three possible values: `true`, `false`, or `mixed`
1045    #[doc(alias = "GTK_ACCESSIBLE_ROLE_CHECKBOX")]
1046    Checkbox,
1047    /// A header in a columned list.
1048    #[doc(alias = "GTK_ACCESSIBLE_ROLE_COLUMN_HEADER")]
1049    ColumnHeader,
1050    /// An input that controls another element,
1051    ///   such as a list or a grid, that can dynamically pop up to help the user
1052    ///   set the value of the input
1053    #[doc(alias = "GTK_ACCESSIBLE_ROLE_COMBO_BOX")]
1054    ComboBox,
1055    /// Abstract role.
1056    #[doc(alias = "GTK_ACCESSIBLE_ROLE_COMMAND")]
1057    Command,
1058    /// Abstract role.
1059    #[doc(alias = "GTK_ACCESSIBLE_ROLE_COMPOSITE")]
1060    Composite,
1061    /// A dialog is a window that is designed to interrupt
1062    ///   the current processing of an application in order to prompt the user to enter
1063    ///   information or require a response.
1064    #[doc(alias = "GTK_ACCESSIBLE_ROLE_DIALOG")]
1065    Dialog,
1066    /// Content that assistive technology users may want to
1067    ///   browse in a reading mode.
1068    #[doc(alias = "GTK_ACCESSIBLE_ROLE_DOCUMENT")]
1069    Document,
1070    /// Unused
1071    #[doc(alias = "GTK_ACCESSIBLE_ROLE_FEED")]
1072    Feed,
1073    /// Unused
1074    #[doc(alias = "GTK_ACCESSIBLE_ROLE_FORM")]
1075    Form,
1076    /// A nameless container that has no semantic meaning
1077    ///   of its own. This is the role that GTK uses by default for widgets.
1078    #[doc(alias = "GTK_ACCESSIBLE_ROLE_GENERIC")]
1079    Generic,
1080    /// A grid of items.
1081    #[doc(alias = "GTK_ACCESSIBLE_ROLE_GRID")]
1082    Grid,
1083    /// An item in a grid or tree grid.
1084    #[doc(alias = "GTK_ACCESSIBLE_ROLE_GRID_CELL")]
1085    GridCell,
1086    /// An element that groups multiple related widgets. GTK uses
1087    ///   this role for various containers, like [`HeaderBar`][crate::HeaderBar] or [`Notebook`][crate::Notebook].
1088    #[doc(alias = "GTK_ACCESSIBLE_ROLE_GROUP")]
1089    Group,
1090    /// Unused
1091    #[doc(alias = "GTK_ACCESSIBLE_ROLE_HEADING")]
1092    Heading,
1093    /// An image.
1094    #[doc(alias = "GTK_ACCESSIBLE_ROLE_IMG")]
1095    Img,
1096    /// Abstract role.
1097    #[doc(alias = "GTK_ACCESSIBLE_ROLE_INPUT")]
1098    Input,
1099    /// A visible name or caption for a user interface component.
1100    #[doc(alias = "GTK_ACCESSIBLE_ROLE_LABEL")]
1101    Label,
1102    /// Abstract role.
1103    #[doc(alias = "GTK_ACCESSIBLE_ROLE_LANDMARK")]
1104    Landmark,
1105    /// Unused
1106    #[doc(alias = "GTK_ACCESSIBLE_ROLE_LEGEND")]
1107    Legend,
1108    /// A clickable link.
1109    #[doc(alias = "GTK_ACCESSIBLE_ROLE_LINK")]
1110    Link,
1111    /// A list of items.
1112    #[doc(alias = "GTK_ACCESSIBLE_ROLE_LIST")]
1113    List,
1114    /// Unused.
1115    #[doc(alias = "GTK_ACCESSIBLE_ROLE_LIST_BOX")]
1116    ListBox,
1117    /// An item in a list.
1118    #[doc(alias = "GTK_ACCESSIBLE_ROLE_LIST_ITEM")]
1119    ListItem,
1120    /// Unused
1121    #[doc(alias = "GTK_ACCESSIBLE_ROLE_LOG")]
1122    Log,
1123    /// Unused
1124    #[doc(alias = "GTK_ACCESSIBLE_ROLE_MAIN")]
1125    Main,
1126    /// Unused
1127    #[doc(alias = "GTK_ACCESSIBLE_ROLE_MARQUEE")]
1128    Marquee,
1129    /// Unused
1130    #[doc(alias = "GTK_ACCESSIBLE_ROLE_MATH")]
1131    Math,
1132    /// An element that represents a value within a known range.
1133    #[doc(alias = "GTK_ACCESSIBLE_ROLE_METER")]
1134    Meter,
1135    /// A menu.
1136    #[doc(alias = "GTK_ACCESSIBLE_ROLE_MENU")]
1137    Menu,
1138    /// A menubar.
1139    #[doc(alias = "GTK_ACCESSIBLE_ROLE_MENU_BAR")]
1140    MenuBar,
1141    /// An item in a menu.
1142    #[doc(alias = "GTK_ACCESSIBLE_ROLE_MENU_ITEM")]
1143    MenuItem,
1144    /// A check item in a menu.
1145    #[doc(alias = "GTK_ACCESSIBLE_ROLE_MENU_ITEM_CHECKBOX")]
1146    MenuItemCheckbox,
1147    /// A radio item in a menu.
1148    #[doc(alias = "GTK_ACCESSIBLE_ROLE_MENU_ITEM_RADIO")]
1149    MenuItemRadio,
1150    /// Unused
1151    #[doc(alias = "GTK_ACCESSIBLE_ROLE_NAVIGATION")]
1152    Navigation,
1153    /// An element that is not represented to accessibility technologies.
1154    ///   This role is synonymous to @GTK_ACCESSIBLE_ROLE_PRESENTATION.
1155    #[doc(alias = "GTK_ACCESSIBLE_ROLE_NONE")]
1156    None,
1157    /// Unused
1158    #[doc(alias = "GTK_ACCESSIBLE_ROLE_NOTE")]
1159    Note,
1160    /// Unused
1161    #[doc(alias = "GTK_ACCESSIBLE_ROLE_OPTION")]
1162    Option,
1163    /// An element that is not represented to accessibility technologies.
1164    ///   This role is synonymous to @GTK_ACCESSIBLE_ROLE_NONE.
1165    #[doc(alias = "GTK_ACCESSIBLE_ROLE_PRESENTATION")]
1166    Presentation,
1167    /// An element that displays the progress
1168    ///   status for tasks that take a long time.
1169    #[doc(alias = "GTK_ACCESSIBLE_ROLE_PROGRESS_BAR")]
1170    ProgressBar,
1171    /// A checkable input in a group of radio roles,
1172    ///   only one of which can be checked at a time.
1173    #[doc(alias = "GTK_ACCESSIBLE_ROLE_RADIO")]
1174    Radio,
1175    /// Unused
1176    #[doc(alias = "GTK_ACCESSIBLE_ROLE_RADIO_GROUP")]
1177    RadioGroup,
1178    /// Abstract role.
1179    #[doc(alias = "GTK_ACCESSIBLE_ROLE_RANGE")]
1180    Range,
1181    /// Unused
1182    #[doc(alias = "GTK_ACCESSIBLE_ROLE_REGION")]
1183    Region,
1184    /// A row in a columned list.
1185    #[doc(alias = "GTK_ACCESSIBLE_ROLE_ROW")]
1186    Row,
1187    /// Unused
1188    #[doc(alias = "GTK_ACCESSIBLE_ROLE_ROW_GROUP")]
1189    RowGroup,
1190    /// Unused
1191    #[doc(alias = "GTK_ACCESSIBLE_ROLE_ROW_HEADER")]
1192    RowHeader,
1193    /// A graphical object that controls the scrolling
1194    ///   of content within a viewing area, regardless of whether the content is fully
1195    ///   displayed within the viewing area.
1196    #[doc(alias = "GTK_ACCESSIBLE_ROLE_SCROLLBAR")]
1197    Scrollbar,
1198    /// Unused
1199    #[doc(alias = "GTK_ACCESSIBLE_ROLE_SEARCH")]
1200    Search,
1201    /// A type of textbox intended for specifying
1202    ///   search criteria.
1203    #[doc(alias = "GTK_ACCESSIBLE_ROLE_SEARCH_BOX")]
1204    SearchBox,
1205    /// Abstract role.
1206    #[doc(alias = "GTK_ACCESSIBLE_ROLE_SECTION")]
1207    Section,
1208    /// Abstract role.
1209    #[doc(alias = "GTK_ACCESSIBLE_ROLE_SECTION_HEAD")]
1210    SectionHead,
1211    /// Abstract role.
1212    #[doc(alias = "GTK_ACCESSIBLE_ROLE_SELECT")]
1213    Select,
1214    /// A divider that separates and distinguishes
1215    ///   sections of content or groups of menuitems.
1216    #[doc(alias = "GTK_ACCESSIBLE_ROLE_SEPARATOR")]
1217    Separator,
1218    /// A user input where the user selects a value
1219    ///   from within a given range.
1220    #[doc(alias = "GTK_ACCESSIBLE_ROLE_SLIDER")]
1221    Slider,
1222    /// A form of range that expects the user to
1223    ///   select from among discrete choices.
1224    #[doc(alias = "GTK_ACCESSIBLE_ROLE_SPIN_BUTTON")]
1225    SpinButton,
1226    /// Unused
1227    #[doc(alias = "GTK_ACCESSIBLE_ROLE_STATUS")]
1228    Status,
1229    /// Abstract role.
1230    #[doc(alias = "GTK_ACCESSIBLE_ROLE_STRUCTURE")]
1231    Structure,
1232    /// A type of checkbox that represents on/off values,
1233    ///   as opposed to checked/unchecked values.
1234    #[doc(alias = "GTK_ACCESSIBLE_ROLE_SWITCH")]
1235    Switch,
1236    /// An item in a list of tab used for switching pages.
1237    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TAB")]
1238    Tab,
1239    /// Unused
1240    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TABLE")]
1241    Table,
1242    /// A list of tabs for switching pages.
1243    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TAB_LIST")]
1244    TabList,
1245    /// A page in a notebook or stack.
1246    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TAB_PANEL")]
1247    TabPanel,
1248    /// A type of input that allows free-form text
1249    ///   as its value.
1250    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TEXT_BOX")]
1251    TextBox,
1252    /// Unused
1253    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TIME")]
1254    Time,
1255    /// Unused
1256    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TIMER")]
1257    Timer,
1258    /// Unused
1259    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TOOLBAR")]
1260    Toolbar,
1261    /// Unused
1262    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TOOLTIP")]
1263    Tooltip,
1264    /// Unused
1265    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TREE")]
1266    Tree,
1267    /// A treeview-like, columned list.
1268    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TREE_GRID")]
1269    TreeGrid,
1270    /// Unused
1271    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TREE_ITEM")]
1272    TreeItem,
1273    /// Abstract role for interactive components of a
1274    ///   graphical user interface
1275    #[doc(alias = "GTK_ACCESSIBLE_ROLE_WIDGET")]
1276    Widget,
1277    /// Abstract role for windows.
1278    #[doc(alias = "GTK_ACCESSIBLE_ROLE_WINDOW")]
1279    Window,
1280    /// A type of push button which stays pressed until depressed by a second
1281    /// activation.
1282    #[cfg(feature = "v4_10")]
1283    #[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
1284    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON")]
1285    ToggleButton,
1286    /// A toplevel element of a graphical user interface.
1287    ///
1288    /// This is the role that GTK uses by default for windows.
1289    #[cfg(feature = "v4_12")]
1290    #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
1291    #[doc(alias = "GTK_ACCESSIBLE_ROLE_APPLICATION")]
1292    Application,
1293    /// A paragraph of content.
1294    #[cfg(feature = "v4_14")]
1295    #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1296    #[doc(alias = "GTK_ACCESSIBLE_ROLE_PARAGRAPH")]
1297    Paragraph,
1298    /// A section of content that is quoted from another source.
1299    #[cfg(feature = "v4_14")]
1300    #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1301    #[doc(alias = "GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE")]
1302    BlockQuote,
1303    /// A section of a page that consists of a composition that forms an independent
1304    /// part of a document, page, or site.
1305    #[cfg(feature = "v4_14")]
1306    #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1307    #[doc(alias = "GTK_ACCESSIBLE_ROLE_ARTICLE")]
1308    Article,
1309    /// A comment contains content expressing reaction to other content.
1310    #[cfg(feature = "v4_14")]
1311    #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1312    #[doc(alias = "GTK_ACCESSIBLE_ROLE_COMMENT")]
1313    Comment,
1314    /// A virtual terminal.
1315    #[cfg(feature = "v4_14")]
1316    #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1317    #[doc(alias = "GTK_ACCESSIBLE_ROLE_TERMINAL")]
1318    Terminal,
1319    #[doc(hidden)]
1320    __Unknown(i32),
1321}
1322
1323#[doc(hidden)]
1324impl IntoGlib for AccessibleRole {
1325    type GlibType = ffi::GtkAccessibleRole;
1326
1327    fn into_glib(self) -> ffi::GtkAccessibleRole {
1328        match self {
1329            Self::Alert => ffi::GTK_ACCESSIBLE_ROLE_ALERT,
1330            Self::AlertDialog => ffi::GTK_ACCESSIBLE_ROLE_ALERT_DIALOG,
1331            Self::Banner => ffi::GTK_ACCESSIBLE_ROLE_BANNER,
1332            Self::Button => ffi::GTK_ACCESSIBLE_ROLE_BUTTON,
1333            Self::Caption => ffi::GTK_ACCESSIBLE_ROLE_CAPTION,
1334            Self::Cell => ffi::GTK_ACCESSIBLE_ROLE_CELL,
1335            Self::Checkbox => ffi::GTK_ACCESSIBLE_ROLE_CHECKBOX,
1336            Self::ColumnHeader => ffi::GTK_ACCESSIBLE_ROLE_COLUMN_HEADER,
1337            Self::ComboBox => ffi::GTK_ACCESSIBLE_ROLE_COMBO_BOX,
1338            Self::Command => ffi::GTK_ACCESSIBLE_ROLE_COMMAND,
1339            Self::Composite => ffi::GTK_ACCESSIBLE_ROLE_COMPOSITE,
1340            Self::Dialog => ffi::GTK_ACCESSIBLE_ROLE_DIALOG,
1341            Self::Document => ffi::GTK_ACCESSIBLE_ROLE_DOCUMENT,
1342            Self::Feed => ffi::GTK_ACCESSIBLE_ROLE_FEED,
1343            Self::Form => ffi::GTK_ACCESSIBLE_ROLE_FORM,
1344            Self::Generic => ffi::GTK_ACCESSIBLE_ROLE_GENERIC,
1345            Self::Grid => ffi::GTK_ACCESSIBLE_ROLE_GRID,
1346            Self::GridCell => ffi::GTK_ACCESSIBLE_ROLE_GRID_CELL,
1347            Self::Group => ffi::GTK_ACCESSIBLE_ROLE_GROUP,
1348            Self::Heading => ffi::GTK_ACCESSIBLE_ROLE_HEADING,
1349            Self::Img => ffi::GTK_ACCESSIBLE_ROLE_IMG,
1350            Self::Input => ffi::GTK_ACCESSIBLE_ROLE_INPUT,
1351            Self::Label => ffi::GTK_ACCESSIBLE_ROLE_LABEL,
1352            Self::Landmark => ffi::GTK_ACCESSIBLE_ROLE_LANDMARK,
1353            Self::Legend => ffi::GTK_ACCESSIBLE_ROLE_LEGEND,
1354            Self::Link => ffi::GTK_ACCESSIBLE_ROLE_LINK,
1355            Self::List => ffi::GTK_ACCESSIBLE_ROLE_LIST,
1356            Self::ListBox => ffi::GTK_ACCESSIBLE_ROLE_LIST_BOX,
1357            Self::ListItem => ffi::GTK_ACCESSIBLE_ROLE_LIST_ITEM,
1358            Self::Log => ffi::GTK_ACCESSIBLE_ROLE_LOG,
1359            Self::Main => ffi::GTK_ACCESSIBLE_ROLE_MAIN,
1360            Self::Marquee => ffi::GTK_ACCESSIBLE_ROLE_MARQUEE,
1361            Self::Math => ffi::GTK_ACCESSIBLE_ROLE_MATH,
1362            Self::Meter => ffi::GTK_ACCESSIBLE_ROLE_METER,
1363            Self::Menu => ffi::GTK_ACCESSIBLE_ROLE_MENU,
1364            Self::MenuBar => ffi::GTK_ACCESSIBLE_ROLE_MENU_BAR,
1365            Self::MenuItem => ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM,
1366            Self::MenuItemCheckbox => ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM_CHECKBOX,
1367            Self::MenuItemRadio => ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM_RADIO,
1368            Self::Navigation => ffi::GTK_ACCESSIBLE_ROLE_NAVIGATION,
1369            Self::None => ffi::GTK_ACCESSIBLE_ROLE_NONE,
1370            Self::Note => ffi::GTK_ACCESSIBLE_ROLE_NOTE,
1371            Self::Option => ffi::GTK_ACCESSIBLE_ROLE_OPTION,
1372            Self::Presentation => ffi::GTK_ACCESSIBLE_ROLE_PRESENTATION,
1373            Self::ProgressBar => ffi::GTK_ACCESSIBLE_ROLE_PROGRESS_BAR,
1374            Self::Radio => ffi::GTK_ACCESSIBLE_ROLE_RADIO,
1375            Self::RadioGroup => ffi::GTK_ACCESSIBLE_ROLE_RADIO_GROUP,
1376            Self::Range => ffi::GTK_ACCESSIBLE_ROLE_RANGE,
1377            Self::Region => ffi::GTK_ACCESSIBLE_ROLE_REGION,
1378            Self::Row => ffi::GTK_ACCESSIBLE_ROLE_ROW,
1379            Self::RowGroup => ffi::GTK_ACCESSIBLE_ROLE_ROW_GROUP,
1380            Self::RowHeader => ffi::GTK_ACCESSIBLE_ROLE_ROW_HEADER,
1381            Self::Scrollbar => ffi::GTK_ACCESSIBLE_ROLE_SCROLLBAR,
1382            Self::Search => ffi::GTK_ACCESSIBLE_ROLE_SEARCH,
1383            Self::SearchBox => ffi::GTK_ACCESSIBLE_ROLE_SEARCH_BOX,
1384            Self::Section => ffi::GTK_ACCESSIBLE_ROLE_SECTION,
1385            Self::SectionHead => ffi::GTK_ACCESSIBLE_ROLE_SECTION_HEAD,
1386            Self::Select => ffi::GTK_ACCESSIBLE_ROLE_SELECT,
1387            Self::Separator => ffi::GTK_ACCESSIBLE_ROLE_SEPARATOR,
1388            Self::Slider => ffi::GTK_ACCESSIBLE_ROLE_SLIDER,
1389            Self::SpinButton => ffi::GTK_ACCESSIBLE_ROLE_SPIN_BUTTON,
1390            Self::Status => ffi::GTK_ACCESSIBLE_ROLE_STATUS,
1391            Self::Structure => ffi::GTK_ACCESSIBLE_ROLE_STRUCTURE,
1392            Self::Switch => ffi::GTK_ACCESSIBLE_ROLE_SWITCH,
1393            Self::Tab => ffi::GTK_ACCESSIBLE_ROLE_TAB,
1394            Self::Table => ffi::GTK_ACCESSIBLE_ROLE_TABLE,
1395            Self::TabList => ffi::GTK_ACCESSIBLE_ROLE_TAB_LIST,
1396            Self::TabPanel => ffi::GTK_ACCESSIBLE_ROLE_TAB_PANEL,
1397            Self::TextBox => ffi::GTK_ACCESSIBLE_ROLE_TEXT_BOX,
1398            Self::Time => ffi::GTK_ACCESSIBLE_ROLE_TIME,
1399            Self::Timer => ffi::GTK_ACCESSIBLE_ROLE_TIMER,
1400            Self::Toolbar => ffi::GTK_ACCESSIBLE_ROLE_TOOLBAR,
1401            Self::Tooltip => ffi::GTK_ACCESSIBLE_ROLE_TOOLTIP,
1402            Self::Tree => ffi::GTK_ACCESSIBLE_ROLE_TREE,
1403            Self::TreeGrid => ffi::GTK_ACCESSIBLE_ROLE_TREE_GRID,
1404            Self::TreeItem => ffi::GTK_ACCESSIBLE_ROLE_TREE_ITEM,
1405            Self::Widget => ffi::GTK_ACCESSIBLE_ROLE_WIDGET,
1406            Self::Window => ffi::GTK_ACCESSIBLE_ROLE_WINDOW,
1407            #[cfg(feature = "v4_10")]
1408            Self::ToggleButton => ffi::GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON,
1409            #[cfg(feature = "v4_12")]
1410            Self::Application => ffi::GTK_ACCESSIBLE_ROLE_APPLICATION,
1411            #[cfg(feature = "v4_14")]
1412            Self::Paragraph => ffi::GTK_ACCESSIBLE_ROLE_PARAGRAPH,
1413            #[cfg(feature = "v4_14")]
1414            Self::BlockQuote => ffi::GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE,
1415            #[cfg(feature = "v4_14")]
1416            Self::Article => ffi::GTK_ACCESSIBLE_ROLE_ARTICLE,
1417            #[cfg(feature = "v4_14")]
1418            Self::Comment => ffi::GTK_ACCESSIBLE_ROLE_COMMENT,
1419            #[cfg(feature = "v4_14")]
1420            Self::Terminal => ffi::GTK_ACCESSIBLE_ROLE_TERMINAL,
1421            Self::__Unknown(value) => value,
1422        }
1423    }
1424}
1425
1426#[doc(hidden)]
1427impl FromGlib<ffi::GtkAccessibleRole> for AccessibleRole {
1428    unsafe fn from_glib(value: ffi::GtkAccessibleRole) -> Self {
1429        skip_assert_initialized!();
1430
1431        match value {
1432            ffi::GTK_ACCESSIBLE_ROLE_ALERT => Self::Alert,
1433            ffi::GTK_ACCESSIBLE_ROLE_ALERT_DIALOG => Self::AlertDialog,
1434            ffi::GTK_ACCESSIBLE_ROLE_BANNER => Self::Banner,
1435            ffi::GTK_ACCESSIBLE_ROLE_BUTTON => Self::Button,
1436            ffi::GTK_ACCESSIBLE_ROLE_CAPTION => Self::Caption,
1437            ffi::GTK_ACCESSIBLE_ROLE_CELL => Self::Cell,
1438            ffi::GTK_ACCESSIBLE_ROLE_CHECKBOX => Self::Checkbox,
1439            ffi::GTK_ACCESSIBLE_ROLE_COLUMN_HEADER => Self::ColumnHeader,
1440            ffi::GTK_ACCESSIBLE_ROLE_COMBO_BOX => Self::ComboBox,
1441            ffi::GTK_ACCESSIBLE_ROLE_COMMAND => Self::Command,
1442            ffi::GTK_ACCESSIBLE_ROLE_COMPOSITE => Self::Composite,
1443            ffi::GTK_ACCESSIBLE_ROLE_DIALOG => Self::Dialog,
1444            ffi::GTK_ACCESSIBLE_ROLE_DOCUMENT => Self::Document,
1445            ffi::GTK_ACCESSIBLE_ROLE_FEED => Self::Feed,
1446            ffi::GTK_ACCESSIBLE_ROLE_FORM => Self::Form,
1447            ffi::GTK_ACCESSIBLE_ROLE_GENERIC => Self::Generic,
1448            ffi::GTK_ACCESSIBLE_ROLE_GRID => Self::Grid,
1449            ffi::GTK_ACCESSIBLE_ROLE_GRID_CELL => Self::GridCell,
1450            ffi::GTK_ACCESSIBLE_ROLE_GROUP => Self::Group,
1451            ffi::GTK_ACCESSIBLE_ROLE_HEADING => Self::Heading,
1452            ffi::GTK_ACCESSIBLE_ROLE_IMG => Self::Img,
1453            ffi::GTK_ACCESSIBLE_ROLE_INPUT => Self::Input,
1454            ffi::GTK_ACCESSIBLE_ROLE_LABEL => Self::Label,
1455            ffi::GTK_ACCESSIBLE_ROLE_LANDMARK => Self::Landmark,
1456            ffi::GTK_ACCESSIBLE_ROLE_LEGEND => Self::Legend,
1457            ffi::GTK_ACCESSIBLE_ROLE_LINK => Self::Link,
1458            ffi::GTK_ACCESSIBLE_ROLE_LIST => Self::List,
1459            ffi::GTK_ACCESSIBLE_ROLE_LIST_BOX => Self::ListBox,
1460            ffi::GTK_ACCESSIBLE_ROLE_LIST_ITEM => Self::ListItem,
1461            ffi::GTK_ACCESSIBLE_ROLE_LOG => Self::Log,
1462            ffi::GTK_ACCESSIBLE_ROLE_MAIN => Self::Main,
1463            ffi::GTK_ACCESSIBLE_ROLE_MARQUEE => Self::Marquee,
1464            ffi::GTK_ACCESSIBLE_ROLE_MATH => Self::Math,
1465            ffi::GTK_ACCESSIBLE_ROLE_METER => Self::Meter,
1466            ffi::GTK_ACCESSIBLE_ROLE_MENU => Self::Menu,
1467            ffi::GTK_ACCESSIBLE_ROLE_MENU_BAR => Self::MenuBar,
1468            ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM => Self::MenuItem,
1469            ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM_CHECKBOX => Self::MenuItemCheckbox,
1470            ffi::GTK_ACCESSIBLE_ROLE_MENU_ITEM_RADIO => Self::MenuItemRadio,
1471            ffi::GTK_ACCESSIBLE_ROLE_NAVIGATION => Self::Navigation,
1472            ffi::GTK_ACCESSIBLE_ROLE_NONE => Self::None,
1473            ffi::GTK_ACCESSIBLE_ROLE_NOTE => Self::Note,
1474            ffi::GTK_ACCESSIBLE_ROLE_OPTION => Self::Option,
1475            ffi::GTK_ACCESSIBLE_ROLE_PRESENTATION => Self::Presentation,
1476            ffi::GTK_ACCESSIBLE_ROLE_PROGRESS_BAR => Self::ProgressBar,
1477            ffi::GTK_ACCESSIBLE_ROLE_RADIO => Self::Radio,
1478            ffi::GTK_ACCESSIBLE_ROLE_RADIO_GROUP => Self::RadioGroup,
1479            ffi::GTK_ACCESSIBLE_ROLE_RANGE => Self::Range,
1480            ffi::GTK_ACCESSIBLE_ROLE_REGION => Self::Region,
1481            ffi::GTK_ACCESSIBLE_ROLE_ROW => Self::Row,
1482            ffi::GTK_ACCESSIBLE_ROLE_ROW_GROUP => Self::RowGroup,
1483            ffi::GTK_ACCESSIBLE_ROLE_ROW_HEADER => Self::RowHeader,
1484            ffi::GTK_ACCESSIBLE_ROLE_SCROLLBAR => Self::Scrollbar,
1485            ffi::GTK_ACCESSIBLE_ROLE_SEARCH => Self::Search,
1486            ffi::GTK_ACCESSIBLE_ROLE_SEARCH_BOX => Self::SearchBox,
1487            ffi::GTK_ACCESSIBLE_ROLE_SECTION => Self::Section,
1488            ffi::GTK_ACCESSIBLE_ROLE_SECTION_HEAD => Self::SectionHead,
1489            ffi::GTK_ACCESSIBLE_ROLE_SELECT => Self::Select,
1490            ffi::GTK_ACCESSIBLE_ROLE_SEPARATOR => Self::Separator,
1491            ffi::GTK_ACCESSIBLE_ROLE_SLIDER => Self::Slider,
1492            ffi::GTK_ACCESSIBLE_ROLE_SPIN_BUTTON => Self::SpinButton,
1493            ffi::GTK_ACCESSIBLE_ROLE_STATUS => Self::Status,
1494            ffi::GTK_ACCESSIBLE_ROLE_STRUCTURE => Self::Structure,
1495            ffi::GTK_ACCESSIBLE_ROLE_SWITCH => Self::Switch,
1496            ffi::GTK_ACCESSIBLE_ROLE_TAB => Self::Tab,
1497            ffi::GTK_ACCESSIBLE_ROLE_TABLE => Self::Table,
1498            ffi::GTK_ACCESSIBLE_ROLE_TAB_LIST => Self::TabList,
1499            ffi::GTK_ACCESSIBLE_ROLE_TAB_PANEL => Self::TabPanel,
1500            ffi::GTK_ACCESSIBLE_ROLE_TEXT_BOX => Self::TextBox,
1501            ffi::GTK_ACCESSIBLE_ROLE_TIME => Self::Time,
1502            ffi::GTK_ACCESSIBLE_ROLE_TIMER => Self::Timer,
1503            ffi::GTK_ACCESSIBLE_ROLE_TOOLBAR => Self::Toolbar,
1504            ffi::GTK_ACCESSIBLE_ROLE_TOOLTIP => Self::Tooltip,
1505            ffi::GTK_ACCESSIBLE_ROLE_TREE => Self::Tree,
1506            ffi::GTK_ACCESSIBLE_ROLE_TREE_GRID => Self::TreeGrid,
1507            ffi::GTK_ACCESSIBLE_ROLE_TREE_ITEM => Self::TreeItem,
1508            ffi::GTK_ACCESSIBLE_ROLE_WIDGET => Self::Widget,
1509            ffi::GTK_ACCESSIBLE_ROLE_WINDOW => Self::Window,
1510            #[cfg(feature = "v4_10")]
1511            ffi::GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON => Self::ToggleButton,
1512            #[cfg(feature = "v4_12")]
1513            ffi::GTK_ACCESSIBLE_ROLE_APPLICATION => Self::Application,
1514            #[cfg(feature = "v4_14")]
1515            ffi::GTK_ACCESSIBLE_ROLE_PARAGRAPH => Self::Paragraph,
1516            #[cfg(feature = "v4_14")]
1517            ffi::GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE => Self::BlockQuote,
1518            #[cfg(feature = "v4_14")]
1519            ffi::GTK_ACCESSIBLE_ROLE_ARTICLE => Self::Article,
1520            #[cfg(feature = "v4_14")]
1521            ffi::GTK_ACCESSIBLE_ROLE_COMMENT => Self::Comment,
1522            #[cfg(feature = "v4_14")]
1523            ffi::GTK_ACCESSIBLE_ROLE_TERMINAL => Self::Terminal,
1524            value => Self::__Unknown(value),
1525        }
1526    }
1527}
1528
1529impl StaticType for AccessibleRole {
1530    #[inline]
1531    #[doc(alias = "gtk_accessible_role_get_type")]
1532    fn static_type() -> glib::Type {
1533        unsafe { from_glib(ffi::gtk_accessible_role_get_type()) }
1534    }
1535}
1536
1537impl glib::HasParamSpec for AccessibleRole {
1538    type ParamSpec = glib::ParamSpecEnum;
1539    type SetValue = Self;
1540    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
1541
1542    fn param_spec_builder() -> Self::BuilderFn {
1543        Self::ParamSpec::builder_with_default
1544    }
1545}
1546
1547impl glib::value::ValueType for AccessibleRole {
1548    type Type = Self;
1549}
1550
1551unsafe impl<'a> glib::value::FromValue<'a> for AccessibleRole {
1552    type Checker = glib::value::GenericValueTypeChecker<Self>;
1553
1554    #[inline]
1555    unsafe fn from_value(value: &'a glib::Value) -> Self {
1556        skip_assert_initialized!();
1557        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1558    }
1559}
1560
1561impl ToValue for AccessibleRole {
1562    #[inline]
1563    fn to_value(&self) -> glib::Value {
1564        let mut value = glib::Value::for_value_type::<Self>();
1565        unsafe {
1566            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1567        }
1568        value
1569    }
1570
1571    #[inline]
1572    fn value_type(&self) -> glib::Type {
1573        Self::static_type()
1574    }
1575}
1576
1577impl From<AccessibleRole> for glib::Value {
1578    #[inline]
1579    fn from(v: AccessibleRole) -> Self {
1580        skip_assert_initialized!();
1581        ToValue::to_value(&v)
1582    }
1583}
1584
1585/// The possible values for the [`AccessibleProperty::Sort`][crate::AccessibleProperty::Sort]
1586/// accessible property.
1587#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1588#[non_exhaustive]
1589#[doc(alias = "GtkAccessibleSort")]
1590pub enum AccessibleSort {
1591    /// There is no defined sort applied to the column.
1592    #[doc(alias = "GTK_ACCESSIBLE_SORT_NONE")]
1593    None,
1594    /// Items are sorted in ascending order by this column.
1595    #[doc(alias = "GTK_ACCESSIBLE_SORT_ASCENDING")]
1596    Ascending,
1597    /// Items are sorted in descending order by this column.
1598    #[doc(alias = "GTK_ACCESSIBLE_SORT_DESCENDING")]
1599    Descending,
1600    /// A sort algorithm other than ascending or
1601    ///    descending has been applied.
1602    #[doc(alias = "GTK_ACCESSIBLE_SORT_OTHER")]
1603    Other,
1604    #[doc(hidden)]
1605    __Unknown(i32),
1606}
1607
1608#[doc(hidden)]
1609impl IntoGlib for AccessibleSort {
1610    type GlibType = ffi::GtkAccessibleSort;
1611
1612    #[inline]
1613    fn into_glib(self) -> ffi::GtkAccessibleSort {
1614        match self {
1615            Self::None => ffi::GTK_ACCESSIBLE_SORT_NONE,
1616            Self::Ascending => ffi::GTK_ACCESSIBLE_SORT_ASCENDING,
1617            Self::Descending => ffi::GTK_ACCESSIBLE_SORT_DESCENDING,
1618            Self::Other => ffi::GTK_ACCESSIBLE_SORT_OTHER,
1619            Self::__Unknown(value) => value,
1620        }
1621    }
1622}
1623
1624#[doc(hidden)]
1625impl FromGlib<ffi::GtkAccessibleSort> for AccessibleSort {
1626    #[inline]
1627    unsafe fn from_glib(value: ffi::GtkAccessibleSort) -> Self {
1628        skip_assert_initialized!();
1629
1630        match value {
1631            ffi::GTK_ACCESSIBLE_SORT_NONE => Self::None,
1632            ffi::GTK_ACCESSIBLE_SORT_ASCENDING => Self::Ascending,
1633            ffi::GTK_ACCESSIBLE_SORT_DESCENDING => Self::Descending,
1634            ffi::GTK_ACCESSIBLE_SORT_OTHER => Self::Other,
1635            value => Self::__Unknown(value),
1636        }
1637    }
1638}
1639
1640impl StaticType for AccessibleSort {
1641    #[inline]
1642    #[doc(alias = "gtk_accessible_sort_get_type")]
1643    fn static_type() -> glib::Type {
1644        unsafe { from_glib(ffi::gtk_accessible_sort_get_type()) }
1645    }
1646}
1647
1648impl glib::HasParamSpec for AccessibleSort {
1649    type ParamSpec = glib::ParamSpecEnum;
1650    type SetValue = Self;
1651    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
1652
1653    fn param_spec_builder() -> Self::BuilderFn {
1654        Self::ParamSpec::builder_with_default
1655    }
1656}
1657
1658impl glib::value::ValueType for AccessibleSort {
1659    type Type = Self;
1660}
1661
1662unsafe impl<'a> glib::value::FromValue<'a> for AccessibleSort {
1663    type Checker = glib::value::GenericValueTypeChecker<Self>;
1664
1665    #[inline]
1666    unsafe fn from_value(value: &'a glib::Value) -> Self {
1667        skip_assert_initialized!();
1668        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1669    }
1670}
1671
1672impl ToValue for AccessibleSort {
1673    #[inline]
1674    fn to_value(&self) -> glib::Value {
1675        let mut value = glib::Value::for_value_type::<Self>();
1676        unsafe {
1677            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1678        }
1679        value
1680    }
1681
1682    #[inline]
1683    fn value_type(&self) -> glib::Type {
1684        Self::static_type()
1685    }
1686}
1687
1688impl From<AccessibleSort> for glib::Value {
1689    #[inline]
1690    fn from(v: AccessibleSort) -> Self {
1691        skip_assert_initialized!();
1692        ToValue::to_value(&v)
1693    }
1694}
1695
1696/// The possible accessible states of a [`Accessible`][crate::Accessible].
1697#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1698#[non_exhaustive]
1699#[doc(alias = "GtkAccessibleState")]
1700pub enum AccessibleState {
1701    /// A “busy” state. This state has boolean values
1702    #[doc(alias = "GTK_ACCESSIBLE_STATE_BUSY")]
1703    Busy,
1704    /// A “checked” state; indicates the current
1705    ///   state of a [`CheckButton`][crate::CheckButton]. Value type: [`AccessibleTristate`][crate::AccessibleTristate]
1706    #[doc(alias = "GTK_ACCESSIBLE_STATE_CHECKED")]
1707    Checked,
1708    /// A “disabled” state; corresponds to the
1709    ///   [`sensitive`][struct@crate::Widget#sensitive] property. It indicates a UI element
1710    ///   that is perceivable, but not editable or operable. Value type: boolean
1711    #[doc(alias = "GTK_ACCESSIBLE_STATE_DISABLED")]
1712    Disabled,
1713    /// An “expanded” state; corresponds to the
1714    ///   [`expanded`][struct@crate::Expander#expanded] property. Value type: boolean
1715    ///   or undefined
1716    #[doc(alias = "GTK_ACCESSIBLE_STATE_EXPANDED")]
1717    Expanded,
1718    /// A “hidden” state; corresponds to the
1719    ///   [`visible`][struct@crate::Widget#visible] property. You can use this state
1720    ///   explicitly on UI elements that should not be exposed to an assistive
1721    ///   technology. Value type: boolean
1722    ///   See also: [`Disabled`][Self::Disabled]
1723    #[doc(alias = "GTK_ACCESSIBLE_STATE_HIDDEN")]
1724    Hidden,
1725    /// An “invalid” state; set when a widget
1726    ///   is showing an error. Value type: [`AccessibleInvalidState`][crate::AccessibleInvalidState]
1727    #[doc(alias = "GTK_ACCESSIBLE_STATE_INVALID")]
1728    Invalid,
1729    /// A “pressed” state; indicates the current
1730    ///   state of a [`ToggleButton`][crate::ToggleButton]. Value type: [`AccessibleTristate`][crate::AccessibleTristate]
1731    ///   enumeration
1732    #[doc(alias = "GTK_ACCESSIBLE_STATE_PRESSED")]
1733    Pressed,
1734    /// A “selected” state; set when a widget
1735    ///   is selected. Value type: boolean or undefined
1736    #[doc(alias = "GTK_ACCESSIBLE_STATE_SELECTED")]
1737    Selected,
1738    /// Indicates that a widget with the GTK_ACCESSIBLE_ROLE_LINK has been visited.
1739    /// Value type: boolean.
1740    #[cfg(feature = "v4_12")]
1741    #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
1742    #[doc(alias = "GTK_ACCESSIBLE_STATE_VISITED")]
1743    Visited,
1744    #[doc(hidden)]
1745    __Unknown(i32),
1746}
1747
1748impl AccessibleState {
1749    #[doc(alias = "gtk_accessible_state_init_value")]
1750    pub fn init_value(self, value: &mut glib::Value) {
1751        assert_initialized_main_thread!();
1752        unsafe {
1753            ffi::gtk_accessible_state_init_value(self.into_glib(), value.to_glib_none_mut().0);
1754        }
1755    }
1756}
1757
1758#[doc(hidden)]
1759impl IntoGlib for AccessibleState {
1760    type GlibType = ffi::GtkAccessibleState;
1761
1762    #[inline]
1763    fn into_glib(self) -> ffi::GtkAccessibleState {
1764        match self {
1765            Self::Busy => ffi::GTK_ACCESSIBLE_STATE_BUSY,
1766            Self::Checked => ffi::GTK_ACCESSIBLE_STATE_CHECKED,
1767            Self::Disabled => ffi::GTK_ACCESSIBLE_STATE_DISABLED,
1768            Self::Expanded => ffi::GTK_ACCESSIBLE_STATE_EXPANDED,
1769            Self::Hidden => ffi::GTK_ACCESSIBLE_STATE_HIDDEN,
1770            Self::Invalid => ffi::GTK_ACCESSIBLE_STATE_INVALID,
1771            Self::Pressed => ffi::GTK_ACCESSIBLE_STATE_PRESSED,
1772            Self::Selected => ffi::GTK_ACCESSIBLE_STATE_SELECTED,
1773            #[cfg(feature = "v4_12")]
1774            Self::Visited => ffi::GTK_ACCESSIBLE_STATE_VISITED,
1775            Self::__Unknown(value) => value,
1776        }
1777    }
1778}
1779
1780#[doc(hidden)]
1781impl FromGlib<ffi::GtkAccessibleState> for AccessibleState {
1782    #[inline]
1783    unsafe fn from_glib(value: ffi::GtkAccessibleState) -> Self {
1784        skip_assert_initialized!();
1785
1786        match value {
1787            ffi::GTK_ACCESSIBLE_STATE_BUSY => Self::Busy,
1788            ffi::GTK_ACCESSIBLE_STATE_CHECKED => Self::Checked,
1789            ffi::GTK_ACCESSIBLE_STATE_DISABLED => Self::Disabled,
1790            ffi::GTK_ACCESSIBLE_STATE_EXPANDED => Self::Expanded,
1791            ffi::GTK_ACCESSIBLE_STATE_HIDDEN => Self::Hidden,
1792            ffi::GTK_ACCESSIBLE_STATE_INVALID => Self::Invalid,
1793            ffi::GTK_ACCESSIBLE_STATE_PRESSED => Self::Pressed,
1794            ffi::GTK_ACCESSIBLE_STATE_SELECTED => Self::Selected,
1795            #[cfg(feature = "v4_12")]
1796            ffi::GTK_ACCESSIBLE_STATE_VISITED => Self::Visited,
1797            value => Self::__Unknown(value),
1798        }
1799    }
1800}
1801
1802impl StaticType for AccessibleState {
1803    #[inline]
1804    #[doc(alias = "gtk_accessible_state_get_type")]
1805    fn static_type() -> glib::Type {
1806        unsafe { from_glib(ffi::gtk_accessible_state_get_type()) }
1807    }
1808}
1809
1810impl glib::HasParamSpec for AccessibleState {
1811    type ParamSpec = glib::ParamSpecEnum;
1812    type SetValue = Self;
1813    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
1814
1815    fn param_spec_builder() -> Self::BuilderFn {
1816        Self::ParamSpec::builder_with_default
1817    }
1818}
1819
1820impl glib::value::ValueType for AccessibleState {
1821    type Type = Self;
1822}
1823
1824unsafe impl<'a> glib::value::FromValue<'a> for AccessibleState {
1825    type Checker = glib::value::GenericValueTypeChecker<Self>;
1826
1827    #[inline]
1828    unsafe fn from_value(value: &'a glib::Value) -> Self {
1829        skip_assert_initialized!();
1830        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1831    }
1832}
1833
1834impl ToValue for AccessibleState {
1835    #[inline]
1836    fn to_value(&self) -> glib::Value {
1837        let mut value = glib::Value::for_value_type::<Self>();
1838        unsafe {
1839            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1840        }
1841        value
1842    }
1843
1844    #[inline]
1845    fn value_type(&self) -> glib::Type {
1846        Self::static_type()
1847    }
1848}
1849
1850impl From<AccessibleState> for glib::Value {
1851    #[inline]
1852    fn from(v: AccessibleState) -> Self {
1853        skip_assert_initialized!();
1854        ToValue::to_value(&v)
1855    }
1856}
1857
1858/// The type of contents change operation.
1859#[cfg(feature = "v4_14")]
1860#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1861#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1862#[non_exhaustive]
1863#[doc(alias = "GtkAccessibleTextContentChange")]
1864pub enum AccessibleTextContentChange {
1865    /// contents change as the result of
1866    ///   an insert operation
1867    #[doc(alias = "GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT")]
1868    Insert,
1869    /// contents change as the result of
1870    ///   a remove operation
1871    #[doc(alias = "GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE")]
1872    Remove,
1873    #[doc(hidden)]
1874    __Unknown(i32),
1875}
1876
1877#[cfg(feature = "v4_14")]
1878#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1879#[doc(hidden)]
1880impl IntoGlib for AccessibleTextContentChange {
1881    type GlibType = ffi::GtkAccessibleTextContentChange;
1882
1883    #[inline]
1884    fn into_glib(self) -> ffi::GtkAccessibleTextContentChange {
1885        match self {
1886            Self::Insert => ffi::GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT,
1887            Self::Remove => ffi::GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE,
1888            Self::__Unknown(value) => value,
1889        }
1890    }
1891}
1892
1893#[cfg(feature = "v4_14")]
1894#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1895#[doc(hidden)]
1896impl FromGlib<ffi::GtkAccessibleTextContentChange> for AccessibleTextContentChange {
1897    #[inline]
1898    unsafe fn from_glib(value: ffi::GtkAccessibleTextContentChange) -> Self {
1899        skip_assert_initialized!();
1900
1901        match value {
1902            ffi::GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT => Self::Insert,
1903            ffi::GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE => Self::Remove,
1904            value => Self::__Unknown(value),
1905        }
1906    }
1907}
1908
1909#[cfg(feature = "v4_14")]
1910#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1911impl StaticType for AccessibleTextContentChange {
1912    #[inline]
1913    #[doc(alias = "gtk_accessible_text_content_change_get_type")]
1914    fn static_type() -> glib::Type {
1915        unsafe { from_glib(ffi::gtk_accessible_text_content_change_get_type()) }
1916    }
1917}
1918
1919#[cfg(feature = "v4_14")]
1920#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1921impl glib::HasParamSpec for AccessibleTextContentChange {
1922    type ParamSpec = glib::ParamSpecEnum;
1923    type SetValue = Self;
1924    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
1925
1926    fn param_spec_builder() -> Self::BuilderFn {
1927        Self::ParamSpec::builder_with_default
1928    }
1929}
1930
1931#[cfg(feature = "v4_14")]
1932#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1933impl glib::value::ValueType for AccessibleTextContentChange {
1934    type Type = Self;
1935}
1936
1937#[cfg(feature = "v4_14")]
1938#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1939unsafe impl<'a> glib::value::FromValue<'a> for AccessibleTextContentChange {
1940    type Checker = glib::value::GenericValueTypeChecker<Self>;
1941
1942    #[inline]
1943    unsafe fn from_value(value: &'a glib::Value) -> Self {
1944        skip_assert_initialized!();
1945        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1946    }
1947}
1948
1949#[cfg(feature = "v4_14")]
1950#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1951impl ToValue for AccessibleTextContentChange {
1952    #[inline]
1953    fn to_value(&self) -> glib::Value {
1954        let mut value = glib::Value::for_value_type::<Self>();
1955        unsafe {
1956            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1957        }
1958        value
1959    }
1960
1961    #[inline]
1962    fn value_type(&self) -> glib::Type {
1963        Self::static_type()
1964    }
1965}
1966
1967#[cfg(feature = "v4_14")]
1968#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1969impl From<AccessibleTextContentChange> for glib::Value {
1970    #[inline]
1971    fn from(v: AccessibleTextContentChange) -> Self {
1972        skip_assert_initialized!();
1973        ToValue::to_value(&v)
1974    }
1975}
1976
1977/// The granularity for queries about the text contents of a [`AccessibleText`][crate::AccessibleText]
1978/// implementation.
1979#[cfg(feature = "v4_14")]
1980#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1981#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1982#[non_exhaustive]
1983#[doc(alias = "GtkAccessibleTextGranularity")]
1984pub enum AccessibleTextGranularity {
1985    /// Use the boundary between
1986    ///   characters (including non-printing characters)
1987    #[doc(alias = "GTK_ACCESSIBLE_TEXT_GRANULARITY_CHARACTER")]
1988    Character,
1989    /// Use the boundary between words,
1990    ///   starting from the beginning of the current word and ending at the
1991    ///   beginning of the next word
1992    #[doc(alias = "GTK_ACCESSIBLE_TEXT_GRANULARITY_WORD")]
1993    Word,
1994    /// Use the boundary between
1995    ///   sentences, starting from the beginning of the current sentence and
1996    ///   ending at the beginning of the next sentence
1997    #[doc(alias = "GTK_ACCESSIBLE_TEXT_GRANULARITY_SENTENCE")]
1998    Sentence,
1999    /// Use the boundary between lines,
2000    ///   starting from the beginning of the current line and ending at the
2001    ///   beginning of the next line
2002    #[doc(alias = "GTK_ACCESSIBLE_TEXT_GRANULARITY_LINE")]
2003    Line,
2004    /// Use the boundary between
2005    ///   paragraphs, starting from the beginning of the current paragraph and
2006    ///   ending at the beginning of the next paragraph
2007    #[doc(alias = "GTK_ACCESSIBLE_TEXT_GRANULARITY_PARAGRAPH")]
2008    Paragraph,
2009    #[doc(hidden)]
2010    __Unknown(i32),
2011}
2012
2013#[cfg(feature = "v4_14")]
2014#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
2015#[doc(hidden)]
2016impl IntoGlib for AccessibleTextGranularity {
2017    type GlibType = ffi::GtkAccessibleTextGranularity;
2018
2019    #[inline]
2020    fn into_glib(self) -> ffi::GtkAccessibleTextGranularity {
2021        match self {
2022            Self::Character => ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_CHARACTER,
2023            Self::Word => ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_WORD,
2024            Self::Sentence => ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_SENTENCE,
2025            Self::Line => ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_LINE,
2026            Self::Paragraph => ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_PARAGRAPH,
2027            Self::__Unknown(value) => value,
2028        }
2029    }
2030}
2031
2032#[cfg(feature = "v4_14")]
2033#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
2034#[doc(hidden)]
2035impl FromGlib<ffi::GtkAccessibleTextGranularity> for AccessibleTextGranularity {
2036    #[inline]
2037    unsafe fn from_glib(value: ffi::GtkAccessibleTextGranularity) -> Self {
2038        skip_assert_initialized!();
2039
2040        match value {
2041            ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_CHARACTER => Self::Character,
2042            ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_WORD => Self::Word,
2043            ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_SENTENCE => Self::Sentence,
2044            ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_LINE => Self::Line,
2045            ffi::GTK_ACCESSIBLE_TEXT_GRANULARITY_PARAGRAPH => Self::Paragraph,
2046            value => Self::__Unknown(value),
2047        }
2048    }
2049}
2050
2051#[cfg(feature = "v4_14")]
2052#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
2053impl StaticType for AccessibleTextGranularity {
2054    #[inline]
2055    #[doc(alias = "gtk_accessible_text_granularity_get_type")]
2056    fn static_type() -> glib::Type {
2057        unsafe { from_glib(ffi::gtk_accessible_text_granularity_get_type()) }
2058    }
2059}
2060
2061#[cfg(feature = "v4_14")]
2062#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
2063impl glib::HasParamSpec for AccessibleTextGranularity {
2064    type ParamSpec = glib::ParamSpecEnum;
2065    type SetValue = Self;
2066    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
2067
2068    fn param_spec_builder() -> Self::BuilderFn {
2069        Self::ParamSpec::builder_with_default
2070    }
2071}
2072
2073#[cfg(feature = "v4_14")]
2074#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
2075impl glib::value::ValueType for AccessibleTextGranularity {
2076    type Type = Self;
2077}
2078
2079#[cfg(feature = "v4_14")]
2080#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
2081unsafe impl<'a> glib::value::FromValue<'a> for AccessibleTextGranularity {
2082    type Checker = glib::value::GenericValueTypeChecker<Self>;
2083
2084    #[inline]
2085    unsafe fn from_value(value: &'a glib::Value) -> Self {
2086        skip_assert_initialized!();
2087        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2088    }
2089}
2090
2091#[cfg(feature = "v4_14")]
2092#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
2093impl ToValue for AccessibleTextGranularity {
2094    #[inline]
2095    fn to_value(&self) -> glib::Value {
2096        let mut value = glib::Value::for_value_type::<Self>();
2097        unsafe {
2098            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2099        }
2100        value
2101    }
2102
2103    #[inline]
2104    fn value_type(&self) -> glib::Type {
2105        Self::static_type()
2106    }
2107}
2108
2109#[cfg(feature = "v4_14")]
2110#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
2111impl From<AccessibleTextGranularity> for glib::Value {
2112    #[inline]
2113    fn from(v: AccessibleTextGranularity) -> Self {
2114        skip_assert_initialized!();
2115        ToValue::to_value(&v)
2116    }
2117}
2118
2119/// The possible values for the [`AccessibleState::Pressed`][crate::AccessibleState::Pressed]
2120/// accessible state.
2121///
2122/// Note that the [`False`][Self::False] and
2123/// [`True`][Self::True] have the same values
2124/// as [`false`] and [`true`].
2125#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2126#[non_exhaustive]
2127#[doc(alias = "GtkAccessibleTristate")]
2128pub enum AccessibleTristate {
2129    /// The state is `false`
2130    #[doc(alias = "GTK_ACCESSIBLE_TRISTATE_FALSE")]
2131    False,
2132    /// The state is `true`
2133    #[doc(alias = "GTK_ACCESSIBLE_TRISTATE_TRUE")]
2134    True,
2135    /// The state is `mixed`
2136    #[doc(alias = "GTK_ACCESSIBLE_TRISTATE_MIXED")]
2137    Mixed,
2138    #[doc(hidden)]
2139    __Unknown(i32),
2140}
2141
2142#[doc(hidden)]
2143impl IntoGlib for AccessibleTristate {
2144    type GlibType = ffi::GtkAccessibleTristate;
2145
2146    #[inline]
2147    fn into_glib(self) -> ffi::GtkAccessibleTristate {
2148        match self {
2149            Self::False => ffi::GTK_ACCESSIBLE_TRISTATE_FALSE,
2150            Self::True => ffi::GTK_ACCESSIBLE_TRISTATE_TRUE,
2151            Self::Mixed => ffi::GTK_ACCESSIBLE_TRISTATE_MIXED,
2152            Self::__Unknown(value) => value,
2153        }
2154    }
2155}
2156
2157#[doc(hidden)]
2158impl FromGlib<ffi::GtkAccessibleTristate> for AccessibleTristate {
2159    #[inline]
2160    unsafe fn from_glib(value: ffi::GtkAccessibleTristate) -> Self {
2161        skip_assert_initialized!();
2162
2163        match value {
2164            ffi::GTK_ACCESSIBLE_TRISTATE_FALSE => Self::False,
2165            ffi::GTK_ACCESSIBLE_TRISTATE_TRUE => Self::True,
2166            ffi::GTK_ACCESSIBLE_TRISTATE_MIXED => Self::Mixed,
2167            value => Self::__Unknown(value),
2168        }
2169    }
2170}
2171
2172impl StaticType for AccessibleTristate {
2173    #[inline]
2174    #[doc(alias = "gtk_accessible_tristate_get_type")]
2175    fn static_type() -> glib::Type {
2176        unsafe { from_glib(ffi::gtk_accessible_tristate_get_type()) }
2177    }
2178}
2179
2180impl glib::HasParamSpec for AccessibleTristate {
2181    type ParamSpec = glib::ParamSpecEnum;
2182    type SetValue = Self;
2183    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
2184
2185    fn param_spec_builder() -> Self::BuilderFn {
2186        Self::ParamSpec::builder_with_default
2187    }
2188}
2189
2190impl glib::value::ValueType for AccessibleTristate {
2191    type Type = Self;
2192}
2193
2194unsafe impl<'a> glib::value::FromValue<'a> for AccessibleTristate {
2195    type Checker = glib::value::GenericValueTypeChecker<Self>;
2196
2197    #[inline]
2198    unsafe fn from_value(value: &'a glib::Value) -> Self {
2199        skip_assert_initialized!();
2200        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2201    }
2202}
2203
2204impl ToValue for AccessibleTristate {
2205    #[inline]
2206    fn to_value(&self) -> glib::Value {
2207        let mut value = glib::Value::for_value_type::<Self>();
2208        unsafe {
2209            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2210        }
2211        value
2212    }
2213
2214    #[inline]
2215    fn value_type(&self) -> glib::Type {
2216        Self::static_type()
2217    }
2218}
2219
2220impl From<AccessibleTristate> for glib::Value {
2221    #[inline]
2222    fn from(v: AccessibleTristate) -> Self {
2223        skip_assert_initialized!();
2224        ToValue::to_value(&v)
2225    }
2226}
2227
2228/// Indicates the direction in which an arrow should point.
2229#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2230#[non_exhaustive]
2231#[doc(alias = "GtkArrowType")]
2232pub enum ArrowType {
2233    /// Represents an upward pointing arrow.
2234    #[doc(alias = "GTK_ARROW_UP")]
2235    Up,
2236    /// Represents a downward pointing arrow.
2237    #[doc(alias = "GTK_ARROW_DOWN")]
2238    Down,
2239    /// Represents a left pointing arrow.
2240    #[doc(alias = "GTK_ARROW_LEFT")]
2241    Left,
2242    /// Represents a right pointing arrow.
2243    #[doc(alias = "GTK_ARROW_RIGHT")]
2244    Right,
2245    /// No arrow.
2246    #[doc(alias = "GTK_ARROW_NONE")]
2247    None,
2248    #[doc(hidden)]
2249    __Unknown(i32),
2250}
2251
2252#[doc(hidden)]
2253impl IntoGlib for ArrowType {
2254    type GlibType = ffi::GtkArrowType;
2255
2256    #[inline]
2257    fn into_glib(self) -> ffi::GtkArrowType {
2258        match self {
2259            Self::Up => ffi::GTK_ARROW_UP,
2260            Self::Down => ffi::GTK_ARROW_DOWN,
2261            Self::Left => ffi::GTK_ARROW_LEFT,
2262            Self::Right => ffi::GTK_ARROW_RIGHT,
2263            Self::None => ffi::GTK_ARROW_NONE,
2264            Self::__Unknown(value) => value,
2265        }
2266    }
2267}
2268
2269#[doc(hidden)]
2270impl FromGlib<ffi::GtkArrowType> for ArrowType {
2271    #[inline]
2272    unsafe fn from_glib(value: ffi::GtkArrowType) -> Self {
2273        skip_assert_initialized!();
2274
2275        match value {
2276            ffi::GTK_ARROW_UP => Self::Up,
2277            ffi::GTK_ARROW_DOWN => Self::Down,
2278            ffi::GTK_ARROW_LEFT => Self::Left,
2279            ffi::GTK_ARROW_RIGHT => Self::Right,
2280            ffi::GTK_ARROW_NONE => Self::None,
2281            value => Self::__Unknown(value),
2282        }
2283    }
2284}
2285
2286impl StaticType for ArrowType {
2287    #[inline]
2288    #[doc(alias = "gtk_arrow_type_get_type")]
2289    fn static_type() -> glib::Type {
2290        unsafe { from_glib(ffi::gtk_arrow_type_get_type()) }
2291    }
2292}
2293
2294impl glib::HasParamSpec for ArrowType {
2295    type ParamSpec = glib::ParamSpecEnum;
2296    type SetValue = Self;
2297    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
2298
2299    fn param_spec_builder() -> Self::BuilderFn {
2300        Self::ParamSpec::builder_with_default
2301    }
2302}
2303
2304impl glib::value::ValueType for ArrowType {
2305    type Type = Self;
2306}
2307
2308unsafe impl<'a> glib::value::FromValue<'a> for ArrowType {
2309    type Checker = glib::value::GenericValueTypeChecker<Self>;
2310
2311    #[inline]
2312    unsafe fn from_value(value: &'a glib::Value) -> Self {
2313        skip_assert_initialized!();
2314        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2315    }
2316}
2317
2318impl ToValue for ArrowType {
2319    #[inline]
2320    fn to_value(&self) -> glib::Value {
2321        let mut value = glib::Value::for_value_type::<Self>();
2322        unsafe {
2323            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2324        }
2325        value
2326    }
2327
2328    #[inline]
2329    fn value_type(&self) -> glib::Type {
2330        Self::static_type()
2331    }
2332}
2333
2334impl From<ArrowType> for glib::Value {
2335    #[inline]
2336    fn from(v: ArrowType) -> Self {
2337        skip_assert_initialized!();
2338        ToValue::to_value(&v)
2339    }
2340}
2341
2342/// Determines the role of a page inside a [`Assistant`][crate::Assistant].
2343///
2344/// The role is used to handle buttons sensitivity and visibility.
2345///
2346/// Note that an assistant needs to end its page flow with a page of type
2347/// [`Confirm`][Self::Confirm], [`Summary`][Self::Summary] or
2348/// [`Progress`][Self::Progress] to be correct.
2349///
2350/// The Cancel button will only be shown if the page isn’t “committed”.
2351/// See gtk_assistant_commit() for details.
2352///
2353/// # Deprecated since 4.10
2354///
2355/// [`Assistant`][crate::Assistant] will be removed in GTK 5
2356#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2357#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2358#[non_exhaustive]
2359#[doc(alias = "GtkAssistantPageType")]
2360pub enum AssistantPageType {
2361    /// The page has regular contents. Both the
2362    ///  Back and forward buttons will be shown.
2363    #[doc(alias = "GTK_ASSISTANT_PAGE_CONTENT")]
2364    Content,
2365    /// The page contains an introduction to the
2366    ///  assistant task. Only the Forward button will be shown if there is a
2367    ///   next page.
2368    #[doc(alias = "GTK_ASSISTANT_PAGE_INTRO")]
2369    Intro,
2370    /// The page lets the user confirm or deny the
2371    ///  changes. The Back and Apply buttons will be shown.
2372    #[doc(alias = "GTK_ASSISTANT_PAGE_CONFIRM")]
2373    Confirm,
2374    /// The page informs the user of the changes
2375    ///  done. Only the Close button will be shown.
2376    #[doc(alias = "GTK_ASSISTANT_PAGE_SUMMARY")]
2377    Summary,
2378    /// Used for tasks that take a long time to
2379    ///  complete, blocks the assistant until the page is marked as complete.
2380    ///   Only the back button will be shown.
2381    #[doc(alias = "GTK_ASSISTANT_PAGE_PROGRESS")]
2382    Progress,
2383    /// Used for when other page types are not
2384    ///  appropriate. No buttons will be shown, and the application must
2385    ///  add its own buttons through gtk_assistant_add_action_widget().
2386    #[doc(alias = "GTK_ASSISTANT_PAGE_CUSTOM")]
2387    Custom,
2388    #[doc(hidden)]
2389    __Unknown(i32),
2390}
2391
2392#[allow(deprecated)]
2393#[doc(hidden)]
2394impl IntoGlib for AssistantPageType {
2395    type GlibType = ffi::GtkAssistantPageType;
2396
2397    #[inline]
2398    fn into_glib(self) -> ffi::GtkAssistantPageType {
2399        match self {
2400            Self::Content => ffi::GTK_ASSISTANT_PAGE_CONTENT,
2401            Self::Intro => ffi::GTK_ASSISTANT_PAGE_INTRO,
2402            Self::Confirm => ffi::GTK_ASSISTANT_PAGE_CONFIRM,
2403            Self::Summary => ffi::GTK_ASSISTANT_PAGE_SUMMARY,
2404            Self::Progress => ffi::GTK_ASSISTANT_PAGE_PROGRESS,
2405            Self::Custom => ffi::GTK_ASSISTANT_PAGE_CUSTOM,
2406            Self::__Unknown(value) => value,
2407        }
2408    }
2409}
2410
2411#[allow(deprecated)]
2412#[doc(hidden)]
2413impl FromGlib<ffi::GtkAssistantPageType> for AssistantPageType {
2414    #[inline]
2415    unsafe fn from_glib(value: ffi::GtkAssistantPageType) -> Self {
2416        skip_assert_initialized!();
2417
2418        match value {
2419            ffi::GTK_ASSISTANT_PAGE_CONTENT => Self::Content,
2420            ffi::GTK_ASSISTANT_PAGE_INTRO => Self::Intro,
2421            ffi::GTK_ASSISTANT_PAGE_CONFIRM => Self::Confirm,
2422            ffi::GTK_ASSISTANT_PAGE_SUMMARY => Self::Summary,
2423            ffi::GTK_ASSISTANT_PAGE_PROGRESS => Self::Progress,
2424            ffi::GTK_ASSISTANT_PAGE_CUSTOM => Self::Custom,
2425            value => Self::__Unknown(value),
2426        }
2427    }
2428}
2429
2430#[allow(deprecated)]
2431impl StaticType for AssistantPageType {
2432    #[inline]
2433    #[doc(alias = "gtk_assistant_page_type_get_type")]
2434    fn static_type() -> glib::Type {
2435        unsafe { from_glib(ffi::gtk_assistant_page_type_get_type()) }
2436    }
2437}
2438
2439#[allow(deprecated)]
2440impl glib::HasParamSpec for AssistantPageType {
2441    type ParamSpec = glib::ParamSpecEnum;
2442    type SetValue = Self;
2443    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
2444
2445    fn param_spec_builder() -> Self::BuilderFn {
2446        Self::ParamSpec::builder_with_default
2447    }
2448}
2449
2450#[allow(deprecated)]
2451impl glib::value::ValueType for AssistantPageType {
2452    type Type = Self;
2453}
2454
2455#[allow(deprecated)]
2456unsafe impl<'a> glib::value::FromValue<'a> for AssistantPageType {
2457    type Checker = glib::value::GenericValueTypeChecker<Self>;
2458
2459    #[inline]
2460    unsafe fn from_value(value: &'a glib::Value) -> Self {
2461        skip_assert_initialized!();
2462        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2463    }
2464}
2465
2466#[allow(deprecated)]
2467impl ToValue for AssistantPageType {
2468    #[inline]
2469    fn to_value(&self) -> glib::Value {
2470        let mut value = glib::Value::for_value_type::<Self>();
2471        unsafe {
2472            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2473        }
2474        value
2475    }
2476
2477    #[inline]
2478    fn value_type(&self) -> glib::Type {
2479        Self::static_type()
2480    }
2481}
2482
2483#[allow(deprecated)]
2484impl From<AssistantPageType> for glib::Value {
2485    #[inline]
2486    fn from(v: AssistantPageType) -> Self {
2487        skip_assert_initialized!();
2488        ToValue::to_value(&v)
2489    }
2490}
2491
2492/// Baseline position in a row of widgets.
2493///
2494/// Whenever a container has some form of natural row it may align
2495/// children in that row along a common typographical baseline. If
2496/// the amount of vertical space in the row is taller than the total
2497/// requested height of the baseline-aligned children then it can use a
2498/// [`BaselinePosition`][crate::BaselinePosition] to select where to put the baseline inside the
2499/// extra available space.
2500#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2501#[non_exhaustive]
2502#[doc(alias = "GtkBaselinePosition")]
2503pub enum BaselinePosition {
2504    /// Align the baseline at the top
2505    #[doc(alias = "GTK_BASELINE_POSITION_TOP")]
2506    Top,
2507    /// Center the baseline
2508    #[doc(alias = "GTK_BASELINE_POSITION_CENTER")]
2509    Center,
2510    /// Align the baseline at the bottom
2511    #[doc(alias = "GTK_BASELINE_POSITION_BOTTOM")]
2512    Bottom,
2513    #[doc(hidden)]
2514    __Unknown(i32),
2515}
2516
2517#[doc(hidden)]
2518impl IntoGlib for BaselinePosition {
2519    type GlibType = ffi::GtkBaselinePosition;
2520
2521    #[inline]
2522    fn into_glib(self) -> ffi::GtkBaselinePosition {
2523        match self {
2524            Self::Top => ffi::GTK_BASELINE_POSITION_TOP,
2525            Self::Center => ffi::GTK_BASELINE_POSITION_CENTER,
2526            Self::Bottom => ffi::GTK_BASELINE_POSITION_BOTTOM,
2527            Self::__Unknown(value) => value,
2528        }
2529    }
2530}
2531
2532#[doc(hidden)]
2533impl FromGlib<ffi::GtkBaselinePosition> for BaselinePosition {
2534    #[inline]
2535    unsafe fn from_glib(value: ffi::GtkBaselinePosition) -> Self {
2536        skip_assert_initialized!();
2537
2538        match value {
2539            ffi::GTK_BASELINE_POSITION_TOP => Self::Top,
2540            ffi::GTK_BASELINE_POSITION_CENTER => Self::Center,
2541            ffi::GTK_BASELINE_POSITION_BOTTOM => Self::Bottom,
2542            value => Self::__Unknown(value),
2543        }
2544    }
2545}
2546
2547impl StaticType for BaselinePosition {
2548    #[inline]
2549    #[doc(alias = "gtk_baseline_position_get_type")]
2550    fn static_type() -> glib::Type {
2551        unsafe { from_glib(ffi::gtk_baseline_position_get_type()) }
2552    }
2553}
2554
2555impl glib::HasParamSpec for BaselinePosition {
2556    type ParamSpec = glib::ParamSpecEnum;
2557    type SetValue = Self;
2558    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
2559
2560    fn param_spec_builder() -> Self::BuilderFn {
2561        Self::ParamSpec::builder_with_default
2562    }
2563}
2564
2565impl glib::value::ValueType for BaselinePosition {
2566    type Type = Self;
2567}
2568
2569unsafe impl<'a> glib::value::FromValue<'a> for BaselinePosition {
2570    type Checker = glib::value::GenericValueTypeChecker<Self>;
2571
2572    #[inline]
2573    unsafe fn from_value(value: &'a glib::Value) -> Self {
2574        skip_assert_initialized!();
2575        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2576    }
2577}
2578
2579impl ToValue for BaselinePosition {
2580    #[inline]
2581    fn to_value(&self) -> glib::Value {
2582        let mut value = glib::Value::for_value_type::<Self>();
2583        unsafe {
2584            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2585        }
2586        value
2587    }
2588
2589    #[inline]
2590    fn value_type(&self) -> glib::Type {
2591        Self::static_type()
2592    }
2593}
2594
2595impl From<BaselinePosition> for glib::Value {
2596    #[inline]
2597    fn from(v: BaselinePosition) -> Self {
2598        skip_assert_initialized!();
2599        ToValue::to_value(&v)
2600    }
2601}
2602
2603/// Describes how the border of a UI element should be rendered.
2604#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2605#[non_exhaustive]
2606#[doc(alias = "GtkBorderStyle")]
2607pub enum BorderStyle {
2608    /// No visible border
2609    #[doc(alias = "GTK_BORDER_STYLE_NONE")]
2610    None,
2611    /// Same as [`None`][Self::None]
2612    #[doc(alias = "GTK_BORDER_STYLE_HIDDEN")]
2613    Hidden,
2614    /// A single line segment
2615    #[doc(alias = "GTK_BORDER_STYLE_SOLID")]
2616    Solid,
2617    /// Looks as if the content is sunken into the canvas
2618    #[doc(alias = "GTK_BORDER_STYLE_INSET")]
2619    Inset,
2620    /// Looks as if the content is coming out of the canvas
2621    #[doc(alias = "GTK_BORDER_STYLE_OUTSET")]
2622    Outset,
2623    /// A series of round dots
2624    #[doc(alias = "GTK_BORDER_STYLE_DOTTED")]
2625    Dotted,
2626    /// A series of square-ended dashes
2627    #[doc(alias = "GTK_BORDER_STYLE_DASHED")]
2628    Dashed,
2629    /// Two parallel lines with some space between them
2630    #[doc(alias = "GTK_BORDER_STYLE_DOUBLE")]
2631    Double,
2632    /// Looks as if it were carved in the canvas
2633    #[doc(alias = "GTK_BORDER_STYLE_GROOVE")]
2634    Groove,
2635    /// Looks as if it were coming out of the canvas
2636    #[doc(alias = "GTK_BORDER_STYLE_RIDGE")]
2637    Ridge,
2638    #[doc(hidden)]
2639    __Unknown(i32),
2640}
2641
2642#[doc(hidden)]
2643impl IntoGlib for BorderStyle {
2644    type GlibType = ffi::GtkBorderStyle;
2645
2646    #[inline]
2647    fn into_glib(self) -> ffi::GtkBorderStyle {
2648        match self {
2649            Self::None => ffi::GTK_BORDER_STYLE_NONE,
2650            Self::Hidden => ffi::GTK_BORDER_STYLE_HIDDEN,
2651            Self::Solid => ffi::GTK_BORDER_STYLE_SOLID,
2652            Self::Inset => ffi::GTK_BORDER_STYLE_INSET,
2653            Self::Outset => ffi::GTK_BORDER_STYLE_OUTSET,
2654            Self::Dotted => ffi::GTK_BORDER_STYLE_DOTTED,
2655            Self::Dashed => ffi::GTK_BORDER_STYLE_DASHED,
2656            Self::Double => ffi::GTK_BORDER_STYLE_DOUBLE,
2657            Self::Groove => ffi::GTK_BORDER_STYLE_GROOVE,
2658            Self::Ridge => ffi::GTK_BORDER_STYLE_RIDGE,
2659            Self::__Unknown(value) => value,
2660        }
2661    }
2662}
2663
2664#[doc(hidden)]
2665impl FromGlib<ffi::GtkBorderStyle> for BorderStyle {
2666    #[inline]
2667    unsafe fn from_glib(value: ffi::GtkBorderStyle) -> Self {
2668        skip_assert_initialized!();
2669
2670        match value {
2671            ffi::GTK_BORDER_STYLE_NONE => Self::None,
2672            ffi::GTK_BORDER_STYLE_HIDDEN => Self::Hidden,
2673            ffi::GTK_BORDER_STYLE_SOLID => Self::Solid,
2674            ffi::GTK_BORDER_STYLE_INSET => Self::Inset,
2675            ffi::GTK_BORDER_STYLE_OUTSET => Self::Outset,
2676            ffi::GTK_BORDER_STYLE_DOTTED => Self::Dotted,
2677            ffi::GTK_BORDER_STYLE_DASHED => Self::Dashed,
2678            ffi::GTK_BORDER_STYLE_DOUBLE => Self::Double,
2679            ffi::GTK_BORDER_STYLE_GROOVE => Self::Groove,
2680            ffi::GTK_BORDER_STYLE_RIDGE => Self::Ridge,
2681            value => Self::__Unknown(value),
2682        }
2683    }
2684}
2685
2686impl StaticType for BorderStyle {
2687    #[inline]
2688    #[doc(alias = "gtk_border_style_get_type")]
2689    fn static_type() -> glib::Type {
2690        unsafe { from_glib(ffi::gtk_border_style_get_type()) }
2691    }
2692}
2693
2694impl glib::HasParamSpec for BorderStyle {
2695    type ParamSpec = glib::ParamSpecEnum;
2696    type SetValue = Self;
2697    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
2698
2699    fn param_spec_builder() -> Self::BuilderFn {
2700        Self::ParamSpec::builder_with_default
2701    }
2702}
2703
2704impl glib::value::ValueType for BorderStyle {
2705    type Type = Self;
2706}
2707
2708unsafe impl<'a> glib::value::FromValue<'a> for BorderStyle {
2709    type Checker = glib::value::GenericValueTypeChecker<Self>;
2710
2711    #[inline]
2712    unsafe fn from_value(value: &'a glib::Value) -> Self {
2713        skip_assert_initialized!();
2714        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2715    }
2716}
2717
2718impl ToValue for BorderStyle {
2719    #[inline]
2720    fn to_value(&self) -> glib::Value {
2721        let mut value = glib::Value::for_value_type::<Self>();
2722        unsafe {
2723            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2724        }
2725        value
2726    }
2727
2728    #[inline]
2729    fn value_type(&self) -> glib::Type {
2730        Self::static_type()
2731    }
2732}
2733
2734impl From<BorderStyle> for glib::Value {
2735    #[inline]
2736    fn from(v: BorderStyle) -> Self {
2737        skip_assert_initialized!();
2738        ToValue::to_value(&v)
2739    }
2740}
2741
2742/// Error codes that identify various errors that can occur while using
2743/// [`Builder`][crate::Builder].
2744#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2745#[non_exhaustive]
2746#[doc(alias = "GtkBuilderError")]
2747pub enum BuilderError {
2748    /// A type-func attribute didn’t name
2749    ///  a function that returns a `GType`.
2750    #[doc(alias = "GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION")]
2751    InvalidTypeFunction,
2752    /// The input contained a tag that [`Builder`][crate::Builder]
2753    ///  can’t handle.
2754    #[doc(alias = "GTK_BUILDER_ERROR_UNHANDLED_TAG")]
2755    UnhandledTag,
2756    /// An attribute that is required by
2757    ///  [`Builder`][crate::Builder] was missing.
2758    #[doc(alias = "GTK_BUILDER_ERROR_MISSING_ATTRIBUTE")]
2759    MissingAttribute,
2760    /// [`Builder`][crate::Builder] found an attribute that
2761    ///  it doesn’t understand.
2762    #[doc(alias = "GTK_BUILDER_ERROR_INVALID_ATTRIBUTE")]
2763    InvalidAttribute,
2764    /// [`Builder`][crate::Builder] found a tag that
2765    ///  it doesn’t understand.
2766    #[doc(alias = "GTK_BUILDER_ERROR_INVALID_TAG")]
2767    InvalidTag,
2768    /// A required property value was
2769    ///  missing.
2770    #[doc(alias = "GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE")]
2771    MissingPropertyValue,
2772    /// [`Builder`][crate::Builder] couldn’t parse
2773    ///  some attribute value.
2774    #[doc(alias = "GTK_BUILDER_ERROR_INVALID_VALUE")]
2775    InvalidValue,
2776    /// The input file requires a newer version
2777    ///  of GTK.
2778    #[doc(alias = "GTK_BUILDER_ERROR_VERSION_MISMATCH")]
2779    VersionMismatch,
2780    /// An object id occurred twice.
2781    #[doc(alias = "GTK_BUILDER_ERROR_DUPLICATE_ID")]
2782    DuplicateId,
2783    /// A specified object type is of the same type or
2784    ///  derived from the type of the composite class being extended with builder XML.
2785    #[doc(alias = "GTK_BUILDER_ERROR_OBJECT_TYPE_REFUSED")]
2786    ObjectTypeRefused,
2787    /// The wrong type was specified in a composite class’s template XML
2788    #[doc(alias = "GTK_BUILDER_ERROR_TEMPLATE_MISMATCH")]
2789    TemplateMismatch,
2790    /// The specified property is unknown for the object class.
2791    #[doc(alias = "GTK_BUILDER_ERROR_INVALID_PROPERTY")]
2792    InvalidProperty,
2793    /// The specified signal is unknown for the object class.
2794    #[doc(alias = "GTK_BUILDER_ERROR_INVALID_SIGNAL")]
2795    InvalidSignal,
2796    /// An object id is unknown.
2797    #[doc(alias = "GTK_BUILDER_ERROR_INVALID_ID")]
2798    InvalidId,
2799    /// A function could not be found. This often happens
2800    ///   when symbols are set to be kept private. Compiling code with -rdynamic or using the
2801    ///   `gmodule-export-2.0` pkgconfig module can fix this problem.
2802    #[doc(alias = "GTK_BUILDER_ERROR_INVALID_FUNCTION")]
2803    InvalidFunction,
2804    #[doc(hidden)]
2805    __Unknown(i32),
2806}
2807
2808#[doc(hidden)]
2809impl IntoGlib for BuilderError {
2810    type GlibType = ffi::GtkBuilderError;
2811
2812    fn into_glib(self) -> ffi::GtkBuilderError {
2813        match self {
2814            Self::InvalidTypeFunction => ffi::GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION,
2815            Self::UnhandledTag => ffi::GTK_BUILDER_ERROR_UNHANDLED_TAG,
2816            Self::MissingAttribute => ffi::GTK_BUILDER_ERROR_MISSING_ATTRIBUTE,
2817            Self::InvalidAttribute => ffi::GTK_BUILDER_ERROR_INVALID_ATTRIBUTE,
2818            Self::InvalidTag => ffi::GTK_BUILDER_ERROR_INVALID_TAG,
2819            Self::MissingPropertyValue => ffi::GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE,
2820            Self::InvalidValue => ffi::GTK_BUILDER_ERROR_INVALID_VALUE,
2821            Self::VersionMismatch => ffi::GTK_BUILDER_ERROR_VERSION_MISMATCH,
2822            Self::DuplicateId => ffi::GTK_BUILDER_ERROR_DUPLICATE_ID,
2823            Self::ObjectTypeRefused => ffi::GTK_BUILDER_ERROR_OBJECT_TYPE_REFUSED,
2824            Self::TemplateMismatch => ffi::GTK_BUILDER_ERROR_TEMPLATE_MISMATCH,
2825            Self::InvalidProperty => ffi::GTK_BUILDER_ERROR_INVALID_PROPERTY,
2826            Self::InvalidSignal => ffi::GTK_BUILDER_ERROR_INVALID_SIGNAL,
2827            Self::InvalidId => ffi::GTK_BUILDER_ERROR_INVALID_ID,
2828            Self::InvalidFunction => ffi::GTK_BUILDER_ERROR_INVALID_FUNCTION,
2829            Self::__Unknown(value) => value,
2830        }
2831    }
2832}
2833
2834#[doc(hidden)]
2835impl FromGlib<ffi::GtkBuilderError> for BuilderError {
2836    unsafe fn from_glib(value: ffi::GtkBuilderError) -> Self {
2837        skip_assert_initialized!();
2838
2839        match value {
2840            ffi::GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION => Self::InvalidTypeFunction,
2841            ffi::GTK_BUILDER_ERROR_UNHANDLED_TAG => Self::UnhandledTag,
2842            ffi::GTK_BUILDER_ERROR_MISSING_ATTRIBUTE => Self::MissingAttribute,
2843            ffi::GTK_BUILDER_ERROR_INVALID_ATTRIBUTE => Self::InvalidAttribute,
2844            ffi::GTK_BUILDER_ERROR_INVALID_TAG => Self::InvalidTag,
2845            ffi::GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE => Self::MissingPropertyValue,
2846            ffi::GTK_BUILDER_ERROR_INVALID_VALUE => Self::InvalidValue,
2847            ffi::GTK_BUILDER_ERROR_VERSION_MISMATCH => Self::VersionMismatch,
2848            ffi::GTK_BUILDER_ERROR_DUPLICATE_ID => Self::DuplicateId,
2849            ffi::GTK_BUILDER_ERROR_OBJECT_TYPE_REFUSED => Self::ObjectTypeRefused,
2850            ffi::GTK_BUILDER_ERROR_TEMPLATE_MISMATCH => Self::TemplateMismatch,
2851            ffi::GTK_BUILDER_ERROR_INVALID_PROPERTY => Self::InvalidProperty,
2852            ffi::GTK_BUILDER_ERROR_INVALID_SIGNAL => Self::InvalidSignal,
2853            ffi::GTK_BUILDER_ERROR_INVALID_ID => Self::InvalidId,
2854            ffi::GTK_BUILDER_ERROR_INVALID_FUNCTION => Self::InvalidFunction,
2855            value => Self::__Unknown(value),
2856        }
2857    }
2858}
2859
2860impl glib::error::ErrorDomain for BuilderError {
2861    #[inline]
2862    fn domain() -> glib::Quark {
2863        skip_assert_initialized!();
2864
2865        unsafe { from_glib(ffi::gtk_builder_error_quark()) }
2866    }
2867
2868    #[inline]
2869    fn code(self) -> i32 {
2870        self.into_glib()
2871    }
2872
2873    #[inline]
2874    #[allow(clippy::match_single_binding)]
2875    fn from(code: i32) -> Option<Self> {
2876        skip_assert_initialized!();
2877        match unsafe { from_glib(code) } {
2878            value => Some(value),
2879        }
2880    }
2881}
2882
2883impl StaticType for BuilderError {
2884    #[inline]
2885    #[doc(alias = "gtk_builder_error_get_type")]
2886    fn static_type() -> glib::Type {
2887        unsafe { from_glib(ffi::gtk_builder_error_get_type()) }
2888    }
2889}
2890
2891impl glib::HasParamSpec for BuilderError {
2892    type ParamSpec = glib::ParamSpecEnum;
2893    type SetValue = Self;
2894    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
2895
2896    fn param_spec_builder() -> Self::BuilderFn {
2897        Self::ParamSpec::builder_with_default
2898    }
2899}
2900
2901impl glib::value::ValueType for BuilderError {
2902    type Type = Self;
2903}
2904
2905unsafe impl<'a> glib::value::FromValue<'a> for BuilderError {
2906    type Checker = glib::value::GenericValueTypeChecker<Self>;
2907
2908    #[inline]
2909    unsafe fn from_value(value: &'a glib::Value) -> Self {
2910        skip_assert_initialized!();
2911        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2912    }
2913}
2914
2915impl ToValue for BuilderError {
2916    #[inline]
2917    fn to_value(&self) -> glib::Value {
2918        let mut value = glib::Value::for_value_type::<Self>();
2919        unsafe {
2920            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2921        }
2922        value
2923    }
2924
2925    #[inline]
2926    fn value_type(&self) -> glib::Type {
2927        Self::static_type()
2928    }
2929}
2930
2931impl From<BuilderError> for glib::Value {
2932    #[inline]
2933    fn from(v: BuilderError) -> Self {
2934        skip_assert_initialized!();
2935        ToValue::to_value(&v)
2936    }
2937}
2938
2939/// Prebuilt sets of buttons for [`Dialog`][crate::Dialog].
2940///
2941/// If none of these choices are appropriate, simply use
2942/// [`None`][Self::None] and call [`DialogExtManual::add_buttons()`][crate::prelude::DialogExtManual::add_buttons()].
2943///
2944/// > Please note that [`Ok`][Self::Ok], [`YesNo`][Self::YesNo]
2945/// > and [`OkCancel`][Self::OkCancel] are discouraged by the
2946/// > [GNOME Human Interface Guidelines](https://developer.gnome.org/hig/).
2947#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2948#[non_exhaustive]
2949#[doc(alias = "GtkButtonsType")]
2950pub enum ButtonsType {
2951    /// no buttons at all
2952    #[doc(alias = "GTK_BUTTONS_NONE")]
2953    None,
2954    /// an OK button
2955    #[doc(alias = "GTK_BUTTONS_OK")]
2956    Ok,
2957    /// a Close button
2958    #[doc(alias = "GTK_BUTTONS_CLOSE")]
2959    Close,
2960    /// a Cancel button
2961    #[doc(alias = "GTK_BUTTONS_CANCEL")]
2962    Cancel,
2963    /// Yes and No buttons
2964    #[doc(alias = "GTK_BUTTONS_YES_NO")]
2965    YesNo,
2966    /// OK and Cancel buttons
2967    #[doc(alias = "GTK_BUTTONS_OK_CANCEL")]
2968    OkCancel,
2969    #[doc(hidden)]
2970    __Unknown(i32),
2971}
2972
2973#[doc(hidden)]
2974impl IntoGlib for ButtonsType {
2975    type GlibType = ffi::GtkButtonsType;
2976
2977    #[inline]
2978    fn into_glib(self) -> ffi::GtkButtonsType {
2979        match self {
2980            Self::None => ffi::GTK_BUTTONS_NONE,
2981            Self::Ok => ffi::GTK_BUTTONS_OK,
2982            Self::Close => ffi::GTK_BUTTONS_CLOSE,
2983            Self::Cancel => ffi::GTK_BUTTONS_CANCEL,
2984            Self::YesNo => ffi::GTK_BUTTONS_YES_NO,
2985            Self::OkCancel => ffi::GTK_BUTTONS_OK_CANCEL,
2986            Self::__Unknown(value) => value,
2987        }
2988    }
2989}
2990
2991#[doc(hidden)]
2992impl FromGlib<ffi::GtkButtonsType> for ButtonsType {
2993    #[inline]
2994    unsafe fn from_glib(value: ffi::GtkButtonsType) -> Self {
2995        skip_assert_initialized!();
2996
2997        match value {
2998            ffi::GTK_BUTTONS_NONE => Self::None,
2999            ffi::GTK_BUTTONS_OK => Self::Ok,
3000            ffi::GTK_BUTTONS_CLOSE => Self::Close,
3001            ffi::GTK_BUTTONS_CANCEL => Self::Cancel,
3002            ffi::GTK_BUTTONS_YES_NO => Self::YesNo,
3003            ffi::GTK_BUTTONS_OK_CANCEL => Self::OkCancel,
3004            value => Self::__Unknown(value),
3005        }
3006    }
3007}
3008
3009impl StaticType for ButtonsType {
3010    #[inline]
3011    #[doc(alias = "gtk_buttons_type_get_type")]
3012    fn static_type() -> glib::Type {
3013        unsafe { from_glib(ffi::gtk_buttons_type_get_type()) }
3014    }
3015}
3016
3017impl glib::HasParamSpec for ButtonsType {
3018    type ParamSpec = glib::ParamSpecEnum;
3019    type SetValue = Self;
3020    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
3021
3022    fn param_spec_builder() -> Self::BuilderFn {
3023        Self::ParamSpec::builder_with_default
3024    }
3025}
3026
3027impl glib::value::ValueType for ButtonsType {
3028    type Type = Self;
3029}
3030
3031unsafe impl<'a> glib::value::FromValue<'a> for ButtonsType {
3032    type Checker = glib::value::GenericValueTypeChecker<Self>;
3033
3034    #[inline]
3035    unsafe fn from_value(value: &'a glib::Value) -> Self {
3036        skip_assert_initialized!();
3037        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3038    }
3039}
3040
3041impl ToValue for ButtonsType {
3042    #[inline]
3043    fn to_value(&self) -> glib::Value {
3044        let mut value = glib::Value::for_value_type::<Self>();
3045        unsafe {
3046            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3047        }
3048        value
3049    }
3050
3051    #[inline]
3052    fn value_type(&self) -> glib::Type {
3053        Self::static_type()
3054    }
3055}
3056
3057impl From<ButtonsType> for glib::Value {
3058    #[inline]
3059    fn from(v: ButtonsType) -> Self {
3060        skip_assert_initialized!();
3061        ToValue::to_value(&v)
3062    }
3063}
3064
3065/// The available modes for [`accel-mode`][struct@crate::CellRendererAccel#accel-mode].
3066///
3067/// # Deprecated since 4.20
3068///
3069/// There is no replacement
3070#[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3071#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3072#[non_exhaustive]
3073#[doc(alias = "GtkCellRendererAccelMode")]
3074pub enum CellRendererAccelMode {
3075    /// GTK accelerators mode
3076    #[doc(alias = "GTK_CELL_RENDERER_ACCEL_MODE_GTK")]
3077    Gtk,
3078    /// Other accelerator mode
3079    #[doc(alias = "GTK_CELL_RENDERER_ACCEL_MODE_OTHER")]
3080    Other,
3081    #[doc(hidden)]
3082    __Unknown(i32),
3083}
3084
3085#[allow(deprecated)]
3086#[doc(hidden)]
3087impl IntoGlib for CellRendererAccelMode {
3088    type GlibType = ffi::GtkCellRendererAccelMode;
3089
3090    #[inline]
3091    fn into_glib(self) -> ffi::GtkCellRendererAccelMode {
3092        match self {
3093            Self::Gtk => ffi::GTK_CELL_RENDERER_ACCEL_MODE_GTK,
3094            Self::Other => ffi::GTK_CELL_RENDERER_ACCEL_MODE_OTHER,
3095            Self::__Unknown(value) => value,
3096        }
3097    }
3098}
3099
3100#[allow(deprecated)]
3101#[doc(hidden)]
3102impl FromGlib<ffi::GtkCellRendererAccelMode> for CellRendererAccelMode {
3103    #[inline]
3104    unsafe fn from_glib(value: ffi::GtkCellRendererAccelMode) -> Self {
3105        skip_assert_initialized!();
3106
3107        match value {
3108            ffi::GTK_CELL_RENDERER_ACCEL_MODE_GTK => Self::Gtk,
3109            ffi::GTK_CELL_RENDERER_ACCEL_MODE_OTHER => Self::Other,
3110            value => Self::__Unknown(value),
3111        }
3112    }
3113}
3114
3115#[allow(deprecated)]
3116impl StaticType for CellRendererAccelMode {
3117    #[inline]
3118    #[doc(alias = "gtk_cell_renderer_accel_mode_get_type")]
3119    fn static_type() -> glib::Type {
3120        unsafe { from_glib(ffi::gtk_cell_renderer_accel_mode_get_type()) }
3121    }
3122}
3123
3124#[allow(deprecated)]
3125impl glib::HasParamSpec for CellRendererAccelMode {
3126    type ParamSpec = glib::ParamSpecEnum;
3127    type SetValue = Self;
3128    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
3129
3130    fn param_spec_builder() -> Self::BuilderFn {
3131        Self::ParamSpec::builder_with_default
3132    }
3133}
3134
3135#[allow(deprecated)]
3136impl glib::value::ValueType for CellRendererAccelMode {
3137    type Type = Self;
3138}
3139
3140#[allow(deprecated)]
3141unsafe impl<'a> glib::value::FromValue<'a> for CellRendererAccelMode {
3142    type Checker = glib::value::GenericValueTypeChecker<Self>;
3143
3144    #[inline]
3145    unsafe fn from_value(value: &'a glib::Value) -> Self {
3146        skip_assert_initialized!();
3147        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3148    }
3149}
3150
3151#[allow(deprecated)]
3152impl ToValue for CellRendererAccelMode {
3153    #[inline]
3154    fn to_value(&self) -> glib::Value {
3155        let mut value = glib::Value::for_value_type::<Self>();
3156        unsafe {
3157            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3158        }
3159        value
3160    }
3161
3162    #[inline]
3163    fn value_type(&self) -> glib::Type {
3164        Self::static_type()
3165    }
3166}
3167
3168#[allow(deprecated)]
3169impl From<CellRendererAccelMode> for glib::Value {
3170    #[inline]
3171    fn from(v: CellRendererAccelMode) -> Self {
3172        skip_assert_initialized!();
3173        ToValue::to_value(&v)
3174    }
3175}
3176
3177/// Identifies how the user can interact with a particular cell.
3178///
3179/// # Deprecated since 4.20
3180///
3181/// There is no replacement.
3182#[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3183#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3184#[non_exhaustive]
3185#[doc(alias = "GtkCellRendererMode")]
3186pub enum CellRendererMode {
3187    /// The cell is just for display
3188    ///  and cannot be interacted with.  Note that this doesn’t mean that eg. the
3189    ///  row being drawn can’t be selected -- just that a particular element of
3190    ///  it cannot be individually modified.
3191    #[doc(alias = "GTK_CELL_RENDERER_MODE_INERT")]
3192    Inert,
3193    /// The cell can be clicked.
3194    #[doc(alias = "GTK_CELL_RENDERER_MODE_ACTIVATABLE")]
3195    Activatable,
3196    /// The cell can be edited or otherwise modified.
3197    #[doc(alias = "GTK_CELL_RENDERER_MODE_EDITABLE")]
3198    Editable,
3199    #[doc(hidden)]
3200    __Unknown(i32),
3201}
3202
3203#[allow(deprecated)]
3204#[doc(hidden)]
3205impl IntoGlib for CellRendererMode {
3206    type GlibType = ffi::GtkCellRendererMode;
3207
3208    #[inline]
3209    fn into_glib(self) -> ffi::GtkCellRendererMode {
3210        match self {
3211            Self::Inert => ffi::GTK_CELL_RENDERER_MODE_INERT,
3212            Self::Activatable => ffi::GTK_CELL_RENDERER_MODE_ACTIVATABLE,
3213            Self::Editable => ffi::GTK_CELL_RENDERER_MODE_EDITABLE,
3214            Self::__Unknown(value) => value,
3215        }
3216    }
3217}
3218
3219#[allow(deprecated)]
3220#[doc(hidden)]
3221impl FromGlib<ffi::GtkCellRendererMode> for CellRendererMode {
3222    #[inline]
3223    unsafe fn from_glib(value: ffi::GtkCellRendererMode) -> Self {
3224        skip_assert_initialized!();
3225
3226        match value {
3227            ffi::GTK_CELL_RENDERER_MODE_INERT => Self::Inert,
3228            ffi::GTK_CELL_RENDERER_MODE_ACTIVATABLE => Self::Activatable,
3229            ffi::GTK_CELL_RENDERER_MODE_EDITABLE => Self::Editable,
3230            value => Self::__Unknown(value),
3231        }
3232    }
3233}
3234
3235#[allow(deprecated)]
3236impl StaticType for CellRendererMode {
3237    #[inline]
3238    #[doc(alias = "gtk_cell_renderer_mode_get_type")]
3239    fn static_type() -> glib::Type {
3240        unsafe { from_glib(ffi::gtk_cell_renderer_mode_get_type()) }
3241    }
3242}
3243
3244#[allow(deprecated)]
3245impl glib::HasParamSpec for CellRendererMode {
3246    type ParamSpec = glib::ParamSpecEnum;
3247    type SetValue = Self;
3248    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
3249
3250    fn param_spec_builder() -> Self::BuilderFn {
3251        Self::ParamSpec::builder_with_default
3252    }
3253}
3254
3255#[allow(deprecated)]
3256impl glib::value::ValueType for CellRendererMode {
3257    type Type = Self;
3258}
3259
3260#[allow(deprecated)]
3261unsafe impl<'a> glib::value::FromValue<'a> for CellRendererMode {
3262    type Checker = glib::value::GenericValueTypeChecker<Self>;
3263
3264    #[inline]
3265    unsafe fn from_value(value: &'a glib::Value) -> Self {
3266        skip_assert_initialized!();
3267        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3268    }
3269}
3270
3271#[allow(deprecated)]
3272impl ToValue for CellRendererMode {
3273    #[inline]
3274    fn to_value(&self) -> glib::Value {
3275        let mut value = glib::Value::for_value_type::<Self>();
3276        unsafe {
3277            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3278        }
3279        value
3280    }
3281
3282    #[inline]
3283    fn value_type(&self) -> glib::Type {
3284        Self::static_type()
3285    }
3286}
3287
3288#[allow(deprecated)]
3289impl From<CellRendererMode> for glib::Value {
3290    #[inline]
3291    fn from(v: CellRendererMode) -> Self {
3292        skip_assert_initialized!();
3293        ToValue::to_value(&v)
3294    }
3295}
3296
3297/// Describes how a [`StringSorter`][crate::StringSorter] turns strings into sort keys to
3298/// compare them.
3299///
3300/// Note that the result of sorting will in general depend on the current locale
3301/// unless the mode is @GTK_COLLATION_NONE.
3302#[cfg(feature = "v4_10")]
3303#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
3304#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3305#[non_exhaustive]
3306#[doc(alias = "GtkCollation")]
3307pub enum Collation {
3308    /// Don't do any collation
3309    #[doc(alias = "GTK_COLLATION_NONE")]
3310    None,
3311    /// Use `utf8_collate_key()`
3312    #[doc(alias = "GTK_COLLATION_UNICODE")]
3313    Unicode,
3314    /// Use `utf8_collate_key_for_filename()`
3315    #[doc(alias = "GTK_COLLATION_FILENAME")]
3316    Filename,
3317    #[doc(hidden)]
3318    __Unknown(i32),
3319}
3320
3321#[cfg(feature = "v4_10")]
3322#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
3323#[doc(hidden)]
3324impl IntoGlib for Collation {
3325    type GlibType = ffi::GtkCollation;
3326
3327    #[inline]
3328    fn into_glib(self) -> ffi::GtkCollation {
3329        match self {
3330            Self::None => ffi::GTK_COLLATION_NONE,
3331            Self::Unicode => ffi::GTK_COLLATION_UNICODE,
3332            Self::Filename => ffi::GTK_COLLATION_FILENAME,
3333            Self::__Unknown(value) => value,
3334        }
3335    }
3336}
3337
3338#[cfg(feature = "v4_10")]
3339#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
3340#[doc(hidden)]
3341impl FromGlib<ffi::GtkCollation> for Collation {
3342    #[inline]
3343    unsafe fn from_glib(value: ffi::GtkCollation) -> Self {
3344        skip_assert_initialized!();
3345
3346        match value {
3347            ffi::GTK_COLLATION_NONE => Self::None,
3348            ffi::GTK_COLLATION_UNICODE => Self::Unicode,
3349            ffi::GTK_COLLATION_FILENAME => Self::Filename,
3350            value => Self::__Unknown(value),
3351        }
3352    }
3353}
3354
3355#[cfg(feature = "v4_10")]
3356#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
3357impl StaticType for Collation {
3358    #[inline]
3359    #[doc(alias = "gtk_collation_get_type")]
3360    fn static_type() -> glib::Type {
3361        unsafe { from_glib(ffi::gtk_collation_get_type()) }
3362    }
3363}
3364
3365#[cfg(feature = "v4_10")]
3366#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
3367impl glib::HasParamSpec for Collation {
3368    type ParamSpec = glib::ParamSpecEnum;
3369    type SetValue = Self;
3370    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
3371
3372    fn param_spec_builder() -> Self::BuilderFn {
3373        Self::ParamSpec::builder_with_default
3374    }
3375}
3376
3377#[cfg(feature = "v4_10")]
3378#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
3379impl glib::value::ValueType for Collation {
3380    type Type = Self;
3381}
3382
3383#[cfg(feature = "v4_10")]
3384#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
3385unsafe impl<'a> glib::value::FromValue<'a> for Collation {
3386    type Checker = glib::value::GenericValueTypeChecker<Self>;
3387
3388    #[inline]
3389    unsafe fn from_value(value: &'a glib::Value) -> Self {
3390        skip_assert_initialized!();
3391        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3392    }
3393}
3394
3395#[cfg(feature = "v4_10")]
3396#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
3397impl ToValue for Collation {
3398    #[inline]
3399    fn to_value(&self) -> glib::Value {
3400        let mut value = glib::Value::for_value_type::<Self>();
3401        unsafe {
3402            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3403        }
3404        value
3405    }
3406
3407    #[inline]
3408    fn value_type(&self) -> glib::Type {
3409        Self::static_type()
3410    }
3411}
3412
3413#[cfg(feature = "v4_10")]
3414#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
3415impl From<Collation> for glib::Value {
3416    #[inline]
3417    fn from(v: Collation) -> Self {
3418        skip_assert_initialized!();
3419        ToValue::to_value(&v)
3420    }
3421}
3422
3423/// The widget attributes that can be used when creating a [`Constraint`][crate::Constraint].
3424#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3425#[non_exhaustive]
3426#[doc(alias = "GtkConstraintAttribute")]
3427pub enum ConstraintAttribute {
3428    /// No attribute, used for constant
3429    ///   relations
3430    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_NONE")]
3431    None,
3432    /// The left edge of a widget, regardless of
3433    ///   text direction
3434    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_LEFT")]
3435    Left,
3436    /// The right edge of a widget, regardless
3437    ///   of text direction
3438    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_RIGHT")]
3439    Right,
3440    /// The top edge of a widget
3441    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_TOP")]
3442    Top,
3443    /// The bottom edge of a widget
3444    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_BOTTOM")]
3445    Bottom,
3446    /// The leading edge of a widget, depending
3447    ///   on text direction; equivalent to [`Left`][Self::Left] for LTR
3448    ///   languages, and [`Right`][Self::Right] for RTL ones
3449    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_START")]
3450    Start,
3451    /// The trailing edge of a widget, depending
3452    ///   on text direction; equivalent to [`Right`][Self::Right] for LTR
3453    ///   languages, and [`Left`][Self::Left] for RTL ones
3454    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_END")]
3455    End,
3456    /// The width of a widget
3457    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_WIDTH")]
3458    Width,
3459    /// The height of a widget
3460    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_HEIGHT")]
3461    Height,
3462    /// The center of a widget, on the
3463    ///   horizontal axis
3464    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_CENTER_X")]
3465    CenterX,
3466    /// The center of a widget, on the
3467    ///   vertical axis
3468    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_CENTER_Y")]
3469    CenterY,
3470    /// The baseline of a widget
3471    #[doc(alias = "GTK_CONSTRAINT_ATTRIBUTE_BASELINE")]
3472    Baseline,
3473    #[doc(hidden)]
3474    __Unknown(i32),
3475}
3476
3477#[doc(hidden)]
3478impl IntoGlib for ConstraintAttribute {
3479    type GlibType = ffi::GtkConstraintAttribute;
3480
3481    #[inline]
3482    fn into_glib(self) -> ffi::GtkConstraintAttribute {
3483        match self {
3484            Self::None => ffi::GTK_CONSTRAINT_ATTRIBUTE_NONE,
3485            Self::Left => ffi::GTK_CONSTRAINT_ATTRIBUTE_LEFT,
3486            Self::Right => ffi::GTK_CONSTRAINT_ATTRIBUTE_RIGHT,
3487            Self::Top => ffi::GTK_CONSTRAINT_ATTRIBUTE_TOP,
3488            Self::Bottom => ffi::GTK_CONSTRAINT_ATTRIBUTE_BOTTOM,
3489            Self::Start => ffi::GTK_CONSTRAINT_ATTRIBUTE_START,
3490            Self::End => ffi::GTK_CONSTRAINT_ATTRIBUTE_END,
3491            Self::Width => ffi::GTK_CONSTRAINT_ATTRIBUTE_WIDTH,
3492            Self::Height => ffi::GTK_CONSTRAINT_ATTRIBUTE_HEIGHT,
3493            Self::CenterX => ffi::GTK_CONSTRAINT_ATTRIBUTE_CENTER_X,
3494            Self::CenterY => ffi::GTK_CONSTRAINT_ATTRIBUTE_CENTER_Y,
3495            Self::Baseline => ffi::GTK_CONSTRAINT_ATTRIBUTE_BASELINE,
3496            Self::__Unknown(value) => value,
3497        }
3498    }
3499}
3500
3501#[doc(hidden)]
3502impl FromGlib<ffi::GtkConstraintAttribute> for ConstraintAttribute {
3503    #[inline]
3504    unsafe fn from_glib(value: ffi::GtkConstraintAttribute) -> Self {
3505        skip_assert_initialized!();
3506
3507        match value {
3508            ffi::GTK_CONSTRAINT_ATTRIBUTE_NONE => Self::None,
3509            ffi::GTK_CONSTRAINT_ATTRIBUTE_LEFT => Self::Left,
3510            ffi::GTK_CONSTRAINT_ATTRIBUTE_RIGHT => Self::Right,
3511            ffi::GTK_CONSTRAINT_ATTRIBUTE_TOP => Self::Top,
3512            ffi::GTK_CONSTRAINT_ATTRIBUTE_BOTTOM => Self::Bottom,
3513            ffi::GTK_CONSTRAINT_ATTRIBUTE_START => Self::Start,
3514            ffi::GTK_CONSTRAINT_ATTRIBUTE_END => Self::End,
3515            ffi::GTK_CONSTRAINT_ATTRIBUTE_WIDTH => Self::Width,
3516            ffi::GTK_CONSTRAINT_ATTRIBUTE_HEIGHT => Self::Height,
3517            ffi::GTK_CONSTRAINT_ATTRIBUTE_CENTER_X => Self::CenterX,
3518            ffi::GTK_CONSTRAINT_ATTRIBUTE_CENTER_Y => Self::CenterY,
3519            ffi::GTK_CONSTRAINT_ATTRIBUTE_BASELINE => Self::Baseline,
3520            value => Self::__Unknown(value),
3521        }
3522    }
3523}
3524
3525impl StaticType for ConstraintAttribute {
3526    #[inline]
3527    #[doc(alias = "gtk_constraint_attribute_get_type")]
3528    fn static_type() -> glib::Type {
3529        unsafe { from_glib(ffi::gtk_constraint_attribute_get_type()) }
3530    }
3531}
3532
3533impl glib::HasParamSpec for ConstraintAttribute {
3534    type ParamSpec = glib::ParamSpecEnum;
3535    type SetValue = Self;
3536    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
3537
3538    fn param_spec_builder() -> Self::BuilderFn {
3539        Self::ParamSpec::builder_with_default
3540    }
3541}
3542
3543impl glib::value::ValueType for ConstraintAttribute {
3544    type Type = Self;
3545}
3546
3547unsafe impl<'a> glib::value::FromValue<'a> for ConstraintAttribute {
3548    type Checker = glib::value::GenericValueTypeChecker<Self>;
3549
3550    #[inline]
3551    unsafe fn from_value(value: &'a glib::Value) -> Self {
3552        skip_assert_initialized!();
3553        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3554    }
3555}
3556
3557impl ToValue for ConstraintAttribute {
3558    #[inline]
3559    fn to_value(&self) -> glib::Value {
3560        let mut value = glib::Value::for_value_type::<Self>();
3561        unsafe {
3562            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3563        }
3564        value
3565    }
3566
3567    #[inline]
3568    fn value_type(&self) -> glib::Type {
3569        Self::static_type()
3570    }
3571}
3572
3573impl From<ConstraintAttribute> for glib::Value {
3574    #[inline]
3575    fn from(v: ConstraintAttribute) -> Self {
3576        skip_assert_initialized!();
3577        ToValue::to_value(&v)
3578    }
3579}
3580
3581/// The relation between two terms of a constraint.
3582#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3583#[non_exhaustive]
3584#[doc(alias = "GtkConstraintRelation")]
3585pub enum ConstraintRelation {
3586    /// Less than, or equal
3587    #[doc(alias = "GTK_CONSTRAINT_RELATION_LE")]
3588    Le,
3589    /// Equal
3590    #[doc(alias = "GTK_CONSTRAINT_RELATION_EQ")]
3591    Eq,
3592    /// Greater than, or equal
3593    #[doc(alias = "GTK_CONSTRAINT_RELATION_GE")]
3594    Ge,
3595    #[doc(hidden)]
3596    __Unknown(i32),
3597}
3598
3599#[doc(hidden)]
3600impl IntoGlib for ConstraintRelation {
3601    type GlibType = ffi::GtkConstraintRelation;
3602
3603    #[inline]
3604    fn into_glib(self) -> ffi::GtkConstraintRelation {
3605        match self {
3606            Self::Le => ffi::GTK_CONSTRAINT_RELATION_LE,
3607            Self::Eq => ffi::GTK_CONSTRAINT_RELATION_EQ,
3608            Self::Ge => ffi::GTK_CONSTRAINT_RELATION_GE,
3609            Self::__Unknown(value) => value,
3610        }
3611    }
3612}
3613
3614#[doc(hidden)]
3615impl FromGlib<ffi::GtkConstraintRelation> for ConstraintRelation {
3616    #[inline]
3617    unsafe fn from_glib(value: ffi::GtkConstraintRelation) -> Self {
3618        skip_assert_initialized!();
3619
3620        match value {
3621            ffi::GTK_CONSTRAINT_RELATION_LE => Self::Le,
3622            ffi::GTK_CONSTRAINT_RELATION_EQ => Self::Eq,
3623            ffi::GTK_CONSTRAINT_RELATION_GE => Self::Ge,
3624            value => Self::__Unknown(value),
3625        }
3626    }
3627}
3628
3629impl StaticType for ConstraintRelation {
3630    #[inline]
3631    #[doc(alias = "gtk_constraint_relation_get_type")]
3632    fn static_type() -> glib::Type {
3633        unsafe { from_glib(ffi::gtk_constraint_relation_get_type()) }
3634    }
3635}
3636
3637impl glib::HasParamSpec for ConstraintRelation {
3638    type ParamSpec = glib::ParamSpecEnum;
3639    type SetValue = Self;
3640    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
3641
3642    fn param_spec_builder() -> Self::BuilderFn {
3643        Self::ParamSpec::builder_with_default
3644    }
3645}
3646
3647impl glib::value::ValueType for ConstraintRelation {
3648    type Type = Self;
3649}
3650
3651unsafe impl<'a> glib::value::FromValue<'a> for ConstraintRelation {
3652    type Checker = glib::value::GenericValueTypeChecker<Self>;
3653
3654    #[inline]
3655    unsafe fn from_value(value: &'a glib::Value) -> Self {
3656        skip_assert_initialized!();
3657        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3658    }
3659}
3660
3661impl ToValue for ConstraintRelation {
3662    #[inline]
3663    fn to_value(&self) -> glib::Value {
3664        let mut value = glib::Value::for_value_type::<Self>();
3665        unsafe {
3666            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3667        }
3668        value
3669    }
3670
3671    #[inline]
3672    fn value_type(&self) -> glib::Type {
3673        Self::static_type()
3674    }
3675}
3676
3677impl From<ConstraintRelation> for glib::Value {
3678    #[inline]
3679    fn from(v: ConstraintRelation) -> Self {
3680        skip_assert_initialized!();
3681        ToValue::to_value(&v)
3682    }
3683}
3684
3685/// The strength of a constraint, expressed as a symbolic constant.
3686///
3687/// The strength of a [`Constraint`][crate::Constraint] can be expressed with any positive
3688/// integer; the values of this enumeration can be used for readability.
3689#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3690#[non_exhaustive]
3691#[doc(alias = "GtkConstraintStrength")]
3692pub enum ConstraintStrength {
3693    /// The constraint is required towards solving the layout
3694    #[doc(alias = "GTK_CONSTRAINT_STRENGTH_REQUIRED")]
3695    Required,
3696    /// A strong constraint
3697    #[doc(alias = "GTK_CONSTRAINT_STRENGTH_STRONG")]
3698    Strong,
3699    /// A medium constraint
3700    #[doc(alias = "GTK_CONSTRAINT_STRENGTH_MEDIUM")]
3701    Medium,
3702    /// A weak constraint
3703    #[doc(alias = "GTK_CONSTRAINT_STRENGTH_WEAK")]
3704    Weak,
3705    #[doc(hidden)]
3706    __Unknown(i32),
3707}
3708
3709#[doc(hidden)]
3710impl IntoGlib for ConstraintStrength {
3711    type GlibType = ffi::GtkConstraintStrength;
3712
3713    #[inline]
3714    fn into_glib(self) -> ffi::GtkConstraintStrength {
3715        match self {
3716            Self::Required => ffi::GTK_CONSTRAINT_STRENGTH_REQUIRED,
3717            Self::Strong => ffi::GTK_CONSTRAINT_STRENGTH_STRONG,
3718            Self::Medium => ffi::GTK_CONSTRAINT_STRENGTH_MEDIUM,
3719            Self::Weak => ffi::GTK_CONSTRAINT_STRENGTH_WEAK,
3720            Self::__Unknown(value) => value,
3721        }
3722    }
3723}
3724
3725#[doc(hidden)]
3726impl FromGlib<ffi::GtkConstraintStrength> for ConstraintStrength {
3727    #[inline]
3728    unsafe fn from_glib(value: ffi::GtkConstraintStrength) -> Self {
3729        skip_assert_initialized!();
3730
3731        match value {
3732            ffi::GTK_CONSTRAINT_STRENGTH_REQUIRED => Self::Required,
3733            ffi::GTK_CONSTRAINT_STRENGTH_STRONG => Self::Strong,
3734            ffi::GTK_CONSTRAINT_STRENGTH_MEDIUM => Self::Medium,
3735            ffi::GTK_CONSTRAINT_STRENGTH_WEAK => Self::Weak,
3736            value => Self::__Unknown(value),
3737        }
3738    }
3739}
3740
3741impl StaticType for ConstraintStrength {
3742    #[inline]
3743    #[doc(alias = "gtk_constraint_strength_get_type")]
3744    fn static_type() -> glib::Type {
3745        unsafe { from_glib(ffi::gtk_constraint_strength_get_type()) }
3746    }
3747}
3748
3749impl glib::HasParamSpec for ConstraintStrength {
3750    type ParamSpec = glib::ParamSpecEnum;
3751    type SetValue = Self;
3752    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
3753
3754    fn param_spec_builder() -> Self::BuilderFn {
3755        Self::ParamSpec::builder_with_default
3756    }
3757}
3758
3759impl glib::value::ValueType for ConstraintStrength {
3760    type Type = Self;
3761}
3762
3763unsafe impl<'a> glib::value::FromValue<'a> for ConstraintStrength {
3764    type Checker = glib::value::GenericValueTypeChecker<Self>;
3765
3766    #[inline]
3767    unsafe fn from_value(value: &'a glib::Value) -> Self {
3768        skip_assert_initialized!();
3769        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3770    }
3771}
3772
3773impl ToValue for ConstraintStrength {
3774    #[inline]
3775    fn to_value(&self) -> glib::Value {
3776        let mut value = glib::Value::for_value_type::<Self>();
3777        unsafe {
3778            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3779        }
3780        value
3781    }
3782
3783    #[inline]
3784    fn value_type(&self) -> glib::Type {
3785        Self::static_type()
3786    }
3787}
3788
3789impl From<ConstraintStrength> for glib::Value {
3790    #[inline]
3791    fn from(v: ConstraintStrength) -> Self {
3792        skip_assert_initialized!();
3793        ToValue::to_value(&v)
3794    }
3795}
3796
3797/// Domain for VFL parsing errors.
3798#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3799#[non_exhaustive]
3800#[doc(alias = "GtkConstraintVflParserError")]
3801pub enum ConstraintVflParserError {
3802    /// Invalid or unknown symbol
3803    #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL")]
3804    Symbol,
3805    /// Invalid or unknown attribute
3806    #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE")]
3807    Attribute,
3808    /// Invalid or unknown view
3809    #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW")]
3810    View,
3811    /// Invalid or unknown metric
3812    #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC")]
3813    Metric,
3814    /// Invalid or unknown priority
3815    #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY")]
3816    Priority,
3817    /// Invalid or unknown relation
3818    #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION")]
3819    Relation,
3820    #[doc(hidden)]
3821    __Unknown(i32),
3822}
3823
3824#[doc(hidden)]
3825impl IntoGlib for ConstraintVflParserError {
3826    type GlibType = ffi::GtkConstraintVflParserError;
3827
3828    #[inline]
3829    fn into_glib(self) -> ffi::GtkConstraintVflParserError {
3830        match self {
3831            Self::Symbol => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL,
3832            Self::Attribute => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE,
3833            Self::View => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW,
3834            Self::Metric => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC,
3835            Self::Priority => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY,
3836            Self::Relation => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION,
3837            Self::__Unknown(value) => value,
3838        }
3839    }
3840}
3841
3842#[doc(hidden)]
3843impl FromGlib<ffi::GtkConstraintVflParserError> for ConstraintVflParserError {
3844    #[inline]
3845    unsafe fn from_glib(value: ffi::GtkConstraintVflParserError) -> Self {
3846        skip_assert_initialized!();
3847
3848        match value {
3849            ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL => Self::Symbol,
3850            ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE => Self::Attribute,
3851            ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW => Self::View,
3852            ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC => Self::Metric,
3853            ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY => Self::Priority,
3854            ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION => Self::Relation,
3855            value => Self::__Unknown(value),
3856        }
3857    }
3858}
3859
3860impl glib::error::ErrorDomain for ConstraintVflParserError {
3861    #[inline]
3862    fn domain() -> glib::Quark {
3863        skip_assert_initialized!();
3864
3865        unsafe { from_glib(ffi::gtk_constraint_vfl_parser_error_quark()) }
3866    }
3867
3868    #[inline]
3869    fn code(self) -> i32 {
3870        self.into_glib()
3871    }
3872
3873    #[inline]
3874    #[allow(clippy::match_single_binding)]
3875    fn from(code: i32) -> Option<Self> {
3876        skip_assert_initialized!();
3877        match unsafe { from_glib(code) } {
3878            value => Some(value),
3879        }
3880    }
3881}
3882
3883impl StaticType for ConstraintVflParserError {
3884    #[inline]
3885    #[doc(alias = "gtk_constraint_vfl_parser_error_get_type")]
3886    fn static_type() -> glib::Type {
3887        unsafe { from_glib(ffi::gtk_constraint_vfl_parser_error_get_type()) }
3888    }
3889}
3890
3891impl glib::HasParamSpec for ConstraintVflParserError {
3892    type ParamSpec = glib::ParamSpecEnum;
3893    type SetValue = Self;
3894    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
3895
3896    fn param_spec_builder() -> Self::BuilderFn {
3897        Self::ParamSpec::builder_with_default
3898    }
3899}
3900
3901impl glib::value::ValueType for ConstraintVflParserError {
3902    type Type = Self;
3903}
3904
3905unsafe impl<'a> glib::value::FromValue<'a> for ConstraintVflParserError {
3906    type Checker = glib::value::GenericValueTypeChecker<Self>;
3907
3908    #[inline]
3909    unsafe fn from_value(value: &'a glib::Value) -> Self {
3910        skip_assert_initialized!();
3911        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3912    }
3913}
3914
3915impl ToValue for ConstraintVflParserError {
3916    #[inline]
3917    fn to_value(&self) -> glib::Value {
3918        let mut value = glib::Value::for_value_type::<Self>();
3919        unsafe {
3920            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3921        }
3922        value
3923    }
3924
3925    #[inline]
3926    fn value_type(&self) -> glib::Type {
3927        Self::static_type()
3928    }
3929}
3930
3931impl From<ConstraintVflParserError> for glib::Value {
3932    #[inline]
3933    fn from(v: ConstraintVflParserError) -> Self {
3934        skip_assert_initialized!();
3935        ToValue::to_value(&v)
3936    }
3937}
3938
3939/// Controls how a content should be made to fit inside an allocation.
3940#[cfg(feature = "v4_8")]
3941#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
3942#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3943#[non_exhaustive]
3944#[doc(alias = "GtkContentFit")]
3945pub enum ContentFit {
3946    /// Make the content fill the entire allocation,
3947    ///   without taking its aspect ratio in consideration. The resulting
3948    ///   content will appear as stretched if its aspect ratio is different
3949    ///   from the allocation aspect ratio.
3950    #[doc(alias = "GTK_CONTENT_FIT_FILL")]
3951    Fill,
3952    /// Scale the content to fit the allocation,
3953    ///   while taking its aspect ratio in consideration. The resulting
3954    ///   content will appear as letterboxed if its aspect ratio is different
3955    ///   from the allocation aspect ratio.
3956    #[doc(alias = "GTK_CONTENT_FIT_CONTAIN")]
3957    Contain,
3958    /// Cover the entire allocation, while taking
3959    ///   the content aspect ratio in consideration. The resulting content
3960    ///   will appear as clipped if its aspect ratio is different from the
3961    ///   allocation aspect ratio.
3962    #[doc(alias = "GTK_CONTENT_FIT_COVER")]
3963    Cover,
3964    /// The content is scaled down to fit the
3965    ///   allocation, if needed, otherwise its original size is used.
3966    #[doc(alias = "GTK_CONTENT_FIT_SCALE_DOWN")]
3967    ScaleDown,
3968    #[doc(hidden)]
3969    __Unknown(i32),
3970}
3971
3972#[cfg(feature = "v4_8")]
3973#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
3974#[doc(hidden)]
3975impl IntoGlib for ContentFit {
3976    type GlibType = ffi::GtkContentFit;
3977
3978    #[inline]
3979    fn into_glib(self) -> ffi::GtkContentFit {
3980        match self {
3981            Self::Fill => ffi::GTK_CONTENT_FIT_FILL,
3982            Self::Contain => ffi::GTK_CONTENT_FIT_CONTAIN,
3983            Self::Cover => ffi::GTK_CONTENT_FIT_COVER,
3984            Self::ScaleDown => ffi::GTK_CONTENT_FIT_SCALE_DOWN,
3985            Self::__Unknown(value) => value,
3986        }
3987    }
3988}
3989
3990#[cfg(feature = "v4_8")]
3991#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
3992#[doc(hidden)]
3993impl FromGlib<ffi::GtkContentFit> for ContentFit {
3994    #[inline]
3995    unsafe fn from_glib(value: ffi::GtkContentFit) -> Self {
3996        skip_assert_initialized!();
3997
3998        match value {
3999            ffi::GTK_CONTENT_FIT_FILL => Self::Fill,
4000            ffi::GTK_CONTENT_FIT_CONTAIN => Self::Contain,
4001            ffi::GTK_CONTENT_FIT_COVER => Self::Cover,
4002            ffi::GTK_CONTENT_FIT_SCALE_DOWN => Self::ScaleDown,
4003            value => Self::__Unknown(value),
4004        }
4005    }
4006}
4007
4008#[cfg(feature = "v4_8")]
4009#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
4010impl StaticType for ContentFit {
4011    #[inline]
4012    #[doc(alias = "gtk_content_fit_get_type")]
4013    fn static_type() -> glib::Type {
4014        unsafe { from_glib(ffi::gtk_content_fit_get_type()) }
4015    }
4016}
4017
4018#[cfg(feature = "v4_8")]
4019#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
4020impl glib::HasParamSpec for ContentFit {
4021    type ParamSpec = glib::ParamSpecEnum;
4022    type SetValue = Self;
4023    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
4024
4025    fn param_spec_builder() -> Self::BuilderFn {
4026        Self::ParamSpec::builder_with_default
4027    }
4028}
4029
4030#[cfg(feature = "v4_8")]
4031#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
4032impl glib::value::ValueType for ContentFit {
4033    type Type = Self;
4034}
4035
4036#[cfg(feature = "v4_8")]
4037#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
4038unsafe impl<'a> glib::value::FromValue<'a> for ContentFit {
4039    type Checker = glib::value::GenericValueTypeChecker<Self>;
4040
4041    #[inline]
4042    unsafe fn from_value(value: &'a glib::Value) -> Self {
4043        skip_assert_initialized!();
4044        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
4045    }
4046}
4047
4048#[cfg(feature = "v4_8")]
4049#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
4050impl ToValue for ContentFit {
4051    #[inline]
4052    fn to_value(&self) -> glib::Value {
4053        let mut value = glib::Value::for_value_type::<Self>();
4054        unsafe {
4055            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
4056        }
4057        value
4058    }
4059
4060    #[inline]
4061    fn value_type(&self) -> glib::Type {
4062        Self::static_type()
4063    }
4064}
4065
4066#[cfg(feature = "v4_8")]
4067#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
4068impl From<ContentFit> for glib::Value {
4069    #[inline]
4070    fn from(v: ContentFit) -> Self {
4071        skip_assert_initialized!();
4072        ToValue::to_value(&v)
4073    }
4074}
4075
4076/// Specifies which corner a child widget should be placed in when packed into
4077/// a [`ScrolledWindow`][crate::ScrolledWindow]
4078///
4079/// This is effectively the opposite of where the scroll bars are placed.
4080#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
4081#[non_exhaustive]
4082#[doc(alias = "GtkCornerType")]
4083pub enum CornerType {
4084    /// Place the scrollbars on the right and bottom of the
4085    ///   widget (default behaviour).
4086    #[doc(alias = "GTK_CORNER_TOP_LEFT")]
4087    TopLeft,
4088    /// Place the scrollbars on the top and right of the
4089    ///   widget.
4090    #[doc(alias = "GTK_CORNER_BOTTOM_LEFT")]
4091    BottomLeft,
4092    /// Place the scrollbars on the left and bottom of the
4093    ///   widget.
4094    #[doc(alias = "GTK_CORNER_TOP_RIGHT")]
4095    TopRight,
4096    /// Place the scrollbars on the top and left of the
4097    ///   widget.
4098    #[doc(alias = "GTK_CORNER_BOTTOM_RIGHT")]
4099    BottomRight,
4100    #[doc(hidden)]
4101    __Unknown(i32),
4102}
4103
4104#[doc(hidden)]
4105impl IntoGlib for CornerType {
4106    type GlibType = ffi::GtkCornerType;
4107
4108    #[inline]
4109    fn into_glib(self) -> ffi::GtkCornerType {
4110        match self {
4111            Self::TopLeft => ffi::GTK_CORNER_TOP_LEFT,
4112            Self::BottomLeft => ffi::GTK_CORNER_BOTTOM_LEFT,
4113            Self::TopRight => ffi::GTK_CORNER_TOP_RIGHT,
4114            Self::BottomRight => ffi::GTK_CORNER_BOTTOM_RIGHT,
4115            Self::__Unknown(value) => value,
4116        }
4117    }
4118}
4119
4120#[doc(hidden)]
4121impl FromGlib<ffi::GtkCornerType> for CornerType {
4122    #[inline]
4123    unsafe fn from_glib(value: ffi::GtkCornerType) -> Self {
4124        skip_assert_initialized!();
4125
4126        match value {
4127            ffi::GTK_CORNER_TOP_LEFT => Self::TopLeft,
4128            ffi::GTK_CORNER_BOTTOM_LEFT => Self::BottomLeft,
4129            ffi::GTK_CORNER_TOP_RIGHT => Self::TopRight,
4130            ffi::GTK_CORNER_BOTTOM_RIGHT => Self::BottomRight,
4131            value => Self::__Unknown(value),
4132        }
4133    }
4134}
4135
4136impl StaticType for CornerType {
4137    #[inline]
4138    #[doc(alias = "gtk_corner_type_get_type")]
4139    fn static_type() -> glib::Type {
4140        unsafe { from_glib(ffi::gtk_corner_type_get_type()) }
4141    }
4142}
4143
4144impl glib::HasParamSpec for CornerType {
4145    type ParamSpec = glib::ParamSpecEnum;
4146    type SetValue = Self;
4147    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
4148
4149    fn param_spec_builder() -> Self::BuilderFn {
4150        Self::ParamSpec::builder_with_default
4151    }
4152}
4153
4154impl glib::value::ValueType for CornerType {
4155    type Type = Self;
4156}
4157
4158unsafe impl<'a> glib::value::FromValue<'a> for CornerType {
4159    type Checker = glib::value::GenericValueTypeChecker<Self>;
4160
4161    #[inline]
4162    unsafe fn from_value(value: &'a glib::Value) -> Self {
4163        skip_assert_initialized!();
4164        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
4165    }
4166}
4167
4168impl ToValue for CornerType {
4169    #[inline]
4170    fn to_value(&self) -> glib::Value {
4171        let mut value = glib::Value::for_value_type::<Self>();
4172        unsafe {
4173            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
4174        }
4175        value
4176    }
4177
4178    #[inline]
4179    fn value_type(&self) -> glib::Type {
4180        Self::static_type()
4181    }
4182}
4183
4184impl From<CornerType> for glib::Value {
4185    #[inline]
4186    fn from(v: CornerType) -> Self {
4187        skip_assert_initialized!();
4188        ToValue::to_value(&v)
4189    }
4190}
4191
4192/// Errors that can occur while parsing CSS.
4193///
4194/// These errors are unexpected and will cause parts of the given CSS
4195/// to be ignored.
4196#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
4197#[non_exhaustive]
4198#[doc(alias = "GtkCssParserError")]
4199pub enum CssParserError {
4200    /// Unknown failure.
4201    #[doc(alias = "GTK_CSS_PARSER_ERROR_FAILED")]
4202    Failed,
4203    /// The given text does not form valid syntax
4204    #[doc(alias = "GTK_CSS_PARSER_ERROR_SYNTAX")]
4205    Syntax,
4206    /// Failed to import a resource
4207    #[doc(alias = "GTK_CSS_PARSER_ERROR_IMPORT")]
4208    Import,
4209    /// The given name has not been defined
4210    #[doc(alias = "GTK_CSS_PARSER_ERROR_NAME")]
4211    Name,
4212    /// The given value is not correct
4213    #[doc(alias = "GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE")]
4214    UnknownValue,
4215    #[doc(hidden)]
4216    __Unknown(i32),
4217}
4218
4219#[doc(hidden)]
4220impl IntoGlib for CssParserError {
4221    type GlibType = ffi::GtkCssParserError;
4222
4223    #[inline]
4224    fn into_glib(self) -> ffi::GtkCssParserError {
4225        match self {
4226            Self::Failed => ffi::GTK_CSS_PARSER_ERROR_FAILED,
4227            Self::Syntax => ffi::GTK_CSS_PARSER_ERROR_SYNTAX,
4228            Self::Import => ffi::GTK_CSS_PARSER_ERROR_IMPORT,
4229            Self::Name => ffi::GTK_CSS_PARSER_ERROR_NAME,
4230            Self::UnknownValue => ffi::GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
4231            Self::__Unknown(value) => value,
4232        }
4233    }
4234}
4235
4236#[doc(hidden)]
4237impl FromGlib<ffi::GtkCssParserError> for CssParserError {
4238    #[inline]
4239    unsafe fn from_glib(value: ffi::GtkCssParserError) -> Self {
4240        skip_assert_initialized!();
4241
4242        match value {
4243            ffi::GTK_CSS_PARSER_ERROR_FAILED => Self::Failed,
4244            ffi::GTK_CSS_PARSER_ERROR_SYNTAX => Self::Syntax,
4245            ffi::GTK_CSS_PARSER_ERROR_IMPORT => Self::Import,
4246            ffi::GTK_CSS_PARSER_ERROR_NAME => Self::Name,
4247            ffi::GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE => Self::UnknownValue,
4248            value => Self::__Unknown(value),
4249        }
4250    }
4251}
4252
4253impl glib::error::ErrorDomain for CssParserError {
4254    #[inline]
4255    fn domain() -> glib::Quark {
4256        skip_assert_initialized!();
4257
4258        unsafe { from_glib(ffi::gtk_css_parser_error_quark()) }
4259    }
4260
4261    #[inline]
4262    fn code(self) -> i32 {
4263        self.into_glib()
4264    }
4265
4266    #[inline]
4267    #[allow(clippy::match_single_binding)]
4268    fn from(code: i32) -> Option<Self> {
4269        skip_assert_initialized!();
4270        match unsafe { from_glib(code) } {
4271            Self::__Unknown(_) => Some(Self::Failed),
4272            value => Some(value),
4273        }
4274    }
4275}
4276
4277/// Warnings that can occur while parsing CSS.
4278///
4279/// Unlike [`CssParserError`][crate::CssParserError]s, warnings do not cause the parser to
4280/// skip any input, but they indicate issues that should be fixed.
4281#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
4282#[non_exhaustive]
4283#[doc(alias = "GtkCssParserWarning")]
4284pub enum CssParserWarning {
4285    /// The given construct is
4286    ///   deprecated and will be removed in a future version
4287    #[doc(alias = "GTK_CSS_PARSER_WARNING_DEPRECATED")]
4288    Deprecated,
4289    /// A syntax construct was used
4290    ///   that should be avoided
4291    #[doc(alias = "GTK_CSS_PARSER_WARNING_SYNTAX")]
4292    Syntax,
4293    /// A feature is not implemented
4294    #[doc(alias = "GTK_CSS_PARSER_WARNING_UNIMPLEMENTED")]
4295    Unimplemented,
4296    #[doc(hidden)]
4297    __Unknown(i32),
4298}
4299
4300#[doc(hidden)]
4301impl IntoGlib for CssParserWarning {
4302    type GlibType = ffi::GtkCssParserWarning;
4303
4304    #[inline]
4305    fn into_glib(self) -> ffi::GtkCssParserWarning {
4306        match self {
4307            Self::Deprecated => ffi::GTK_CSS_PARSER_WARNING_DEPRECATED,
4308            Self::Syntax => ffi::GTK_CSS_PARSER_WARNING_SYNTAX,
4309            Self::Unimplemented => ffi::GTK_CSS_PARSER_WARNING_UNIMPLEMENTED,
4310            Self::__Unknown(value) => value,
4311        }
4312    }
4313}
4314
4315#[doc(hidden)]
4316impl FromGlib<ffi::GtkCssParserWarning> for CssParserWarning {
4317    #[inline]
4318    unsafe fn from_glib(value: ffi::GtkCssParserWarning) -> Self {
4319        skip_assert_initialized!();
4320
4321        match value {
4322            ffi::GTK_CSS_PARSER_WARNING_DEPRECATED => Self::Deprecated,
4323            ffi::GTK_CSS_PARSER_WARNING_SYNTAX => Self::Syntax,
4324            ffi::GTK_CSS_PARSER_WARNING_UNIMPLEMENTED => Self::Unimplemented,
4325            value => Self::__Unknown(value),
4326        }
4327    }
4328}
4329
4330/// Passed to various keybinding signals for deleting text.
4331#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
4332#[non_exhaustive]
4333#[doc(alias = "GtkDeleteType")]
4334pub enum DeleteType {
4335    /// Delete characters.
4336    #[doc(alias = "GTK_DELETE_CHARS")]
4337    Chars,
4338    /// Delete only the portion of the word to the
4339    ///   left/right of cursor if we’re in the middle of a word.
4340    #[doc(alias = "GTK_DELETE_WORD_ENDS")]
4341    WordEnds,
4342    /// Delete words.
4343    #[doc(alias = "GTK_DELETE_WORDS")]
4344    Words,
4345    /// Delete display-lines. Display-lines
4346    ///   refers to the visible lines, with respect to the current line
4347    ///   breaks. As opposed to paragraphs, which are defined by line
4348    ///   breaks in the input.
4349    #[doc(alias = "GTK_DELETE_DISPLAY_LINES")]
4350    DisplayLines,
4351    /// Delete only the portion of the
4352    ///   display-line to the left/right of cursor.
4353    #[doc(alias = "GTK_DELETE_DISPLAY_LINE_ENDS")]
4354    DisplayLineEnds,
4355    /// Delete to the end of the
4356    ///   paragraph. Like C-k in Emacs (or its reverse).
4357    #[doc(alias = "GTK_DELETE_PARAGRAPH_ENDS")]
4358    ParagraphEnds,
4359    /// Delete entire line. Like C-k in pico.
4360    #[doc(alias = "GTK_DELETE_PARAGRAPHS")]
4361    Paragraphs,
4362    /// Delete only whitespace. Like M-\ in Emacs.
4363    #[doc(alias = "GTK_DELETE_WHITESPACE")]
4364    Whitespace,
4365    #[doc(hidden)]
4366    __Unknown(i32),
4367}
4368
4369#[doc(hidden)]
4370impl IntoGlib for DeleteType {
4371    type GlibType = ffi::GtkDeleteType;
4372
4373    #[inline]
4374    fn into_glib(self) -> ffi::GtkDeleteType {
4375        match self {
4376            Self::Chars => ffi::GTK_DELETE_CHARS,
4377            Self::WordEnds => ffi::GTK_DELETE_WORD_ENDS,
4378            Self::Words => ffi::GTK_DELETE_WORDS,
4379            Self::DisplayLines => ffi::GTK_DELETE_DISPLAY_LINES,
4380            Self::DisplayLineEnds => ffi::GTK_DELETE_DISPLAY_LINE_ENDS,
4381            Self::ParagraphEnds => ffi::GTK_DELETE_PARAGRAPH_ENDS,
4382            Self::Paragraphs => ffi::GTK_DELETE_PARAGRAPHS,
4383            Self::Whitespace => ffi::GTK_DELETE_WHITESPACE,
4384            Self::__Unknown(value) => value,
4385        }
4386    }
4387}
4388
4389#[doc(hidden)]
4390impl FromGlib<ffi::GtkDeleteType> for DeleteType {
4391    #[inline]
4392    unsafe fn from_glib(value: ffi::GtkDeleteType) -> Self {
4393        skip_assert_initialized!();
4394
4395        match value {
4396            ffi::GTK_DELETE_CHARS => Self::Chars,
4397            ffi::GTK_DELETE_WORD_ENDS => Self::WordEnds,
4398            ffi::GTK_DELETE_WORDS => Self::Words,
4399            ffi::GTK_DELETE_DISPLAY_LINES => Self::DisplayLines,
4400            ffi::GTK_DELETE_DISPLAY_LINE_ENDS => Self::DisplayLineEnds,
4401            ffi::GTK_DELETE_PARAGRAPH_ENDS => Self::ParagraphEnds,
4402            ffi::GTK_DELETE_PARAGRAPHS => Self::Paragraphs,
4403            ffi::GTK_DELETE_WHITESPACE => Self::Whitespace,
4404            value => Self::__Unknown(value),
4405        }
4406    }
4407}
4408
4409impl StaticType for DeleteType {
4410    #[inline]
4411    #[doc(alias = "gtk_delete_type_get_type")]
4412    fn static_type() -> glib::Type {
4413        unsafe { from_glib(ffi::gtk_delete_type_get_type()) }
4414    }
4415}
4416
4417impl glib::HasParamSpec for DeleteType {
4418    type ParamSpec = glib::ParamSpecEnum;
4419    type SetValue = Self;
4420    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
4421
4422    fn param_spec_builder() -> Self::BuilderFn {
4423        Self::ParamSpec::builder_with_default
4424    }
4425}
4426
4427impl glib::value::ValueType for DeleteType {
4428    type Type = Self;
4429}
4430
4431unsafe impl<'a> glib::value::FromValue<'a> for DeleteType {
4432    type Checker = glib::value::GenericValueTypeChecker<Self>;
4433
4434    #[inline]
4435    unsafe fn from_value(value: &'a glib::Value) -> Self {
4436        skip_assert_initialized!();
4437        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
4438    }
4439}
4440
4441impl ToValue for DeleteType {
4442    #[inline]
4443    fn to_value(&self) -> glib::Value {
4444        let mut value = glib::Value::for_value_type::<Self>();
4445        unsafe {
4446            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
4447        }
4448        value
4449    }
4450
4451    #[inline]
4452    fn value_type(&self) -> glib::Type {
4453        Self::static_type()
4454    }
4455}
4456
4457impl From<DeleteType> for glib::Value {
4458    #[inline]
4459    fn from(v: DeleteType) -> Self {
4460        skip_assert_initialized!();
4461        ToValue::to_value(&v)
4462    }
4463}
4464
4465/// Error codes in the `GTK_DIALOG_ERROR` domain that can be returned
4466/// by async dialog functions.
4467#[cfg(feature = "v4_10")]
4468#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
4469#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
4470#[non_exhaustive]
4471#[doc(alias = "GtkDialogError")]
4472pub enum DialogError {
4473    /// Generic error condition for when
4474    ///   an operation fails and no more specific code is applicable
4475    #[doc(alias = "GTK_DIALOG_ERROR_FAILED")]
4476    Failed,
4477    /// The async function call was cancelled
4478    ///   via its `GCancellable`
4479    #[doc(alias = "GTK_DIALOG_ERROR_CANCELLED")]
4480    Cancelled,
4481    /// The operation was cancelled
4482    ///   by the user (via a Cancel or Close button)
4483    #[doc(alias = "GTK_DIALOG_ERROR_DISMISSED")]
4484    Dismissed,
4485    #[doc(hidden)]
4486    __Unknown(i32),
4487}
4488
4489#[cfg(feature = "v4_10")]
4490#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
4491#[doc(hidden)]
4492impl IntoGlib for DialogError {
4493    type GlibType = ffi::GtkDialogError;
4494
4495    #[inline]
4496    fn into_glib(self) -> ffi::GtkDialogError {
4497        match self {
4498            Self::Failed => ffi::GTK_DIALOG_ERROR_FAILED,
4499            Self::Cancelled => ffi::GTK_DIALOG_ERROR_CANCELLED,
4500            Self::Dismissed => ffi::GTK_DIALOG_ERROR_DISMISSED,
4501            Self::__Unknown(value) => value,
4502        }
4503    }
4504}
4505
4506#[cfg(feature = "v4_10")]
4507#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
4508#[doc(hidden)]
4509impl FromGlib<ffi::GtkDialogError> for DialogError {
4510    #[inline]
4511    unsafe fn from_glib(value: ffi::GtkDialogError) -> Self {
4512        skip_assert_initialized!();
4513
4514        match value {
4515            ffi::GTK_DIALOG_ERROR_FAILED => Self::Failed,
4516            ffi::GTK_DIALOG_ERROR_CANCELLED => Self::Cancelled,
4517            ffi::GTK_DIALOG_ERROR_DISMISSED => Self::Dismissed,
4518            value => Self::__Unknown(value),
4519        }
4520    }
4521}
4522
4523#[cfg(feature = "v4_10")]
4524#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
4525impl glib::error::ErrorDomain for DialogError {
4526    #[inline]
4527    fn domain() -> glib::Quark {
4528        skip_assert_initialized!();
4529
4530        unsafe { from_glib(ffi::gtk_dialog_error_quark()) }
4531    }
4532
4533    #[inline]
4534    fn code(self) -> i32 {
4535        self.into_glib()
4536    }
4537
4538    #[inline]
4539    #[allow(clippy::match_single_binding)]
4540    fn from(code: i32) -> Option<Self> {
4541        skip_assert_initialized!();
4542        match unsafe { from_glib(code) } {
4543            Self::__Unknown(_) => Some(Self::Failed),
4544            value => Some(value),
4545        }
4546    }
4547}
4548
4549#[cfg(feature = "v4_10")]
4550#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
4551impl StaticType for DialogError {
4552    #[inline]
4553    #[doc(alias = "gtk_dialog_error_get_type")]
4554    fn static_type() -> glib::Type {
4555        unsafe { from_glib(ffi::gtk_dialog_error_get_type()) }
4556    }
4557}
4558
4559#[cfg(feature = "v4_10")]
4560#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
4561impl glib::HasParamSpec for DialogError {
4562    type ParamSpec = glib::ParamSpecEnum;
4563    type SetValue = Self;
4564    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
4565
4566    fn param_spec_builder() -> Self::BuilderFn {
4567        Self::ParamSpec::builder_with_default
4568    }
4569}
4570
4571#[cfg(feature = "v4_10")]
4572#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
4573impl glib::value::ValueType for DialogError {
4574    type Type = Self;
4575}
4576
4577#[cfg(feature = "v4_10")]
4578#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
4579unsafe impl<'a> glib::value::FromValue<'a> for DialogError {
4580    type Checker = glib::value::GenericValueTypeChecker<Self>;
4581
4582    #[inline]
4583    unsafe fn from_value(value: &'a glib::Value) -> Self {
4584        skip_assert_initialized!();
4585        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
4586    }
4587}
4588
4589#[cfg(feature = "v4_10")]
4590#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
4591impl ToValue for DialogError {
4592    #[inline]
4593    fn to_value(&self) -> glib::Value {
4594        let mut value = glib::Value::for_value_type::<Self>();
4595        unsafe {
4596            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
4597        }
4598        value
4599    }
4600
4601    #[inline]
4602    fn value_type(&self) -> glib::Type {
4603        Self::static_type()
4604    }
4605}
4606
4607#[cfg(feature = "v4_10")]
4608#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
4609impl From<DialogError> for glib::Value {
4610    #[inline]
4611    fn from(v: DialogError) -> Self {
4612        skip_assert_initialized!();
4613        ToValue::to_value(&v)
4614    }
4615}
4616
4617/// Focus movement types.
4618#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
4619#[non_exhaustive]
4620#[doc(alias = "GtkDirectionType")]
4621pub enum DirectionType {
4622    /// Move forward.
4623    #[doc(alias = "GTK_DIR_TAB_FORWARD")]
4624    TabForward,
4625    /// Move backward.
4626    #[doc(alias = "GTK_DIR_TAB_BACKWARD")]
4627    TabBackward,
4628    /// Move up.
4629    #[doc(alias = "GTK_DIR_UP")]
4630    Up,
4631    /// Move down.
4632    #[doc(alias = "GTK_DIR_DOWN")]
4633    Down,
4634    /// Move left.
4635    #[doc(alias = "GTK_DIR_LEFT")]
4636    Left,
4637    /// Move right.
4638    #[doc(alias = "GTK_DIR_RIGHT")]
4639    Right,
4640    #[doc(hidden)]
4641    __Unknown(i32),
4642}
4643
4644#[doc(hidden)]
4645impl IntoGlib for DirectionType {
4646    type GlibType = ffi::GtkDirectionType;
4647
4648    #[inline]
4649    fn into_glib(self) -> ffi::GtkDirectionType {
4650        match self {
4651            Self::TabForward => ffi::GTK_DIR_TAB_FORWARD,
4652            Self::TabBackward => ffi::GTK_DIR_TAB_BACKWARD,
4653            Self::Up => ffi::GTK_DIR_UP,
4654            Self::Down => ffi::GTK_DIR_DOWN,
4655            Self::Left => ffi::GTK_DIR_LEFT,
4656            Self::Right => ffi::GTK_DIR_RIGHT,
4657            Self::__Unknown(value) => value,
4658        }
4659    }
4660}
4661
4662#[doc(hidden)]
4663impl FromGlib<ffi::GtkDirectionType> for DirectionType {
4664    #[inline]
4665    unsafe fn from_glib(value: ffi::GtkDirectionType) -> Self {
4666        skip_assert_initialized!();
4667
4668        match value {
4669            ffi::GTK_DIR_TAB_FORWARD => Self::TabForward,
4670            ffi::GTK_DIR_TAB_BACKWARD => Self::TabBackward,
4671            ffi::GTK_DIR_UP => Self::Up,
4672            ffi::GTK_DIR_DOWN => Self::Down,
4673            ffi::GTK_DIR_LEFT => Self::Left,
4674            ffi::GTK_DIR_RIGHT => Self::Right,
4675            value => Self::__Unknown(value),
4676        }
4677    }
4678}
4679
4680impl StaticType for DirectionType {
4681    #[inline]
4682    #[doc(alias = "gtk_direction_type_get_type")]
4683    fn static_type() -> glib::Type {
4684        unsafe { from_glib(ffi::gtk_direction_type_get_type()) }
4685    }
4686}
4687
4688impl glib::HasParamSpec for DirectionType {
4689    type ParamSpec = glib::ParamSpecEnum;
4690    type SetValue = Self;
4691    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
4692
4693    fn param_spec_builder() -> Self::BuilderFn {
4694        Self::ParamSpec::builder_with_default
4695    }
4696}
4697
4698impl glib::value::ValueType for DirectionType {
4699    type Type = Self;
4700}
4701
4702unsafe impl<'a> glib::value::FromValue<'a> for DirectionType {
4703    type Checker = glib::value::GenericValueTypeChecker<Self>;
4704
4705    #[inline]
4706    unsafe fn from_value(value: &'a glib::Value) -> Self {
4707        skip_assert_initialized!();
4708        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
4709    }
4710}
4711
4712impl ToValue for DirectionType {
4713    #[inline]
4714    fn to_value(&self) -> glib::Value {
4715        let mut value = glib::Value::for_value_type::<Self>();
4716        unsafe {
4717            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
4718        }
4719        value
4720    }
4721
4722    #[inline]
4723    fn value_type(&self) -> glib::Type {
4724        Self::static_type()
4725    }
4726}
4727
4728impl From<DirectionType> for glib::Value {
4729    #[inline]
4730    fn from(v: DirectionType) -> Self {
4731        skip_assert_initialized!();
4732        ToValue::to_value(&v)
4733    }
4734}
4735
4736/// The identifiers for [`Editable`][crate::Editable] properties.
4737///
4738/// See [`Editable::install_properties()`][crate::Editable::install_properties()] for details on how to
4739/// implement the [`Editable`][crate::Editable] interface.
4740#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
4741#[non_exhaustive]
4742#[doc(alias = "GtkEditableProperties")]
4743pub enum EditableProperties {
4744    /// the property id for [`text`][struct@crate::Editable#text]
4745    #[doc(alias = "GTK_EDITABLE_PROP_TEXT")]
4746    PropText,
4747    /// the property id for [`cursor-position`][struct@crate::Editable#cursor-position]
4748    #[doc(alias = "GTK_EDITABLE_PROP_CURSOR_POSITION")]
4749    PropCursorPosition,
4750    /// the property id for [`selection-bound`][struct@crate::Editable#selection-bound]
4751    #[doc(alias = "GTK_EDITABLE_PROP_SELECTION_BOUND")]
4752    PropSelectionBound,
4753    /// the property id for [`editable`][struct@crate::Editable#editable]
4754    #[doc(alias = "GTK_EDITABLE_PROP_EDITABLE")]
4755    PropEditable,
4756    /// the property id for [`width-chars`][struct@crate::Editable#width-chars]
4757    #[doc(alias = "GTK_EDITABLE_PROP_WIDTH_CHARS")]
4758    PropWidthChars,
4759    /// the property id for [`max-width-chars`][struct@crate::Editable#max-width-chars]
4760    #[doc(alias = "GTK_EDITABLE_PROP_MAX_WIDTH_CHARS")]
4761    PropMaxWidthChars,
4762    /// the property id for [`xalign`][struct@crate::Editable#xalign]
4763    #[doc(alias = "GTK_EDITABLE_PROP_XALIGN")]
4764    PropXalign,
4765    /// the property id for [`enable-undo`][struct@crate::Editable#enable-undo]
4766    #[doc(alias = "GTK_EDITABLE_PROP_ENABLE_UNDO")]
4767    PropEnableUndo,
4768    /// the number of properties
4769    #[doc(alias = "GTK_EDITABLE_NUM_PROPERTIES")]
4770    NumProperties,
4771    #[doc(hidden)]
4772    __Unknown(i32),
4773}
4774
4775#[doc(hidden)]
4776impl IntoGlib for EditableProperties {
4777    type GlibType = ffi::GtkEditableProperties;
4778
4779    #[inline]
4780    fn into_glib(self) -> ffi::GtkEditableProperties {
4781        match self {
4782            Self::PropText => ffi::GTK_EDITABLE_PROP_TEXT,
4783            Self::PropCursorPosition => ffi::GTK_EDITABLE_PROP_CURSOR_POSITION,
4784            Self::PropSelectionBound => ffi::GTK_EDITABLE_PROP_SELECTION_BOUND,
4785            Self::PropEditable => ffi::GTK_EDITABLE_PROP_EDITABLE,
4786            Self::PropWidthChars => ffi::GTK_EDITABLE_PROP_WIDTH_CHARS,
4787            Self::PropMaxWidthChars => ffi::GTK_EDITABLE_PROP_MAX_WIDTH_CHARS,
4788            Self::PropXalign => ffi::GTK_EDITABLE_PROP_XALIGN,
4789            Self::PropEnableUndo => ffi::GTK_EDITABLE_PROP_ENABLE_UNDO,
4790            Self::NumProperties => ffi::GTK_EDITABLE_NUM_PROPERTIES,
4791            Self::__Unknown(value) => value,
4792        }
4793    }
4794}
4795
4796#[doc(hidden)]
4797impl FromGlib<ffi::GtkEditableProperties> for EditableProperties {
4798    #[inline]
4799    unsafe fn from_glib(value: ffi::GtkEditableProperties) -> Self {
4800        skip_assert_initialized!();
4801
4802        match value {
4803            ffi::GTK_EDITABLE_PROP_TEXT => Self::PropText,
4804            ffi::GTK_EDITABLE_PROP_CURSOR_POSITION => Self::PropCursorPosition,
4805            ffi::GTK_EDITABLE_PROP_SELECTION_BOUND => Self::PropSelectionBound,
4806            ffi::GTK_EDITABLE_PROP_EDITABLE => Self::PropEditable,
4807            ffi::GTK_EDITABLE_PROP_WIDTH_CHARS => Self::PropWidthChars,
4808            ffi::GTK_EDITABLE_PROP_MAX_WIDTH_CHARS => Self::PropMaxWidthChars,
4809            ffi::GTK_EDITABLE_PROP_XALIGN => Self::PropXalign,
4810            ffi::GTK_EDITABLE_PROP_ENABLE_UNDO => Self::PropEnableUndo,
4811            ffi::GTK_EDITABLE_NUM_PROPERTIES => Self::NumProperties,
4812            value => Self::__Unknown(value),
4813        }
4814    }
4815}
4816
4817impl StaticType for EditableProperties {
4818    #[inline]
4819    #[doc(alias = "gtk_editable_properties_get_type")]
4820    fn static_type() -> glib::Type {
4821        unsafe { from_glib(ffi::gtk_editable_properties_get_type()) }
4822    }
4823}
4824
4825impl glib::HasParamSpec for EditableProperties {
4826    type ParamSpec = glib::ParamSpecEnum;
4827    type SetValue = Self;
4828    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
4829
4830    fn param_spec_builder() -> Self::BuilderFn {
4831        Self::ParamSpec::builder_with_default
4832    }
4833}
4834
4835impl glib::value::ValueType for EditableProperties {
4836    type Type = Self;
4837}
4838
4839unsafe impl<'a> glib::value::FromValue<'a> for EditableProperties {
4840    type Checker = glib::value::GenericValueTypeChecker<Self>;
4841
4842    #[inline]
4843    unsafe fn from_value(value: &'a glib::Value) -> Self {
4844        skip_assert_initialized!();
4845        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
4846    }
4847}
4848
4849impl ToValue for EditableProperties {
4850    #[inline]
4851    fn to_value(&self) -> glib::Value {
4852        let mut value = glib::Value::for_value_type::<Self>();
4853        unsafe {
4854            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
4855        }
4856        value
4857    }
4858
4859    #[inline]
4860    fn value_type(&self) -> glib::Type {
4861        Self::static_type()
4862    }
4863}
4864
4865impl From<EditableProperties> for glib::Value {
4866    #[inline]
4867    fn from(v: EditableProperties) -> Self {
4868        skip_assert_initialized!();
4869        ToValue::to_value(&v)
4870    }
4871}
4872
4873/// Specifies the side of the entry at which an icon is placed.
4874#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
4875#[non_exhaustive]
4876#[doc(alias = "GtkEntryIconPosition")]
4877pub enum EntryIconPosition {
4878    /// At the beginning of the entry (depending on the text direction).
4879    #[doc(alias = "GTK_ENTRY_ICON_PRIMARY")]
4880    Primary,
4881    /// At the end of the entry (depending on the text direction).
4882    #[doc(alias = "GTK_ENTRY_ICON_SECONDARY")]
4883    Secondary,
4884    #[doc(hidden)]
4885    __Unknown(i32),
4886}
4887
4888#[doc(hidden)]
4889impl IntoGlib for EntryIconPosition {
4890    type GlibType = ffi::GtkEntryIconPosition;
4891
4892    #[inline]
4893    fn into_glib(self) -> ffi::GtkEntryIconPosition {
4894        match self {
4895            Self::Primary => ffi::GTK_ENTRY_ICON_PRIMARY,
4896            Self::Secondary => ffi::GTK_ENTRY_ICON_SECONDARY,
4897            Self::__Unknown(value) => value,
4898        }
4899    }
4900}
4901
4902#[doc(hidden)]
4903impl FromGlib<ffi::GtkEntryIconPosition> for EntryIconPosition {
4904    #[inline]
4905    unsafe fn from_glib(value: ffi::GtkEntryIconPosition) -> Self {
4906        skip_assert_initialized!();
4907
4908        match value {
4909            ffi::GTK_ENTRY_ICON_PRIMARY => Self::Primary,
4910            ffi::GTK_ENTRY_ICON_SECONDARY => Self::Secondary,
4911            value => Self::__Unknown(value),
4912        }
4913    }
4914}
4915
4916impl StaticType for EntryIconPosition {
4917    #[inline]
4918    #[doc(alias = "gtk_entry_icon_position_get_type")]
4919    fn static_type() -> glib::Type {
4920        unsafe { from_glib(ffi::gtk_entry_icon_position_get_type()) }
4921    }
4922}
4923
4924impl glib::HasParamSpec for EntryIconPosition {
4925    type ParamSpec = glib::ParamSpecEnum;
4926    type SetValue = Self;
4927    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
4928
4929    fn param_spec_builder() -> Self::BuilderFn {
4930        Self::ParamSpec::builder_with_default
4931    }
4932}
4933
4934impl glib::value::ValueType for EntryIconPosition {
4935    type Type = Self;
4936}
4937
4938unsafe impl<'a> glib::value::FromValue<'a> for EntryIconPosition {
4939    type Checker = glib::value::GenericValueTypeChecker<Self>;
4940
4941    #[inline]
4942    unsafe fn from_value(value: &'a glib::Value) -> Self {
4943        skip_assert_initialized!();
4944        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
4945    }
4946}
4947
4948impl ToValue for EntryIconPosition {
4949    #[inline]
4950    fn to_value(&self) -> glib::Value {
4951        let mut value = glib::Value::for_value_type::<Self>();
4952        unsafe {
4953            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
4954        }
4955        value
4956    }
4957
4958    #[inline]
4959    fn value_type(&self) -> glib::Type {
4960        Self::static_type()
4961    }
4962}
4963
4964impl From<EntryIconPosition> for glib::Value {
4965    #[inline]
4966    fn from(v: EntryIconPosition) -> Self {
4967        skip_assert_initialized!();
4968        ToValue::to_value(&v)
4969    }
4970}
4971
4972/// Describes the state of a [`gdk::EventSequence`][crate::gdk::EventSequence] in a [`Gesture`][crate::Gesture].
4973#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
4974#[non_exhaustive]
4975#[doc(alias = "GtkEventSequenceState")]
4976pub enum EventSequenceState {
4977    /// The sequence is handled, but not grabbed.
4978    #[doc(alias = "GTK_EVENT_SEQUENCE_NONE")]
4979    None,
4980    /// The sequence is handled and grabbed.
4981    #[doc(alias = "GTK_EVENT_SEQUENCE_CLAIMED")]
4982    Claimed,
4983    /// The sequence is denied.
4984    #[doc(alias = "GTK_EVENT_SEQUENCE_DENIED")]
4985    Denied,
4986    #[doc(hidden)]
4987    __Unknown(i32),
4988}
4989
4990#[doc(hidden)]
4991impl IntoGlib for EventSequenceState {
4992    type GlibType = ffi::GtkEventSequenceState;
4993
4994    #[inline]
4995    fn into_glib(self) -> ffi::GtkEventSequenceState {
4996        match self {
4997            Self::None => ffi::GTK_EVENT_SEQUENCE_NONE,
4998            Self::Claimed => ffi::GTK_EVENT_SEQUENCE_CLAIMED,
4999            Self::Denied => ffi::GTK_EVENT_SEQUENCE_DENIED,
5000            Self::__Unknown(value) => value,
5001        }
5002    }
5003}
5004
5005#[doc(hidden)]
5006impl FromGlib<ffi::GtkEventSequenceState> for EventSequenceState {
5007    #[inline]
5008    unsafe fn from_glib(value: ffi::GtkEventSequenceState) -> Self {
5009        skip_assert_initialized!();
5010
5011        match value {
5012            ffi::GTK_EVENT_SEQUENCE_NONE => Self::None,
5013            ffi::GTK_EVENT_SEQUENCE_CLAIMED => Self::Claimed,
5014            ffi::GTK_EVENT_SEQUENCE_DENIED => Self::Denied,
5015            value => Self::__Unknown(value),
5016        }
5017    }
5018}
5019
5020impl StaticType for EventSequenceState {
5021    #[inline]
5022    #[doc(alias = "gtk_event_sequence_state_get_type")]
5023    fn static_type() -> glib::Type {
5024        unsafe { from_glib(ffi::gtk_event_sequence_state_get_type()) }
5025    }
5026}
5027
5028impl glib::HasParamSpec for EventSequenceState {
5029    type ParamSpec = glib::ParamSpecEnum;
5030    type SetValue = Self;
5031    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
5032
5033    fn param_spec_builder() -> Self::BuilderFn {
5034        Self::ParamSpec::builder_with_default
5035    }
5036}
5037
5038impl glib::value::ValueType for EventSequenceState {
5039    type Type = Self;
5040}
5041
5042unsafe impl<'a> glib::value::FromValue<'a> for EventSequenceState {
5043    type Checker = glib::value::GenericValueTypeChecker<Self>;
5044
5045    #[inline]
5046    unsafe fn from_value(value: &'a glib::Value) -> Self {
5047        skip_assert_initialized!();
5048        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
5049    }
5050}
5051
5052impl ToValue for EventSequenceState {
5053    #[inline]
5054    fn to_value(&self) -> glib::Value {
5055        let mut value = glib::Value::for_value_type::<Self>();
5056        unsafe {
5057            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
5058        }
5059        value
5060    }
5061
5062    #[inline]
5063    fn value_type(&self) -> glib::Type {
5064        Self::static_type()
5065    }
5066}
5067
5068impl From<EventSequenceState> for glib::Value {
5069    #[inline]
5070    fn from(v: EventSequenceState) -> Self {
5071        skip_assert_initialized!();
5072        ToValue::to_value(&v)
5073    }
5074}
5075
5076/// Describes whether a [`FileChooser`][crate::FileChooser] is being used to open existing files
5077/// or to save to a possibly new file.
5078#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
5079#[non_exhaustive]
5080#[doc(alias = "GtkFileChooserAction")]
5081pub enum FileChooserAction {
5082    /// Indicates open mode.  The file chooser
5083    ///  will only let the user pick an existing file.
5084    #[doc(alias = "GTK_FILE_CHOOSER_ACTION_OPEN")]
5085    Open,
5086    /// Indicates save mode.  The file chooser
5087    ///  will let the user pick an existing file, or type in a new
5088    ///  filename.
5089    #[doc(alias = "GTK_FILE_CHOOSER_ACTION_SAVE")]
5090    Save,
5091    /// Indicates an Open mode for
5092    ///  selecting folders.  The file chooser will let the user pick an
5093    ///  existing folder.
5094    #[doc(alias = "GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER")]
5095    SelectFolder,
5096    #[doc(hidden)]
5097    __Unknown(i32),
5098}
5099
5100#[doc(hidden)]
5101impl IntoGlib for FileChooserAction {
5102    type GlibType = ffi::GtkFileChooserAction;
5103
5104    #[inline]
5105    fn into_glib(self) -> ffi::GtkFileChooserAction {
5106        match self {
5107            Self::Open => ffi::GTK_FILE_CHOOSER_ACTION_OPEN,
5108            Self::Save => ffi::GTK_FILE_CHOOSER_ACTION_SAVE,
5109            Self::SelectFolder => ffi::GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
5110            Self::__Unknown(value) => value,
5111        }
5112    }
5113}
5114
5115#[doc(hidden)]
5116impl FromGlib<ffi::GtkFileChooserAction> for FileChooserAction {
5117    #[inline]
5118    unsafe fn from_glib(value: ffi::GtkFileChooserAction) -> Self {
5119        skip_assert_initialized!();
5120
5121        match value {
5122            ffi::GTK_FILE_CHOOSER_ACTION_OPEN => Self::Open,
5123            ffi::GTK_FILE_CHOOSER_ACTION_SAVE => Self::Save,
5124            ffi::GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER => Self::SelectFolder,
5125            value => Self::__Unknown(value),
5126        }
5127    }
5128}
5129
5130impl StaticType for FileChooserAction {
5131    #[inline]
5132    #[doc(alias = "gtk_file_chooser_action_get_type")]
5133    fn static_type() -> glib::Type {
5134        unsafe { from_glib(ffi::gtk_file_chooser_action_get_type()) }
5135    }
5136}
5137
5138impl glib::HasParamSpec for FileChooserAction {
5139    type ParamSpec = glib::ParamSpecEnum;
5140    type SetValue = Self;
5141    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
5142
5143    fn param_spec_builder() -> Self::BuilderFn {
5144        Self::ParamSpec::builder_with_default
5145    }
5146}
5147
5148impl glib::value::ValueType for FileChooserAction {
5149    type Type = Self;
5150}
5151
5152unsafe impl<'a> glib::value::FromValue<'a> for FileChooserAction {
5153    type Checker = glib::value::GenericValueTypeChecker<Self>;
5154
5155    #[inline]
5156    unsafe fn from_value(value: &'a glib::Value) -> Self {
5157        skip_assert_initialized!();
5158        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
5159    }
5160}
5161
5162impl ToValue for FileChooserAction {
5163    #[inline]
5164    fn to_value(&self) -> glib::Value {
5165        let mut value = glib::Value::for_value_type::<Self>();
5166        unsafe {
5167            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
5168        }
5169        value
5170    }
5171
5172    #[inline]
5173    fn value_type(&self) -> glib::Type {
5174        Self::static_type()
5175    }
5176}
5177
5178impl From<FileChooserAction> for glib::Value {
5179    #[inline]
5180    fn from(v: FileChooserAction) -> Self {
5181        skip_assert_initialized!();
5182        ToValue::to_value(&v)
5183    }
5184}
5185
5186/// These identify the various errors that can occur while calling
5187/// [`FileChooser`][crate::FileChooser] functions.
5188///
5189/// # Deprecated since 4.20
5190///
5191/// There is no replacement
5192#[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
5193#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
5194#[non_exhaustive]
5195#[doc(alias = "GtkFileChooserError")]
5196pub enum FileChooserError {
5197    /// Indicates that a file does not exist.
5198    #[doc(alias = "GTK_FILE_CHOOSER_ERROR_NONEXISTENT")]
5199    Nonexistent,
5200    /// Indicates a malformed filename.
5201    #[doc(alias = "GTK_FILE_CHOOSER_ERROR_BAD_FILENAME")]
5202    BadFilename,
5203    /// Indicates a duplicate path (e.g. when
5204    ///  adding a bookmark).
5205    #[doc(alias = "GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS")]
5206    AlreadyExists,
5207    /// Indicates an incomplete hostname
5208    ///  (e.g. "http://foo" without a slash after that).
5209    #[doc(alias = "GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME")]
5210    IncompleteHostname,
5211    #[doc(hidden)]
5212    __Unknown(i32),
5213}
5214
5215#[allow(deprecated)]
5216#[doc(hidden)]
5217impl IntoGlib for FileChooserError {
5218    type GlibType = ffi::GtkFileChooserError;
5219
5220    #[inline]
5221    fn into_glib(self) -> ffi::GtkFileChooserError {
5222        match self {
5223            Self::Nonexistent => ffi::GTK_FILE_CHOOSER_ERROR_NONEXISTENT,
5224            Self::BadFilename => ffi::GTK_FILE_CHOOSER_ERROR_BAD_FILENAME,
5225            Self::AlreadyExists => ffi::GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS,
5226            Self::IncompleteHostname => ffi::GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME,
5227            Self::__Unknown(value) => value,
5228        }
5229    }
5230}
5231
5232#[allow(deprecated)]
5233#[doc(hidden)]
5234impl FromGlib<ffi::GtkFileChooserError> for FileChooserError {
5235    #[inline]
5236    unsafe fn from_glib(value: ffi::GtkFileChooserError) -> Self {
5237        skip_assert_initialized!();
5238
5239        match value {
5240            ffi::GTK_FILE_CHOOSER_ERROR_NONEXISTENT => Self::Nonexistent,
5241            ffi::GTK_FILE_CHOOSER_ERROR_BAD_FILENAME => Self::BadFilename,
5242            ffi::GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS => Self::AlreadyExists,
5243            ffi::GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME => Self::IncompleteHostname,
5244            value => Self::__Unknown(value),
5245        }
5246    }
5247}
5248
5249#[allow(deprecated)]
5250impl glib::error::ErrorDomain for FileChooserError {
5251    #[inline]
5252    fn domain() -> glib::Quark {
5253        skip_assert_initialized!();
5254
5255        unsafe { from_glib(ffi::gtk_file_chooser_error_quark()) }
5256    }
5257
5258    #[inline]
5259    fn code(self) -> i32 {
5260        self.into_glib()
5261    }
5262
5263    #[inline]
5264    #[allow(clippy::match_single_binding)]
5265    fn from(code: i32) -> Option<Self> {
5266        skip_assert_initialized!();
5267        match unsafe { from_glib(code) } {
5268            value => Some(value),
5269        }
5270    }
5271}
5272
5273#[allow(deprecated)]
5274impl StaticType for FileChooserError {
5275    #[inline]
5276    #[doc(alias = "gtk_file_chooser_error_get_type")]
5277    fn static_type() -> glib::Type {
5278        unsafe { from_glib(ffi::gtk_file_chooser_error_get_type()) }
5279    }
5280}
5281
5282#[allow(deprecated)]
5283impl glib::HasParamSpec for FileChooserError {
5284    type ParamSpec = glib::ParamSpecEnum;
5285    type SetValue = Self;
5286    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
5287
5288    fn param_spec_builder() -> Self::BuilderFn {
5289        Self::ParamSpec::builder_with_default
5290    }
5291}
5292
5293#[allow(deprecated)]
5294impl glib::value::ValueType for FileChooserError {
5295    type Type = Self;
5296}
5297
5298#[allow(deprecated)]
5299unsafe impl<'a> glib::value::FromValue<'a> for FileChooserError {
5300    type Checker = glib::value::GenericValueTypeChecker<Self>;
5301
5302    #[inline]
5303    unsafe fn from_value(value: &'a glib::Value) -> Self {
5304        skip_assert_initialized!();
5305        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
5306    }
5307}
5308
5309#[allow(deprecated)]
5310impl ToValue for FileChooserError {
5311    #[inline]
5312    fn to_value(&self) -> glib::Value {
5313        let mut value = glib::Value::for_value_type::<Self>();
5314        unsafe {
5315            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
5316        }
5317        value
5318    }
5319
5320    #[inline]
5321    fn value_type(&self) -> glib::Type {
5322        Self::static_type()
5323    }
5324}
5325
5326#[allow(deprecated)]
5327impl From<FileChooserError> for glib::Value {
5328    #[inline]
5329    fn from(v: FileChooserError) -> Self {
5330        skip_assert_initialized!();
5331        ToValue::to_value(&v)
5332    }
5333}
5334
5335/// Describes changes in a filter in more detail and allows objects
5336/// using the filter to optimize refiltering items.
5337///
5338/// If you are writing an implementation and are not sure which
5339/// value to pass, `GTK_FILTER_CHANGE_DIFFERENT` is always a correct
5340/// choice.
5341///
5342/// New values may be added in the future.
5343#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
5344#[non_exhaustive]
5345#[doc(alias = "GtkFilterChange")]
5346pub enum FilterChange {
5347    /// The filter change cannot be
5348    ///   described with any of the other enumeration values
5349    #[doc(alias = "GTK_FILTER_CHANGE_DIFFERENT")]
5350    Different,
5351    /// The filter is less strict than
5352    ///   it was before: All items that it used to return true
5353    ///   still return true, others now may, too.
5354    #[doc(alias = "GTK_FILTER_CHANGE_LESS_STRICT")]
5355    LessStrict,
5356    /// The filter is more strict than
5357    ///   it was before: All items that it used to return false
5358    ///   still return false, others now may, too.
5359    #[doc(alias = "GTK_FILTER_CHANGE_MORE_STRICT")]
5360    MoreStrict,
5361    /// Similar to [enum@Gtk.FilterChange.DIFFERENT],
5362    /// but signs that item watches should be recreated. This is used by
5363    /// [`FilterListModel`][crate::FilterListModel] to keep the list up-to-date when items
5364    /// change.
5365    #[cfg(feature = "v4_20")]
5366    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
5367    #[doc(alias = "GTK_FILTER_CHANGE_DIFFERENT_REWATCH")]
5368    DifferentRewatch,
5369    /// Similar to [enum@Gtk.FilterChange.LESS_STRICT],
5370    /// but signs that item watches should be recreated. This is used by
5371    /// [`FilterListModel`][crate::FilterListModel] to keep the list up-to-date when items
5372    /// change.
5373    #[cfg(feature = "v4_20")]
5374    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
5375    #[doc(alias = "GTK_FILTER_CHANGE_LESS_STRICT_REWATCH")]
5376    LessStrictRewatch,
5377    /// Similar to [enum@Gtk.FilterChange.MORE_STRICT],
5378    /// but signs that item watches should be recreated. This is used by
5379    /// [`FilterListModel`][crate::FilterListModel] to keep the list up-to-date when items
5380    /// change.
5381    #[cfg(feature = "v4_20")]
5382    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
5383    #[doc(alias = "GTK_FILTER_CHANGE_MORE_STRICT_REWATCH")]
5384    MoreStrictRewatch,
5385    #[doc(hidden)]
5386    __Unknown(i32),
5387}
5388
5389#[doc(hidden)]
5390impl IntoGlib for FilterChange {
5391    type GlibType = ffi::GtkFilterChange;
5392
5393    #[inline]
5394    fn into_glib(self) -> ffi::GtkFilterChange {
5395        match self {
5396            Self::Different => ffi::GTK_FILTER_CHANGE_DIFFERENT,
5397            Self::LessStrict => ffi::GTK_FILTER_CHANGE_LESS_STRICT,
5398            Self::MoreStrict => ffi::GTK_FILTER_CHANGE_MORE_STRICT,
5399            #[cfg(feature = "v4_20")]
5400            Self::DifferentRewatch => ffi::GTK_FILTER_CHANGE_DIFFERENT_REWATCH,
5401            #[cfg(feature = "v4_20")]
5402            Self::LessStrictRewatch => ffi::GTK_FILTER_CHANGE_LESS_STRICT_REWATCH,
5403            #[cfg(feature = "v4_20")]
5404            Self::MoreStrictRewatch => ffi::GTK_FILTER_CHANGE_MORE_STRICT_REWATCH,
5405            Self::__Unknown(value) => value,
5406        }
5407    }
5408}
5409
5410#[doc(hidden)]
5411impl FromGlib<ffi::GtkFilterChange> for FilterChange {
5412    #[inline]
5413    unsafe fn from_glib(value: ffi::GtkFilterChange) -> Self {
5414        skip_assert_initialized!();
5415
5416        match value {
5417            ffi::GTK_FILTER_CHANGE_DIFFERENT => Self::Different,
5418            ffi::GTK_FILTER_CHANGE_LESS_STRICT => Self::LessStrict,
5419            ffi::GTK_FILTER_CHANGE_MORE_STRICT => Self::MoreStrict,
5420            #[cfg(feature = "v4_20")]
5421            ffi::GTK_FILTER_CHANGE_DIFFERENT_REWATCH => Self::DifferentRewatch,
5422            #[cfg(feature = "v4_20")]
5423            ffi::GTK_FILTER_CHANGE_LESS_STRICT_REWATCH => Self::LessStrictRewatch,
5424            #[cfg(feature = "v4_20")]
5425            ffi::GTK_FILTER_CHANGE_MORE_STRICT_REWATCH => Self::MoreStrictRewatch,
5426            value => Self::__Unknown(value),
5427        }
5428    }
5429}
5430
5431impl StaticType for FilterChange {
5432    #[inline]
5433    #[doc(alias = "gtk_filter_change_get_type")]
5434    fn static_type() -> glib::Type {
5435        unsafe { from_glib(ffi::gtk_filter_change_get_type()) }
5436    }
5437}
5438
5439impl glib::HasParamSpec for FilterChange {
5440    type ParamSpec = glib::ParamSpecEnum;
5441    type SetValue = Self;
5442    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
5443
5444    fn param_spec_builder() -> Self::BuilderFn {
5445        Self::ParamSpec::builder_with_default
5446    }
5447}
5448
5449impl glib::value::ValueType for FilterChange {
5450    type Type = Self;
5451}
5452
5453unsafe impl<'a> glib::value::FromValue<'a> for FilterChange {
5454    type Checker = glib::value::GenericValueTypeChecker<Self>;
5455
5456    #[inline]
5457    unsafe fn from_value(value: &'a glib::Value) -> Self {
5458        skip_assert_initialized!();
5459        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
5460    }
5461}
5462
5463impl ToValue for FilterChange {
5464    #[inline]
5465    fn to_value(&self) -> glib::Value {
5466        let mut value = glib::Value::for_value_type::<Self>();
5467        unsafe {
5468            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
5469        }
5470        value
5471    }
5472
5473    #[inline]
5474    fn value_type(&self) -> glib::Type {
5475        Self::static_type()
5476    }
5477}
5478
5479impl From<FilterChange> for glib::Value {
5480    #[inline]
5481    fn from(v: FilterChange) -> Self {
5482        skip_assert_initialized!();
5483        ToValue::to_value(&v)
5484    }
5485}
5486
5487/// Describes the known strictness of a filter.
5488///
5489/// Note that for filters where the strictness is not known,
5490/// `GTK_FILTER_MATCH_SOME` is always an acceptable value,
5491/// even if a filter does match all or no items.
5492#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
5493#[non_exhaustive]
5494#[doc(alias = "GtkFilterMatch")]
5495pub enum FilterMatch {
5496    /// The filter matches some items,
5497    ///   [`FilterExt::match_()`][crate::prelude::FilterExt::match_()] may return true or false
5498    #[doc(alias = "GTK_FILTER_MATCH_SOME")]
5499    Some,
5500    /// The filter does not match any item,
5501    ///   [`FilterExt::match_()`][crate::prelude::FilterExt::match_()] will always return false
5502    #[doc(alias = "GTK_FILTER_MATCH_NONE")]
5503    None,
5504    /// The filter matches all items,
5505    ///   [`FilterExt::match_()`][crate::prelude::FilterExt::match_()] will alays return true
5506    #[doc(alias = "GTK_FILTER_MATCH_ALL")]
5507    All,
5508    #[doc(hidden)]
5509    __Unknown(i32),
5510}
5511
5512#[doc(hidden)]
5513impl IntoGlib for FilterMatch {
5514    type GlibType = ffi::GtkFilterMatch;
5515
5516    #[inline]
5517    fn into_glib(self) -> ffi::GtkFilterMatch {
5518        match self {
5519            Self::Some => ffi::GTK_FILTER_MATCH_SOME,
5520            Self::None => ffi::GTK_FILTER_MATCH_NONE,
5521            Self::All => ffi::GTK_FILTER_MATCH_ALL,
5522            Self::__Unknown(value) => value,
5523        }
5524    }
5525}
5526
5527#[doc(hidden)]
5528impl FromGlib<ffi::GtkFilterMatch> for FilterMatch {
5529    #[inline]
5530    unsafe fn from_glib(value: ffi::GtkFilterMatch) -> Self {
5531        skip_assert_initialized!();
5532
5533        match value {
5534            ffi::GTK_FILTER_MATCH_SOME => Self::Some,
5535            ffi::GTK_FILTER_MATCH_NONE => Self::None,
5536            ffi::GTK_FILTER_MATCH_ALL => Self::All,
5537            value => Self::__Unknown(value),
5538        }
5539    }
5540}
5541
5542impl StaticType for FilterMatch {
5543    #[inline]
5544    #[doc(alias = "gtk_filter_match_get_type")]
5545    fn static_type() -> glib::Type {
5546        unsafe { from_glib(ffi::gtk_filter_match_get_type()) }
5547    }
5548}
5549
5550impl glib::HasParamSpec for FilterMatch {
5551    type ParamSpec = glib::ParamSpecEnum;
5552    type SetValue = Self;
5553    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
5554
5555    fn param_spec_builder() -> Self::BuilderFn {
5556        Self::ParamSpec::builder_with_default
5557    }
5558}
5559
5560impl glib::value::ValueType for FilterMatch {
5561    type Type = Self;
5562}
5563
5564unsafe impl<'a> glib::value::FromValue<'a> for FilterMatch {
5565    type Checker = glib::value::GenericValueTypeChecker<Self>;
5566
5567    #[inline]
5568    unsafe fn from_value(value: &'a glib::Value) -> Self {
5569        skip_assert_initialized!();
5570        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
5571    }
5572}
5573
5574impl ToValue for FilterMatch {
5575    #[inline]
5576    fn to_value(&self) -> glib::Value {
5577        let mut value = glib::Value::for_value_type::<Self>();
5578        unsafe {
5579            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
5580        }
5581        value
5582    }
5583
5584    #[inline]
5585    fn value_type(&self) -> glib::Type {
5586        Self::static_type()
5587    }
5588}
5589
5590impl From<FilterMatch> for glib::Value {
5591    #[inline]
5592    fn from(v: FilterMatch) -> Self {
5593        skip_assert_initialized!();
5594        ToValue::to_value(&v)
5595    }
5596}
5597
5598/// The level of granularity for the font selection.
5599///
5600/// Depending on this value, the [`pango::FontDescription`][crate::pango::FontDescription] that
5601/// is returned by [`FontDialogButton::font_desc()`][crate::FontDialogButton::font_desc()]
5602/// will have more or less fields set.
5603#[cfg(feature = "v4_10")]
5604#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
5605#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
5606#[non_exhaustive]
5607#[doc(alias = "GtkFontLevel")]
5608pub enum FontLevel {
5609    /// Select a font family
5610    #[doc(alias = "GTK_FONT_LEVEL_FAMILY")]
5611    Family,
5612    /// Select a font face (i.e. a family and a style)
5613    #[doc(alias = "GTK_FONT_LEVEL_FACE")]
5614    Face,
5615    /// Select a font (i.e. a face with a size, and possibly font variations)
5616    #[doc(alias = "GTK_FONT_LEVEL_FONT")]
5617    Font,
5618    /// Select a font and font features
5619    #[doc(alias = "GTK_FONT_LEVEL_FEATURES")]
5620    Features,
5621    #[doc(hidden)]
5622    __Unknown(i32),
5623}
5624
5625#[cfg(feature = "v4_10")]
5626#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
5627#[doc(hidden)]
5628impl IntoGlib for FontLevel {
5629    type GlibType = ffi::GtkFontLevel;
5630
5631    #[inline]
5632    fn into_glib(self) -> ffi::GtkFontLevel {
5633        match self {
5634            Self::Family => ffi::GTK_FONT_LEVEL_FAMILY,
5635            Self::Face => ffi::GTK_FONT_LEVEL_FACE,
5636            Self::Font => ffi::GTK_FONT_LEVEL_FONT,
5637            Self::Features => ffi::GTK_FONT_LEVEL_FEATURES,
5638            Self::__Unknown(value) => value,
5639        }
5640    }
5641}
5642
5643#[cfg(feature = "v4_10")]
5644#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
5645#[doc(hidden)]
5646impl FromGlib<ffi::GtkFontLevel> for FontLevel {
5647    #[inline]
5648    unsafe fn from_glib(value: ffi::GtkFontLevel) -> Self {
5649        skip_assert_initialized!();
5650
5651        match value {
5652            ffi::GTK_FONT_LEVEL_FAMILY => Self::Family,
5653            ffi::GTK_FONT_LEVEL_FACE => Self::Face,
5654            ffi::GTK_FONT_LEVEL_FONT => Self::Font,
5655            ffi::GTK_FONT_LEVEL_FEATURES => Self::Features,
5656            value => Self::__Unknown(value),
5657        }
5658    }
5659}
5660
5661#[cfg(feature = "v4_10")]
5662#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
5663impl StaticType for FontLevel {
5664    #[inline]
5665    #[doc(alias = "gtk_font_level_get_type")]
5666    fn static_type() -> glib::Type {
5667        unsafe { from_glib(ffi::gtk_font_level_get_type()) }
5668    }
5669}
5670
5671#[cfg(feature = "v4_10")]
5672#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
5673impl glib::HasParamSpec for FontLevel {
5674    type ParamSpec = glib::ParamSpecEnum;
5675    type SetValue = Self;
5676    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
5677
5678    fn param_spec_builder() -> Self::BuilderFn {
5679        Self::ParamSpec::builder_with_default
5680    }
5681}
5682
5683#[cfg(feature = "v4_10")]
5684#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
5685impl glib::value::ValueType for FontLevel {
5686    type Type = Self;
5687}
5688
5689#[cfg(feature = "v4_10")]
5690#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
5691unsafe impl<'a> glib::value::FromValue<'a> for FontLevel {
5692    type Checker = glib::value::GenericValueTypeChecker<Self>;
5693
5694    #[inline]
5695    unsafe fn from_value(value: &'a glib::Value) -> Self {
5696        skip_assert_initialized!();
5697        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
5698    }
5699}
5700
5701#[cfg(feature = "v4_10")]
5702#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
5703impl ToValue for FontLevel {
5704    #[inline]
5705    fn to_value(&self) -> glib::Value {
5706        let mut value = glib::Value::for_value_type::<Self>();
5707        unsafe {
5708            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
5709        }
5710        value
5711    }
5712
5713    #[inline]
5714    fn value_type(&self) -> glib::Type {
5715        Self::static_type()
5716    }
5717}
5718
5719#[cfg(feature = "v4_10")]
5720#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
5721impl From<FontLevel> for glib::Value {
5722    #[inline]
5723    fn from(v: FontLevel) -> Self {
5724        skip_assert_initialized!();
5725        ToValue::to_value(&v)
5726    }
5727}
5728
5729/// Values for the [`gtk-font-rendering`][struct@crate::Settings#gtk-font-rendering] setting
5730/// that influence how GTK renders fonts.
5731#[cfg(feature = "v4_16")]
5732#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
5733#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
5734#[non_exhaustive]
5735#[doc(alias = "GtkFontRendering")]
5736pub enum FontRendering {
5737    /// Set up font rendering automatically,
5738    ///   taking factors like screen resolution and scale into account
5739    #[doc(alias = "GTK_FONT_RENDERING_AUTOMATIC")]
5740    Automatic,
5741    /// Follow low-level font-related settings
5742    ///   when configuring font rendering
5743    #[doc(alias = "GTK_FONT_RENDERING_MANUAL")]
5744    Manual,
5745    #[doc(hidden)]
5746    __Unknown(i32),
5747}
5748
5749#[cfg(feature = "v4_16")]
5750#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
5751#[doc(hidden)]
5752impl IntoGlib for FontRendering {
5753    type GlibType = ffi::GtkFontRendering;
5754
5755    #[inline]
5756    fn into_glib(self) -> ffi::GtkFontRendering {
5757        match self {
5758            Self::Automatic => ffi::GTK_FONT_RENDERING_AUTOMATIC,
5759            Self::Manual => ffi::GTK_FONT_RENDERING_MANUAL,
5760            Self::__Unknown(value) => value,
5761        }
5762    }
5763}
5764
5765#[cfg(feature = "v4_16")]
5766#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
5767#[doc(hidden)]
5768impl FromGlib<ffi::GtkFontRendering> for FontRendering {
5769    #[inline]
5770    unsafe fn from_glib(value: ffi::GtkFontRendering) -> Self {
5771        skip_assert_initialized!();
5772
5773        match value {
5774            ffi::GTK_FONT_RENDERING_AUTOMATIC => Self::Automatic,
5775            ffi::GTK_FONT_RENDERING_MANUAL => Self::Manual,
5776            value => Self::__Unknown(value),
5777        }
5778    }
5779}
5780
5781#[cfg(feature = "v4_16")]
5782#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
5783impl StaticType for FontRendering {
5784    #[inline]
5785    #[doc(alias = "gtk_font_rendering_get_type")]
5786    fn static_type() -> glib::Type {
5787        unsafe { from_glib(ffi::gtk_font_rendering_get_type()) }
5788    }
5789}
5790
5791#[cfg(feature = "v4_16")]
5792#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
5793impl glib::HasParamSpec for FontRendering {
5794    type ParamSpec = glib::ParamSpecEnum;
5795    type SetValue = Self;
5796    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
5797
5798    fn param_spec_builder() -> Self::BuilderFn {
5799        Self::ParamSpec::builder_with_default
5800    }
5801}
5802
5803#[cfg(feature = "v4_16")]
5804#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
5805impl glib::value::ValueType for FontRendering {
5806    type Type = Self;
5807}
5808
5809#[cfg(feature = "v4_16")]
5810#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
5811unsafe impl<'a> glib::value::FromValue<'a> for FontRendering {
5812    type Checker = glib::value::GenericValueTypeChecker<Self>;
5813
5814    #[inline]
5815    unsafe fn from_value(value: &'a glib::Value) -> Self {
5816        skip_assert_initialized!();
5817        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
5818    }
5819}
5820
5821#[cfg(feature = "v4_16")]
5822#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
5823impl ToValue for FontRendering {
5824    #[inline]
5825    fn to_value(&self) -> glib::Value {
5826        let mut value = glib::Value::for_value_type::<Self>();
5827        unsafe {
5828            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
5829        }
5830        value
5831    }
5832
5833    #[inline]
5834    fn value_type(&self) -> glib::Type {
5835        Self::static_type()
5836    }
5837}
5838
5839#[cfg(feature = "v4_16")]
5840#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
5841impl From<FontRendering> for glib::Value {
5842    #[inline]
5843    fn from(v: FontRendering) -> Self {
5844        skip_assert_initialized!();
5845        ToValue::to_value(&v)
5846    }
5847}
5848
5849/// Represents the state of graphics offloading.
5850#[cfg(feature = "v4_14")]
5851#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
5852#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
5853#[non_exhaustive]
5854#[doc(alias = "GtkGraphicsOffloadEnabled")]
5855pub enum GraphicsOffloadEnabled {
5856    /// Graphics offloading is enabled.
5857    #[doc(alias = "GTK_GRAPHICS_OFFLOAD_ENABLED")]
5858    Enabled,
5859    /// Graphics offloading is disabled.
5860    #[doc(alias = "GTK_GRAPHICS_OFFLOAD_DISABLED")]
5861    Disabled,
5862    #[doc(hidden)]
5863    __Unknown(i32),
5864}
5865
5866#[cfg(feature = "v4_14")]
5867#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
5868#[doc(hidden)]
5869impl IntoGlib for GraphicsOffloadEnabled {
5870    type GlibType = ffi::GtkGraphicsOffloadEnabled;
5871
5872    #[inline]
5873    fn into_glib(self) -> ffi::GtkGraphicsOffloadEnabled {
5874        match self {
5875            Self::Enabled => ffi::GTK_GRAPHICS_OFFLOAD_ENABLED,
5876            Self::Disabled => ffi::GTK_GRAPHICS_OFFLOAD_DISABLED,
5877            Self::__Unknown(value) => value,
5878        }
5879    }
5880}
5881
5882#[cfg(feature = "v4_14")]
5883#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
5884#[doc(hidden)]
5885impl FromGlib<ffi::GtkGraphicsOffloadEnabled> for GraphicsOffloadEnabled {
5886    #[inline]
5887    unsafe fn from_glib(value: ffi::GtkGraphicsOffloadEnabled) -> Self {
5888        skip_assert_initialized!();
5889
5890        match value {
5891            ffi::GTK_GRAPHICS_OFFLOAD_ENABLED => Self::Enabled,
5892            ffi::GTK_GRAPHICS_OFFLOAD_DISABLED => Self::Disabled,
5893            value => Self::__Unknown(value),
5894        }
5895    }
5896}
5897
5898#[cfg(feature = "v4_14")]
5899#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
5900impl StaticType for GraphicsOffloadEnabled {
5901    #[inline]
5902    #[doc(alias = "gtk_graphics_offload_enabled_get_type")]
5903    fn static_type() -> glib::Type {
5904        unsafe { from_glib(ffi::gtk_graphics_offload_enabled_get_type()) }
5905    }
5906}
5907
5908#[cfg(feature = "v4_14")]
5909#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
5910impl glib::HasParamSpec for GraphicsOffloadEnabled {
5911    type ParamSpec = glib::ParamSpecEnum;
5912    type SetValue = Self;
5913    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
5914
5915    fn param_spec_builder() -> Self::BuilderFn {
5916        Self::ParamSpec::builder_with_default
5917    }
5918}
5919
5920#[cfg(feature = "v4_14")]
5921#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
5922impl glib::value::ValueType for GraphicsOffloadEnabled {
5923    type Type = Self;
5924}
5925
5926#[cfg(feature = "v4_14")]
5927#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
5928unsafe impl<'a> glib::value::FromValue<'a> for GraphicsOffloadEnabled {
5929    type Checker = glib::value::GenericValueTypeChecker<Self>;
5930
5931    #[inline]
5932    unsafe fn from_value(value: &'a glib::Value) -> Self {
5933        skip_assert_initialized!();
5934        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
5935    }
5936}
5937
5938#[cfg(feature = "v4_14")]
5939#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
5940impl ToValue for GraphicsOffloadEnabled {
5941    #[inline]
5942    fn to_value(&self) -> glib::Value {
5943        let mut value = glib::Value::for_value_type::<Self>();
5944        unsafe {
5945            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
5946        }
5947        value
5948    }
5949
5950    #[inline]
5951    fn value_type(&self) -> glib::Type {
5952        Self::static_type()
5953    }
5954}
5955
5956#[cfg(feature = "v4_14")]
5957#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
5958impl From<GraphicsOffloadEnabled> for glib::Value {
5959    #[inline]
5960    fn from(v: GraphicsOffloadEnabled) -> Self {
5961        skip_assert_initialized!();
5962        ToValue::to_value(&v)
5963    }
5964}
5965
5966/// Built-in icon sizes.
5967///
5968/// Icon sizes default to being inherited. Where they cannot be
5969/// inherited, text size is the default.
5970///
5971/// All widgets which use [`IconSize`][crate::IconSize] set the normal-icons or
5972/// large-icons style classes correspondingly, and let themes
5973/// determine the actual size to be used with the
5974/// `-gtk-icon-size` CSS property.
5975#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
5976#[non_exhaustive]
5977#[doc(alias = "GtkIconSize")]
5978pub enum IconSize {
5979    /// Keep the size of the parent element
5980    #[doc(alias = "GTK_ICON_SIZE_INHERIT")]
5981    Inherit,
5982    /// Size similar to text size
5983    #[doc(alias = "GTK_ICON_SIZE_NORMAL")]
5984    Normal,
5985    /// Large size, for example in an icon view
5986    #[doc(alias = "GTK_ICON_SIZE_LARGE")]
5987    Large,
5988    #[doc(hidden)]
5989    __Unknown(i32),
5990}
5991
5992#[doc(hidden)]
5993impl IntoGlib for IconSize {
5994    type GlibType = ffi::GtkIconSize;
5995
5996    #[inline]
5997    fn into_glib(self) -> ffi::GtkIconSize {
5998        match self {
5999            Self::Inherit => ffi::GTK_ICON_SIZE_INHERIT,
6000            Self::Normal => ffi::GTK_ICON_SIZE_NORMAL,
6001            Self::Large => ffi::GTK_ICON_SIZE_LARGE,
6002            Self::__Unknown(value) => value,
6003        }
6004    }
6005}
6006
6007#[doc(hidden)]
6008impl FromGlib<ffi::GtkIconSize> for IconSize {
6009    #[inline]
6010    unsafe fn from_glib(value: ffi::GtkIconSize) -> Self {
6011        skip_assert_initialized!();
6012
6013        match value {
6014            ffi::GTK_ICON_SIZE_INHERIT => Self::Inherit,
6015            ffi::GTK_ICON_SIZE_NORMAL => Self::Normal,
6016            ffi::GTK_ICON_SIZE_LARGE => Self::Large,
6017            value => Self::__Unknown(value),
6018        }
6019    }
6020}
6021
6022impl StaticType for IconSize {
6023    #[inline]
6024    #[doc(alias = "gtk_icon_size_get_type")]
6025    fn static_type() -> glib::Type {
6026        unsafe { from_glib(ffi::gtk_icon_size_get_type()) }
6027    }
6028}
6029
6030impl glib::HasParamSpec for IconSize {
6031    type ParamSpec = glib::ParamSpecEnum;
6032    type SetValue = Self;
6033    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
6034
6035    fn param_spec_builder() -> Self::BuilderFn {
6036        Self::ParamSpec::builder_with_default
6037    }
6038}
6039
6040impl glib::value::ValueType for IconSize {
6041    type Type = Self;
6042}
6043
6044unsafe impl<'a> glib::value::FromValue<'a> for IconSize {
6045    type Checker = glib::value::GenericValueTypeChecker<Self>;
6046
6047    #[inline]
6048    unsafe fn from_value(value: &'a glib::Value) -> Self {
6049        skip_assert_initialized!();
6050        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
6051    }
6052}
6053
6054impl ToValue for IconSize {
6055    #[inline]
6056    fn to_value(&self) -> glib::Value {
6057        let mut value = glib::Value::for_value_type::<Self>();
6058        unsafe {
6059            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
6060        }
6061        value
6062    }
6063
6064    #[inline]
6065    fn value_type(&self) -> glib::Type {
6066        Self::static_type()
6067    }
6068}
6069
6070impl From<IconSize> for glib::Value {
6071    #[inline]
6072    fn from(v: IconSize) -> Self {
6073        skip_assert_initialized!();
6074        ToValue::to_value(&v)
6075    }
6076}
6077
6078/// Error codes for [`IconTheme`][crate::IconTheme] operations.
6079#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
6080#[non_exhaustive]
6081#[doc(alias = "GtkIconThemeError")]
6082pub enum IconThemeError {
6083    /// The icon specified does not exist in the theme
6084    #[doc(alias = "GTK_ICON_THEME_NOT_FOUND")]
6085    NotFound,
6086    /// An unspecified error occurred.
6087    #[doc(alias = "GTK_ICON_THEME_FAILED")]
6088    Failed,
6089    #[doc(hidden)]
6090    __Unknown(i32),
6091}
6092
6093#[doc(hidden)]
6094impl IntoGlib for IconThemeError {
6095    type GlibType = ffi::GtkIconThemeError;
6096
6097    #[inline]
6098    fn into_glib(self) -> ffi::GtkIconThemeError {
6099        match self {
6100            Self::NotFound => ffi::GTK_ICON_THEME_NOT_FOUND,
6101            Self::Failed => ffi::GTK_ICON_THEME_FAILED,
6102            Self::__Unknown(value) => value,
6103        }
6104    }
6105}
6106
6107#[doc(hidden)]
6108impl FromGlib<ffi::GtkIconThemeError> for IconThemeError {
6109    #[inline]
6110    unsafe fn from_glib(value: ffi::GtkIconThemeError) -> Self {
6111        skip_assert_initialized!();
6112
6113        match value {
6114            ffi::GTK_ICON_THEME_NOT_FOUND => Self::NotFound,
6115            ffi::GTK_ICON_THEME_FAILED => Self::Failed,
6116            value => Self::__Unknown(value),
6117        }
6118    }
6119}
6120
6121impl glib::error::ErrorDomain for IconThemeError {
6122    #[inline]
6123    fn domain() -> glib::Quark {
6124        skip_assert_initialized!();
6125
6126        unsafe { from_glib(ffi::gtk_icon_theme_error_quark()) }
6127    }
6128
6129    #[inline]
6130    fn code(self) -> i32 {
6131        self.into_glib()
6132    }
6133
6134    #[inline]
6135    #[allow(clippy::match_single_binding)]
6136    fn from(code: i32) -> Option<Self> {
6137        skip_assert_initialized!();
6138        match unsafe { from_glib(code) } {
6139            Self::__Unknown(_) => Some(Self::Failed),
6140            value => Some(value),
6141        }
6142    }
6143}
6144
6145impl StaticType for IconThemeError {
6146    #[inline]
6147    #[doc(alias = "gtk_icon_theme_error_get_type")]
6148    fn static_type() -> glib::Type {
6149        unsafe { from_glib(ffi::gtk_icon_theme_error_get_type()) }
6150    }
6151}
6152
6153impl glib::HasParamSpec for IconThemeError {
6154    type ParamSpec = glib::ParamSpecEnum;
6155    type SetValue = Self;
6156    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
6157
6158    fn param_spec_builder() -> Self::BuilderFn {
6159        Self::ParamSpec::builder_with_default
6160    }
6161}
6162
6163impl glib::value::ValueType for IconThemeError {
6164    type Type = Self;
6165}
6166
6167unsafe impl<'a> glib::value::FromValue<'a> for IconThemeError {
6168    type Checker = glib::value::GenericValueTypeChecker<Self>;
6169
6170    #[inline]
6171    unsafe fn from_value(value: &'a glib::Value) -> Self {
6172        skip_assert_initialized!();
6173        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
6174    }
6175}
6176
6177impl ToValue for IconThemeError {
6178    #[inline]
6179    fn to_value(&self) -> glib::Value {
6180        let mut value = glib::Value::for_value_type::<Self>();
6181        unsafe {
6182            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
6183        }
6184        value
6185    }
6186
6187    #[inline]
6188    fn value_type(&self) -> glib::Type {
6189        Self::static_type()
6190    }
6191}
6192
6193impl From<IconThemeError> for glib::Value {
6194    #[inline]
6195    fn from(v: IconThemeError) -> Self {
6196        skip_assert_initialized!();
6197        ToValue::to_value(&v)
6198    }
6199}
6200
6201/// An enum for determining where a dropped item goes.
6202///
6203/// # Deprecated since 4.20
6204///
6205/// There is no replacement.
6206#[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
6207#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
6208#[non_exhaustive]
6209#[doc(alias = "GtkIconViewDropPosition")]
6210pub enum IconViewDropPosition {
6211    /// no drop possible
6212    #[doc(alias = "GTK_ICON_VIEW_NO_DROP")]
6213    NoDrop,
6214    /// dropped item replaces the item
6215    #[doc(alias = "GTK_ICON_VIEW_DROP_INTO")]
6216    DropInto,
6217    /// dropped item is inserted to the left
6218    #[doc(alias = "GTK_ICON_VIEW_DROP_LEFT")]
6219    DropLeft,
6220    /// dropped item is inserted to the right
6221    #[doc(alias = "GTK_ICON_VIEW_DROP_RIGHT")]
6222    DropRight,
6223    /// dropped item is inserted above
6224    #[doc(alias = "GTK_ICON_VIEW_DROP_ABOVE")]
6225    DropAbove,
6226    /// dropped item is inserted below
6227    #[doc(alias = "GTK_ICON_VIEW_DROP_BELOW")]
6228    DropBelow,
6229    #[doc(hidden)]
6230    __Unknown(i32),
6231}
6232
6233#[allow(deprecated)]
6234#[doc(hidden)]
6235impl IntoGlib for IconViewDropPosition {
6236    type GlibType = ffi::GtkIconViewDropPosition;
6237
6238    #[inline]
6239    fn into_glib(self) -> ffi::GtkIconViewDropPosition {
6240        match self {
6241            Self::NoDrop => ffi::GTK_ICON_VIEW_NO_DROP,
6242            Self::DropInto => ffi::GTK_ICON_VIEW_DROP_INTO,
6243            Self::DropLeft => ffi::GTK_ICON_VIEW_DROP_LEFT,
6244            Self::DropRight => ffi::GTK_ICON_VIEW_DROP_RIGHT,
6245            Self::DropAbove => ffi::GTK_ICON_VIEW_DROP_ABOVE,
6246            Self::DropBelow => ffi::GTK_ICON_VIEW_DROP_BELOW,
6247            Self::__Unknown(value) => value,
6248        }
6249    }
6250}
6251
6252#[allow(deprecated)]
6253#[doc(hidden)]
6254impl FromGlib<ffi::GtkIconViewDropPosition> for IconViewDropPosition {
6255    #[inline]
6256    unsafe fn from_glib(value: ffi::GtkIconViewDropPosition) -> Self {
6257        skip_assert_initialized!();
6258
6259        match value {
6260            ffi::GTK_ICON_VIEW_NO_DROP => Self::NoDrop,
6261            ffi::GTK_ICON_VIEW_DROP_INTO => Self::DropInto,
6262            ffi::GTK_ICON_VIEW_DROP_LEFT => Self::DropLeft,
6263            ffi::GTK_ICON_VIEW_DROP_RIGHT => Self::DropRight,
6264            ffi::GTK_ICON_VIEW_DROP_ABOVE => Self::DropAbove,
6265            ffi::GTK_ICON_VIEW_DROP_BELOW => Self::DropBelow,
6266            value => Self::__Unknown(value),
6267        }
6268    }
6269}
6270
6271#[allow(deprecated)]
6272impl StaticType for IconViewDropPosition {
6273    #[inline]
6274    #[doc(alias = "gtk_icon_view_drop_position_get_type")]
6275    fn static_type() -> glib::Type {
6276        unsafe { from_glib(ffi::gtk_icon_view_drop_position_get_type()) }
6277    }
6278}
6279
6280#[allow(deprecated)]
6281impl glib::HasParamSpec for IconViewDropPosition {
6282    type ParamSpec = glib::ParamSpecEnum;
6283    type SetValue = Self;
6284    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
6285
6286    fn param_spec_builder() -> Self::BuilderFn {
6287        Self::ParamSpec::builder_with_default
6288    }
6289}
6290
6291#[allow(deprecated)]
6292impl glib::value::ValueType for IconViewDropPosition {
6293    type Type = Self;
6294}
6295
6296#[allow(deprecated)]
6297unsafe impl<'a> glib::value::FromValue<'a> for IconViewDropPosition {
6298    type Checker = glib::value::GenericValueTypeChecker<Self>;
6299
6300    #[inline]
6301    unsafe fn from_value(value: &'a glib::Value) -> Self {
6302        skip_assert_initialized!();
6303        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
6304    }
6305}
6306
6307#[allow(deprecated)]
6308impl ToValue for IconViewDropPosition {
6309    #[inline]
6310    fn to_value(&self) -> glib::Value {
6311        let mut value = glib::Value::for_value_type::<Self>();
6312        unsafe {
6313            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
6314        }
6315        value
6316    }
6317
6318    #[inline]
6319    fn value_type(&self) -> glib::Type {
6320        Self::static_type()
6321    }
6322}
6323
6324#[allow(deprecated)]
6325impl From<IconViewDropPosition> for glib::Value {
6326    #[inline]
6327    fn from(v: IconViewDropPosition) -> Self {
6328        skip_assert_initialized!();
6329        ToValue::to_value(&v)
6330    }
6331}
6332
6333/// Describes the image data representation used by a [`Image`][crate::Image].
6334///
6335/// If you want to get the image from the widget, you can only get the
6336/// currently-stored representation; for instance, if the gtk_image_get_storage_type()
6337/// returns [`Paintable`][Self::Paintable], then you can call gtk_image_get_paintable().
6338///
6339/// For empty images, you can request any storage type (call any of the "get"
6340/// functions), but they will all return [`None`] values.
6341#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
6342#[non_exhaustive]
6343#[doc(alias = "GtkImageType")]
6344pub enum ImageType {
6345    /// there is no image displayed by the widget
6346    #[doc(alias = "GTK_IMAGE_EMPTY")]
6347    Empty,
6348    /// the widget contains a named icon
6349    #[doc(alias = "GTK_IMAGE_ICON_NAME")]
6350    IconName,
6351    /// the widget contains a `GIcon`
6352    #[doc(alias = "GTK_IMAGE_GICON")]
6353    Gicon,
6354    /// the widget contains a [`gdk::Paintable`][crate::gdk::Paintable]
6355    #[doc(alias = "GTK_IMAGE_PAINTABLE")]
6356    Paintable,
6357    #[doc(hidden)]
6358    __Unknown(i32),
6359}
6360
6361#[doc(hidden)]
6362impl IntoGlib for ImageType {
6363    type GlibType = ffi::GtkImageType;
6364
6365    #[inline]
6366    fn into_glib(self) -> ffi::GtkImageType {
6367        match self {
6368            Self::Empty => ffi::GTK_IMAGE_EMPTY,
6369            Self::IconName => ffi::GTK_IMAGE_ICON_NAME,
6370            Self::Gicon => ffi::GTK_IMAGE_GICON,
6371            Self::Paintable => ffi::GTK_IMAGE_PAINTABLE,
6372            Self::__Unknown(value) => value,
6373        }
6374    }
6375}
6376
6377#[doc(hidden)]
6378impl FromGlib<ffi::GtkImageType> for ImageType {
6379    #[inline]
6380    unsafe fn from_glib(value: ffi::GtkImageType) -> Self {
6381        skip_assert_initialized!();
6382
6383        match value {
6384            ffi::GTK_IMAGE_EMPTY => Self::Empty,
6385            ffi::GTK_IMAGE_ICON_NAME => Self::IconName,
6386            ffi::GTK_IMAGE_GICON => Self::Gicon,
6387            ffi::GTK_IMAGE_PAINTABLE => Self::Paintable,
6388            value => Self::__Unknown(value),
6389        }
6390    }
6391}
6392
6393impl StaticType for ImageType {
6394    #[inline]
6395    #[doc(alias = "gtk_image_type_get_type")]
6396    fn static_type() -> glib::Type {
6397        unsafe { from_glib(ffi::gtk_image_type_get_type()) }
6398    }
6399}
6400
6401impl glib::HasParamSpec for ImageType {
6402    type ParamSpec = glib::ParamSpecEnum;
6403    type SetValue = Self;
6404    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
6405
6406    fn param_spec_builder() -> Self::BuilderFn {
6407        Self::ParamSpec::builder_with_default
6408    }
6409}
6410
6411impl glib::value::ValueType for ImageType {
6412    type Type = Self;
6413}
6414
6415unsafe impl<'a> glib::value::FromValue<'a> for ImageType {
6416    type Checker = glib::value::GenericValueTypeChecker<Self>;
6417
6418    #[inline]
6419    unsafe fn from_value(value: &'a glib::Value) -> Self {
6420        skip_assert_initialized!();
6421        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
6422    }
6423}
6424
6425impl ToValue for ImageType {
6426    #[inline]
6427    fn to_value(&self) -> glib::Value {
6428        let mut value = glib::Value::for_value_type::<Self>();
6429        unsafe {
6430            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
6431        }
6432        value
6433    }
6434
6435    #[inline]
6436    fn value_type(&self) -> glib::Type {
6437        Self::static_type()
6438    }
6439}
6440
6441impl From<ImageType> for glib::Value {
6442    #[inline]
6443    fn from(v: ImageType) -> Self {
6444        skip_assert_initialized!();
6445        ToValue::to_value(&v)
6446    }
6447}
6448
6449/// Describes primary purpose of the input widget.
6450///
6451/// This information is useful for on-screen keyboards and similar input
6452/// methods to decide which keys should be presented to the user.
6453///
6454/// Note that the purpose is not meant to impose a totally strict rule
6455/// about allowed characters, and does not replace input validation.
6456/// It is fine for an on-screen keyboard to let the user override the
6457/// character set restriction that is expressed by the purpose. The
6458/// application is expected to validate the entry contents, even if
6459/// it specified a purpose.
6460///
6461/// The difference between [`Digits`][Self::Digits] and
6462/// [`Number`][Self::Number] is that the former accepts only digits
6463/// while the latter also some punctuation (like commas or points, plus,
6464/// minus) and “e” or “E” as in 3.14E+000.
6465///
6466/// This enumeration may be extended in the future; input methods should
6467/// interpret unknown values as “free form”.
6468#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
6469#[non_exhaustive]
6470#[doc(alias = "GtkInputPurpose")]
6471pub enum InputPurpose {
6472    /// Allow any character
6473    #[doc(alias = "GTK_INPUT_PURPOSE_FREE_FORM")]
6474    FreeForm,
6475    /// Allow only alphabetic characters
6476    #[doc(alias = "GTK_INPUT_PURPOSE_ALPHA")]
6477    Alpha,
6478    /// Allow only digits
6479    #[doc(alias = "GTK_INPUT_PURPOSE_DIGITS")]
6480    Digits,
6481    /// Edited field expects numbers
6482    #[doc(alias = "GTK_INPUT_PURPOSE_NUMBER")]
6483    Number,
6484    /// Edited field expects phone number
6485    #[doc(alias = "GTK_INPUT_PURPOSE_PHONE")]
6486    Phone,
6487    /// Edited field expects URL
6488    #[doc(alias = "GTK_INPUT_PURPOSE_URL")]
6489    Url,
6490    /// Edited field expects email address
6491    #[doc(alias = "GTK_INPUT_PURPOSE_EMAIL")]
6492    Email,
6493    /// Edited field expects the name of a person
6494    #[doc(alias = "GTK_INPUT_PURPOSE_NAME")]
6495    Name,
6496    /// Like [`FreeForm`][Self::FreeForm], but characters are hidden
6497    #[doc(alias = "GTK_INPUT_PURPOSE_PASSWORD")]
6498    Password,
6499    /// Like [`Digits`][Self::Digits], but characters are hidden
6500    #[doc(alias = "GTK_INPUT_PURPOSE_PIN")]
6501    Pin,
6502    /// Allow any character, in addition to control codes
6503    #[doc(alias = "GTK_INPUT_PURPOSE_TERMINAL")]
6504    Terminal,
6505    #[doc(hidden)]
6506    __Unknown(i32),
6507}
6508
6509#[doc(hidden)]
6510impl IntoGlib for InputPurpose {
6511    type GlibType = ffi::GtkInputPurpose;
6512
6513    #[inline]
6514    fn into_glib(self) -> ffi::GtkInputPurpose {
6515        match self {
6516            Self::FreeForm => ffi::GTK_INPUT_PURPOSE_FREE_FORM,
6517            Self::Alpha => ffi::GTK_INPUT_PURPOSE_ALPHA,
6518            Self::Digits => ffi::GTK_INPUT_PURPOSE_DIGITS,
6519            Self::Number => ffi::GTK_INPUT_PURPOSE_NUMBER,
6520            Self::Phone => ffi::GTK_INPUT_PURPOSE_PHONE,
6521            Self::Url => ffi::GTK_INPUT_PURPOSE_URL,
6522            Self::Email => ffi::GTK_INPUT_PURPOSE_EMAIL,
6523            Self::Name => ffi::GTK_INPUT_PURPOSE_NAME,
6524            Self::Password => ffi::GTK_INPUT_PURPOSE_PASSWORD,
6525            Self::Pin => ffi::GTK_INPUT_PURPOSE_PIN,
6526            Self::Terminal => ffi::GTK_INPUT_PURPOSE_TERMINAL,
6527            Self::__Unknown(value) => value,
6528        }
6529    }
6530}
6531
6532#[doc(hidden)]
6533impl FromGlib<ffi::GtkInputPurpose> for InputPurpose {
6534    #[inline]
6535    unsafe fn from_glib(value: ffi::GtkInputPurpose) -> Self {
6536        skip_assert_initialized!();
6537
6538        match value {
6539            ffi::GTK_INPUT_PURPOSE_FREE_FORM => Self::FreeForm,
6540            ffi::GTK_INPUT_PURPOSE_ALPHA => Self::Alpha,
6541            ffi::GTK_INPUT_PURPOSE_DIGITS => Self::Digits,
6542            ffi::GTK_INPUT_PURPOSE_NUMBER => Self::Number,
6543            ffi::GTK_INPUT_PURPOSE_PHONE => Self::Phone,
6544            ffi::GTK_INPUT_PURPOSE_URL => Self::Url,
6545            ffi::GTK_INPUT_PURPOSE_EMAIL => Self::Email,
6546            ffi::GTK_INPUT_PURPOSE_NAME => Self::Name,
6547            ffi::GTK_INPUT_PURPOSE_PASSWORD => Self::Password,
6548            ffi::GTK_INPUT_PURPOSE_PIN => Self::Pin,
6549            ffi::GTK_INPUT_PURPOSE_TERMINAL => Self::Terminal,
6550            value => Self::__Unknown(value),
6551        }
6552    }
6553}
6554
6555impl StaticType for InputPurpose {
6556    #[inline]
6557    #[doc(alias = "gtk_input_purpose_get_type")]
6558    fn static_type() -> glib::Type {
6559        unsafe { from_glib(ffi::gtk_input_purpose_get_type()) }
6560    }
6561}
6562
6563impl glib::HasParamSpec for InputPurpose {
6564    type ParamSpec = glib::ParamSpecEnum;
6565    type SetValue = Self;
6566    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
6567
6568    fn param_spec_builder() -> Self::BuilderFn {
6569        Self::ParamSpec::builder_with_default
6570    }
6571}
6572
6573impl glib::value::ValueType for InputPurpose {
6574    type Type = Self;
6575}
6576
6577unsafe impl<'a> glib::value::FromValue<'a> for InputPurpose {
6578    type Checker = glib::value::GenericValueTypeChecker<Self>;
6579
6580    #[inline]
6581    unsafe fn from_value(value: &'a glib::Value) -> Self {
6582        skip_assert_initialized!();
6583        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
6584    }
6585}
6586
6587impl ToValue for InputPurpose {
6588    #[inline]
6589    fn to_value(&self) -> glib::Value {
6590        let mut value = glib::Value::for_value_type::<Self>();
6591        unsafe {
6592            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
6593        }
6594        value
6595    }
6596
6597    #[inline]
6598    fn value_type(&self) -> glib::Type {
6599        Self::static_type()
6600    }
6601}
6602
6603impl From<InputPurpose> for glib::Value {
6604    #[inline]
6605    fn from(v: InputPurpose) -> Self {
6606        skip_assert_initialized!();
6607        ToValue::to_value(&v)
6608    }
6609}
6610
6611/// The different methods to handle text in #GtkInscription when it doesn't
6612/// fit the available space.
6613#[cfg(feature = "v4_8")]
6614#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
6615#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
6616#[non_exhaustive]
6617#[doc(alias = "GtkInscriptionOverflow")]
6618pub enum InscriptionOverflow {
6619    /// Clip the remaining text
6620    #[doc(alias = "GTK_INSCRIPTION_OVERFLOW_CLIP")]
6621    Clip,
6622    /// Omit characters at the start of the text
6623    #[doc(alias = "GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START")]
6624    EllipsizeStart,
6625    /// Omit characters at the middle of the text
6626    #[doc(alias = "GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE")]
6627    EllipsizeMiddle,
6628    /// Omit characters at the end of the text
6629    #[doc(alias = "GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END")]
6630    EllipsizeEnd,
6631    #[doc(hidden)]
6632    __Unknown(i32),
6633}
6634
6635#[cfg(feature = "v4_8")]
6636#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
6637#[doc(hidden)]
6638impl IntoGlib for InscriptionOverflow {
6639    type GlibType = ffi::GtkInscriptionOverflow;
6640
6641    #[inline]
6642    fn into_glib(self) -> ffi::GtkInscriptionOverflow {
6643        match self {
6644            Self::Clip => ffi::GTK_INSCRIPTION_OVERFLOW_CLIP,
6645            Self::EllipsizeStart => ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START,
6646            Self::EllipsizeMiddle => ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE,
6647            Self::EllipsizeEnd => ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END,
6648            Self::__Unknown(value) => value,
6649        }
6650    }
6651}
6652
6653#[cfg(feature = "v4_8")]
6654#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
6655#[doc(hidden)]
6656impl FromGlib<ffi::GtkInscriptionOverflow> for InscriptionOverflow {
6657    #[inline]
6658    unsafe fn from_glib(value: ffi::GtkInscriptionOverflow) -> Self {
6659        skip_assert_initialized!();
6660
6661        match value {
6662            ffi::GTK_INSCRIPTION_OVERFLOW_CLIP => Self::Clip,
6663            ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START => Self::EllipsizeStart,
6664            ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE => Self::EllipsizeMiddle,
6665            ffi::GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END => Self::EllipsizeEnd,
6666            value => Self::__Unknown(value),
6667        }
6668    }
6669}
6670
6671#[cfg(feature = "v4_8")]
6672#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
6673impl StaticType for InscriptionOverflow {
6674    #[inline]
6675    #[doc(alias = "gtk_inscription_overflow_get_type")]
6676    fn static_type() -> glib::Type {
6677        unsafe { from_glib(ffi::gtk_inscription_overflow_get_type()) }
6678    }
6679}
6680
6681#[cfg(feature = "v4_8")]
6682#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
6683impl glib::HasParamSpec for InscriptionOverflow {
6684    type ParamSpec = glib::ParamSpecEnum;
6685    type SetValue = Self;
6686    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
6687
6688    fn param_spec_builder() -> Self::BuilderFn {
6689        Self::ParamSpec::builder_with_default
6690    }
6691}
6692
6693#[cfg(feature = "v4_8")]
6694#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
6695impl glib::value::ValueType for InscriptionOverflow {
6696    type Type = Self;
6697}
6698
6699#[cfg(feature = "v4_8")]
6700#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
6701unsafe impl<'a> glib::value::FromValue<'a> for InscriptionOverflow {
6702    type Checker = glib::value::GenericValueTypeChecker<Self>;
6703
6704    #[inline]
6705    unsafe fn from_value(value: &'a glib::Value) -> Self {
6706        skip_assert_initialized!();
6707        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
6708    }
6709}
6710
6711#[cfg(feature = "v4_8")]
6712#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
6713impl ToValue for InscriptionOverflow {
6714    #[inline]
6715    fn to_value(&self) -> glib::Value {
6716        let mut value = glib::Value::for_value_type::<Self>();
6717        unsafe {
6718            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
6719        }
6720        value
6721    }
6722
6723    #[inline]
6724    fn value_type(&self) -> glib::Type {
6725        Self::static_type()
6726    }
6727}
6728
6729#[cfg(feature = "v4_8")]
6730#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
6731impl From<InscriptionOverflow> for glib::Value {
6732    #[inline]
6733    fn from(v: InscriptionOverflow) -> Self {
6734        skip_assert_initialized!();
6735        ToValue::to_value(&v)
6736    }
6737}
6738
6739/// Values for the [`gtk-interface-color-scheme`][struct@crate::Settings#gtk-interface-color-scheme]
6740/// and [`prefers-color-scheme`][struct@crate::CssProvider#prefers-color-scheme] properties
6741/// that indicates what color scheme is used.
6742///
6743/// This information can be used inside CSS via media queries.
6744///
6745/// More values may be added to this enumeration. Unknown values
6746/// should be treated the same as `GTK_INTERFACE_COLOR_SCHEME_DEFAULT`.
6747#[cfg(feature = "v4_20")]
6748#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6749#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
6750#[non_exhaustive]
6751#[doc(alias = "GtkInterfaceColorScheme")]
6752pub enum InterfaceColorScheme {
6753    /// The system doesn't support color schemes
6754    #[doc(alias = "GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED")]
6755    Unsupported,
6756    /// The default color scheme is used
6757    #[doc(alias = "GTK_INTERFACE_COLOR_SCHEME_DEFAULT")]
6758    Default,
6759    /// A dark color scheme is used
6760    #[doc(alias = "GTK_INTERFACE_COLOR_SCHEME_DARK")]
6761    Dark,
6762    /// A light color scheme is used
6763    #[doc(alias = "GTK_INTERFACE_COLOR_SCHEME_LIGHT")]
6764    Light,
6765    #[doc(hidden)]
6766    __Unknown(i32),
6767}
6768
6769#[cfg(feature = "v4_20")]
6770#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6771#[doc(hidden)]
6772impl IntoGlib for InterfaceColorScheme {
6773    type GlibType = ffi::GtkInterfaceColorScheme;
6774
6775    #[inline]
6776    fn into_glib(self) -> ffi::GtkInterfaceColorScheme {
6777        match self {
6778            Self::Unsupported => ffi::GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED,
6779            Self::Default => ffi::GTK_INTERFACE_COLOR_SCHEME_DEFAULT,
6780            Self::Dark => ffi::GTK_INTERFACE_COLOR_SCHEME_DARK,
6781            Self::Light => ffi::GTK_INTERFACE_COLOR_SCHEME_LIGHT,
6782            Self::__Unknown(value) => value,
6783        }
6784    }
6785}
6786
6787#[cfg(feature = "v4_20")]
6788#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6789#[doc(hidden)]
6790impl FromGlib<ffi::GtkInterfaceColorScheme> for InterfaceColorScheme {
6791    #[inline]
6792    unsafe fn from_glib(value: ffi::GtkInterfaceColorScheme) -> Self {
6793        skip_assert_initialized!();
6794
6795        match value {
6796            ffi::GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED => Self::Unsupported,
6797            ffi::GTK_INTERFACE_COLOR_SCHEME_DEFAULT => Self::Default,
6798            ffi::GTK_INTERFACE_COLOR_SCHEME_DARK => Self::Dark,
6799            ffi::GTK_INTERFACE_COLOR_SCHEME_LIGHT => Self::Light,
6800            value => Self::__Unknown(value),
6801        }
6802    }
6803}
6804
6805#[cfg(feature = "v4_20")]
6806#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6807impl StaticType for InterfaceColorScheme {
6808    #[inline]
6809    #[doc(alias = "gtk_interface_color_scheme_get_type")]
6810    fn static_type() -> glib::Type {
6811        unsafe { from_glib(ffi::gtk_interface_color_scheme_get_type()) }
6812    }
6813}
6814
6815#[cfg(feature = "v4_20")]
6816#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6817impl glib::HasParamSpec for InterfaceColorScheme {
6818    type ParamSpec = glib::ParamSpecEnum;
6819    type SetValue = Self;
6820    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
6821
6822    fn param_spec_builder() -> Self::BuilderFn {
6823        Self::ParamSpec::builder_with_default
6824    }
6825}
6826
6827#[cfg(feature = "v4_20")]
6828#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6829impl glib::value::ValueType for InterfaceColorScheme {
6830    type Type = Self;
6831}
6832
6833#[cfg(feature = "v4_20")]
6834#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6835unsafe impl<'a> glib::value::FromValue<'a> for InterfaceColorScheme {
6836    type Checker = glib::value::GenericValueTypeChecker<Self>;
6837
6838    #[inline]
6839    unsafe fn from_value(value: &'a glib::Value) -> Self {
6840        skip_assert_initialized!();
6841        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
6842    }
6843}
6844
6845#[cfg(feature = "v4_20")]
6846#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6847impl ToValue for InterfaceColorScheme {
6848    #[inline]
6849    fn to_value(&self) -> glib::Value {
6850        let mut value = glib::Value::for_value_type::<Self>();
6851        unsafe {
6852            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
6853        }
6854        value
6855    }
6856
6857    #[inline]
6858    fn value_type(&self) -> glib::Type {
6859        Self::static_type()
6860    }
6861}
6862
6863#[cfg(feature = "v4_20")]
6864#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6865impl From<InterfaceColorScheme> for glib::Value {
6866    #[inline]
6867    fn from(v: InterfaceColorScheme) -> Self {
6868        skip_assert_initialized!();
6869        ToValue::to_value(&v)
6870    }
6871}
6872
6873/// Values for the [`gtk-interface-contrast`][struct@crate::Settings#gtk-interface-contrast]
6874/// and [`prefers-contrast`][struct@crate::CssProvider#prefers-contrast] properties
6875/// that indicates the preferred level of contrast.
6876///
6877/// This information can be used inside CSS via media queries.
6878///
6879/// More values may be added to this enumeration. Unknown values
6880/// should be treated the same as `GTK_INTERFACE_CONTRAST_NO_PREFERENCE`.
6881#[cfg(feature = "v4_20")]
6882#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6883#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
6884#[non_exhaustive]
6885#[doc(alias = "GtkInterfaceContrast")]
6886pub enum InterfaceContrast {
6887    /// The system doesn't support contrast levels
6888    #[doc(alias = "GTK_INTERFACE_CONTRAST_UNSUPPORTED")]
6889    Unsupported,
6890    /// No particular preference for contrast
6891    #[doc(alias = "GTK_INTERFACE_CONTRAST_NO_PREFERENCE")]
6892    NoPreference,
6893    /// More contrast is preferred
6894    #[doc(alias = "GTK_INTERFACE_CONTRAST_MORE")]
6895    More,
6896    /// Less contrast is preferred
6897    #[doc(alias = "GTK_INTERFACE_CONTRAST_LESS")]
6898    Less,
6899    #[doc(hidden)]
6900    __Unknown(i32),
6901}
6902
6903#[cfg(feature = "v4_20")]
6904#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6905#[doc(hidden)]
6906impl IntoGlib for InterfaceContrast {
6907    type GlibType = ffi::GtkInterfaceContrast;
6908
6909    #[inline]
6910    fn into_glib(self) -> ffi::GtkInterfaceContrast {
6911        match self {
6912            Self::Unsupported => ffi::GTK_INTERFACE_CONTRAST_UNSUPPORTED,
6913            Self::NoPreference => ffi::GTK_INTERFACE_CONTRAST_NO_PREFERENCE,
6914            Self::More => ffi::GTK_INTERFACE_CONTRAST_MORE,
6915            Self::Less => ffi::GTK_INTERFACE_CONTRAST_LESS,
6916            Self::__Unknown(value) => value,
6917        }
6918    }
6919}
6920
6921#[cfg(feature = "v4_20")]
6922#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6923#[doc(hidden)]
6924impl FromGlib<ffi::GtkInterfaceContrast> for InterfaceContrast {
6925    #[inline]
6926    unsafe fn from_glib(value: ffi::GtkInterfaceContrast) -> Self {
6927        skip_assert_initialized!();
6928
6929        match value {
6930            ffi::GTK_INTERFACE_CONTRAST_UNSUPPORTED => Self::Unsupported,
6931            ffi::GTK_INTERFACE_CONTRAST_NO_PREFERENCE => Self::NoPreference,
6932            ffi::GTK_INTERFACE_CONTRAST_MORE => Self::More,
6933            ffi::GTK_INTERFACE_CONTRAST_LESS => Self::Less,
6934            value => Self::__Unknown(value),
6935        }
6936    }
6937}
6938
6939#[cfg(feature = "v4_20")]
6940#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6941impl StaticType for InterfaceContrast {
6942    #[inline]
6943    #[doc(alias = "gtk_interface_contrast_get_type")]
6944    fn static_type() -> glib::Type {
6945        unsafe { from_glib(ffi::gtk_interface_contrast_get_type()) }
6946    }
6947}
6948
6949#[cfg(feature = "v4_20")]
6950#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6951impl glib::HasParamSpec for InterfaceContrast {
6952    type ParamSpec = glib::ParamSpecEnum;
6953    type SetValue = Self;
6954    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
6955
6956    fn param_spec_builder() -> Self::BuilderFn {
6957        Self::ParamSpec::builder_with_default
6958    }
6959}
6960
6961#[cfg(feature = "v4_20")]
6962#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6963impl glib::value::ValueType for InterfaceContrast {
6964    type Type = Self;
6965}
6966
6967#[cfg(feature = "v4_20")]
6968#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6969unsafe impl<'a> glib::value::FromValue<'a> for InterfaceContrast {
6970    type Checker = glib::value::GenericValueTypeChecker<Self>;
6971
6972    #[inline]
6973    unsafe fn from_value(value: &'a glib::Value) -> Self {
6974        skip_assert_initialized!();
6975        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
6976    }
6977}
6978
6979#[cfg(feature = "v4_20")]
6980#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6981impl ToValue for InterfaceContrast {
6982    #[inline]
6983    fn to_value(&self) -> glib::Value {
6984        let mut value = glib::Value::for_value_type::<Self>();
6985        unsafe {
6986            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
6987        }
6988        value
6989    }
6990
6991    #[inline]
6992    fn value_type(&self) -> glib::Type {
6993        Self::static_type()
6994    }
6995}
6996
6997#[cfg(feature = "v4_20")]
6998#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
6999impl From<InterfaceContrast> for glib::Value {
7000    #[inline]
7001    fn from(v: InterfaceContrast) -> Self {
7002        skip_assert_initialized!();
7003        ToValue::to_value(&v)
7004    }
7005}
7006
7007/// Used for justifying the text inside a [`Label`][crate::Label] widget.
7008#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
7009#[non_exhaustive]
7010#[doc(alias = "GtkJustification")]
7011pub enum Justification {
7012    /// The text is placed at the left edge of the label.
7013    #[doc(alias = "GTK_JUSTIFY_LEFT")]
7014    Left,
7015    /// The text is placed at the right edge of the label.
7016    #[doc(alias = "GTK_JUSTIFY_RIGHT")]
7017    Right,
7018    /// The text is placed in the center of the label.
7019    #[doc(alias = "GTK_JUSTIFY_CENTER")]
7020    Center,
7021    /// The text is placed is distributed across the label.
7022    #[doc(alias = "GTK_JUSTIFY_FILL")]
7023    Fill,
7024    #[doc(hidden)]
7025    __Unknown(i32),
7026}
7027
7028#[doc(hidden)]
7029impl IntoGlib for Justification {
7030    type GlibType = ffi::GtkJustification;
7031
7032    #[inline]
7033    fn into_glib(self) -> ffi::GtkJustification {
7034        match self {
7035            Self::Left => ffi::GTK_JUSTIFY_LEFT,
7036            Self::Right => ffi::GTK_JUSTIFY_RIGHT,
7037            Self::Center => ffi::GTK_JUSTIFY_CENTER,
7038            Self::Fill => ffi::GTK_JUSTIFY_FILL,
7039            Self::__Unknown(value) => value,
7040        }
7041    }
7042}
7043
7044#[doc(hidden)]
7045impl FromGlib<ffi::GtkJustification> for Justification {
7046    #[inline]
7047    unsafe fn from_glib(value: ffi::GtkJustification) -> Self {
7048        skip_assert_initialized!();
7049
7050        match value {
7051            ffi::GTK_JUSTIFY_LEFT => Self::Left,
7052            ffi::GTK_JUSTIFY_RIGHT => Self::Right,
7053            ffi::GTK_JUSTIFY_CENTER => Self::Center,
7054            ffi::GTK_JUSTIFY_FILL => Self::Fill,
7055            value => Self::__Unknown(value),
7056        }
7057    }
7058}
7059
7060impl StaticType for Justification {
7061    #[inline]
7062    #[doc(alias = "gtk_justification_get_type")]
7063    fn static_type() -> glib::Type {
7064        unsafe { from_glib(ffi::gtk_justification_get_type()) }
7065    }
7066}
7067
7068impl glib::HasParamSpec for Justification {
7069    type ParamSpec = glib::ParamSpecEnum;
7070    type SetValue = Self;
7071    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
7072
7073    fn param_spec_builder() -> Self::BuilderFn {
7074        Self::ParamSpec::builder_with_default
7075    }
7076}
7077
7078impl glib::value::ValueType for Justification {
7079    type Type = Self;
7080}
7081
7082unsafe impl<'a> glib::value::FromValue<'a> for Justification {
7083    type Checker = glib::value::GenericValueTypeChecker<Self>;
7084
7085    #[inline]
7086    unsafe fn from_value(value: &'a glib::Value) -> Self {
7087        skip_assert_initialized!();
7088        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
7089    }
7090}
7091
7092impl ToValue for Justification {
7093    #[inline]
7094    fn to_value(&self) -> glib::Value {
7095        let mut value = glib::Value::for_value_type::<Self>();
7096        unsafe {
7097            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
7098        }
7099        value
7100    }
7101
7102    #[inline]
7103    fn value_type(&self) -> glib::Type {
7104        Self::static_type()
7105    }
7106}
7107
7108impl From<Justification> for glib::Value {
7109    #[inline]
7110    fn from(v: Justification) -> Self {
7111        skip_assert_initialized!();
7112        ToValue::to_value(&v)
7113    }
7114}
7115
7116/// Describes how [`LevelBar`][crate::LevelBar] contents should be rendered.
7117///
7118/// Note that this enumeration could be extended with additional modes
7119/// in the future.
7120#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
7121#[non_exhaustive]
7122#[doc(alias = "GtkLevelBarMode")]
7123pub enum LevelBarMode {
7124    /// the bar has a continuous mode
7125    #[doc(alias = "GTK_LEVEL_BAR_MODE_CONTINUOUS")]
7126    Continuous,
7127    /// the bar has a discrete mode
7128    #[doc(alias = "GTK_LEVEL_BAR_MODE_DISCRETE")]
7129    Discrete,
7130    #[doc(hidden)]
7131    __Unknown(i32),
7132}
7133
7134#[doc(hidden)]
7135impl IntoGlib for LevelBarMode {
7136    type GlibType = ffi::GtkLevelBarMode;
7137
7138    #[inline]
7139    fn into_glib(self) -> ffi::GtkLevelBarMode {
7140        match self {
7141            Self::Continuous => ffi::GTK_LEVEL_BAR_MODE_CONTINUOUS,
7142            Self::Discrete => ffi::GTK_LEVEL_BAR_MODE_DISCRETE,
7143            Self::__Unknown(value) => value,
7144        }
7145    }
7146}
7147
7148#[doc(hidden)]
7149impl FromGlib<ffi::GtkLevelBarMode> for LevelBarMode {
7150    #[inline]
7151    unsafe fn from_glib(value: ffi::GtkLevelBarMode) -> Self {
7152        skip_assert_initialized!();
7153
7154        match value {
7155            ffi::GTK_LEVEL_BAR_MODE_CONTINUOUS => Self::Continuous,
7156            ffi::GTK_LEVEL_BAR_MODE_DISCRETE => Self::Discrete,
7157            value => Self::__Unknown(value),
7158        }
7159    }
7160}
7161
7162impl StaticType for LevelBarMode {
7163    #[inline]
7164    #[doc(alias = "gtk_level_bar_mode_get_type")]
7165    fn static_type() -> glib::Type {
7166        unsafe { from_glib(ffi::gtk_level_bar_mode_get_type()) }
7167    }
7168}
7169
7170impl glib::HasParamSpec for LevelBarMode {
7171    type ParamSpec = glib::ParamSpecEnum;
7172    type SetValue = Self;
7173    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
7174
7175    fn param_spec_builder() -> Self::BuilderFn {
7176        Self::ParamSpec::builder_with_default
7177    }
7178}
7179
7180impl glib::value::ValueType for LevelBarMode {
7181    type Type = Self;
7182}
7183
7184unsafe impl<'a> glib::value::FromValue<'a> for LevelBarMode {
7185    type Checker = glib::value::GenericValueTypeChecker<Self>;
7186
7187    #[inline]
7188    unsafe fn from_value(value: &'a glib::Value) -> Self {
7189        skip_assert_initialized!();
7190        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
7191    }
7192}
7193
7194impl ToValue for LevelBarMode {
7195    #[inline]
7196    fn to_value(&self) -> glib::Value {
7197        let mut value = glib::Value::for_value_type::<Self>();
7198        unsafe {
7199            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
7200        }
7201        value
7202    }
7203
7204    #[inline]
7205    fn value_type(&self) -> glib::Type {
7206        Self::static_type()
7207    }
7208}
7209
7210impl From<LevelBarMode> for glib::Value {
7211    #[inline]
7212    fn from(v: LevelBarMode) -> Self {
7213        skip_assert_initialized!();
7214        ToValue::to_value(&v)
7215    }
7216}
7217
7218/// The type of license for an application.
7219///
7220/// This enumeration can be expanded at later date.
7221#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
7222#[non_exhaustive]
7223#[doc(alias = "GtkLicense")]
7224pub enum License {
7225    /// No license specified
7226    #[doc(alias = "GTK_LICENSE_UNKNOWN")]
7227    Unknown,
7228    /// A license text is going to be specified by the
7229    ///   developer
7230    #[doc(alias = "GTK_LICENSE_CUSTOM")]
7231    Custom,
7232    /// The GNU General Public License, version 2.0 or later
7233    #[doc(alias = "GTK_LICENSE_GPL_2_0")]
7234    Gpl20,
7235    /// The GNU General Public License, version 3.0 or later
7236    #[doc(alias = "GTK_LICENSE_GPL_3_0")]
7237    Gpl30,
7238    /// The GNU Lesser General Public License, version 2.1 or later
7239    #[doc(alias = "GTK_LICENSE_LGPL_2_1")]
7240    Lgpl21,
7241    /// The GNU Lesser General Public License, version 3.0 or later
7242    #[doc(alias = "GTK_LICENSE_LGPL_3_0")]
7243    Lgpl30,
7244    /// The BSD standard license
7245    #[doc(alias = "GTK_LICENSE_BSD")]
7246    Bsd,
7247    /// The MIT/X11 standard license
7248    #[doc(alias = "GTK_LICENSE_MIT_X11")]
7249    MitX11,
7250    /// The Artistic License, version 2.0
7251    #[doc(alias = "GTK_LICENSE_ARTISTIC")]
7252    Artistic,
7253    /// The GNU General Public License, version 2.0 only
7254    #[doc(alias = "GTK_LICENSE_GPL_2_0_ONLY")]
7255    Gpl20Only,
7256    /// The GNU General Public License, version 3.0 only
7257    #[doc(alias = "GTK_LICENSE_GPL_3_0_ONLY")]
7258    Gpl30Only,
7259    /// The GNU Lesser General Public License, version 2.1 only
7260    #[doc(alias = "GTK_LICENSE_LGPL_2_1_ONLY")]
7261    Lgpl21Only,
7262    /// The GNU Lesser General Public License, version 3.0 only
7263    #[doc(alias = "GTK_LICENSE_LGPL_3_0_ONLY")]
7264    Lgpl30Only,
7265    /// The GNU Affero General Public License, version 3.0 or later
7266    #[doc(alias = "GTK_LICENSE_AGPL_3_0")]
7267    Agpl30,
7268    /// The GNU Affero General Public License, version 3.0 only
7269    #[doc(alias = "GTK_LICENSE_AGPL_3_0_ONLY")]
7270    Agpl30Only,
7271    /// The 3-clause BSD licence
7272    #[doc(alias = "GTK_LICENSE_BSD_3")]
7273    Bsd3,
7274    /// The Apache License, version 2.0
7275    #[doc(alias = "GTK_LICENSE_APACHE_2_0")]
7276    Apache20,
7277    /// The Mozilla Public License, version 2.0
7278    #[doc(alias = "GTK_LICENSE_MPL_2_0")]
7279    Mpl20,
7280    /// Zero-Clause BSD license
7281    #[cfg(feature = "v4_14")]
7282    #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
7283    #[doc(alias = "GTK_LICENSE_0BSD")]
7284    _0bsd,
7285    #[doc(hidden)]
7286    __Unknown(i32),
7287}
7288
7289#[doc(hidden)]
7290impl IntoGlib for License {
7291    type GlibType = ffi::GtkLicense;
7292
7293    fn into_glib(self) -> ffi::GtkLicense {
7294        match self {
7295            Self::Unknown => ffi::GTK_LICENSE_UNKNOWN,
7296            Self::Custom => ffi::GTK_LICENSE_CUSTOM,
7297            Self::Gpl20 => ffi::GTK_LICENSE_GPL_2_0,
7298            Self::Gpl30 => ffi::GTK_LICENSE_GPL_3_0,
7299            Self::Lgpl21 => ffi::GTK_LICENSE_LGPL_2_1,
7300            Self::Lgpl30 => ffi::GTK_LICENSE_LGPL_3_0,
7301            Self::Bsd => ffi::GTK_LICENSE_BSD,
7302            Self::MitX11 => ffi::GTK_LICENSE_MIT_X11,
7303            Self::Artistic => ffi::GTK_LICENSE_ARTISTIC,
7304            Self::Gpl20Only => ffi::GTK_LICENSE_GPL_2_0_ONLY,
7305            Self::Gpl30Only => ffi::GTK_LICENSE_GPL_3_0_ONLY,
7306            Self::Lgpl21Only => ffi::GTK_LICENSE_LGPL_2_1_ONLY,
7307            Self::Lgpl30Only => ffi::GTK_LICENSE_LGPL_3_0_ONLY,
7308            Self::Agpl30 => ffi::GTK_LICENSE_AGPL_3_0,
7309            Self::Agpl30Only => ffi::GTK_LICENSE_AGPL_3_0_ONLY,
7310            Self::Bsd3 => ffi::GTK_LICENSE_BSD_3,
7311            Self::Apache20 => ffi::GTK_LICENSE_APACHE_2_0,
7312            Self::Mpl20 => ffi::GTK_LICENSE_MPL_2_0,
7313            #[cfg(feature = "v4_14")]
7314            Self::_0bsd => ffi::GTK_LICENSE_0BSD,
7315            Self::__Unknown(value) => value,
7316        }
7317    }
7318}
7319
7320#[doc(hidden)]
7321impl FromGlib<ffi::GtkLicense> for License {
7322    unsafe fn from_glib(value: ffi::GtkLicense) -> Self {
7323        skip_assert_initialized!();
7324
7325        match value {
7326            ffi::GTK_LICENSE_UNKNOWN => Self::Unknown,
7327            ffi::GTK_LICENSE_CUSTOM => Self::Custom,
7328            ffi::GTK_LICENSE_GPL_2_0 => Self::Gpl20,
7329            ffi::GTK_LICENSE_GPL_3_0 => Self::Gpl30,
7330            ffi::GTK_LICENSE_LGPL_2_1 => Self::Lgpl21,
7331            ffi::GTK_LICENSE_LGPL_3_0 => Self::Lgpl30,
7332            ffi::GTK_LICENSE_BSD => Self::Bsd,
7333            ffi::GTK_LICENSE_MIT_X11 => Self::MitX11,
7334            ffi::GTK_LICENSE_ARTISTIC => Self::Artistic,
7335            ffi::GTK_LICENSE_GPL_2_0_ONLY => Self::Gpl20Only,
7336            ffi::GTK_LICENSE_GPL_3_0_ONLY => Self::Gpl30Only,
7337            ffi::GTK_LICENSE_LGPL_2_1_ONLY => Self::Lgpl21Only,
7338            ffi::GTK_LICENSE_LGPL_3_0_ONLY => Self::Lgpl30Only,
7339            ffi::GTK_LICENSE_AGPL_3_0 => Self::Agpl30,
7340            ffi::GTK_LICENSE_AGPL_3_0_ONLY => Self::Agpl30Only,
7341            ffi::GTK_LICENSE_BSD_3 => Self::Bsd3,
7342            ffi::GTK_LICENSE_APACHE_2_0 => Self::Apache20,
7343            ffi::GTK_LICENSE_MPL_2_0 => Self::Mpl20,
7344            #[cfg(feature = "v4_14")]
7345            ffi::GTK_LICENSE_0BSD => Self::_0bsd,
7346            value => Self::__Unknown(value),
7347        }
7348    }
7349}
7350
7351impl StaticType for License {
7352    #[inline]
7353    #[doc(alias = "gtk_license_get_type")]
7354    fn static_type() -> glib::Type {
7355        unsafe { from_glib(ffi::gtk_license_get_type()) }
7356    }
7357}
7358
7359impl glib::HasParamSpec for License {
7360    type ParamSpec = glib::ParamSpecEnum;
7361    type SetValue = Self;
7362    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
7363
7364    fn param_spec_builder() -> Self::BuilderFn {
7365        Self::ParamSpec::builder_with_default
7366    }
7367}
7368
7369impl glib::value::ValueType for License {
7370    type Type = Self;
7371}
7372
7373unsafe impl<'a> glib::value::FromValue<'a> for License {
7374    type Checker = glib::value::GenericValueTypeChecker<Self>;
7375
7376    #[inline]
7377    unsafe fn from_value(value: &'a glib::Value) -> Self {
7378        skip_assert_initialized!();
7379        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
7380    }
7381}
7382
7383impl ToValue for License {
7384    #[inline]
7385    fn to_value(&self) -> glib::Value {
7386        let mut value = glib::Value::for_value_type::<Self>();
7387        unsafe {
7388            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
7389        }
7390        value
7391    }
7392
7393    #[inline]
7394    fn value_type(&self) -> glib::Type {
7395        Self::static_type()
7396    }
7397}
7398
7399impl From<License> for glib::Value {
7400    #[inline]
7401    fn from(v: License) -> Self {
7402        skip_assert_initialized!();
7403        ToValue::to_value(&v)
7404    }
7405}
7406
7407/// Used to configure the focus behavior in the `GTK_DIR_TAB_FORWARD`
7408/// and `GTK_DIR_TAB_BACKWARD` direction, like the <kbd>Tab</kbd> key
7409/// in a [`ListView`][crate::ListView].
7410#[cfg(feature = "v4_12")]
7411#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
7412#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
7413#[non_exhaustive]
7414#[doc(alias = "GtkListTabBehavior")]
7415pub enum ListTabBehavior {
7416    /// Cycle through all focusable items of the list
7417    #[doc(alias = "GTK_LIST_TAB_ALL")]
7418    All,
7419    /// Cycle through a single list element, then move
7420    ///   focus out of the list. Moving focus between items needs to be
7421    ///   done with the arrow keys.
7422    #[doc(alias = "GTK_LIST_TAB_ITEM")]
7423    Item,
7424    /// Cycle only through a single cell, then
7425    ///   move focus out of the list. Moving focus between cells needs to
7426    ///   be done with the arrow keys. This is only relevant for
7427    ///   cell-based widgets like #GtkColumnView, otherwise it behaves
7428    ///   like `GTK_LIST_TAB_ITEM`.
7429    #[doc(alias = "GTK_LIST_TAB_CELL")]
7430    Cell,
7431    #[doc(hidden)]
7432    __Unknown(i32),
7433}
7434
7435#[cfg(feature = "v4_12")]
7436#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
7437#[doc(hidden)]
7438impl IntoGlib for ListTabBehavior {
7439    type GlibType = ffi::GtkListTabBehavior;
7440
7441    #[inline]
7442    fn into_glib(self) -> ffi::GtkListTabBehavior {
7443        match self {
7444            Self::All => ffi::GTK_LIST_TAB_ALL,
7445            Self::Item => ffi::GTK_LIST_TAB_ITEM,
7446            Self::Cell => ffi::GTK_LIST_TAB_CELL,
7447            Self::__Unknown(value) => value,
7448        }
7449    }
7450}
7451
7452#[cfg(feature = "v4_12")]
7453#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
7454#[doc(hidden)]
7455impl FromGlib<ffi::GtkListTabBehavior> for ListTabBehavior {
7456    #[inline]
7457    unsafe fn from_glib(value: ffi::GtkListTabBehavior) -> Self {
7458        skip_assert_initialized!();
7459
7460        match value {
7461            ffi::GTK_LIST_TAB_ALL => Self::All,
7462            ffi::GTK_LIST_TAB_ITEM => Self::Item,
7463            ffi::GTK_LIST_TAB_CELL => Self::Cell,
7464            value => Self::__Unknown(value),
7465        }
7466    }
7467}
7468
7469#[cfg(feature = "v4_12")]
7470#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
7471impl StaticType for ListTabBehavior {
7472    #[inline]
7473    #[doc(alias = "gtk_list_tab_behavior_get_type")]
7474    fn static_type() -> glib::Type {
7475        unsafe { from_glib(ffi::gtk_list_tab_behavior_get_type()) }
7476    }
7477}
7478
7479#[cfg(feature = "v4_12")]
7480#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
7481impl glib::HasParamSpec for ListTabBehavior {
7482    type ParamSpec = glib::ParamSpecEnum;
7483    type SetValue = Self;
7484    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
7485
7486    fn param_spec_builder() -> Self::BuilderFn {
7487        Self::ParamSpec::builder_with_default
7488    }
7489}
7490
7491#[cfg(feature = "v4_12")]
7492#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
7493impl glib::value::ValueType for ListTabBehavior {
7494    type Type = Self;
7495}
7496
7497#[cfg(feature = "v4_12")]
7498#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
7499unsafe impl<'a> glib::value::FromValue<'a> for ListTabBehavior {
7500    type Checker = glib::value::GenericValueTypeChecker<Self>;
7501
7502    #[inline]
7503    unsafe fn from_value(value: &'a glib::Value) -> Self {
7504        skip_assert_initialized!();
7505        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
7506    }
7507}
7508
7509#[cfg(feature = "v4_12")]
7510#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
7511impl ToValue for ListTabBehavior {
7512    #[inline]
7513    fn to_value(&self) -> glib::Value {
7514        let mut value = glib::Value::for_value_type::<Self>();
7515        unsafe {
7516            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
7517        }
7518        value
7519    }
7520
7521    #[inline]
7522    fn value_type(&self) -> glib::Type {
7523        Self::static_type()
7524    }
7525}
7526
7527#[cfg(feature = "v4_12")]
7528#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
7529impl From<ListTabBehavior> for glib::Value {
7530    #[inline]
7531    fn from(v: ListTabBehavior) -> Self {
7532        skip_assert_initialized!();
7533        ToValue::to_value(&v)
7534    }
7535}
7536
7537/// The type of message being displayed in a [`MessageDialog`][crate::MessageDialog].
7538#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
7539#[non_exhaustive]
7540#[doc(alias = "GtkMessageType")]
7541pub enum MessageType {
7542    /// Informational message
7543    #[doc(alias = "GTK_MESSAGE_INFO")]
7544    Info,
7545    /// Non-fatal warning message
7546    #[doc(alias = "GTK_MESSAGE_WARNING")]
7547    Warning,
7548    /// Question requiring a choice
7549    #[doc(alias = "GTK_MESSAGE_QUESTION")]
7550    Question,
7551    /// Fatal error message
7552    #[doc(alias = "GTK_MESSAGE_ERROR")]
7553    Error,
7554    /// None of the above
7555    #[doc(alias = "GTK_MESSAGE_OTHER")]
7556    Other,
7557    #[doc(hidden)]
7558    __Unknown(i32),
7559}
7560
7561#[doc(hidden)]
7562impl IntoGlib for MessageType {
7563    type GlibType = ffi::GtkMessageType;
7564
7565    #[inline]
7566    fn into_glib(self) -> ffi::GtkMessageType {
7567        match self {
7568            Self::Info => ffi::GTK_MESSAGE_INFO,
7569            Self::Warning => ffi::GTK_MESSAGE_WARNING,
7570            Self::Question => ffi::GTK_MESSAGE_QUESTION,
7571            Self::Error => ffi::GTK_MESSAGE_ERROR,
7572            Self::Other => ffi::GTK_MESSAGE_OTHER,
7573            Self::__Unknown(value) => value,
7574        }
7575    }
7576}
7577
7578#[doc(hidden)]
7579impl FromGlib<ffi::GtkMessageType> for MessageType {
7580    #[inline]
7581    unsafe fn from_glib(value: ffi::GtkMessageType) -> Self {
7582        skip_assert_initialized!();
7583
7584        match value {
7585            ffi::GTK_MESSAGE_INFO => Self::Info,
7586            ffi::GTK_MESSAGE_WARNING => Self::Warning,
7587            ffi::GTK_MESSAGE_QUESTION => Self::Question,
7588            ffi::GTK_MESSAGE_ERROR => Self::Error,
7589            ffi::GTK_MESSAGE_OTHER => Self::Other,
7590            value => Self::__Unknown(value),
7591        }
7592    }
7593}
7594
7595impl StaticType for MessageType {
7596    #[inline]
7597    #[doc(alias = "gtk_message_type_get_type")]
7598    fn static_type() -> glib::Type {
7599        unsafe { from_glib(ffi::gtk_message_type_get_type()) }
7600    }
7601}
7602
7603impl glib::HasParamSpec for MessageType {
7604    type ParamSpec = glib::ParamSpecEnum;
7605    type SetValue = Self;
7606    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
7607
7608    fn param_spec_builder() -> Self::BuilderFn {
7609        Self::ParamSpec::builder_with_default
7610    }
7611}
7612
7613impl glib::value::ValueType for MessageType {
7614    type Type = Self;
7615}
7616
7617unsafe impl<'a> glib::value::FromValue<'a> for MessageType {
7618    type Checker = glib::value::GenericValueTypeChecker<Self>;
7619
7620    #[inline]
7621    unsafe fn from_value(value: &'a glib::Value) -> Self {
7622        skip_assert_initialized!();
7623        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
7624    }
7625}
7626
7627impl ToValue for MessageType {
7628    #[inline]
7629    fn to_value(&self) -> glib::Value {
7630        let mut value = glib::Value::for_value_type::<Self>();
7631        unsafe {
7632            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
7633        }
7634        value
7635    }
7636
7637    #[inline]
7638    fn value_type(&self) -> glib::Type {
7639        Self::static_type()
7640    }
7641}
7642
7643impl From<MessageType> for glib::Value {
7644    #[inline]
7645    fn from(v: MessageType) -> Self {
7646        skip_assert_initialized!();
7647        ToValue::to_value(&v)
7648    }
7649}
7650
7651/// Passed as argument to various keybinding signals for moving the
7652/// cursor position.
7653#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
7654#[non_exhaustive]
7655#[doc(alias = "GtkMovementStep")]
7656pub enum MovementStep {
7657    /// Move forward or back by graphemes
7658    #[doc(alias = "GTK_MOVEMENT_LOGICAL_POSITIONS")]
7659    LogicalPositions,
7660    /// Move left or right by graphemes
7661    #[doc(alias = "GTK_MOVEMENT_VISUAL_POSITIONS")]
7662    VisualPositions,
7663    /// Move forward or back by words
7664    #[doc(alias = "GTK_MOVEMENT_WORDS")]
7665    Words,
7666    /// Move up or down lines (wrapped lines)
7667    #[doc(alias = "GTK_MOVEMENT_DISPLAY_LINES")]
7668    DisplayLines,
7669    /// Move to either end of a line
7670    #[doc(alias = "GTK_MOVEMENT_DISPLAY_LINE_ENDS")]
7671    DisplayLineEnds,
7672    /// Move up or down paragraphs (newline-ended lines)
7673    #[doc(alias = "GTK_MOVEMENT_PARAGRAPHS")]
7674    Paragraphs,
7675    /// Move to either end of a paragraph
7676    #[doc(alias = "GTK_MOVEMENT_PARAGRAPH_ENDS")]
7677    ParagraphEnds,
7678    /// Move by pages
7679    #[doc(alias = "GTK_MOVEMENT_PAGES")]
7680    Pages,
7681    /// Move to ends of the buffer
7682    #[doc(alias = "GTK_MOVEMENT_BUFFER_ENDS")]
7683    BufferEnds,
7684    /// Move horizontally by pages
7685    #[doc(alias = "GTK_MOVEMENT_HORIZONTAL_PAGES")]
7686    HorizontalPages,
7687    #[doc(hidden)]
7688    __Unknown(i32),
7689}
7690
7691#[doc(hidden)]
7692impl IntoGlib for MovementStep {
7693    type GlibType = ffi::GtkMovementStep;
7694
7695    #[inline]
7696    fn into_glib(self) -> ffi::GtkMovementStep {
7697        match self {
7698            Self::LogicalPositions => ffi::GTK_MOVEMENT_LOGICAL_POSITIONS,
7699            Self::VisualPositions => ffi::GTK_MOVEMENT_VISUAL_POSITIONS,
7700            Self::Words => ffi::GTK_MOVEMENT_WORDS,
7701            Self::DisplayLines => ffi::GTK_MOVEMENT_DISPLAY_LINES,
7702            Self::DisplayLineEnds => ffi::GTK_MOVEMENT_DISPLAY_LINE_ENDS,
7703            Self::Paragraphs => ffi::GTK_MOVEMENT_PARAGRAPHS,
7704            Self::ParagraphEnds => ffi::GTK_MOVEMENT_PARAGRAPH_ENDS,
7705            Self::Pages => ffi::GTK_MOVEMENT_PAGES,
7706            Self::BufferEnds => ffi::GTK_MOVEMENT_BUFFER_ENDS,
7707            Self::HorizontalPages => ffi::GTK_MOVEMENT_HORIZONTAL_PAGES,
7708            Self::__Unknown(value) => value,
7709        }
7710    }
7711}
7712
7713#[doc(hidden)]
7714impl FromGlib<ffi::GtkMovementStep> for MovementStep {
7715    #[inline]
7716    unsafe fn from_glib(value: ffi::GtkMovementStep) -> Self {
7717        skip_assert_initialized!();
7718
7719        match value {
7720            ffi::GTK_MOVEMENT_LOGICAL_POSITIONS => Self::LogicalPositions,
7721            ffi::GTK_MOVEMENT_VISUAL_POSITIONS => Self::VisualPositions,
7722            ffi::GTK_MOVEMENT_WORDS => Self::Words,
7723            ffi::GTK_MOVEMENT_DISPLAY_LINES => Self::DisplayLines,
7724            ffi::GTK_MOVEMENT_DISPLAY_LINE_ENDS => Self::DisplayLineEnds,
7725            ffi::GTK_MOVEMENT_PARAGRAPHS => Self::Paragraphs,
7726            ffi::GTK_MOVEMENT_PARAGRAPH_ENDS => Self::ParagraphEnds,
7727            ffi::GTK_MOVEMENT_PAGES => Self::Pages,
7728            ffi::GTK_MOVEMENT_BUFFER_ENDS => Self::BufferEnds,
7729            ffi::GTK_MOVEMENT_HORIZONTAL_PAGES => Self::HorizontalPages,
7730            value => Self::__Unknown(value),
7731        }
7732    }
7733}
7734
7735impl StaticType for MovementStep {
7736    #[inline]
7737    #[doc(alias = "gtk_movement_step_get_type")]
7738    fn static_type() -> glib::Type {
7739        unsafe { from_glib(ffi::gtk_movement_step_get_type()) }
7740    }
7741}
7742
7743impl glib::HasParamSpec for MovementStep {
7744    type ParamSpec = glib::ParamSpecEnum;
7745    type SetValue = Self;
7746    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
7747
7748    fn param_spec_builder() -> Self::BuilderFn {
7749        Self::ParamSpec::builder_with_default
7750    }
7751}
7752
7753impl glib::value::ValueType for MovementStep {
7754    type Type = Self;
7755}
7756
7757unsafe impl<'a> glib::value::FromValue<'a> for MovementStep {
7758    type Checker = glib::value::GenericValueTypeChecker<Self>;
7759
7760    #[inline]
7761    unsafe fn from_value(value: &'a glib::Value) -> Self {
7762        skip_assert_initialized!();
7763        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
7764    }
7765}
7766
7767impl ToValue for MovementStep {
7768    #[inline]
7769    fn to_value(&self) -> glib::Value {
7770        let mut value = glib::Value::for_value_type::<Self>();
7771        unsafe {
7772            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
7773        }
7774        value
7775    }
7776
7777    #[inline]
7778    fn value_type(&self) -> glib::Type {
7779        Self::static_type()
7780    }
7781}
7782
7783impl From<MovementStep> for glib::Value {
7784    #[inline]
7785    fn from(v: MovementStep) -> Self {
7786        skip_assert_initialized!();
7787        ToValue::to_value(&v)
7788    }
7789}
7790
7791/// Options for selecting a different wrap mode for natural size
7792/// requests.
7793///
7794/// See for example the [`natural-wrap-mode`][struct@crate::Label#natural-wrap-mode] property.
7795#[cfg(feature = "v4_6")]
7796#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
7797#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
7798#[non_exhaustive]
7799#[doc(alias = "GtkNaturalWrapMode")]
7800pub enum NaturalWrapMode {
7801    /// Inherit the minimum size request.
7802    ///   In particular, this should be used with [`pango::WrapMode::Char`][crate::pango::WrapMode::Char].
7803    #[doc(alias = "GTK_NATURAL_WRAP_INHERIT")]
7804    Inherit,
7805    /// Try not to wrap the text. This mode is the
7806    ///   closest to GTK3's behavior but can lead to a wide label leaving
7807    ///   lots of empty space below the text.
7808    #[doc(alias = "GTK_NATURAL_WRAP_NONE")]
7809    None,
7810    /// Attempt to wrap at word boundaries. This
7811    ///   is useful in particular when using [`pango::WrapMode::WordChar`][crate::pango::WrapMode::WordChar] as the
7812    ///   wrap mode.
7813    #[doc(alias = "GTK_NATURAL_WRAP_WORD")]
7814    Word,
7815    #[doc(hidden)]
7816    __Unknown(i32),
7817}
7818
7819#[cfg(feature = "v4_6")]
7820#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
7821#[doc(hidden)]
7822impl IntoGlib for NaturalWrapMode {
7823    type GlibType = ffi::GtkNaturalWrapMode;
7824
7825    #[inline]
7826    fn into_glib(self) -> ffi::GtkNaturalWrapMode {
7827        match self {
7828            Self::Inherit => ffi::GTK_NATURAL_WRAP_INHERIT,
7829            Self::None => ffi::GTK_NATURAL_WRAP_NONE,
7830            Self::Word => ffi::GTK_NATURAL_WRAP_WORD,
7831            Self::__Unknown(value) => value,
7832        }
7833    }
7834}
7835
7836#[cfg(feature = "v4_6")]
7837#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
7838#[doc(hidden)]
7839impl FromGlib<ffi::GtkNaturalWrapMode> for NaturalWrapMode {
7840    #[inline]
7841    unsafe fn from_glib(value: ffi::GtkNaturalWrapMode) -> Self {
7842        skip_assert_initialized!();
7843
7844        match value {
7845            ffi::GTK_NATURAL_WRAP_INHERIT => Self::Inherit,
7846            ffi::GTK_NATURAL_WRAP_NONE => Self::None,
7847            ffi::GTK_NATURAL_WRAP_WORD => Self::Word,
7848            value => Self::__Unknown(value),
7849        }
7850    }
7851}
7852
7853#[cfg(feature = "v4_6")]
7854#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
7855impl StaticType for NaturalWrapMode {
7856    #[inline]
7857    #[doc(alias = "gtk_natural_wrap_mode_get_type")]
7858    fn static_type() -> glib::Type {
7859        unsafe { from_glib(ffi::gtk_natural_wrap_mode_get_type()) }
7860    }
7861}
7862
7863#[cfg(feature = "v4_6")]
7864#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
7865impl glib::HasParamSpec for NaturalWrapMode {
7866    type ParamSpec = glib::ParamSpecEnum;
7867    type SetValue = Self;
7868    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
7869
7870    fn param_spec_builder() -> Self::BuilderFn {
7871        Self::ParamSpec::builder_with_default
7872    }
7873}
7874
7875#[cfg(feature = "v4_6")]
7876#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
7877impl glib::value::ValueType for NaturalWrapMode {
7878    type Type = Self;
7879}
7880
7881#[cfg(feature = "v4_6")]
7882#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
7883unsafe impl<'a> glib::value::FromValue<'a> for NaturalWrapMode {
7884    type Checker = glib::value::GenericValueTypeChecker<Self>;
7885
7886    #[inline]
7887    unsafe fn from_value(value: &'a glib::Value) -> Self {
7888        skip_assert_initialized!();
7889        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
7890    }
7891}
7892
7893#[cfg(feature = "v4_6")]
7894#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
7895impl ToValue for NaturalWrapMode {
7896    #[inline]
7897    fn to_value(&self) -> glib::Value {
7898        let mut value = glib::Value::for_value_type::<Self>();
7899        unsafe {
7900            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
7901        }
7902        value
7903    }
7904
7905    #[inline]
7906    fn value_type(&self) -> glib::Type {
7907        Self::static_type()
7908    }
7909}
7910
7911#[cfg(feature = "v4_6")]
7912#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
7913impl From<NaturalWrapMode> for glib::Value {
7914    #[inline]
7915    fn from(v: NaturalWrapMode) -> Self {
7916        skip_assert_initialized!();
7917        ToValue::to_value(&v)
7918    }
7919}
7920
7921/// The parameter used in the action signals of [`Notebook`][crate::Notebook].
7922#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
7923#[non_exhaustive]
7924#[doc(alias = "GtkNotebookTab")]
7925pub enum NotebookTab {
7926    /// the first tab in the notebook
7927    #[doc(alias = "GTK_NOTEBOOK_TAB_FIRST")]
7928    First,
7929    /// the last tab in the notebook
7930    #[doc(alias = "GTK_NOTEBOOK_TAB_LAST")]
7931    Last,
7932    #[doc(hidden)]
7933    __Unknown(i32),
7934}
7935
7936#[doc(hidden)]
7937impl IntoGlib for NotebookTab {
7938    type GlibType = ffi::GtkNotebookTab;
7939
7940    #[inline]
7941    fn into_glib(self) -> ffi::GtkNotebookTab {
7942        match self {
7943            Self::First => ffi::GTK_NOTEBOOK_TAB_FIRST,
7944            Self::Last => ffi::GTK_NOTEBOOK_TAB_LAST,
7945            Self::__Unknown(value) => value,
7946        }
7947    }
7948}
7949
7950#[doc(hidden)]
7951impl FromGlib<ffi::GtkNotebookTab> for NotebookTab {
7952    #[inline]
7953    unsafe fn from_glib(value: ffi::GtkNotebookTab) -> Self {
7954        skip_assert_initialized!();
7955
7956        match value {
7957            ffi::GTK_NOTEBOOK_TAB_FIRST => Self::First,
7958            ffi::GTK_NOTEBOOK_TAB_LAST => Self::Last,
7959            value => Self::__Unknown(value),
7960        }
7961    }
7962}
7963
7964impl StaticType for NotebookTab {
7965    #[inline]
7966    #[doc(alias = "gtk_notebook_tab_get_type")]
7967    fn static_type() -> glib::Type {
7968        unsafe { from_glib(ffi::gtk_notebook_tab_get_type()) }
7969    }
7970}
7971
7972impl glib::HasParamSpec for NotebookTab {
7973    type ParamSpec = glib::ParamSpecEnum;
7974    type SetValue = Self;
7975    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
7976
7977    fn param_spec_builder() -> Self::BuilderFn {
7978        Self::ParamSpec::builder_with_default
7979    }
7980}
7981
7982impl glib::value::ValueType for NotebookTab {
7983    type Type = Self;
7984}
7985
7986unsafe impl<'a> glib::value::FromValue<'a> for NotebookTab {
7987    type Checker = glib::value::GenericValueTypeChecker<Self>;
7988
7989    #[inline]
7990    unsafe fn from_value(value: &'a glib::Value) -> Self {
7991        skip_assert_initialized!();
7992        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
7993    }
7994}
7995
7996impl ToValue for NotebookTab {
7997    #[inline]
7998    fn to_value(&self) -> glib::Value {
7999        let mut value = glib::Value::for_value_type::<Self>();
8000        unsafe {
8001            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
8002        }
8003        value
8004    }
8005
8006    #[inline]
8007    fn value_type(&self) -> glib::Type {
8008        Self::static_type()
8009    }
8010}
8011
8012impl From<NotebookTab> for glib::Value {
8013    #[inline]
8014    fn from(v: NotebookTab) -> Self {
8015        skip_assert_initialized!();
8016        ToValue::to_value(&v)
8017    }
8018}
8019
8020/// Used to determine the layout of pages on a sheet when printing
8021/// multiple pages per sheet.
8022#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
8023#[non_exhaustive]
8024#[doc(alias = "GtkNumberUpLayout")]
8025pub enum NumberUpLayout {
8026    /// ![](layout-lrtb.png)
8027    #[doc(alias = "GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM")]
8028    Lrtb,
8029    /// ![](layout-lrbt.png)
8030    #[doc(alias = "GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP")]
8031    Lrbt,
8032    /// ![](layout-rltb.png)
8033    #[doc(alias = "GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM")]
8034    Rltb,
8035    /// ![](layout-rlbt.png)
8036    #[doc(alias = "GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP")]
8037    Rlbt,
8038    /// ![](layout-tblr.png)
8039    #[doc(alias = "GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT")]
8040    Tblr,
8041    /// ![](layout-tbrl.png)
8042    #[doc(alias = "GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT")]
8043    Tbrl,
8044    /// ![](layout-btlr.png)
8045    #[doc(alias = "GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT")]
8046    Btlr,
8047    /// ![](layout-btrl.png)
8048    #[doc(alias = "GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT")]
8049    Btrl,
8050    #[doc(hidden)]
8051    __Unknown(i32),
8052}
8053
8054#[doc(hidden)]
8055impl IntoGlib for NumberUpLayout {
8056    type GlibType = ffi::GtkNumberUpLayout;
8057
8058    #[inline]
8059    fn into_glib(self) -> ffi::GtkNumberUpLayout {
8060        match self {
8061            Self::Lrtb => ffi::GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM,
8062            Self::Lrbt => ffi::GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP,
8063            Self::Rltb => ffi::GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM,
8064            Self::Rlbt => ffi::GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP,
8065            Self::Tblr => ffi::GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT,
8066            Self::Tbrl => ffi::GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT,
8067            Self::Btlr => ffi::GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT,
8068            Self::Btrl => ffi::GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT,
8069            Self::__Unknown(value) => value,
8070        }
8071    }
8072}
8073
8074#[doc(hidden)]
8075impl FromGlib<ffi::GtkNumberUpLayout> for NumberUpLayout {
8076    #[inline]
8077    unsafe fn from_glib(value: ffi::GtkNumberUpLayout) -> Self {
8078        skip_assert_initialized!();
8079
8080        match value {
8081            ffi::GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM => Self::Lrtb,
8082            ffi::GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP => Self::Lrbt,
8083            ffi::GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM => Self::Rltb,
8084            ffi::GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP => Self::Rlbt,
8085            ffi::GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT => Self::Tblr,
8086            ffi::GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT => Self::Tbrl,
8087            ffi::GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT => Self::Btlr,
8088            ffi::GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT => Self::Btrl,
8089            value => Self::__Unknown(value),
8090        }
8091    }
8092}
8093
8094impl StaticType for NumberUpLayout {
8095    #[inline]
8096    #[doc(alias = "gtk_number_up_layout_get_type")]
8097    fn static_type() -> glib::Type {
8098        unsafe { from_glib(ffi::gtk_number_up_layout_get_type()) }
8099    }
8100}
8101
8102impl glib::HasParamSpec for NumberUpLayout {
8103    type ParamSpec = glib::ParamSpecEnum;
8104    type SetValue = Self;
8105    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
8106
8107    fn param_spec_builder() -> Self::BuilderFn {
8108        Self::ParamSpec::builder_with_default
8109    }
8110}
8111
8112impl glib::value::ValueType for NumberUpLayout {
8113    type Type = Self;
8114}
8115
8116unsafe impl<'a> glib::value::FromValue<'a> for NumberUpLayout {
8117    type Checker = glib::value::GenericValueTypeChecker<Self>;
8118
8119    #[inline]
8120    unsafe fn from_value(value: &'a glib::Value) -> Self {
8121        skip_assert_initialized!();
8122        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
8123    }
8124}
8125
8126impl ToValue for NumberUpLayout {
8127    #[inline]
8128    fn to_value(&self) -> glib::Value {
8129        let mut value = glib::Value::for_value_type::<Self>();
8130        unsafe {
8131            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
8132        }
8133        value
8134    }
8135
8136    #[inline]
8137    fn value_type(&self) -> glib::Type {
8138        Self::static_type()
8139    }
8140}
8141
8142impl From<NumberUpLayout> for glib::Value {
8143    #[inline]
8144    fn from(v: NumberUpLayout) -> Self {
8145        skip_assert_initialized!();
8146        ToValue::to_value(&v)
8147    }
8148}
8149
8150/// Describes the way two values can be compared.
8151///
8152/// These values can be used with a `callback::GLib::CompareFunc. However,
8153/// a `GCompareFunc` is allowed to return any integer values.
8154/// For converting such a value to a [`Ordering`][crate::Ordering] value, use
8155/// `Gtk::Ordering::from_cmpfunc()`.
8156#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
8157#[non_exhaustive]
8158#[doc(alias = "GtkOrdering")]
8159pub enum Ordering {
8160    /// the first value is smaller than the second
8161    #[doc(alias = "GTK_ORDERING_SMALLER")]
8162    Smaller,
8163    /// the two values are equal
8164    #[doc(alias = "GTK_ORDERING_EQUAL")]
8165    Equal,
8166    /// the first value is larger than the second
8167    #[doc(alias = "GTK_ORDERING_LARGER")]
8168    Larger,
8169    #[doc(hidden)]
8170    __Unknown(i32),
8171}
8172
8173#[doc(hidden)]
8174impl IntoGlib for Ordering {
8175    type GlibType = ffi::GtkOrdering;
8176
8177    #[inline]
8178    fn into_glib(self) -> ffi::GtkOrdering {
8179        match self {
8180            Self::Smaller => ffi::GTK_ORDERING_SMALLER,
8181            Self::Equal => ffi::GTK_ORDERING_EQUAL,
8182            Self::Larger => ffi::GTK_ORDERING_LARGER,
8183            Self::__Unknown(value) => value,
8184        }
8185    }
8186}
8187
8188#[doc(hidden)]
8189impl FromGlib<ffi::GtkOrdering> for Ordering {
8190    #[inline]
8191    unsafe fn from_glib(value: ffi::GtkOrdering) -> Self {
8192        skip_assert_initialized!();
8193
8194        match value {
8195            ffi::GTK_ORDERING_SMALLER => Self::Smaller,
8196            ffi::GTK_ORDERING_EQUAL => Self::Equal,
8197            ffi::GTK_ORDERING_LARGER => Self::Larger,
8198            value => Self::__Unknown(value),
8199        }
8200    }
8201}
8202
8203impl StaticType for Ordering {
8204    #[inline]
8205    #[doc(alias = "gtk_ordering_get_type")]
8206    fn static_type() -> glib::Type {
8207        unsafe { from_glib(ffi::gtk_ordering_get_type()) }
8208    }
8209}
8210
8211impl glib::HasParamSpec for Ordering {
8212    type ParamSpec = glib::ParamSpecEnum;
8213    type SetValue = Self;
8214    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
8215
8216    fn param_spec_builder() -> Self::BuilderFn {
8217        Self::ParamSpec::builder_with_default
8218    }
8219}
8220
8221impl glib::value::ValueType for Ordering {
8222    type Type = Self;
8223}
8224
8225unsafe impl<'a> glib::value::FromValue<'a> for Ordering {
8226    type Checker = glib::value::GenericValueTypeChecker<Self>;
8227
8228    #[inline]
8229    unsafe fn from_value(value: &'a glib::Value) -> Self {
8230        skip_assert_initialized!();
8231        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
8232    }
8233}
8234
8235impl ToValue for Ordering {
8236    #[inline]
8237    fn to_value(&self) -> glib::Value {
8238        let mut value = glib::Value::for_value_type::<Self>();
8239        unsafe {
8240            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
8241        }
8242        value
8243    }
8244
8245    #[inline]
8246    fn value_type(&self) -> glib::Type {
8247        Self::static_type()
8248    }
8249}
8250
8251impl From<Ordering> for glib::Value {
8252    #[inline]
8253    fn from(v: Ordering) -> Self {
8254        skip_assert_initialized!();
8255        ToValue::to_value(&v)
8256    }
8257}
8258
8259/// Represents the orientation of widgets and other objects.
8260///
8261/// Typical examples are [`Box`][crate::Box] or [`GesturePan`][crate::GesturePan].
8262#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
8263#[non_exhaustive]
8264#[doc(alias = "GtkOrientation")]
8265pub enum Orientation {
8266    /// The element is in horizontal orientation.
8267    #[doc(alias = "GTK_ORIENTATION_HORIZONTAL")]
8268    Horizontal,
8269    /// The element is in vertical orientation.
8270    #[doc(alias = "GTK_ORIENTATION_VERTICAL")]
8271    Vertical,
8272    #[doc(hidden)]
8273    __Unknown(i32),
8274}
8275
8276#[doc(hidden)]
8277impl IntoGlib for Orientation {
8278    type GlibType = ffi::GtkOrientation;
8279
8280    #[inline]
8281    fn into_glib(self) -> ffi::GtkOrientation {
8282        match self {
8283            Self::Horizontal => ffi::GTK_ORIENTATION_HORIZONTAL,
8284            Self::Vertical => ffi::GTK_ORIENTATION_VERTICAL,
8285            Self::__Unknown(value) => value,
8286        }
8287    }
8288}
8289
8290#[doc(hidden)]
8291impl FromGlib<ffi::GtkOrientation> for Orientation {
8292    #[inline]
8293    unsafe fn from_glib(value: ffi::GtkOrientation) -> Self {
8294        skip_assert_initialized!();
8295
8296        match value {
8297            ffi::GTK_ORIENTATION_HORIZONTAL => Self::Horizontal,
8298            ffi::GTK_ORIENTATION_VERTICAL => Self::Vertical,
8299            value => Self::__Unknown(value),
8300        }
8301    }
8302}
8303
8304impl StaticType for Orientation {
8305    #[inline]
8306    #[doc(alias = "gtk_orientation_get_type")]
8307    fn static_type() -> glib::Type {
8308        unsafe { from_glib(ffi::gtk_orientation_get_type()) }
8309    }
8310}
8311
8312impl glib::HasParamSpec for Orientation {
8313    type ParamSpec = glib::ParamSpecEnum;
8314    type SetValue = Self;
8315    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
8316
8317    fn param_spec_builder() -> Self::BuilderFn {
8318        Self::ParamSpec::builder_with_default
8319    }
8320}
8321
8322impl glib::value::ValueType for Orientation {
8323    type Type = Self;
8324}
8325
8326unsafe impl<'a> glib::value::FromValue<'a> for Orientation {
8327    type Checker = glib::value::GenericValueTypeChecker<Self>;
8328
8329    #[inline]
8330    unsafe fn from_value(value: &'a glib::Value) -> Self {
8331        skip_assert_initialized!();
8332        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
8333    }
8334}
8335
8336impl ToValue for Orientation {
8337    #[inline]
8338    fn to_value(&self) -> glib::Value {
8339        let mut value = glib::Value::for_value_type::<Self>();
8340        unsafe {
8341            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
8342        }
8343        value
8344    }
8345
8346    #[inline]
8347    fn value_type(&self) -> glib::Type {
8348        Self::static_type()
8349    }
8350}
8351
8352impl From<Orientation> for glib::Value {
8353    #[inline]
8354    fn from(v: Orientation) -> Self {
8355        skip_assert_initialized!();
8356        ToValue::to_value(&v)
8357    }
8358}
8359
8360/// Defines how content overflowing a given area should be handled.
8361///
8362/// This is used in [`WidgetExt::set_overflow()`][crate::prelude::WidgetExt::set_overflow()]. The
8363/// [`overflow`][struct@crate::Widget#overflow] property is modeled after the
8364/// CSS overflow property, but implements it only partially.
8365#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
8366#[non_exhaustive]
8367#[doc(alias = "GtkOverflow")]
8368pub enum Overflow {
8369    /// No change is applied. Content is drawn at the specified
8370    ///   position.
8371    #[doc(alias = "GTK_OVERFLOW_VISIBLE")]
8372    Visible,
8373    /// Content is clipped to the bounds of the area. Content
8374    ///   outside the area is not drawn and cannot be interacted with.
8375    #[doc(alias = "GTK_OVERFLOW_HIDDEN")]
8376    Hidden,
8377    #[doc(hidden)]
8378    __Unknown(i32),
8379}
8380
8381#[doc(hidden)]
8382impl IntoGlib for Overflow {
8383    type GlibType = ffi::GtkOverflow;
8384
8385    #[inline]
8386    fn into_glib(self) -> ffi::GtkOverflow {
8387        match self {
8388            Self::Visible => ffi::GTK_OVERFLOW_VISIBLE,
8389            Self::Hidden => ffi::GTK_OVERFLOW_HIDDEN,
8390            Self::__Unknown(value) => value,
8391        }
8392    }
8393}
8394
8395#[doc(hidden)]
8396impl FromGlib<ffi::GtkOverflow> for Overflow {
8397    #[inline]
8398    unsafe fn from_glib(value: ffi::GtkOverflow) -> Self {
8399        skip_assert_initialized!();
8400
8401        match value {
8402            ffi::GTK_OVERFLOW_VISIBLE => Self::Visible,
8403            ffi::GTK_OVERFLOW_HIDDEN => Self::Hidden,
8404            value => Self::__Unknown(value),
8405        }
8406    }
8407}
8408
8409impl StaticType for Overflow {
8410    #[inline]
8411    #[doc(alias = "gtk_overflow_get_type")]
8412    fn static_type() -> glib::Type {
8413        unsafe { from_glib(ffi::gtk_overflow_get_type()) }
8414    }
8415}
8416
8417impl glib::HasParamSpec for Overflow {
8418    type ParamSpec = glib::ParamSpecEnum;
8419    type SetValue = Self;
8420    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
8421
8422    fn param_spec_builder() -> Self::BuilderFn {
8423        Self::ParamSpec::builder_with_default
8424    }
8425}
8426
8427impl glib::value::ValueType for Overflow {
8428    type Type = Self;
8429}
8430
8431unsafe impl<'a> glib::value::FromValue<'a> for Overflow {
8432    type Checker = glib::value::GenericValueTypeChecker<Self>;
8433
8434    #[inline]
8435    unsafe fn from_value(value: &'a glib::Value) -> Self {
8436        skip_assert_initialized!();
8437        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
8438    }
8439}
8440
8441impl ToValue for Overflow {
8442    #[inline]
8443    fn to_value(&self) -> glib::Value {
8444        let mut value = glib::Value::for_value_type::<Self>();
8445        unsafe {
8446            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
8447        }
8448        value
8449    }
8450
8451    #[inline]
8452    fn value_type(&self) -> glib::Type {
8453        Self::static_type()
8454    }
8455}
8456
8457impl From<Overflow> for glib::Value {
8458    #[inline]
8459    fn from(v: Overflow) -> Self {
8460        skip_assert_initialized!();
8461        ToValue::to_value(&v)
8462    }
8463}
8464
8465/// Represents the packing location of a children in its parent.
8466///
8467/// See [`WindowControls`][crate::WindowControls] for example.
8468#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
8469#[non_exhaustive]
8470#[doc(alias = "GtkPackType")]
8471pub enum PackType {
8472    /// The child is packed into the start of the widget
8473    #[doc(alias = "GTK_PACK_START")]
8474    Start,
8475    /// The child is packed into the end of the widget
8476    #[doc(alias = "GTK_PACK_END")]
8477    End,
8478    #[doc(hidden)]
8479    __Unknown(i32),
8480}
8481
8482#[doc(hidden)]
8483impl IntoGlib for PackType {
8484    type GlibType = ffi::GtkPackType;
8485
8486    #[inline]
8487    fn into_glib(self) -> ffi::GtkPackType {
8488        match self {
8489            Self::Start => ffi::GTK_PACK_START,
8490            Self::End => ffi::GTK_PACK_END,
8491            Self::__Unknown(value) => value,
8492        }
8493    }
8494}
8495
8496#[doc(hidden)]
8497impl FromGlib<ffi::GtkPackType> for PackType {
8498    #[inline]
8499    unsafe fn from_glib(value: ffi::GtkPackType) -> Self {
8500        skip_assert_initialized!();
8501
8502        match value {
8503            ffi::GTK_PACK_START => Self::Start,
8504            ffi::GTK_PACK_END => Self::End,
8505            value => Self::__Unknown(value),
8506        }
8507    }
8508}
8509
8510impl StaticType for PackType {
8511    #[inline]
8512    #[doc(alias = "gtk_pack_type_get_type")]
8513    fn static_type() -> glib::Type {
8514        unsafe { from_glib(ffi::gtk_pack_type_get_type()) }
8515    }
8516}
8517
8518impl glib::HasParamSpec for PackType {
8519    type ParamSpec = glib::ParamSpecEnum;
8520    type SetValue = Self;
8521    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
8522
8523    fn param_spec_builder() -> Self::BuilderFn {
8524        Self::ParamSpec::builder_with_default
8525    }
8526}
8527
8528impl glib::value::ValueType for PackType {
8529    type Type = Self;
8530}
8531
8532unsafe impl<'a> glib::value::FromValue<'a> for PackType {
8533    type Checker = glib::value::GenericValueTypeChecker<Self>;
8534
8535    #[inline]
8536    unsafe fn from_value(value: &'a glib::Value) -> Self {
8537        skip_assert_initialized!();
8538        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
8539    }
8540}
8541
8542impl ToValue for PackType {
8543    #[inline]
8544    fn to_value(&self) -> glib::Value {
8545        let mut value = glib::Value::for_value_type::<Self>();
8546        unsafe {
8547            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
8548        }
8549        value
8550    }
8551
8552    #[inline]
8553    fn value_type(&self) -> glib::Type {
8554        Self::static_type()
8555    }
8556}
8557
8558impl From<PackType> for glib::Value {
8559    #[inline]
8560    fn from(v: PackType) -> Self {
8561        skip_assert_initialized!();
8562        ToValue::to_value(&v)
8563    }
8564}
8565
8566/// The type of a pad action.
8567#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
8568#[non_exhaustive]
8569#[doc(alias = "GtkPadActionType")]
8570pub enum PadActionType {
8571    /// Action is triggered by a pad button
8572    #[doc(alias = "GTK_PAD_ACTION_BUTTON")]
8573    Button,
8574    /// Action is triggered by a pad ring
8575    #[doc(alias = "GTK_PAD_ACTION_RING")]
8576    Ring,
8577    /// Action is triggered by a pad strip
8578    #[doc(alias = "GTK_PAD_ACTION_STRIP")]
8579    Strip,
8580    /// Action is triggered by a pad dial
8581    #[doc(alias = "GTK_PAD_ACTION_DIAL")]
8582    Dial,
8583    #[doc(hidden)]
8584    __Unknown(i32),
8585}
8586
8587#[doc(hidden)]
8588impl IntoGlib for PadActionType {
8589    type GlibType = ffi::GtkPadActionType;
8590
8591    #[inline]
8592    fn into_glib(self) -> ffi::GtkPadActionType {
8593        match self {
8594            Self::Button => ffi::GTK_PAD_ACTION_BUTTON,
8595            Self::Ring => ffi::GTK_PAD_ACTION_RING,
8596            Self::Strip => ffi::GTK_PAD_ACTION_STRIP,
8597            Self::Dial => ffi::GTK_PAD_ACTION_DIAL,
8598            Self::__Unknown(value) => value,
8599        }
8600    }
8601}
8602
8603#[doc(hidden)]
8604impl FromGlib<ffi::GtkPadActionType> for PadActionType {
8605    #[inline]
8606    unsafe fn from_glib(value: ffi::GtkPadActionType) -> Self {
8607        skip_assert_initialized!();
8608
8609        match value {
8610            ffi::GTK_PAD_ACTION_BUTTON => Self::Button,
8611            ffi::GTK_PAD_ACTION_RING => Self::Ring,
8612            ffi::GTK_PAD_ACTION_STRIP => Self::Strip,
8613            ffi::GTK_PAD_ACTION_DIAL => Self::Dial,
8614            value => Self::__Unknown(value),
8615        }
8616    }
8617}
8618
8619impl StaticType for PadActionType {
8620    #[inline]
8621    #[doc(alias = "gtk_pad_action_type_get_type")]
8622    fn static_type() -> glib::Type {
8623        unsafe { from_glib(ffi::gtk_pad_action_type_get_type()) }
8624    }
8625}
8626
8627impl glib::HasParamSpec for PadActionType {
8628    type ParamSpec = glib::ParamSpecEnum;
8629    type SetValue = Self;
8630    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
8631
8632    fn param_spec_builder() -> Self::BuilderFn {
8633        Self::ParamSpec::builder_with_default
8634    }
8635}
8636
8637impl glib::value::ValueType for PadActionType {
8638    type Type = Self;
8639}
8640
8641unsafe impl<'a> glib::value::FromValue<'a> for PadActionType {
8642    type Checker = glib::value::GenericValueTypeChecker<Self>;
8643
8644    #[inline]
8645    unsafe fn from_value(value: &'a glib::Value) -> Self {
8646        skip_assert_initialized!();
8647        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
8648    }
8649}
8650
8651impl ToValue for PadActionType {
8652    #[inline]
8653    fn to_value(&self) -> glib::Value {
8654        let mut value = glib::Value::for_value_type::<Self>();
8655        unsafe {
8656            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
8657        }
8658        value
8659    }
8660
8661    #[inline]
8662    fn value_type(&self) -> glib::Type {
8663        Self::static_type()
8664    }
8665}
8666
8667impl From<PadActionType> for glib::Value {
8668    #[inline]
8669    fn from(v: PadActionType) -> Self {
8670        skip_assert_initialized!();
8671        ToValue::to_value(&v)
8672    }
8673}
8674
8675/// See also gtk_print_settings_set_orientation().
8676#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
8677#[non_exhaustive]
8678#[doc(alias = "GtkPageOrientation")]
8679pub enum PageOrientation {
8680    /// Portrait mode.
8681    #[doc(alias = "GTK_PAGE_ORIENTATION_PORTRAIT")]
8682    Portrait,
8683    /// Landscape mode.
8684    #[doc(alias = "GTK_PAGE_ORIENTATION_LANDSCAPE")]
8685    Landscape,
8686    /// Reverse portrait mode.
8687    #[doc(alias = "GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT")]
8688    ReversePortrait,
8689    /// Reverse landscape mode.
8690    #[doc(alias = "GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE")]
8691    ReverseLandscape,
8692    #[doc(hidden)]
8693    __Unknown(i32),
8694}
8695
8696#[doc(hidden)]
8697impl IntoGlib for PageOrientation {
8698    type GlibType = ffi::GtkPageOrientation;
8699
8700    #[inline]
8701    fn into_glib(self) -> ffi::GtkPageOrientation {
8702        match self {
8703            Self::Portrait => ffi::GTK_PAGE_ORIENTATION_PORTRAIT,
8704            Self::Landscape => ffi::GTK_PAGE_ORIENTATION_LANDSCAPE,
8705            Self::ReversePortrait => ffi::GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT,
8706            Self::ReverseLandscape => ffi::GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE,
8707            Self::__Unknown(value) => value,
8708        }
8709    }
8710}
8711
8712#[doc(hidden)]
8713impl FromGlib<ffi::GtkPageOrientation> for PageOrientation {
8714    #[inline]
8715    unsafe fn from_glib(value: ffi::GtkPageOrientation) -> Self {
8716        skip_assert_initialized!();
8717
8718        match value {
8719            ffi::GTK_PAGE_ORIENTATION_PORTRAIT => Self::Portrait,
8720            ffi::GTK_PAGE_ORIENTATION_LANDSCAPE => Self::Landscape,
8721            ffi::GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT => Self::ReversePortrait,
8722            ffi::GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE => Self::ReverseLandscape,
8723            value => Self::__Unknown(value),
8724        }
8725    }
8726}
8727
8728impl StaticType for PageOrientation {
8729    #[inline]
8730    #[doc(alias = "gtk_page_orientation_get_type")]
8731    fn static_type() -> glib::Type {
8732        unsafe { from_glib(ffi::gtk_page_orientation_get_type()) }
8733    }
8734}
8735
8736impl glib::HasParamSpec for PageOrientation {
8737    type ParamSpec = glib::ParamSpecEnum;
8738    type SetValue = Self;
8739    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
8740
8741    fn param_spec_builder() -> Self::BuilderFn {
8742        Self::ParamSpec::builder_with_default
8743    }
8744}
8745
8746impl glib::value::ValueType for PageOrientation {
8747    type Type = Self;
8748}
8749
8750unsafe impl<'a> glib::value::FromValue<'a> for PageOrientation {
8751    type Checker = glib::value::GenericValueTypeChecker<Self>;
8752
8753    #[inline]
8754    unsafe fn from_value(value: &'a glib::Value) -> Self {
8755        skip_assert_initialized!();
8756        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
8757    }
8758}
8759
8760impl ToValue for PageOrientation {
8761    #[inline]
8762    fn to_value(&self) -> glib::Value {
8763        let mut value = glib::Value::for_value_type::<Self>();
8764        unsafe {
8765            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
8766        }
8767        value
8768    }
8769
8770    #[inline]
8771    fn value_type(&self) -> glib::Type {
8772        Self::static_type()
8773    }
8774}
8775
8776impl From<PageOrientation> for glib::Value {
8777    #[inline]
8778    fn from(v: PageOrientation) -> Self {
8779        skip_assert_initialized!();
8780        ToValue::to_value(&v)
8781    }
8782}
8783
8784/// See also gtk_print_job_set_page_set().
8785#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
8786#[non_exhaustive]
8787#[doc(alias = "GtkPageSet")]
8788pub enum PageSet {
8789    /// All pages.
8790    #[doc(alias = "GTK_PAGE_SET_ALL")]
8791    All,
8792    /// Even pages.
8793    #[doc(alias = "GTK_PAGE_SET_EVEN")]
8794    Even,
8795    /// Odd pages.
8796    #[doc(alias = "GTK_PAGE_SET_ODD")]
8797    Odd,
8798    #[doc(hidden)]
8799    __Unknown(i32),
8800}
8801
8802#[doc(hidden)]
8803impl IntoGlib for PageSet {
8804    type GlibType = ffi::GtkPageSet;
8805
8806    #[inline]
8807    fn into_glib(self) -> ffi::GtkPageSet {
8808        match self {
8809            Self::All => ffi::GTK_PAGE_SET_ALL,
8810            Self::Even => ffi::GTK_PAGE_SET_EVEN,
8811            Self::Odd => ffi::GTK_PAGE_SET_ODD,
8812            Self::__Unknown(value) => value,
8813        }
8814    }
8815}
8816
8817#[doc(hidden)]
8818impl FromGlib<ffi::GtkPageSet> for PageSet {
8819    #[inline]
8820    unsafe fn from_glib(value: ffi::GtkPageSet) -> Self {
8821        skip_assert_initialized!();
8822
8823        match value {
8824            ffi::GTK_PAGE_SET_ALL => Self::All,
8825            ffi::GTK_PAGE_SET_EVEN => Self::Even,
8826            ffi::GTK_PAGE_SET_ODD => Self::Odd,
8827            value => Self::__Unknown(value),
8828        }
8829    }
8830}
8831
8832impl StaticType for PageSet {
8833    #[inline]
8834    #[doc(alias = "gtk_page_set_get_type")]
8835    fn static_type() -> glib::Type {
8836        unsafe { from_glib(ffi::gtk_page_set_get_type()) }
8837    }
8838}
8839
8840impl glib::HasParamSpec for PageSet {
8841    type ParamSpec = glib::ParamSpecEnum;
8842    type SetValue = Self;
8843    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
8844
8845    fn param_spec_builder() -> Self::BuilderFn {
8846        Self::ParamSpec::builder_with_default
8847    }
8848}
8849
8850impl glib::value::ValueType for PageSet {
8851    type Type = Self;
8852}
8853
8854unsafe impl<'a> glib::value::FromValue<'a> for PageSet {
8855    type Checker = glib::value::GenericValueTypeChecker<Self>;
8856
8857    #[inline]
8858    unsafe fn from_value(value: &'a glib::Value) -> Self {
8859        skip_assert_initialized!();
8860        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
8861    }
8862}
8863
8864impl ToValue for PageSet {
8865    #[inline]
8866    fn to_value(&self) -> glib::Value {
8867        let mut value = glib::Value::for_value_type::<Self>();
8868        unsafe {
8869            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
8870        }
8871        value
8872    }
8873
8874    #[inline]
8875    fn value_type(&self) -> glib::Type {
8876        Self::static_type()
8877    }
8878}
8879
8880impl From<PageSet> for glib::Value {
8881    #[inline]
8882    fn from(v: PageSet) -> Self {
8883        skip_assert_initialized!();
8884        ToValue::to_value(&v)
8885    }
8886}
8887
8888/// Describes the panning direction of a [`GesturePan`][crate::GesturePan].
8889#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
8890#[non_exhaustive]
8891#[doc(alias = "GtkPanDirection")]
8892pub enum PanDirection {
8893    /// panned towards the left
8894    #[doc(alias = "GTK_PAN_DIRECTION_LEFT")]
8895    Left,
8896    /// panned towards the right
8897    #[doc(alias = "GTK_PAN_DIRECTION_RIGHT")]
8898    Right,
8899    /// panned upwards
8900    #[doc(alias = "GTK_PAN_DIRECTION_UP")]
8901    Up,
8902    /// panned downwards
8903    #[doc(alias = "GTK_PAN_DIRECTION_DOWN")]
8904    Down,
8905    #[doc(hidden)]
8906    __Unknown(i32),
8907}
8908
8909#[doc(hidden)]
8910impl IntoGlib for PanDirection {
8911    type GlibType = ffi::GtkPanDirection;
8912
8913    #[inline]
8914    fn into_glib(self) -> ffi::GtkPanDirection {
8915        match self {
8916            Self::Left => ffi::GTK_PAN_DIRECTION_LEFT,
8917            Self::Right => ffi::GTK_PAN_DIRECTION_RIGHT,
8918            Self::Up => ffi::GTK_PAN_DIRECTION_UP,
8919            Self::Down => ffi::GTK_PAN_DIRECTION_DOWN,
8920            Self::__Unknown(value) => value,
8921        }
8922    }
8923}
8924
8925#[doc(hidden)]
8926impl FromGlib<ffi::GtkPanDirection> for PanDirection {
8927    #[inline]
8928    unsafe fn from_glib(value: ffi::GtkPanDirection) -> Self {
8929        skip_assert_initialized!();
8930
8931        match value {
8932            ffi::GTK_PAN_DIRECTION_LEFT => Self::Left,
8933            ffi::GTK_PAN_DIRECTION_RIGHT => Self::Right,
8934            ffi::GTK_PAN_DIRECTION_UP => Self::Up,
8935            ffi::GTK_PAN_DIRECTION_DOWN => Self::Down,
8936            value => Self::__Unknown(value),
8937        }
8938    }
8939}
8940
8941impl StaticType for PanDirection {
8942    #[inline]
8943    #[doc(alias = "gtk_pan_direction_get_type")]
8944    fn static_type() -> glib::Type {
8945        unsafe { from_glib(ffi::gtk_pan_direction_get_type()) }
8946    }
8947}
8948
8949impl glib::HasParamSpec for PanDirection {
8950    type ParamSpec = glib::ParamSpecEnum;
8951    type SetValue = Self;
8952    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
8953
8954    fn param_spec_builder() -> Self::BuilderFn {
8955        Self::ParamSpec::builder_with_default
8956    }
8957}
8958
8959impl glib::value::ValueType for PanDirection {
8960    type Type = Self;
8961}
8962
8963unsafe impl<'a> glib::value::FromValue<'a> for PanDirection {
8964    type Checker = glib::value::GenericValueTypeChecker<Self>;
8965
8966    #[inline]
8967    unsafe fn from_value(value: &'a glib::Value) -> Self {
8968        skip_assert_initialized!();
8969        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
8970    }
8971}
8972
8973impl ToValue for PanDirection {
8974    #[inline]
8975    fn to_value(&self) -> glib::Value {
8976        let mut value = glib::Value::for_value_type::<Self>();
8977        unsafe {
8978            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
8979        }
8980        value
8981    }
8982
8983    #[inline]
8984    fn value_type(&self) -> glib::Type {
8985        Self::static_type()
8986    }
8987}
8988
8989impl From<PanDirection> for glib::Value {
8990    #[inline]
8991    fn from(v: PanDirection) -> Self {
8992        skip_assert_initialized!();
8993        ToValue::to_value(&v)
8994    }
8995}
8996
8997/// Determines how the size should be computed to achieve the one of the
8998/// visibility mode for the scrollbars.
8999#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
9000#[non_exhaustive]
9001#[doc(alias = "GtkPolicyType")]
9002pub enum PolicyType {
9003    /// The scrollbar is always visible. The view size is
9004    ///   independent of the content.
9005    #[doc(alias = "GTK_POLICY_ALWAYS")]
9006    Always,
9007    /// The scrollbar will appear and disappear as necessary.
9008    ///   For example, when all of a [`TreeView`][crate::TreeView] can not be seen.
9009    #[doc(alias = "GTK_POLICY_AUTOMATIC")]
9010    Automatic,
9011    /// The scrollbar should never appear. In this mode the
9012    ///   content determines the size.
9013    #[doc(alias = "GTK_POLICY_NEVER")]
9014    Never,
9015    /// Don't show a scrollbar, but don't force the
9016    ///   size to follow the content. This can be used e.g. to make multiple
9017    ///   scrolled windows share a scrollbar.
9018    #[doc(alias = "GTK_POLICY_EXTERNAL")]
9019    External,
9020    #[doc(hidden)]
9021    __Unknown(i32),
9022}
9023
9024#[doc(hidden)]
9025impl IntoGlib for PolicyType {
9026    type GlibType = ffi::GtkPolicyType;
9027
9028    #[inline]
9029    fn into_glib(self) -> ffi::GtkPolicyType {
9030        match self {
9031            Self::Always => ffi::GTK_POLICY_ALWAYS,
9032            Self::Automatic => ffi::GTK_POLICY_AUTOMATIC,
9033            Self::Never => ffi::GTK_POLICY_NEVER,
9034            Self::External => ffi::GTK_POLICY_EXTERNAL,
9035            Self::__Unknown(value) => value,
9036        }
9037    }
9038}
9039
9040#[doc(hidden)]
9041impl FromGlib<ffi::GtkPolicyType> for PolicyType {
9042    #[inline]
9043    unsafe fn from_glib(value: ffi::GtkPolicyType) -> Self {
9044        skip_assert_initialized!();
9045
9046        match value {
9047            ffi::GTK_POLICY_ALWAYS => Self::Always,
9048            ffi::GTK_POLICY_AUTOMATIC => Self::Automatic,
9049            ffi::GTK_POLICY_NEVER => Self::Never,
9050            ffi::GTK_POLICY_EXTERNAL => Self::External,
9051            value => Self::__Unknown(value),
9052        }
9053    }
9054}
9055
9056impl StaticType for PolicyType {
9057    #[inline]
9058    #[doc(alias = "gtk_policy_type_get_type")]
9059    fn static_type() -> glib::Type {
9060        unsafe { from_glib(ffi::gtk_policy_type_get_type()) }
9061    }
9062}
9063
9064impl glib::HasParamSpec for PolicyType {
9065    type ParamSpec = glib::ParamSpecEnum;
9066    type SetValue = Self;
9067    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
9068
9069    fn param_spec_builder() -> Self::BuilderFn {
9070        Self::ParamSpec::builder_with_default
9071    }
9072}
9073
9074impl glib::value::ValueType for PolicyType {
9075    type Type = Self;
9076}
9077
9078unsafe impl<'a> glib::value::FromValue<'a> for PolicyType {
9079    type Checker = glib::value::GenericValueTypeChecker<Self>;
9080
9081    #[inline]
9082    unsafe fn from_value(value: &'a glib::Value) -> Self {
9083        skip_assert_initialized!();
9084        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
9085    }
9086}
9087
9088impl ToValue for PolicyType {
9089    #[inline]
9090    fn to_value(&self) -> glib::Value {
9091        let mut value = glib::Value::for_value_type::<Self>();
9092        unsafe {
9093            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
9094        }
9095        value
9096    }
9097
9098    #[inline]
9099    fn value_type(&self) -> glib::Type {
9100        Self::static_type()
9101    }
9102}
9103
9104impl From<PolicyType> for glib::Value {
9105    #[inline]
9106    fn from(v: PolicyType) -> Self {
9107        skip_assert_initialized!();
9108        ToValue::to_value(&v)
9109    }
9110}
9111
9112/// Describes which edge of a widget a certain feature is positioned at.
9113///
9114/// For examples, see the tabs of a [`Notebook`][crate::Notebook], or the label
9115/// of a [`Scale`][crate::Scale].
9116#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
9117#[non_exhaustive]
9118#[doc(alias = "GtkPositionType")]
9119pub enum PositionType {
9120    /// The feature is at the left edge.
9121    #[doc(alias = "GTK_POS_LEFT")]
9122    Left,
9123    /// The feature is at the right edge.
9124    #[doc(alias = "GTK_POS_RIGHT")]
9125    Right,
9126    /// The feature is at the top edge.
9127    #[doc(alias = "GTK_POS_TOP")]
9128    Top,
9129    /// The feature is at the bottom edge.
9130    #[doc(alias = "GTK_POS_BOTTOM")]
9131    Bottom,
9132    #[doc(hidden)]
9133    __Unknown(i32),
9134}
9135
9136#[doc(hidden)]
9137impl IntoGlib for PositionType {
9138    type GlibType = ffi::GtkPositionType;
9139
9140    #[inline]
9141    fn into_glib(self) -> ffi::GtkPositionType {
9142        match self {
9143            Self::Left => ffi::GTK_POS_LEFT,
9144            Self::Right => ffi::GTK_POS_RIGHT,
9145            Self::Top => ffi::GTK_POS_TOP,
9146            Self::Bottom => ffi::GTK_POS_BOTTOM,
9147            Self::__Unknown(value) => value,
9148        }
9149    }
9150}
9151
9152#[doc(hidden)]
9153impl FromGlib<ffi::GtkPositionType> for PositionType {
9154    #[inline]
9155    unsafe fn from_glib(value: ffi::GtkPositionType) -> Self {
9156        skip_assert_initialized!();
9157
9158        match value {
9159            ffi::GTK_POS_LEFT => Self::Left,
9160            ffi::GTK_POS_RIGHT => Self::Right,
9161            ffi::GTK_POS_TOP => Self::Top,
9162            ffi::GTK_POS_BOTTOM => Self::Bottom,
9163            value => Self::__Unknown(value),
9164        }
9165    }
9166}
9167
9168impl StaticType for PositionType {
9169    #[inline]
9170    #[doc(alias = "gtk_position_type_get_type")]
9171    fn static_type() -> glib::Type {
9172        unsafe { from_glib(ffi::gtk_position_type_get_type()) }
9173    }
9174}
9175
9176impl glib::HasParamSpec for PositionType {
9177    type ParamSpec = glib::ParamSpecEnum;
9178    type SetValue = Self;
9179    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
9180
9181    fn param_spec_builder() -> Self::BuilderFn {
9182        Self::ParamSpec::builder_with_default
9183    }
9184}
9185
9186impl glib::value::ValueType for PositionType {
9187    type Type = Self;
9188}
9189
9190unsafe impl<'a> glib::value::FromValue<'a> for PositionType {
9191    type Checker = glib::value::GenericValueTypeChecker<Self>;
9192
9193    #[inline]
9194    unsafe fn from_value(value: &'a glib::Value) -> Self {
9195        skip_assert_initialized!();
9196        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
9197    }
9198}
9199
9200impl ToValue for PositionType {
9201    #[inline]
9202    fn to_value(&self) -> glib::Value {
9203        let mut value = glib::Value::for_value_type::<Self>();
9204        unsafe {
9205            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
9206        }
9207        value
9208    }
9209
9210    #[inline]
9211    fn value_type(&self) -> glib::Type {
9212        Self::static_type()
9213    }
9214}
9215
9216impl From<PositionType> for glib::Value {
9217    #[inline]
9218    fn from(v: PositionType) -> Self {
9219        skip_assert_initialized!();
9220        ToValue::to_value(&v)
9221    }
9222}
9223
9224/// See also gtk_print_settings_set_duplex().
9225#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
9226#[non_exhaustive]
9227#[doc(alias = "GtkPrintDuplex")]
9228pub enum PrintDuplex {
9229    /// No duplex.
9230    #[doc(alias = "GTK_PRINT_DUPLEX_SIMPLEX")]
9231    Simplex,
9232    /// Horizontal duplex.
9233    #[doc(alias = "GTK_PRINT_DUPLEX_HORIZONTAL")]
9234    Horizontal,
9235    /// Vertical duplex.
9236    #[doc(alias = "GTK_PRINT_DUPLEX_VERTICAL")]
9237    Vertical,
9238    #[doc(hidden)]
9239    __Unknown(i32),
9240}
9241
9242#[doc(hidden)]
9243impl IntoGlib for PrintDuplex {
9244    type GlibType = ffi::GtkPrintDuplex;
9245
9246    #[inline]
9247    fn into_glib(self) -> ffi::GtkPrintDuplex {
9248        match self {
9249            Self::Simplex => ffi::GTK_PRINT_DUPLEX_SIMPLEX,
9250            Self::Horizontal => ffi::GTK_PRINT_DUPLEX_HORIZONTAL,
9251            Self::Vertical => ffi::GTK_PRINT_DUPLEX_VERTICAL,
9252            Self::__Unknown(value) => value,
9253        }
9254    }
9255}
9256
9257#[doc(hidden)]
9258impl FromGlib<ffi::GtkPrintDuplex> for PrintDuplex {
9259    #[inline]
9260    unsafe fn from_glib(value: ffi::GtkPrintDuplex) -> Self {
9261        skip_assert_initialized!();
9262
9263        match value {
9264            ffi::GTK_PRINT_DUPLEX_SIMPLEX => Self::Simplex,
9265            ffi::GTK_PRINT_DUPLEX_HORIZONTAL => Self::Horizontal,
9266            ffi::GTK_PRINT_DUPLEX_VERTICAL => Self::Vertical,
9267            value => Self::__Unknown(value),
9268        }
9269    }
9270}
9271
9272impl StaticType for PrintDuplex {
9273    #[inline]
9274    #[doc(alias = "gtk_print_duplex_get_type")]
9275    fn static_type() -> glib::Type {
9276        unsafe { from_glib(ffi::gtk_print_duplex_get_type()) }
9277    }
9278}
9279
9280impl glib::HasParamSpec for PrintDuplex {
9281    type ParamSpec = glib::ParamSpecEnum;
9282    type SetValue = Self;
9283    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
9284
9285    fn param_spec_builder() -> Self::BuilderFn {
9286        Self::ParamSpec::builder_with_default
9287    }
9288}
9289
9290impl glib::value::ValueType for PrintDuplex {
9291    type Type = Self;
9292}
9293
9294unsafe impl<'a> glib::value::FromValue<'a> for PrintDuplex {
9295    type Checker = glib::value::GenericValueTypeChecker<Self>;
9296
9297    #[inline]
9298    unsafe fn from_value(value: &'a glib::Value) -> Self {
9299        skip_assert_initialized!();
9300        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
9301    }
9302}
9303
9304impl ToValue for PrintDuplex {
9305    #[inline]
9306    fn to_value(&self) -> glib::Value {
9307        let mut value = glib::Value::for_value_type::<Self>();
9308        unsafe {
9309            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
9310        }
9311        value
9312    }
9313
9314    #[inline]
9315    fn value_type(&self) -> glib::Type {
9316        Self::static_type()
9317    }
9318}
9319
9320impl From<PrintDuplex> for glib::Value {
9321    #[inline]
9322    fn from(v: PrintDuplex) -> Self {
9323        skip_assert_initialized!();
9324        ToValue::to_value(&v)
9325    }
9326}
9327
9328/// Error codes that identify various errors that can occur while
9329/// using the GTK printing support.
9330#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
9331#[non_exhaustive]
9332#[doc(alias = "GtkPrintError")]
9333pub enum PrintError {
9334    /// An unspecified error occurred.
9335    #[doc(alias = "GTK_PRINT_ERROR_GENERAL")]
9336    General,
9337    /// An internal error occurred.
9338    #[doc(alias = "GTK_PRINT_ERROR_INTERNAL_ERROR")]
9339    InternalError,
9340    /// A memory allocation failed.
9341    #[doc(alias = "GTK_PRINT_ERROR_NOMEM")]
9342    Nomem,
9343    /// An error occurred while loading a page setup
9344    ///   or paper size from a key file.
9345    #[doc(alias = "GTK_PRINT_ERROR_INVALID_FILE")]
9346    InvalidFile,
9347    #[doc(hidden)]
9348    __Unknown(i32),
9349}
9350
9351#[doc(hidden)]
9352impl IntoGlib for PrintError {
9353    type GlibType = ffi::GtkPrintError;
9354
9355    #[inline]
9356    fn into_glib(self) -> ffi::GtkPrintError {
9357        match self {
9358            Self::General => ffi::GTK_PRINT_ERROR_GENERAL,
9359            Self::InternalError => ffi::GTK_PRINT_ERROR_INTERNAL_ERROR,
9360            Self::Nomem => ffi::GTK_PRINT_ERROR_NOMEM,
9361            Self::InvalidFile => ffi::GTK_PRINT_ERROR_INVALID_FILE,
9362            Self::__Unknown(value) => value,
9363        }
9364    }
9365}
9366
9367#[doc(hidden)]
9368impl FromGlib<ffi::GtkPrintError> for PrintError {
9369    #[inline]
9370    unsafe fn from_glib(value: ffi::GtkPrintError) -> Self {
9371        skip_assert_initialized!();
9372
9373        match value {
9374            ffi::GTK_PRINT_ERROR_GENERAL => Self::General,
9375            ffi::GTK_PRINT_ERROR_INTERNAL_ERROR => Self::InternalError,
9376            ffi::GTK_PRINT_ERROR_NOMEM => Self::Nomem,
9377            ffi::GTK_PRINT_ERROR_INVALID_FILE => Self::InvalidFile,
9378            value => Self::__Unknown(value),
9379        }
9380    }
9381}
9382
9383impl glib::error::ErrorDomain for PrintError {
9384    #[inline]
9385    fn domain() -> glib::Quark {
9386        skip_assert_initialized!();
9387
9388        unsafe { from_glib(ffi::gtk_print_error_quark()) }
9389    }
9390
9391    #[inline]
9392    fn code(self) -> i32 {
9393        self.into_glib()
9394    }
9395
9396    #[inline]
9397    #[allow(clippy::match_single_binding)]
9398    fn from(code: i32) -> Option<Self> {
9399        skip_assert_initialized!();
9400        match unsafe { from_glib(code) } {
9401            value => Some(value),
9402        }
9403    }
9404}
9405
9406impl StaticType for PrintError {
9407    #[inline]
9408    #[doc(alias = "gtk_print_error_get_type")]
9409    fn static_type() -> glib::Type {
9410        unsafe { from_glib(ffi::gtk_print_error_get_type()) }
9411    }
9412}
9413
9414impl glib::HasParamSpec for PrintError {
9415    type ParamSpec = glib::ParamSpecEnum;
9416    type SetValue = Self;
9417    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
9418
9419    fn param_spec_builder() -> Self::BuilderFn {
9420        Self::ParamSpec::builder_with_default
9421    }
9422}
9423
9424impl glib::value::ValueType for PrintError {
9425    type Type = Self;
9426}
9427
9428unsafe impl<'a> glib::value::FromValue<'a> for PrintError {
9429    type Checker = glib::value::GenericValueTypeChecker<Self>;
9430
9431    #[inline]
9432    unsafe fn from_value(value: &'a glib::Value) -> Self {
9433        skip_assert_initialized!();
9434        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
9435    }
9436}
9437
9438impl ToValue for PrintError {
9439    #[inline]
9440    fn to_value(&self) -> glib::Value {
9441        let mut value = glib::Value::for_value_type::<Self>();
9442        unsafe {
9443            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
9444        }
9445        value
9446    }
9447
9448    #[inline]
9449    fn value_type(&self) -> glib::Type {
9450        Self::static_type()
9451    }
9452}
9453
9454impl From<PrintError> for glib::Value {
9455    #[inline]
9456    fn from(v: PrintError) -> Self {
9457        skip_assert_initialized!();
9458        ToValue::to_value(&v)
9459    }
9460}
9461
9462/// Determines what action the print operation should perform.
9463///
9464/// A parameter of this typs is passed to [`PrintOperationExt::run()`][crate::prelude::PrintOperationExt::run()].
9465#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
9466#[non_exhaustive]
9467#[doc(alias = "GtkPrintOperationAction")]
9468pub enum PrintOperationAction {
9469    /// Show the print dialog.
9470    #[doc(alias = "GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG")]
9471    PrintDialog,
9472    /// Start to print without showing
9473    ///   the print dialog, based on the current print settings, if possible.
9474    ///   Depending on the platform, a print dialog might appear anyway.
9475    #[doc(alias = "GTK_PRINT_OPERATION_ACTION_PRINT")]
9476    Print,
9477    /// Show the print preview.
9478    #[doc(alias = "GTK_PRINT_OPERATION_ACTION_PREVIEW")]
9479    Preview,
9480    /// Export to a file. This requires
9481    ///   the export-filename property to be set.
9482    #[doc(alias = "GTK_PRINT_OPERATION_ACTION_EXPORT")]
9483    Export,
9484    #[doc(hidden)]
9485    __Unknown(i32),
9486}
9487
9488#[doc(hidden)]
9489impl IntoGlib for PrintOperationAction {
9490    type GlibType = ffi::GtkPrintOperationAction;
9491
9492    #[inline]
9493    fn into_glib(self) -> ffi::GtkPrintOperationAction {
9494        match self {
9495            Self::PrintDialog => ffi::GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
9496            Self::Print => ffi::GTK_PRINT_OPERATION_ACTION_PRINT,
9497            Self::Preview => ffi::GTK_PRINT_OPERATION_ACTION_PREVIEW,
9498            Self::Export => ffi::GTK_PRINT_OPERATION_ACTION_EXPORT,
9499            Self::__Unknown(value) => value,
9500        }
9501    }
9502}
9503
9504#[doc(hidden)]
9505impl FromGlib<ffi::GtkPrintOperationAction> for PrintOperationAction {
9506    #[inline]
9507    unsafe fn from_glib(value: ffi::GtkPrintOperationAction) -> Self {
9508        skip_assert_initialized!();
9509
9510        match value {
9511            ffi::GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG => Self::PrintDialog,
9512            ffi::GTK_PRINT_OPERATION_ACTION_PRINT => Self::Print,
9513            ffi::GTK_PRINT_OPERATION_ACTION_PREVIEW => Self::Preview,
9514            ffi::GTK_PRINT_OPERATION_ACTION_EXPORT => Self::Export,
9515            value => Self::__Unknown(value),
9516        }
9517    }
9518}
9519
9520impl StaticType for PrintOperationAction {
9521    #[inline]
9522    #[doc(alias = "gtk_print_operation_action_get_type")]
9523    fn static_type() -> glib::Type {
9524        unsafe { from_glib(ffi::gtk_print_operation_action_get_type()) }
9525    }
9526}
9527
9528impl glib::HasParamSpec for PrintOperationAction {
9529    type ParamSpec = glib::ParamSpecEnum;
9530    type SetValue = Self;
9531    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
9532
9533    fn param_spec_builder() -> Self::BuilderFn {
9534        Self::ParamSpec::builder_with_default
9535    }
9536}
9537
9538impl glib::value::ValueType for PrintOperationAction {
9539    type Type = Self;
9540}
9541
9542unsafe impl<'a> glib::value::FromValue<'a> for PrintOperationAction {
9543    type Checker = glib::value::GenericValueTypeChecker<Self>;
9544
9545    #[inline]
9546    unsafe fn from_value(value: &'a glib::Value) -> Self {
9547        skip_assert_initialized!();
9548        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
9549    }
9550}
9551
9552impl ToValue for PrintOperationAction {
9553    #[inline]
9554    fn to_value(&self) -> glib::Value {
9555        let mut value = glib::Value::for_value_type::<Self>();
9556        unsafe {
9557            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
9558        }
9559        value
9560    }
9561
9562    #[inline]
9563    fn value_type(&self) -> glib::Type {
9564        Self::static_type()
9565    }
9566}
9567
9568impl From<PrintOperationAction> for glib::Value {
9569    #[inline]
9570    fn from(v: PrintOperationAction) -> Self {
9571        skip_assert_initialized!();
9572        ToValue::to_value(&v)
9573    }
9574}
9575
9576/// The result of a print operation.
9577///
9578/// A value of this type is returned by [`PrintOperationExt::run()`][crate::prelude::PrintOperationExt::run()].
9579#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
9580#[non_exhaustive]
9581#[doc(alias = "GtkPrintOperationResult")]
9582pub enum PrintOperationResult {
9583    /// An error has occurred.
9584    #[doc(alias = "GTK_PRINT_OPERATION_RESULT_ERROR")]
9585    Error,
9586    /// The print settings should be stored.
9587    #[doc(alias = "GTK_PRINT_OPERATION_RESULT_APPLY")]
9588    Apply,
9589    /// The print operation has been canceled,
9590    ///   the print settings should not be stored.
9591    #[doc(alias = "GTK_PRINT_OPERATION_RESULT_CANCEL")]
9592    Cancel,
9593    /// The print operation is not complete
9594    ///   yet. This value will only be returned when running asynchronously.
9595    #[doc(alias = "GTK_PRINT_OPERATION_RESULT_IN_PROGRESS")]
9596    InProgress,
9597    #[doc(hidden)]
9598    __Unknown(i32),
9599}
9600
9601#[doc(hidden)]
9602impl IntoGlib for PrintOperationResult {
9603    type GlibType = ffi::GtkPrintOperationResult;
9604
9605    #[inline]
9606    fn into_glib(self) -> ffi::GtkPrintOperationResult {
9607        match self {
9608            Self::Error => ffi::GTK_PRINT_OPERATION_RESULT_ERROR,
9609            Self::Apply => ffi::GTK_PRINT_OPERATION_RESULT_APPLY,
9610            Self::Cancel => ffi::GTK_PRINT_OPERATION_RESULT_CANCEL,
9611            Self::InProgress => ffi::GTK_PRINT_OPERATION_RESULT_IN_PROGRESS,
9612            Self::__Unknown(value) => value,
9613        }
9614    }
9615}
9616
9617#[doc(hidden)]
9618impl FromGlib<ffi::GtkPrintOperationResult> for PrintOperationResult {
9619    #[inline]
9620    unsafe fn from_glib(value: ffi::GtkPrintOperationResult) -> Self {
9621        skip_assert_initialized!();
9622
9623        match value {
9624            ffi::GTK_PRINT_OPERATION_RESULT_ERROR => Self::Error,
9625            ffi::GTK_PRINT_OPERATION_RESULT_APPLY => Self::Apply,
9626            ffi::GTK_PRINT_OPERATION_RESULT_CANCEL => Self::Cancel,
9627            ffi::GTK_PRINT_OPERATION_RESULT_IN_PROGRESS => Self::InProgress,
9628            value => Self::__Unknown(value),
9629        }
9630    }
9631}
9632
9633impl StaticType for PrintOperationResult {
9634    #[inline]
9635    #[doc(alias = "gtk_print_operation_result_get_type")]
9636    fn static_type() -> glib::Type {
9637        unsafe { from_glib(ffi::gtk_print_operation_result_get_type()) }
9638    }
9639}
9640
9641impl glib::HasParamSpec for PrintOperationResult {
9642    type ParamSpec = glib::ParamSpecEnum;
9643    type SetValue = Self;
9644    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
9645
9646    fn param_spec_builder() -> Self::BuilderFn {
9647        Self::ParamSpec::builder_with_default
9648    }
9649}
9650
9651impl glib::value::ValueType for PrintOperationResult {
9652    type Type = Self;
9653}
9654
9655unsafe impl<'a> glib::value::FromValue<'a> for PrintOperationResult {
9656    type Checker = glib::value::GenericValueTypeChecker<Self>;
9657
9658    #[inline]
9659    unsafe fn from_value(value: &'a glib::Value) -> Self {
9660        skip_assert_initialized!();
9661        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
9662    }
9663}
9664
9665impl ToValue for PrintOperationResult {
9666    #[inline]
9667    fn to_value(&self) -> glib::Value {
9668        let mut value = glib::Value::for_value_type::<Self>();
9669        unsafe {
9670            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
9671        }
9672        value
9673    }
9674
9675    #[inline]
9676    fn value_type(&self) -> glib::Type {
9677        Self::static_type()
9678    }
9679}
9680
9681impl From<PrintOperationResult> for glib::Value {
9682    #[inline]
9683    fn from(v: PrintOperationResult) -> Self {
9684        skip_assert_initialized!();
9685        ToValue::to_value(&v)
9686    }
9687}
9688
9689/// See also gtk_print_job_set_pages()
9690#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
9691#[non_exhaustive]
9692#[doc(alias = "GtkPrintPages")]
9693pub enum PrintPages {
9694    /// All pages.
9695    #[doc(alias = "GTK_PRINT_PAGES_ALL")]
9696    All,
9697    /// Current page.
9698    #[doc(alias = "GTK_PRINT_PAGES_CURRENT")]
9699    Current,
9700    /// Range of pages.
9701    #[doc(alias = "GTK_PRINT_PAGES_RANGES")]
9702    Ranges,
9703    /// Selected pages.
9704    #[doc(alias = "GTK_PRINT_PAGES_SELECTION")]
9705    Selection,
9706    #[doc(hidden)]
9707    __Unknown(i32),
9708}
9709
9710#[doc(hidden)]
9711impl IntoGlib for PrintPages {
9712    type GlibType = ffi::GtkPrintPages;
9713
9714    #[inline]
9715    fn into_glib(self) -> ffi::GtkPrintPages {
9716        match self {
9717            Self::All => ffi::GTK_PRINT_PAGES_ALL,
9718            Self::Current => ffi::GTK_PRINT_PAGES_CURRENT,
9719            Self::Ranges => ffi::GTK_PRINT_PAGES_RANGES,
9720            Self::Selection => ffi::GTK_PRINT_PAGES_SELECTION,
9721            Self::__Unknown(value) => value,
9722        }
9723    }
9724}
9725
9726#[doc(hidden)]
9727impl FromGlib<ffi::GtkPrintPages> for PrintPages {
9728    #[inline]
9729    unsafe fn from_glib(value: ffi::GtkPrintPages) -> Self {
9730        skip_assert_initialized!();
9731
9732        match value {
9733            ffi::GTK_PRINT_PAGES_ALL => Self::All,
9734            ffi::GTK_PRINT_PAGES_CURRENT => Self::Current,
9735            ffi::GTK_PRINT_PAGES_RANGES => Self::Ranges,
9736            ffi::GTK_PRINT_PAGES_SELECTION => Self::Selection,
9737            value => Self::__Unknown(value),
9738        }
9739    }
9740}
9741
9742impl StaticType for PrintPages {
9743    #[inline]
9744    #[doc(alias = "gtk_print_pages_get_type")]
9745    fn static_type() -> glib::Type {
9746        unsafe { from_glib(ffi::gtk_print_pages_get_type()) }
9747    }
9748}
9749
9750impl glib::HasParamSpec for PrintPages {
9751    type ParamSpec = glib::ParamSpecEnum;
9752    type SetValue = Self;
9753    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
9754
9755    fn param_spec_builder() -> Self::BuilderFn {
9756        Self::ParamSpec::builder_with_default
9757    }
9758}
9759
9760impl glib::value::ValueType for PrintPages {
9761    type Type = Self;
9762}
9763
9764unsafe impl<'a> glib::value::FromValue<'a> for PrintPages {
9765    type Checker = glib::value::GenericValueTypeChecker<Self>;
9766
9767    #[inline]
9768    unsafe fn from_value(value: &'a glib::Value) -> Self {
9769        skip_assert_initialized!();
9770        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
9771    }
9772}
9773
9774impl ToValue for PrintPages {
9775    #[inline]
9776    fn to_value(&self) -> glib::Value {
9777        let mut value = glib::Value::for_value_type::<Self>();
9778        unsafe {
9779            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
9780        }
9781        value
9782    }
9783
9784    #[inline]
9785    fn value_type(&self) -> glib::Type {
9786        Self::static_type()
9787    }
9788}
9789
9790impl From<PrintPages> for glib::Value {
9791    #[inline]
9792    fn from(v: PrintPages) -> Self {
9793        skip_assert_initialized!();
9794        ToValue::to_value(&v)
9795    }
9796}
9797
9798/// See also gtk_print_settings_set_quality().
9799#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
9800#[non_exhaustive]
9801#[doc(alias = "GtkPrintQuality")]
9802pub enum PrintQuality {
9803    /// Low quality.
9804    #[doc(alias = "GTK_PRINT_QUALITY_LOW")]
9805    Low,
9806    /// Normal quality.
9807    #[doc(alias = "GTK_PRINT_QUALITY_NORMAL")]
9808    Normal,
9809    /// High quality.
9810    #[doc(alias = "GTK_PRINT_QUALITY_HIGH")]
9811    High,
9812    /// Draft quality.
9813    #[doc(alias = "GTK_PRINT_QUALITY_DRAFT")]
9814    Draft,
9815    #[doc(hidden)]
9816    __Unknown(i32),
9817}
9818
9819#[doc(hidden)]
9820impl IntoGlib for PrintQuality {
9821    type GlibType = ffi::GtkPrintQuality;
9822
9823    #[inline]
9824    fn into_glib(self) -> ffi::GtkPrintQuality {
9825        match self {
9826            Self::Low => ffi::GTK_PRINT_QUALITY_LOW,
9827            Self::Normal => ffi::GTK_PRINT_QUALITY_NORMAL,
9828            Self::High => ffi::GTK_PRINT_QUALITY_HIGH,
9829            Self::Draft => ffi::GTK_PRINT_QUALITY_DRAFT,
9830            Self::__Unknown(value) => value,
9831        }
9832    }
9833}
9834
9835#[doc(hidden)]
9836impl FromGlib<ffi::GtkPrintQuality> for PrintQuality {
9837    #[inline]
9838    unsafe fn from_glib(value: ffi::GtkPrintQuality) -> Self {
9839        skip_assert_initialized!();
9840
9841        match value {
9842            ffi::GTK_PRINT_QUALITY_LOW => Self::Low,
9843            ffi::GTK_PRINT_QUALITY_NORMAL => Self::Normal,
9844            ffi::GTK_PRINT_QUALITY_HIGH => Self::High,
9845            ffi::GTK_PRINT_QUALITY_DRAFT => Self::Draft,
9846            value => Self::__Unknown(value),
9847        }
9848    }
9849}
9850
9851impl StaticType for PrintQuality {
9852    #[inline]
9853    #[doc(alias = "gtk_print_quality_get_type")]
9854    fn static_type() -> glib::Type {
9855        unsafe { from_glib(ffi::gtk_print_quality_get_type()) }
9856    }
9857}
9858
9859impl glib::HasParamSpec for PrintQuality {
9860    type ParamSpec = glib::ParamSpecEnum;
9861    type SetValue = Self;
9862    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
9863
9864    fn param_spec_builder() -> Self::BuilderFn {
9865        Self::ParamSpec::builder_with_default
9866    }
9867}
9868
9869impl glib::value::ValueType for PrintQuality {
9870    type Type = Self;
9871}
9872
9873unsafe impl<'a> glib::value::FromValue<'a> for PrintQuality {
9874    type Checker = glib::value::GenericValueTypeChecker<Self>;
9875
9876    #[inline]
9877    unsafe fn from_value(value: &'a glib::Value) -> Self {
9878        skip_assert_initialized!();
9879        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
9880    }
9881}
9882
9883impl ToValue for PrintQuality {
9884    #[inline]
9885    fn to_value(&self) -> glib::Value {
9886        let mut value = glib::Value::for_value_type::<Self>();
9887        unsafe {
9888            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
9889        }
9890        value
9891    }
9892
9893    #[inline]
9894    fn value_type(&self) -> glib::Type {
9895        Self::static_type()
9896    }
9897}
9898
9899impl From<PrintQuality> for glib::Value {
9900    #[inline]
9901    fn from(v: PrintQuality) -> Self {
9902        skip_assert_initialized!();
9903        ToValue::to_value(&v)
9904    }
9905}
9906
9907/// The status gives a rough indication of the completion of a running
9908/// print operation.
9909#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
9910#[non_exhaustive]
9911#[doc(alias = "GtkPrintStatus")]
9912pub enum PrintStatus {
9913    /// The printing has not started yet; this
9914    ///   status is set initially, and while the print dialog is shown.
9915    #[doc(alias = "GTK_PRINT_STATUS_INITIAL")]
9916    Initial,
9917    /// This status is set while the begin-print
9918    ///   signal is emitted and during pagination.
9919    #[doc(alias = "GTK_PRINT_STATUS_PREPARING")]
9920    Preparing,
9921    /// This status is set while the
9922    ///   pages are being rendered.
9923    #[doc(alias = "GTK_PRINT_STATUS_GENERATING_DATA")]
9924    GeneratingData,
9925    /// The print job is being sent off to the
9926    ///   printer.
9927    #[doc(alias = "GTK_PRINT_STATUS_SENDING_DATA")]
9928    SendingData,
9929    /// The print job has been sent to the printer,
9930    ///   but is not printed for some reason, e.g. the printer may be stopped.
9931    #[doc(alias = "GTK_PRINT_STATUS_PENDING")]
9932    Pending,
9933    /// Some problem has occurred during
9934    ///   printing, e.g. a paper jam.
9935    #[doc(alias = "GTK_PRINT_STATUS_PENDING_ISSUE")]
9936    PendingIssue,
9937    /// The printer is processing the print job.
9938    #[doc(alias = "GTK_PRINT_STATUS_PRINTING")]
9939    Printing,
9940    /// The printing has been completed successfully.
9941    #[doc(alias = "GTK_PRINT_STATUS_FINISHED")]
9942    Finished,
9943    /// The printing has been aborted.
9944    #[doc(alias = "GTK_PRINT_STATUS_FINISHED_ABORTED")]
9945    FinishedAborted,
9946    #[doc(hidden)]
9947    __Unknown(i32),
9948}
9949
9950#[doc(hidden)]
9951impl IntoGlib for PrintStatus {
9952    type GlibType = ffi::GtkPrintStatus;
9953
9954    #[inline]
9955    fn into_glib(self) -> ffi::GtkPrintStatus {
9956        match self {
9957            Self::Initial => ffi::GTK_PRINT_STATUS_INITIAL,
9958            Self::Preparing => ffi::GTK_PRINT_STATUS_PREPARING,
9959            Self::GeneratingData => ffi::GTK_PRINT_STATUS_GENERATING_DATA,
9960            Self::SendingData => ffi::GTK_PRINT_STATUS_SENDING_DATA,
9961            Self::Pending => ffi::GTK_PRINT_STATUS_PENDING,
9962            Self::PendingIssue => ffi::GTK_PRINT_STATUS_PENDING_ISSUE,
9963            Self::Printing => ffi::GTK_PRINT_STATUS_PRINTING,
9964            Self::Finished => ffi::GTK_PRINT_STATUS_FINISHED,
9965            Self::FinishedAborted => ffi::GTK_PRINT_STATUS_FINISHED_ABORTED,
9966            Self::__Unknown(value) => value,
9967        }
9968    }
9969}
9970
9971#[doc(hidden)]
9972impl FromGlib<ffi::GtkPrintStatus> for PrintStatus {
9973    #[inline]
9974    unsafe fn from_glib(value: ffi::GtkPrintStatus) -> Self {
9975        skip_assert_initialized!();
9976
9977        match value {
9978            ffi::GTK_PRINT_STATUS_INITIAL => Self::Initial,
9979            ffi::GTK_PRINT_STATUS_PREPARING => Self::Preparing,
9980            ffi::GTK_PRINT_STATUS_GENERATING_DATA => Self::GeneratingData,
9981            ffi::GTK_PRINT_STATUS_SENDING_DATA => Self::SendingData,
9982            ffi::GTK_PRINT_STATUS_PENDING => Self::Pending,
9983            ffi::GTK_PRINT_STATUS_PENDING_ISSUE => Self::PendingIssue,
9984            ffi::GTK_PRINT_STATUS_PRINTING => Self::Printing,
9985            ffi::GTK_PRINT_STATUS_FINISHED => Self::Finished,
9986            ffi::GTK_PRINT_STATUS_FINISHED_ABORTED => Self::FinishedAborted,
9987            value => Self::__Unknown(value),
9988        }
9989    }
9990}
9991
9992impl StaticType for PrintStatus {
9993    #[inline]
9994    #[doc(alias = "gtk_print_status_get_type")]
9995    fn static_type() -> glib::Type {
9996        unsafe { from_glib(ffi::gtk_print_status_get_type()) }
9997    }
9998}
9999
10000impl glib::HasParamSpec for PrintStatus {
10001    type ParamSpec = glib::ParamSpecEnum;
10002    type SetValue = Self;
10003    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
10004
10005    fn param_spec_builder() -> Self::BuilderFn {
10006        Self::ParamSpec::builder_with_default
10007    }
10008}
10009
10010impl glib::value::ValueType for PrintStatus {
10011    type Type = Self;
10012}
10013
10014unsafe impl<'a> glib::value::FromValue<'a> for PrintStatus {
10015    type Checker = glib::value::GenericValueTypeChecker<Self>;
10016
10017    #[inline]
10018    unsafe fn from_value(value: &'a glib::Value) -> Self {
10019        skip_assert_initialized!();
10020        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
10021    }
10022}
10023
10024impl ToValue for PrintStatus {
10025    #[inline]
10026    fn to_value(&self) -> glib::Value {
10027        let mut value = glib::Value::for_value_type::<Self>();
10028        unsafe {
10029            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
10030        }
10031        value
10032    }
10033
10034    #[inline]
10035    fn value_type(&self) -> glib::Type {
10036        Self::static_type()
10037    }
10038}
10039
10040impl From<PrintStatus> for glib::Value {
10041    #[inline]
10042    fn from(v: PrintStatus) -> Self {
10043        skip_assert_initialized!();
10044        ToValue::to_value(&v)
10045    }
10046}
10047
10048/// Describes limits of a [`EventController`][crate::EventController] for handling events
10049/// targeting other widgets.
10050#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
10051#[non_exhaustive]
10052#[doc(alias = "GtkPropagationLimit")]
10053pub enum PropagationLimit {
10054    /// Events are handled regardless of what their
10055    ///   target is.
10056    #[doc(alias = "GTK_LIMIT_NONE")]
10057    None,
10058    /// Events are only handled if their target is in
10059    ///   the same [`Native`][crate::Native] (or widget with [`limit-events`][struct@crate::Widget#limit-events]
10060    ///   set) as the event controllers widget.
10061    ///   Note that some event types have two targets (origin and destination).
10062    #[doc(alias = "GTK_LIMIT_SAME_NATIVE")]
10063    SameNative,
10064    #[doc(hidden)]
10065    __Unknown(i32),
10066}
10067
10068#[doc(hidden)]
10069impl IntoGlib for PropagationLimit {
10070    type GlibType = ffi::GtkPropagationLimit;
10071
10072    #[inline]
10073    fn into_glib(self) -> ffi::GtkPropagationLimit {
10074        match self {
10075            Self::None => ffi::GTK_LIMIT_NONE,
10076            Self::SameNative => ffi::GTK_LIMIT_SAME_NATIVE,
10077            Self::__Unknown(value) => value,
10078        }
10079    }
10080}
10081
10082#[doc(hidden)]
10083impl FromGlib<ffi::GtkPropagationLimit> for PropagationLimit {
10084    #[inline]
10085    unsafe fn from_glib(value: ffi::GtkPropagationLimit) -> Self {
10086        skip_assert_initialized!();
10087
10088        match value {
10089            ffi::GTK_LIMIT_NONE => Self::None,
10090            ffi::GTK_LIMIT_SAME_NATIVE => Self::SameNative,
10091            value => Self::__Unknown(value),
10092        }
10093    }
10094}
10095
10096impl StaticType for PropagationLimit {
10097    #[inline]
10098    #[doc(alias = "gtk_propagation_limit_get_type")]
10099    fn static_type() -> glib::Type {
10100        unsafe { from_glib(ffi::gtk_propagation_limit_get_type()) }
10101    }
10102}
10103
10104impl glib::HasParamSpec for PropagationLimit {
10105    type ParamSpec = glib::ParamSpecEnum;
10106    type SetValue = Self;
10107    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
10108
10109    fn param_spec_builder() -> Self::BuilderFn {
10110        Self::ParamSpec::builder_with_default
10111    }
10112}
10113
10114impl glib::value::ValueType for PropagationLimit {
10115    type Type = Self;
10116}
10117
10118unsafe impl<'a> glib::value::FromValue<'a> for PropagationLimit {
10119    type Checker = glib::value::GenericValueTypeChecker<Self>;
10120
10121    #[inline]
10122    unsafe fn from_value(value: &'a glib::Value) -> Self {
10123        skip_assert_initialized!();
10124        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
10125    }
10126}
10127
10128impl ToValue for PropagationLimit {
10129    #[inline]
10130    fn to_value(&self) -> glib::Value {
10131        let mut value = glib::Value::for_value_type::<Self>();
10132        unsafe {
10133            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
10134        }
10135        value
10136    }
10137
10138    #[inline]
10139    fn value_type(&self) -> glib::Type {
10140        Self::static_type()
10141    }
10142}
10143
10144impl From<PropagationLimit> for glib::Value {
10145    #[inline]
10146    fn from(v: PropagationLimit) -> Self {
10147        skip_assert_initialized!();
10148        ToValue::to_value(&v)
10149    }
10150}
10151
10152/// Describes the stage at which events are fed into a [`EventController`][crate::EventController].
10153#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
10154#[non_exhaustive]
10155#[doc(alias = "GtkPropagationPhase")]
10156pub enum PropagationPhase {
10157    /// Events are not delivered.
10158    #[doc(alias = "GTK_PHASE_NONE")]
10159    None,
10160    /// Events are delivered in the capture phase. The
10161    ///   capture phase happens before the bubble phase, runs from the toplevel down
10162    ///   to the event widget. This option should only be used on containers that
10163    ///   might possibly handle events before their children do.
10164    #[doc(alias = "GTK_PHASE_CAPTURE")]
10165    Capture,
10166    /// Events are delivered in the bubble phase. The bubble
10167    ///   phase happens after the capture phase, and before the default handlers
10168    ///   are run. This phase runs from the event widget, up to the toplevel.
10169    #[doc(alias = "GTK_PHASE_BUBBLE")]
10170    Bubble,
10171    /// Events are delivered in the default widget event handlers,
10172    ///   note that widget implementations must chain up on button, motion, touch and
10173    ///   grab broken handlers for controllers in this phase to be run.
10174    #[doc(alias = "GTK_PHASE_TARGET")]
10175    Target,
10176    #[doc(hidden)]
10177    __Unknown(i32),
10178}
10179
10180#[doc(hidden)]
10181impl IntoGlib for PropagationPhase {
10182    type GlibType = ffi::GtkPropagationPhase;
10183
10184    #[inline]
10185    fn into_glib(self) -> ffi::GtkPropagationPhase {
10186        match self {
10187            Self::None => ffi::GTK_PHASE_NONE,
10188            Self::Capture => ffi::GTK_PHASE_CAPTURE,
10189            Self::Bubble => ffi::GTK_PHASE_BUBBLE,
10190            Self::Target => ffi::GTK_PHASE_TARGET,
10191            Self::__Unknown(value) => value,
10192        }
10193    }
10194}
10195
10196#[doc(hidden)]
10197impl FromGlib<ffi::GtkPropagationPhase> for PropagationPhase {
10198    #[inline]
10199    unsafe fn from_glib(value: ffi::GtkPropagationPhase) -> Self {
10200        skip_assert_initialized!();
10201
10202        match value {
10203            ffi::GTK_PHASE_NONE => Self::None,
10204            ffi::GTK_PHASE_CAPTURE => Self::Capture,
10205            ffi::GTK_PHASE_BUBBLE => Self::Bubble,
10206            ffi::GTK_PHASE_TARGET => Self::Target,
10207            value => Self::__Unknown(value),
10208        }
10209    }
10210}
10211
10212impl StaticType for PropagationPhase {
10213    #[inline]
10214    #[doc(alias = "gtk_propagation_phase_get_type")]
10215    fn static_type() -> glib::Type {
10216        unsafe { from_glib(ffi::gtk_propagation_phase_get_type()) }
10217    }
10218}
10219
10220impl glib::HasParamSpec for PropagationPhase {
10221    type ParamSpec = glib::ParamSpecEnum;
10222    type SetValue = Self;
10223    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
10224
10225    fn param_spec_builder() -> Self::BuilderFn {
10226        Self::ParamSpec::builder_with_default
10227    }
10228}
10229
10230impl glib::value::ValueType for PropagationPhase {
10231    type Type = Self;
10232}
10233
10234unsafe impl<'a> glib::value::FromValue<'a> for PropagationPhase {
10235    type Checker = glib::value::GenericValueTypeChecker<Self>;
10236
10237    #[inline]
10238    unsafe fn from_value(value: &'a glib::Value) -> Self {
10239        skip_assert_initialized!();
10240        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
10241    }
10242}
10243
10244impl ToValue for PropagationPhase {
10245    #[inline]
10246    fn to_value(&self) -> glib::Value {
10247        let mut value = glib::Value::for_value_type::<Self>();
10248        unsafe {
10249            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
10250        }
10251        value
10252    }
10253
10254    #[inline]
10255    fn value_type(&self) -> glib::Type {
10256        Self::static_type()
10257    }
10258}
10259
10260impl From<PropagationPhase> for glib::Value {
10261    #[inline]
10262    fn from(v: PropagationPhase) -> Self {
10263        skip_assert_initialized!();
10264        ToValue::to_value(&v)
10265    }
10266}
10267
10268/// Error codes for [`RecentManager`][crate::RecentManager] operations
10269#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
10270#[non_exhaustive]
10271#[doc(alias = "GtkRecentManagerError")]
10272pub enum RecentManagerError {
10273    /// the URI specified does not exists in
10274    ///   the recently used resources list.
10275    #[doc(alias = "GTK_RECENT_MANAGER_ERROR_NOT_FOUND")]
10276    NotFound,
10277    /// the URI specified is not valid.
10278    #[doc(alias = "GTK_RECENT_MANAGER_ERROR_INVALID_URI")]
10279    InvalidUri,
10280    /// the supplied string is not
10281    ///   UTF-8 encoded.
10282    #[doc(alias = "GTK_RECENT_MANAGER_ERROR_INVALID_ENCODING")]
10283    InvalidEncoding,
10284    /// no application has registered
10285    ///   the specified item.
10286    #[doc(alias = "GTK_RECENT_MANAGER_ERROR_NOT_REGISTERED")]
10287    NotRegistered,
10288    /// failure while reading the recently used
10289    ///   resources file.
10290    #[doc(alias = "GTK_RECENT_MANAGER_ERROR_READ")]
10291    Read,
10292    /// failure while writing the recently used
10293    ///   resources file.
10294    #[doc(alias = "GTK_RECENT_MANAGER_ERROR_WRITE")]
10295    Write,
10296    /// unspecified error.
10297    #[doc(alias = "GTK_RECENT_MANAGER_ERROR_UNKNOWN")]
10298    Unknown,
10299    #[doc(hidden)]
10300    __Unknown(i32),
10301}
10302
10303#[doc(hidden)]
10304impl IntoGlib for RecentManagerError {
10305    type GlibType = ffi::GtkRecentManagerError;
10306
10307    #[inline]
10308    fn into_glib(self) -> ffi::GtkRecentManagerError {
10309        match self {
10310            Self::NotFound => ffi::GTK_RECENT_MANAGER_ERROR_NOT_FOUND,
10311            Self::InvalidUri => ffi::GTK_RECENT_MANAGER_ERROR_INVALID_URI,
10312            Self::InvalidEncoding => ffi::GTK_RECENT_MANAGER_ERROR_INVALID_ENCODING,
10313            Self::NotRegistered => ffi::GTK_RECENT_MANAGER_ERROR_NOT_REGISTERED,
10314            Self::Read => ffi::GTK_RECENT_MANAGER_ERROR_READ,
10315            Self::Write => ffi::GTK_RECENT_MANAGER_ERROR_WRITE,
10316            Self::Unknown => ffi::GTK_RECENT_MANAGER_ERROR_UNKNOWN,
10317            Self::__Unknown(value) => value,
10318        }
10319    }
10320}
10321
10322#[doc(hidden)]
10323impl FromGlib<ffi::GtkRecentManagerError> for RecentManagerError {
10324    #[inline]
10325    unsafe fn from_glib(value: ffi::GtkRecentManagerError) -> Self {
10326        skip_assert_initialized!();
10327
10328        match value {
10329            ffi::GTK_RECENT_MANAGER_ERROR_NOT_FOUND => Self::NotFound,
10330            ffi::GTK_RECENT_MANAGER_ERROR_INVALID_URI => Self::InvalidUri,
10331            ffi::GTK_RECENT_MANAGER_ERROR_INVALID_ENCODING => Self::InvalidEncoding,
10332            ffi::GTK_RECENT_MANAGER_ERROR_NOT_REGISTERED => Self::NotRegistered,
10333            ffi::GTK_RECENT_MANAGER_ERROR_READ => Self::Read,
10334            ffi::GTK_RECENT_MANAGER_ERROR_WRITE => Self::Write,
10335            ffi::GTK_RECENT_MANAGER_ERROR_UNKNOWN => Self::Unknown,
10336            value => Self::__Unknown(value),
10337        }
10338    }
10339}
10340
10341impl glib::error::ErrorDomain for RecentManagerError {
10342    #[inline]
10343    fn domain() -> glib::Quark {
10344        skip_assert_initialized!();
10345
10346        unsafe { from_glib(ffi::gtk_recent_manager_error_quark()) }
10347    }
10348
10349    #[inline]
10350    fn code(self) -> i32 {
10351        self.into_glib()
10352    }
10353
10354    #[inline]
10355    #[allow(clippy::match_single_binding)]
10356    fn from(code: i32) -> Option<Self> {
10357        skip_assert_initialized!();
10358        match unsafe { from_glib(code) } {
10359            value => Some(value),
10360        }
10361    }
10362}
10363
10364impl StaticType for RecentManagerError {
10365    #[inline]
10366    #[doc(alias = "gtk_recent_manager_error_get_type")]
10367    fn static_type() -> glib::Type {
10368        unsafe { from_glib(ffi::gtk_recent_manager_error_get_type()) }
10369    }
10370}
10371
10372impl glib::HasParamSpec for RecentManagerError {
10373    type ParamSpec = glib::ParamSpecEnum;
10374    type SetValue = Self;
10375    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
10376
10377    fn param_spec_builder() -> Self::BuilderFn {
10378        Self::ParamSpec::builder_with_default
10379    }
10380}
10381
10382impl glib::value::ValueType for RecentManagerError {
10383    type Type = Self;
10384}
10385
10386unsafe impl<'a> glib::value::FromValue<'a> for RecentManagerError {
10387    type Checker = glib::value::GenericValueTypeChecker<Self>;
10388
10389    #[inline]
10390    unsafe fn from_value(value: &'a glib::Value) -> Self {
10391        skip_assert_initialized!();
10392        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
10393    }
10394}
10395
10396impl ToValue for RecentManagerError {
10397    #[inline]
10398    fn to_value(&self) -> glib::Value {
10399        let mut value = glib::Value::for_value_type::<Self>();
10400        unsafe {
10401            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
10402        }
10403        value
10404    }
10405
10406    #[inline]
10407    fn value_type(&self) -> glib::Type {
10408        Self::static_type()
10409    }
10410}
10411
10412impl From<RecentManagerError> for glib::Value {
10413    #[inline]
10414    fn from(v: RecentManagerError) -> Self {
10415        skip_assert_initialized!();
10416        ToValue::to_value(&v)
10417    }
10418}
10419
10420/// These enumeration values describe the possible transitions
10421/// when the child of a [`Revealer`][crate::Revealer] widget is shown or hidden.
10422#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
10423#[non_exhaustive]
10424#[doc(alias = "GtkRevealerTransitionType")]
10425pub enum RevealerTransitionType {
10426    /// No transition
10427    #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_NONE")]
10428    None,
10429    /// Fade in
10430    #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_CROSSFADE")]
10431    Crossfade,
10432    /// Slide in from the left
10433    #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT")]
10434    SlideRight,
10435    /// Slide in from the right
10436    #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT")]
10437    SlideLeft,
10438    /// Slide in from the bottom
10439    #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP")]
10440    SlideUp,
10441    /// Slide in from the top
10442    #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN")]
10443    SlideDown,
10444    /// Floop in from the left
10445    #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_SWING_RIGHT")]
10446    SwingRight,
10447    /// Floop in from the right
10448    #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_SWING_LEFT")]
10449    SwingLeft,
10450    /// Floop in from the bottom
10451    #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_SWING_UP")]
10452    SwingUp,
10453    /// Floop in from the top
10454    #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_SWING_DOWN")]
10455    SwingDown,
10456    #[doc(hidden)]
10457    __Unknown(i32),
10458}
10459
10460#[doc(hidden)]
10461impl IntoGlib for RevealerTransitionType {
10462    type GlibType = ffi::GtkRevealerTransitionType;
10463
10464    #[inline]
10465    fn into_glib(self) -> ffi::GtkRevealerTransitionType {
10466        match self {
10467            Self::None => ffi::GTK_REVEALER_TRANSITION_TYPE_NONE,
10468            Self::Crossfade => ffi::GTK_REVEALER_TRANSITION_TYPE_CROSSFADE,
10469            Self::SlideRight => ffi::GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT,
10470            Self::SlideLeft => ffi::GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT,
10471            Self::SlideUp => ffi::GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP,
10472            Self::SlideDown => ffi::GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN,
10473            Self::SwingRight => ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_RIGHT,
10474            Self::SwingLeft => ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_LEFT,
10475            Self::SwingUp => ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_UP,
10476            Self::SwingDown => ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_DOWN,
10477            Self::__Unknown(value) => value,
10478        }
10479    }
10480}
10481
10482#[doc(hidden)]
10483impl FromGlib<ffi::GtkRevealerTransitionType> for RevealerTransitionType {
10484    #[inline]
10485    unsafe fn from_glib(value: ffi::GtkRevealerTransitionType) -> Self {
10486        skip_assert_initialized!();
10487
10488        match value {
10489            ffi::GTK_REVEALER_TRANSITION_TYPE_NONE => Self::None,
10490            ffi::GTK_REVEALER_TRANSITION_TYPE_CROSSFADE => Self::Crossfade,
10491            ffi::GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT => Self::SlideRight,
10492            ffi::GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT => Self::SlideLeft,
10493            ffi::GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP => Self::SlideUp,
10494            ffi::GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN => Self::SlideDown,
10495            ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_RIGHT => Self::SwingRight,
10496            ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_LEFT => Self::SwingLeft,
10497            ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_UP => Self::SwingUp,
10498            ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_DOWN => Self::SwingDown,
10499            value => Self::__Unknown(value),
10500        }
10501    }
10502}
10503
10504impl StaticType for RevealerTransitionType {
10505    #[inline]
10506    #[doc(alias = "gtk_revealer_transition_type_get_type")]
10507    fn static_type() -> glib::Type {
10508        unsafe { from_glib(ffi::gtk_revealer_transition_type_get_type()) }
10509    }
10510}
10511
10512impl glib::HasParamSpec for RevealerTransitionType {
10513    type ParamSpec = glib::ParamSpecEnum;
10514    type SetValue = Self;
10515    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
10516
10517    fn param_spec_builder() -> Self::BuilderFn {
10518        Self::ParamSpec::builder_with_default
10519    }
10520}
10521
10522impl glib::value::ValueType for RevealerTransitionType {
10523    type Type = Self;
10524}
10525
10526unsafe impl<'a> glib::value::FromValue<'a> for RevealerTransitionType {
10527    type Checker = glib::value::GenericValueTypeChecker<Self>;
10528
10529    #[inline]
10530    unsafe fn from_value(value: &'a glib::Value) -> Self {
10531        skip_assert_initialized!();
10532        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
10533    }
10534}
10535
10536impl ToValue for RevealerTransitionType {
10537    #[inline]
10538    fn to_value(&self) -> glib::Value {
10539        let mut value = glib::Value::for_value_type::<Self>();
10540        unsafe {
10541            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
10542        }
10543        value
10544    }
10545
10546    #[inline]
10547    fn value_type(&self) -> glib::Type {
10548        Self::static_type()
10549    }
10550}
10551
10552impl From<RevealerTransitionType> for glib::Value {
10553    #[inline]
10554    fn from(v: RevealerTransitionType) -> Self {
10555        skip_assert_initialized!();
10556        ToValue::to_value(&v)
10557    }
10558}
10559
10560/// Passed as argument to various keybinding signals.
10561#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
10562#[non_exhaustive]
10563#[doc(alias = "GtkScrollStep")]
10564pub enum ScrollStep {
10565    /// Scroll in steps.
10566    #[doc(alias = "GTK_SCROLL_STEPS")]
10567    Steps,
10568    /// Scroll by pages.
10569    #[doc(alias = "GTK_SCROLL_PAGES")]
10570    Pages,
10571    /// Scroll to ends.
10572    #[doc(alias = "GTK_SCROLL_ENDS")]
10573    Ends,
10574    /// Scroll in horizontal steps.
10575    #[doc(alias = "GTK_SCROLL_HORIZONTAL_STEPS")]
10576    HorizontalSteps,
10577    /// Scroll by horizontal pages.
10578    #[doc(alias = "GTK_SCROLL_HORIZONTAL_PAGES")]
10579    HorizontalPages,
10580    /// Scroll to the horizontal ends.
10581    #[doc(alias = "GTK_SCROLL_HORIZONTAL_ENDS")]
10582    HorizontalEnds,
10583    #[doc(hidden)]
10584    __Unknown(i32),
10585}
10586
10587#[doc(hidden)]
10588impl IntoGlib for ScrollStep {
10589    type GlibType = ffi::GtkScrollStep;
10590
10591    #[inline]
10592    fn into_glib(self) -> ffi::GtkScrollStep {
10593        match self {
10594            Self::Steps => ffi::GTK_SCROLL_STEPS,
10595            Self::Pages => ffi::GTK_SCROLL_PAGES,
10596            Self::Ends => ffi::GTK_SCROLL_ENDS,
10597            Self::HorizontalSteps => ffi::GTK_SCROLL_HORIZONTAL_STEPS,
10598            Self::HorizontalPages => ffi::GTK_SCROLL_HORIZONTAL_PAGES,
10599            Self::HorizontalEnds => ffi::GTK_SCROLL_HORIZONTAL_ENDS,
10600            Self::__Unknown(value) => value,
10601        }
10602    }
10603}
10604
10605#[doc(hidden)]
10606impl FromGlib<ffi::GtkScrollStep> for ScrollStep {
10607    #[inline]
10608    unsafe fn from_glib(value: ffi::GtkScrollStep) -> Self {
10609        skip_assert_initialized!();
10610
10611        match value {
10612            ffi::GTK_SCROLL_STEPS => Self::Steps,
10613            ffi::GTK_SCROLL_PAGES => Self::Pages,
10614            ffi::GTK_SCROLL_ENDS => Self::Ends,
10615            ffi::GTK_SCROLL_HORIZONTAL_STEPS => Self::HorizontalSteps,
10616            ffi::GTK_SCROLL_HORIZONTAL_PAGES => Self::HorizontalPages,
10617            ffi::GTK_SCROLL_HORIZONTAL_ENDS => Self::HorizontalEnds,
10618            value => Self::__Unknown(value),
10619        }
10620    }
10621}
10622
10623impl StaticType for ScrollStep {
10624    #[inline]
10625    #[doc(alias = "gtk_scroll_step_get_type")]
10626    fn static_type() -> glib::Type {
10627        unsafe { from_glib(ffi::gtk_scroll_step_get_type()) }
10628    }
10629}
10630
10631impl glib::HasParamSpec for ScrollStep {
10632    type ParamSpec = glib::ParamSpecEnum;
10633    type SetValue = Self;
10634    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
10635
10636    fn param_spec_builder() -> Self::BuilderFn {
10637        Self::ParamSpec::builder_with_default
10638    }
10639}
10640
10641impl glib::value::ValueType for ScrollStep {
10642    type Type = Self;
10643}
10644
10645unsafe impl<'a> glib::value::FromValue<'a> for ScrollStep {
10646    type Checker = glib::value::GenericValueTypeChecker<Self>;
10647
10648    #[inline]
10649    unsafe fn from_value(value: &'a glib::Value) -> Self {
10650        skip_assert_initialized!();
10651        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
10652    }
10653}
10654
10655impl ToValue for ScrollStep {
10656    #[inline]
10657    fn to_value(&self) -> glib::Value {
10658        let mut value = glib::Value::for_value_type::<Self>();
10659        unsafe {
10660            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
10661        }
10662        value
10663    }
10664
10665    #[inline]
10666    fn value_type(&self) -> glib::Type {
10667        Self::static_type()
10668    }
10669}
10670
10671impl From<ScrollStep> for glib::Value {
10672    #[inline]
10673    fn from(v: ScrollStep) -> Self {
10674        skip_assert_initialized!();
10675        ToValue::to_value(&v)
10676    }
10677}
10678
10679/// Scrolling types.
10680#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
10681#[non_exhaustive]
10682#[doc(alias = "GtkScrollType")]
10683pub enum ScrollType {
10684    /// No scrolling.
10685    #[doc(alias = "GTK_SCROLL_NONE")]
10686    None,
10687    /// Jump to new location.
10688    #[doc(alias = "GTK_SCROLL_JUMP")]
10689    Jump,
10690    /// Step backward.
10691    #[doc(alias = "GTK_SCROLL_STEP_BACKWARD")]
10692    StepBackward,
10693    /// Step forward.
10694    #[doc(alias = "GTK_SCROLL_STEP_FORWARD")]
10695    StepForward,
10696    /// Page backward.
10697    #[doc(alias = "GTK_SCROLL_PAGE_BACKWARD")]
10698    PageBackward,
10699    /// Page forward.
10700    #[doc(alias = "GTK_SCROLL_PAGE_FORWARD")]
10701    PageForward,
10702    /// Step up.
10703    #[doc(alias = "GTK_SCROLL_STEP_UP")]
10704    StepUp,
10705    /// Step down.
10706    #[doc(alias = "GTK_SCROLL_STEP_DOWN")]
10707    StepDown,
10708    /// Page up.
10709    #[doc(alias = "GTK_SCROLL_PAGE_UP")]
10710    PageUp,
10711    /// Page down.
10712    #[doc(alias = "GTK_SCROLL_PAGE_DOWN")]
10713    PageDown,
10714    /// Step to the left.
10715    #[doc(alias = "GTK_SCROLL_STEP_LEFT")]
10716    StepLeft,
10717    /// Step to the right.
10718    #[doc(alias = "GTK_SCROLL_STEP_RIGHT")]
10719    StepRight,
10720    /// Page to the left.
10721    #[doc(alias = "GTK_SCROLL_PAGE_LEFT")]
10722    PageLeft,
10723    /// Page to the right.
10724    #[doc(alias = "GTK_SCROLL_PAGE_RIGHT")]
10725    PageRight,
10726    /// Scroll to start.
10727    #[doc(alias = "GTK_SCROLL_START")]
10728    Start,
10729    /// Scroll to end.
10730    #[doc(alias = "GTK_SCROLL_END")]
10731    End,
10732    #[doc(hidden)]
10733    __Unknown(i32),
10734}
10735
10736#[doc(hidden)]
10737impl IntoGlib for ScrollType {
10738    type GlibType = ffi::GtkScrollType;
10739
10740    fn into_glib(self) -> ffi::GtkScrollType {
10741        match self {
10742            Self::None => ffi::GTK_SCROLL_NONE,
10743            Self::Jump => ffi::GTK_SCROLL_JUMP,
10744            Self::StepBackward => ffi::GTK_SCROLL_STEP_BACKWARD,
10745            Self::StepForward => ffi::GTK_SCROLL_STEP_FORWARD,
10746            Self::PageBackward => ffi::GTK_SCROLL_PAGE_BACKWARD,
10747            Self::PageForward => ffi::GTK_SCROLL_PAGE_FORWARD,
10748            Self::StepUp => ffi::GTK_SCROLL_STEP_UP,
10749            Self::StepDown => ffi::GTK_SCROLL_STEP_DOWN,
10750            Self::PageUp => ffi::GTK_SCROLL_PAGE_UP,
10751            Self::PageDown => ffi::GTK_SCROLL_PAGE_DOWN,
10752            Self::StepLeft => ffi::GTK_SCROLL_STEP_LEFT,
10753            Self::StepRight => ffi::GTK_SCROLL_STEP_RIGHT,
10754            Self::PageLeft => ffi::GTK_SCROLL_PAGE_LEFT,
10755            Self::PageRight => ffi::GTK_SCROLL_PAGE_RIGHT,
10756            Self::Start => ffi::GTK_SCROLL_START,
10757            Self::End => ffi::GTK_SCROLL_END,
10758            Self::__Unknown(value) => value,
10759        }
10760    }
10761}
10762
10763#[doc(hidden)]
10764impl FromGlib<ffi::GtkScrollType> for ScrollType {
10765    unsafe fn from_glib(value: ffi::GtkScrollType) -> Self {
10766        skip_assert_initialized!();
10767
10768        match value {
10769            ffi::GTK_SCROLL_NONE => Self::None,
10770            ffi::GTK_SCROLL_JUMP => Self::Jump,
10771            ffi::GTK_SCROLL_STEP_BACKWARD => Self::StepBackward,
10772            ffi::GTK_SCROLL_STEP_FORWARD => Self::StepForward,
10773            ffi::GTK_SCROLL_PAGE_BACKWARD => Self::PageBackward,
10774            ffi::GTK_SCROLL_PAGE_FORWARD => Self::PageForward,
10775            ffi::GTK_SCROLL_STEP_UP => Self::StepUp,
10776            ffi::GTK_SCROLL_STEP_DOWN => Self::StepDown,
10777            ffi::GTK_SCROLL_PAGE_UP => Self::PageUp,
10778            ffi::GTK_SCROLL_PAGE_DOWN => Self::PageDown,
10779            ffi::GTK_SCROLL_STEP_LEFT => Self::StepLeft,
10780            ffi::GTK_SCROLL_STEP_RIGHT => Self::StepRight,
10781            ffi::GTK_SCROLL_PAGE_LEFT => Self::PageLeft,
10782            ffi::GTK_SCROLL_PAGE_RIGHT => Self::PageRight,
10783            ffi::GTK_SCROLL_START => Self::Start,
10784            ffi::GTK_SCROLL_END => Self::End,
10785            value => Self::__Unknown(value),
10786        }
10787    }
10788}
10789
10790impl StaticType for ScrollType {
10791    #[inline]
10792    #[doc(alias = "gtk_scroll_type_get_type")]
10793    fn static_type() -> glib::Type {
10794        unsafe { from_glib(ffi::gtk_scroll_type_get_type()) }
10795    }
10796}
10797
10798impl glib::HasParamSpec for ScrollType {
10799    type ParamSpec = glib::ParamSpecEnum;
10800    type SetValue = Self;
10801    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
10802
10803    fn param_spec_builder() -> Self::BuilderFn {
10804        Self::ParamSpec::builder_with_default
10805    }
10806}
10807
10808impl glib::value::ValueType for ScrollType {
10809    type Type = Self;
10810}
10811
10812unsafe impl<'a> glib::value::FromValue<'a> for ScrollType {
10813    type Checker = glib::value::GenericValueTypeChecker<Self>;
10814
10815    #[inline]
10816    unsafe fn from_value(value: &'a glib::Value) -> Self {
10817        skip_assert_initialized!();
10818        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
10819    }
10820}
10821
10822impl ToValue for ScrollType {
10823    #[inline]
10824    fn to_value(&self) -> glib::Value {
10825        let mut value = glib::Value::for_value_type::<Self>();
10826        unsafe {
10827            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
10828        }
10829        value
10830    }
10831
10832    #[inline]
10833    fn value_type(&self) -> glib::Type {
10834        Self::static_type()
10835    }
10836}
10837
10838impl From<ScrollType> for glib::Value {
10839    #[inline]
10840    fn from(v: ScrollType) -> Self {
10841        skip_assert_initialized!();
10842        ToValue::to_value(&v)
10843    }
10844}
10845
10846/// Defines the policy to be used in a scrollable widget when updating
10847/// the scrolled window adjustments in a given orientation.
10848#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
10849#[non_exhaustive]
10850#[doc(alias = "GtkScrollablePolicy")]
10851pub enum ScrollablePolicy {
10852    /// Scrollable adjustments are based on the minimum size
10853    #[doc(alias = "GTK_SCROLL_MINIMUM")]
10854    Minimum,
10855    /// Scrollable adjustments are based on the natural size
10856    #[doc(alias = "GTK_SCROLL_NATURAL")]
10857    Natural,
10858    #[doc(hidden)]
10859    __Unknown(i32),
10860}
10861
10862#[doc(hidden)]
10863impl IntoGlib for ScrollablePolicy {
10864    type GlibType = ffi::GtkScrollablePolicy;
10865
10866    #[inline]
10867    fn into_glib(self) -> ffi::GtkScrollablePolicy {
10868        match self {
10869            Self::Minimum => ffi::GTK_SCROLL_MINIMUM,
10870            Self::Natural => ffi::GTK_SCROLL_NATURAL,
10871            Self::__Unknown(value) => value,
10872        }
10873    }
10874}
10875
10876#[doc(hidden)]
10877impl FromGlib<ffi::GtkScrollablePolicy> for ScrollablePolicy {
10878    #[inline]
10879    unsafe fn from_glib(value: ffi::GtkScrollablePolicy) -> Self {
10880        skip_assert_initialized!();
10881
10882        match value {
10883            ffi::GTK_SCROLL_MINIMUM => Self::Minimum,
10884            ffi::GTK_SCROLL_NATURAL => Self::Natural,
10885            value => Self::__Unknown(value),
10886        }
10887    }
10888}
10889
10890impl StaticType for ScrollablePolicy {
10891    #[inline]
10892    #[doc(alias = "gtk_scrollable_policy_get_type")]
10893    fn static_type() -> glib::Type {
10894        unsafe { from_glib(ffi::gtk_scrollable_policy_get_type()) }
10895    }
10896}
10897
10898impl glib::HasParamSpec for ScrollablePolicy {
10899    type ParamSpec = glib::ParamSpecEnum;
10900    type SetValue = Self;
10901    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
10902
10903    fn param_spec_builder() -> Self::BuilderFn {
10904        Self::ParamSpec::builder_with_default
10905    }
10906}
10907
10908impl glib::value::ValueType for ScrollablePolicy {
10909    type Type = Self;
10910}
10911
10912unsafe impl<'a> glib::value::FromValue<'a> for ScrollablePolicy {
10913    type Checker = glib::value::GenericValueTypeChecker<Self>;
10914
10915    #[inline]
10916    unsafe fn from_value(value: &'a glib::Value) -> Self {
10917        skip_assert_initialized!();
10918        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
10919    }
10920}
10921
10922impl ToValue for ScrollablePolicy {
10923    #[inline]
10924    fn to_value(&self) -> glib::Value {
10925        let mut value = glib::Value::for_value_type::<Self>();
10926        unsafe {
10927            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
10928        }
10929        value
10930    }
10931
10932    #[inline]
10933    fn value_type(&self) -> glib::Type {
10934        Self::static_type()
10935    }
10936}
10937
10938impl From<ScrollablePolicy> for glib::Value {
10939    #[inline]
10940    fn from(v: ScrollablePolicy) -> Self {
10941        skip_assert_initialized!();
10942        ToValue::to_value(&v)
10943    }
10944}
10945
10946/// Used to control what selections users are allowed to make.
10947#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
10948#[non_exhaustive]
10949#[doc(alias = "GtkSelectionMode")]
10950pub enum SelectionMode {
10951    /// No selection is possible.
10952    #[doc(alias = "GTK_SELECTION_NONE")]
10953    None,
10954    /// Zero or one element may be selected.
10955    #[doc(alias = "GTK_SELECTION_SINGLE")]
10956    Single,
10957    /// Exactly one element is selected.
10958    ///   In some circumstances, such as initially or during a search
10959    ///   operation, it’s possible for no element to be selected with
10960    ///   [`Browse`][Self::Browse]. What is really enforced is that the user
10961    ///   can’t deselect a currently selected element except by selecting
10962    ///   another element.
10963    #[doc(alias = "GTK_SELECTION_BROWSE")]
10964    Browse,
10965    /// Any number of elements may be selected.
10966    ///   The Ctrl key may be used to enlarge the selection, and Shift
10967    ///   key to select between the focus and the child pointed to.
10968    ///   Some widgets may also allow Click-drag to select a range of elements.
10969    #[doc(alias = "GTK_SELECTION_MULTIPLE")]
10970    Multiple,
10971    #[doc(hidden)]
10972    __Unknown(i32),
10973}
10974
10975#[doc(hidden)]
10976impl IntoGlib for SelectionMode {
10977    type GlibType = ffi::GtkSelectionMode;
10978
10979    #[inline]
10980    fn into_glib(self) -> ffi::GtkSelectionMode {
10981        match self {
10982            Self::None => ffi::GTK_SELECTION_NONE,
10983            Self::Single => ffi::GTK_SELECTION_SINGLE,
10984            Self::Browse => ffi::GTK_SELECTION_BROWSE,
10985            Self::Multiple => ffi::GTK_SELECTION_MULTIPLE,
10986            Self::__Unknown(value) => value,
10987        }
10988    }
10989}
10990
10991#[doc(hidden)]
10992impl FromGlib<ffi::GtkSelectionMode> for SelectionMode {
10993    #[inline]
10994    unsafe fn from_glib(value: ffi::GtkSelectionMode) -> Self {
10995        skip_assert_initialized!();
10996
10997        match value {
10998            ffi::GTK_SELECTION_NONE => Self::None,
10999            ffi::GTK_SELECTION_SINGLE => Self::Single,
11000            ffi::GTK_SELECTION_BROWSE => Self::Browse,
11001            ffi::GTK_SELECTION_MULTIPLE => Self::Multiple,
11002            value => Self::__Unknown(value),
11003        }
11004    }
11005}
11006
11007impl StaticType for SelectionMode {
11008    #[inline]
11009    #[doc(alias = "gtk_selection_mode_get_type")]
11010    fn static_type() -> glib::Type {
11011        unsafe { from_glib(ffi::gtk_selection_mode_get_type()) }
11012    }
11013}
11014
11015impl glib::HasParamSpec for SelectionMode {
11016    type ParamSpec = glib::ParamSpecEnum;
11017    type SetValue = Self;
11018    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
11019
11020    fn param_spec_builder() -> Self::BuilderFn {
11021        Self::ParamSpec::builder_with_default
11022    }
11023}
11024
11025impl glib::value::ValueType for SelectionMode {
11026    type Type = Self;
11027}
11028
11029unsafe impl<'a> glib::value::FromValue<'a> for SelectionMode {
11030    type Checker = glib::value::GenericValueTypeChecker<Self>;
11031
11032    #[inline]
11033    unsafe fn from_value(value: &'a glib::Value) -> Self {
11034        skip_assert_initialized!();
11035        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
11036    }
11037}
11038
11039impl ToValue for SelectionMode {
11040    #[inline]
11041    fn to_value(&self) -> glib::Value {
11042        let mut value = glib::Value::for_value_type::<Self>();
11043        unsafe {
11044            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
11045        }
11046        value
11047    }
11048
11049    #[inline]
11050    fn value_type(&self) -> glib::Type {
11051        Self::static_type()
11052    }
11053}
11054
11055impl From<SelectionMode> for glib::Value {
11056    #[inline]
11057    fn from(v: SelectionMode) -> Self {
11058        skip_assert_initialized!();
11059        ToValue::to_value(&v)
11060    }
11061}
11062
11063/// Determines how GTK handles the sensitivity of various controls,
11064/// such as combo box buttons.
11065#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
11066#[non_exhaustive]
11067#[doc(alias = "GtkSensitivityType")]
11068pub enum SensitivityType {
11069    /// The control is made insensitive if no
11070    ///   action can be triggered
11071    #[doc(alias = "GTK_SENSITIVITY_AUTO")]
11072    Auto,
11073    /// The control is always sensitive
11074    #[doc(alias = "GTK_SENSITIVITY_ON")]
11075    On,
11076    /// The control is always insensitive
11077    #[doc(alias = "GTK_SENSITIVITY_OFF")]
11078    Off,
11079    #[doc(hidden)]
11080    __Unknown(i32),
11081}
11082
11083#[doc(hidden)]
11084impl IntoGlib for SensitivityType {
11085    type GlibType = ffi::GtkSensitivityType;
11086
11087    #[inline]
11088    fn into_glib(self) -> ffi::GtkSensitivityType {
11089        match self {
11090            Self::Auto => ffi::GTK_SENSITIVITY_AUTO,
11091            Self::On => ffi::GTK_SENSITIVITY_ON,
11092            Self::Off => ffi::GTK_SENSITIVITY_OFF,
11093            Self::__Unknown(value) => value,
11094        }
11095    }
11096}
11097
11098#[doc(hidden)]
11099impl FromGlib<ffi::GtkSensitivityType> for SensitivityType {
11100    #[inline]
11101    unsafe fn from_glib(value: ffi::GtkSensitivityType) -> Self {
11102        skip_assert_initialized!();
11103
11104        match value {
11105            ffi::GTK_SENSITIVITY_AUTO => Self::Auto,
11106            ffi::GTK_SENSITIVITY_ON => Self::On,
11107            ffi::GTK_SENSITIVITY_OFF => Self::Off,
11108            value => Self::__Unknown(value),
11109        }
11110    }
11111}
11112
11113impl StaticType for SensitivityType {
11114    #[inline]
11115    #[doc(alias = "gtk_sensitivity_type_get_type")]
11116    fn static_type() -> glib::Type {
11117        unsafe { from_glib(ffi::gtk_sensitivity_type_get_type()) }
11118    }
11119}
11120
11121impl glib::HasParamSpec for SensitivityType {
11122    type ParamSpec = glib::ParamSpecEnum;
11123    type SetValue = Self;
11124    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
11125
11126    fn param_spec_builder() -> Self::BuilderFn {
11127        Self::ParamSpec::builder_with_default
11128    }
11129}
11130
11131impl glib::value::ValueType for SensitivityType {
11132    type Type = Self;
11133}
11134
11135unsafe impl<'a> glib::value::FromValue<'a> for SensitivityType {
11136    type Checker = glib::value::GenericValueTypeChecker<Self>;
11137
11138    #[inline]
11139    unsafe fn from_value(value: &'a glib::Value) -> Self {
11140        skip_assert_initialized!();
11141        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
11142    }
11143}
11144
11145impl ToValue for SensitivityType {
11146    #[inline]
11147    fn to_value(&self) -> glib::Value {
11148        let mut value = glib::Value::for_value_type::<Self>();
11149        unsafe {
11150            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
11151        }
11152        value
11153    }
11154
11155    #[inline]
11156    fn value_type(&self) -> glib::Type {
11157        Self::static_type()
11158    }
11159}
11160
11161impl From<SensitivityType> for glib::Value {
11162    #[inline]
11163    fn from(v: SensitivityType) -> Self {
11164        skip_assert_initialized!();
11165        ToValue::to_value(&v)
11166    }
11167}
11168
11169/// Describes where [`Shortcut`][crate::Shortcut]s added to a
11170/// [`ShortcutController`][crate::ShortcutController] get handled.
11171#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
11172#[non_exhaustive]
11173#[doc(alias = "GtkShortcutScope")]
11174pub enum ShortcutScope {
11175    /// Shortcuts are handled inside
11176    ///   the widget the controller belongs to.
11177    #[doc(alias = "GTK_SHORTCUT_SCOPE_LOCAL")]
11178    Local,
11179    /// Shortcuts are handled by
11180    ///   the first ancestor that is a [`ShortcutManager`][crate::ShortcutManager]
11181    #[doc(alias = "GTK_SHORTCUT_SCOPE_MANAGED")]
11182    Managed,
11183    /// Shortcuts are handled by
11184    ///   the root widget.
11185    #[doc(alias = "GTK_SHORTCUT_SCOPE_GLOBAL")]
11186    Global,
11187    #[doc(hidden)]
11188    __Unknown(i32),
11189}
11190
11191#[doc(hidden)]
11192impl IntoGlib for ShortcutScope {
11193    type GlibType = ffi::GtkShortcutScope;
11194
11195    #[inline]
11196    fn into_glib(self) -> ffi::GtkShortcutScope {
11197        match self {
11198            Self::Local => ffi::GTK_SHORTCUT_SCOPE_LOCAL,
11199            Self::Managed => ffi::GTK_SHORTCUT_SCOPE_MANAGED,
11200            Self::Global => ffi::GTK_SHORTCUT_SCOPE_GLOBAL,
11201            Self::__Unknown(value) => value,
11202        }
11203    }
11204}
11205
11206#[doc(hidden)]
11207impl FromGlib<ffi::GtkShortcutScope> for ShortcutScope {
11208    #[inline]
11209    unsafe fn from_glib(value: ffi::GtkShortcutScope) -> Self {
11210        skip_assert_initialized!();
11211
11212        match value {
11213            ffi::GTK_SHORTCUT_SCOPE_LOCAL => Self::Local,
11214            ffi::GTK_SHORTCUT_SCOPE_MANAGED => Self::Managed,
11215            ffi::GTK_SHORTCUT_SCOPE_GLOBAL => Self::Global,
11216            value => Self::__Unknown(value),
11217        }
11218    }
11219}
11220
11221impl StaticType for ShortcutScope {
11222    #[inline]
11223    #[doc(alias = "gtk_shortcut_scope_get_type")]
11224    fn static_type() -> glib::Type {
11225        unsafe { from_glib(ffi::gtk_shortcut_scope_get_type()) }
11226    }
11227}
11228
11229impl glib::HasParamSpec for ShortcutScope {
11230    type ParamSpec = glib::ParamSpecEnum;
11231    type SetValue = Self;
11232    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
11233
11234    fn param_spec_builder() -> Self::BuilderFn {
11235        Self::ParamSpec::builder_with_default
11236    }
11237}
11238
11239impl glib::value::ValueType for ShortcutScope {
11240    type Type = Self;
11241}
11242
11243unsafe impl<'a> glib::value::FromValue<'a> for ShortcutScope {
11244    type Checker = glib::value::GenericValueTypeChecker<Self>;
11245
11246    #[inline]
11247    unsafe fn from_value(value: &'a glib::Value) -> Self {
11248        skip_assert_initialized!();
11249        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
11250    }
11251}
11252
11253impl ToValue for ShortcutScope {
11254    #[inline]
11255    fn to_value(&self) -> glib::Value {
11256        let mut value = glib::Value::for_value_type::<Self>();
11257        unsafe {
11258            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
11259        }
11260        value
11261    }
11262
11263    #[inline]
11264    fn value_type(&self) -> glib::Type {
11265        Self::static_type()
11266    }
11267}
11268
11269impl From<ShortcutScope> for glib::Value {
11270    #[inline]
11271    fn from(v: ShortcutScope) -> Self {
11272        skip_assert_initialized!();
11273        ToValue::to_value(&v)
11274    }
11275}
11276
11277/// GtkShortcutType specifies the kind of shortcut that is being described.
11278///
11279/// More values may be added to this enumeration over time.
11280#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
11281#[non_exhaustive]
11282#[doc(alias = "GtkShortcutType")]
11283pub enum ShortcutType {
11284    /// The shortcut is a keyboard accelerator. The GtkShortcutsShortcut:accelerator
11285    ///   property will be used.
11286    #[doc(alias = "GTK_SHORTCUT_ACCELERATOR")]
11287    Accelerator,
11288    /// The shortcut is a pinch gesture. GTK provides an icon and subtitle.
11289    #[doc(alias = "GTK_SHORTCUT_GESTURE_PINCH")]
11290    GesturePinch,
11291    /// The shortcut is a stretch gesture. GTK provides an icon and subtitle.
11292    #[doc(alias = "GTK_SHORTCUT_GESTURE_STRETCH")]
11293    GestureStretch,
11294    /// The shortcut is a clockwise rotation gesture. GTK provides an icon and subtitle.
11295    #[doc(alias = "GTK_SHORTCUT_GESTURE_ROTATE_CLOCKWISE")]
11296    GestureRotateClockwise,
11297    /// The shortcut is a counterclockwise rotation gesture. GTK provides an icon and subtitle.
11298    #[doc(alias = "GTK_SHORTCUT_GESTURE_ROTATE_COUNTERCLOCKWISE")]
11299    GestureRotateCounterclockwise,
11300    /// The shortcut is a two-finger swipe gesture. GTK provides an icon and subtitle.
11301    #[doc(alias = "GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_LEFT")]
11302    GestureTwoFingerSwipeLeft,
11303    /// The shortcut is a two-finger swipe gesture. GTK provides an icon and subtitle.
11304    #[doc(alias = "GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_RIGHT")]
11305    GestureTwoFingerSwipeRight,
11306    /// The shortcut is a gesture. The GtkShortcutsShortcut:icon property will be
11307    ///   used.
11308    #[doc(alias = "GTK_SHORTCUT_GESTURE")]
11309    Gesture,
11310    /// The shortcut is a swipe gesture. GTK provides an icon and subtitle.
11311    #[doc(alias = "GTK_SHORTCUT_GESTURE_SWIPE_LEFT")]
11312    GestureSwipeLeft,
11313    /// The shortcut is a swipe gesture. GTK provides an icon and subtitle.
11314    #[doc(alias = "GTK_SHORTCUT_GESTURE_SWIPE_RIGHT")]
11315    GestureSwipeRight,
11316    #[doc(hidden)]
11317    __Unknown(i32),
11318}
11319
11320#[doc(hidden)]
11321impl IntoGlib for ShortcutType {
11322    type GlibType = ffi::GtkShortcutType;
11323
11324    #[inline]
11325    fn into_glib(self) -> ffi::GtkShortcutType {
11326        match self {
11327            Self::Accelerator => ffi::GTK_SHORTCUT_ACCELERATOR,
11328            Self::GesturePinch => ffi::GTK_SHORTCUT_GESTURE_PINCH,
11329            Self::GestureStretch => ffi::GTK_SHORTCUT_GESTURE_STRETCH,
11330            Self::GestureRotateClockwise => ffi::GTK_SHORTCUT_GESTURE_ROTATE_CLOCKWISE,
11331            Self::GestureRotateCounterclockwise => {
11332                ffi::GTK_SHORTCUT_GESTURE_ROTATE_COUNTERCLOCKWISE
11333            }
11334            Self::GestureTwoFingerSwipeLeft => ffi::GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_LEFT,
11335            Self::GestureTwoFingerSwipeRight => ffi::GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_RIGHT,
11336            Self::Gesture => ffi::GTK_SHORTCUT_GESTURE,
11337            Self::GestureSwipeLeft => ffi::GTK_SHORTCUT_GESTURE_SWIPE_LEFT,
11338            Self::GestureSwipeRight => ffi::GTK_SHORTCUT_GESTURE_SWIPE_RIGHT,
11339            Self::__Unknown(value) => value,
11340        }
11341    }
11342}
11343
11344#[doc(hidden)]
11345impl FromGlib<ffi::GtkShortcutType> for ShortcutType {
11346    #[inline]
11347    unsafe fn from_glib(value: ffi::GtkShortcutType) -> Self {
11348        skip_assert_initialized!();
11349
11350        match value {
11351            ffi::GTK_SHORTCUT_ACCELERATOR => Self::Accelerator,
11352            ffi::GTK_SHORTCUT_GESTURE_PINCH => Self::GesturePinch,
11353            ffi::GTK_SHORTCUT_GESTURE_STRETCH => Self::GestureStretch,
11354            ffi::GTK_SHORTCUT_GESTURE_ROTATE_CLOCKWISE => Self::GestureRotateClockwise,
11355            ffi::GTK_SHORTCUT_GESTURE_ROTATE_COUNTERCLOCKWISE => {
11356                Self::GestureRotateCounterclockwise
11357            }
11358            ffi::GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_LEFT => Self::GestureTwoFingerSwipeLeft,
11359            ffi::GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_RIGHT => Self::GestureTwoFingerSwipeRight,
11360            ffi::GTK_SHORTCUT_GESTURE => Self::Gesture,
11361            ffi::GTK_SHORTCUT_GESTURE_SWIPE_LEFT => Self::GestureSwipeLeft,
11362            ffi::GTK_SHORTCUT_GESTURE_SWIPE_RIGHT => Self::GestureSwipeRight,
11363            value => Self::__Unknown(value),
11364        }
11365    }
11366}
11367
11368impl StaticType for ShortcutType {
11369    #[inline]
11370    #[doc(alias = "gtk_shortcut_type_get_type")]
11371    fn static_type() -> glib::Type {
11372        unsafe { from_glib(ffi::gtk_shortcut_type_get_type()) }
11373    }
11374}
11375
11376impl glib::HasParamSpec for ShortcutType {
11377    type ParamSpec = glib::ParamSpecEnum;
11378    type SetValue = Self;
11379    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
11380
11381    fn param_spec_builder() -> Self::BuilderFn {
11382        Self::ParamSpec::builder_with_default
11383    }
11384}
11385
11386impl glib::value::ValueType for ShortcutType {
11387    type Type = Self;
11388}
11389
11390unsafe impl<'a> glib::value::FromValue<'a> for ShortcutType {
11391    type Checker = glib::value::GenericValueTypeChecker<Self>;
11392
11393    #[inline]
11394    unsafe fn from_value(value: &'a glib::Value) -> Self {
11395        skip_assert_initialized!();
11396        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
11397    }
11398}
11399
11400impl ToValue for ShortcutType {
11401    #[inline]
11402    fn to_value(&self) -> glib::Value {
11403        let mut value = glib::Value::for_value_type::<Self>();
11404        unsafe {
11405            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
11406        }
11407        value
11408    }
11409
11410    #[inline]
11411    fn value_type(&self) -> glib::Type {
11412        Self::static_type()
11413    }
11414}
11415
11416impl From<ShortcutType> for glib::Value {
11417    #[inline]
11418    fn from(v: ShortcutType) -> Self {
11419        skip_assert_initialized!();
11420        ToValue::to_value(&v)
11421    }
11422}
11423
11424/// The mode of the size group determines the directions in which the size
11425/// group affects the requested sizes of its component widgets.
11426#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
11427#[non_exhaustive]
11428#[doc(alias = "GtkSizeGroupMode")]
11429pub enum SizeGroupMode {
11430    /// group has no effect
11431    #[doc(alias = "GTK_SIZE_GROUP_NONE")]
11432    None,
11433    /// group affects horizontal requisition
11434    #[doc(alias = "GTK_SIZE_GROUP_HORIZONTAL")]
11435    Horizontal,
11436    /// group affects vertical requisition
11437    #[doc(alias = "GTK_SIZE_GROUP_VERTICAL")]
11438    Vertical,
11439    /// group affects both horizontal and vertical requisition
11440    #[doc(alias = "GTK_SIZE_GROUP_BOTH")]
11441    Both,
11442    #[doc(hidden)]
11443    __Unknown(i32),
11444}
11445
11446#[doc(hidden)]
11447impl IntoGlib for SizeGroupMode {
11448    type GlibType = ffi::GtkSizeGroupMode;
11449
11450    #[inline]
11451    fn into_glib(self) -> ffi::GtkSizeGroupMode {
11452        match self {
11453            Self::None => ffi::GTK_SIZE_GROUP_NONE,
11454            Self::Horizontal => ffi::GTK_SIZE_GROUP_HORIZONTAL,
11455            Self::Vertical => ffi::GTK_SIZE_GROUP_VERTICAL,
11456            Self::Both => ffi::GTK_SIZE_GROUP_BOTH,
11457            Self::__Unknown(value) => value,
11458        }
11459    }
11460}
11461
11462#[doc(hidden)]
11463impl FromGlib<ffi::GtkSizeGroupMode> for SizeGroupMode {
11464    #[inline]
11465    unsafe fn from_glib(value: ffi::GtkSizeGroupMode) -> Self {
11466        skip_assert_initialized!();
11467
11468        match value {
11469            ffi::GTK_SIZE_GROUP_NONE => Self::None,
11470            ffi::GTK_SIZE_GROUP_HORIZONTAL => Self::Horizontal,
11471            ffi::GTK_SIZE_GROUP_VERTICAL => Self::Vertical,
11472            ffi::GTK_SIZE_GROUP_BOTH => Self::Both,
11473            value => Self::__Unknown(value),
11474        }
11475    }
11476}
11477
11478impl StaticType for SizeGroupMode {
11479    #[inline]
11480    #[doc(alias = "gtk_size_group_mode_get_type")]
11481    fn static_type() -> glib::Type {
11482        unsafe { from_glib(ffi::gtk_size_group_mode_get_type()) }
11483    }
11484}
11485
11486impl glib::HasParamSpec for SizeGroupMode {
11487    type ParamSpec = glib::ParamSpecEnum;
11488    type SetValue = Self;
11489    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
11490
11491    fn param_spec_builder() -> Self::BuilderFn {
11492        Self::ParamSpec::builder_with_default
11493    }
11494}
11495
11496impl glib::value::ValueType for SizeGroupMode {
11497    type Type = Self;
11498}
11499
11500unsafe impl<'a> glib::value::FromValue<'a> for SizeGroupMode {
11501    type Checker = glib::value::GenericValueTypeChecker<Self>;
11502
11503    #[inline]
11504    unsafe fn from_value(value: &'a glib::Value) -> Self {
11505        skip_assert_initialized!();
11506        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
11507    }
11508}
11509
11510impl ToValue for SizeGroupMode {
11511    #[inline]
11512    fn to_value(&self) -> glib::Value {
11513        let mut value = glib::Value::for_value_type::<Self>();
11514        unsafe {
11515            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
11516        }
11517        value
11518    }
11519
11520    #[inline]
11521    fn value_type(&self) -> glib::Type {
11522        Self::static_type()
11523    }
11524}
11525
11526impl From<SizeGroupMode> for glib::Value {
11527    #[inline]
11528    fn from(v: SizeGroupMode) -> Self {
11529        skip_assert_initialized!();
11530        ToValue::to_value(&v)
11531    }
11532}
11533
11534/// Specifies a preference for height-for-width or
11535/// width-for-height geometry management.
11536#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
11537#[non_exhaustive]
11538#[doc(alias = "GtkSizeRequestMode")]
11539pub enum SizeRequestMode {
11540    /// Prefer height-for-width geometry management
11541    #[doc(alias = "GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH")]
11542    HeightForWidth,
11543    /// Prefer width-for-height geometry management
11544    #[doc(alias = "GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT")]
11545    WidthForHeight,
11546    /// Don’t trade height-for-width or width-for-height
11547    #[doc(alias = "GTK_SIZE_REQUEST_CONSTANT_SIZE")]
11548    ConstantSize,
11549    #[doc(hidden)]
11550    __Unknown(i32),
11551}
11552
11553#[doc(hidden)]
11554impl IntoGlib for SizeRequestMode {
11555    type GlibType = ffi::GtkSizeRequestMode;
11556
11557    #[inline]
11558    fn into_glib(self) -> ffi::GtkSizeRequestMode {
11559        match self {
11560            Self::HeightForWidth => ffi::GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH,
11561            Self::WidthForHeight => ffi::GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT,
11562            Self::ConstantSize => ffi::GTK_SIZE_REQUEST_CONSTANT_SIZE,
11563            Self::__Unknown(value) => value,
11564        }
11565    }
11566}
11567
11568#[doc(hidden)]
11569impl FromGlib<ffi::GtkSizeRequestMode> for SizeRequestMode {
11570    #[inline]
11571    unsafe fn from_glib(value: ffi::GtkSizeRequestMode) -> Self {
11572        skip_assert_initialized!();
11573
11574        match value {
11575            ffi::GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH => Self::HeightForWidth,
11576            ffi::GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT => Self::WidthForHeight,
11577            ffi::GTK_SIZE_REQUEST_CONSTANT_SIZE => Self::ConstantSize,
11578            value => Self::__Unknown(value),
11579        }
11580    }
11581}
11582
11583impl StaticType for SizeRequestMode {
11584    #[inline]
11585    #[doc(alias = "gtk_size_request_mode_get_type")]
11586    fn static_type() -> glib::Type {
11587        unsafe { from_glib(ffi::gtk_size_request_mode_get_type()) }
11588    }
11589}
11590
11591impl glib::HasParamSpec for SizeRequestMode {
11592    type ParamSpec = glib::ParamSpecEnum;
11593    type SetValue = Self;
11594    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
11595
11596    fn param_spec_builder() -> Self::BuilderFn {
11597        Self::ParamSpec::builder_with_default
11598    }
11599}
11600
11601impl glib::value::ValueType for SizeRequestMode {
11602    type Type = Self;
11603}
11604
11605unsafe impl<'a> glib::value::FromValue<'a> for SizeRequestMode {
11606    type Checker = glib::value::GenericValueTypeChecker<Self>;
11607
11608    #[inline]
11609    unsafe fn from_value(value: &'a glib::Value) -> Self {
11610        skip_assert_initialized!();
11611        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
11612    }
11613}
11614
11615impl ToValue for SizeRequestMode {
11616    #[inline]
11617    fn to_value(&self) -> glib::Value {
11618        let mut value = glib::Value::for_value_type::<Self>();
11619        unsafe {
11620            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
11621        }
11622        value
11623    }
11624
11625    #[inline]
11626    fn value_type(&self) -> glib::Type {
11627        Self::static_type()
11628    }
11629}
11630
11631impl From<SizeRequestMode> for glib::Value {
11632    #[inline]
11633    fn from(v: SizeRequestMode) -> Self {
11634        skip_assert_initialized!();
11635        ToValue::to_value(&v)
11636    }
11637}
11638
11639/// Determines the direction of a sort.
11640#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
11641#[non_exhaustive]
11642#[doc(alias = "GtkSortType")]
11643pub enum SortType {
11644    /// Sorting is in ascending order.
11645    #[doc(alias = "GTK_SORT_ASCENDING")]
11646    Ascending,
11647    /// Sorting is in descending order.
11648    #[doc(alias = "GTK_SORT_DESCENDING")]
11649    Descending,
11650    #[doc(hidden)]
11651    __Unknown(i32),
11652}
11653
11654#[doc(hidden)]
11655impl IntoGlib for SortType {
11656    type GlibType = ffi::GtkSortType;
11657
11658    #[inline]
11659    fn into_glib(self) -> ffi::GtkSortType {
11660        match self {
11661            Self::Ascending => ffi::GTK_SORT_ASCENDING,
11662            Self::Descending => ffi::GTK_SORT_DESCENDING,
11663            Self::__Unknown(value) => value,
11664        }
11665    }
11666}
11667
11668#[doc(hidden)]
11669impl FromGlib<ffi::GtkSortType> for SortType {
11670    #[inline]
11671    unsafe fn from_glib(value: ffi::GtkSortType) -> Self {
11672        skip_assert_initialized!();
11673
11674        match value {
11675            ffi::GTK_SORT_ASCENDING => Self::Ascending,
11676            ffi::GTK_SORT_DESCENDING => Self::Descending,
11677            value => Self::__Unknown(value),
11678        }
11679    }
11680}
11681
11682impl StaticType for SortType {
11683    #[inline]
11684    #[doc(alias = "gtk_sort_type_get_type")]
11685    fn static_type() -> glib::Type {
11686        unsafe { from_glib(ffi::gtk_sort_type_get_type()) }
11687    }
11688}
11689
11690impl glib::HasParamSpec for SortType {
11691    type ParamSpec = glib::ParamSpecEnum;
11692    type SetValue = Self;
11693    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
11694
11695    fn param_spec_builder() -> Self::BuilderFn {
11696        Self::ParamSpec::builder_with_default
11697    }
11698}
11699
11700impl glib::value::ValueType for SortType {
11701    type Type = Self;
11702}
11703
11704unsafe impl<'a> glib::value::FromValue<'a> for SortType {
11705    type Checker = glib::value::GenericValueTypeChecker<Self>;
11706
11707    #[inline]
11708    unsafe fn from_value(value: &'a glib::Value) -> Self {
11709        skip_assert_initialized!();
11710        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
11711    }
11712}
11713
11714impl ToValue for SortType {
11715    #[inline]
11716    fn to_value(&self) -> glib::Value {
11717        let mut value = glib::Value::for_value_type::<Self>();
11718        unsafe {
11719            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
11720        }
11721        value
11722    }
11723
11724    #[inline]
11725    fn value_type(&self) -> glib::Type {
11726        Self::static_type()
11727    }
11728}
11729
11730impl From<SortType> for glib::Value {
11731    #[inline]
11732    fn from(v: SortType) -> Self {
11733        skip_assert_initialized!();
11734        ToValue::to_value(&v)
11735    }
11736}
11737
11738/// Describes changes in a sorter in more detail and allows users
11739/// to optimize resorting.
11740#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
11741#[non_exhaustive]
11742#[doc(alias = "GtkSorterChange")]
11743pub enum SorterChange {
11744    /// The sorter change cannot be described
11745    ///   by any of the other enumeration values
11746    #[doc(alias = "GTK_SORTER_CHANGE_DIFFERENT")]
11747    Different,
11748    /// The sort order was inverted. Comparisons
11749    ///   that returned [`Ordering::Smaller`][crate::Ordering::Smaller] now return [`Ordering::Larger`][crate::Ordering::Larger]
11750    ///   and vice versa. Other comparisons return the same values as before.
11751    #[doc(alias = "GTK_SORTER_CHANGE_INVERTED")]
11752    Inverted,
11753    /// The sorter is less strict: Comparisons
11754    ///   may now return [`Ordering::Equal`][crate::Ordering::Equal] that did not do so before.
11755    #[doc(alias = "GTK_SORTER_CHANGE_LESS_STRICT")]
11756    LessStrict,
11757    /// The sorter is more strict: Comparisons
11758    ///   that did return [`Ordering::Equal`][crate::Ordering::Equal] may not do so anymore.
11759    #[doc(alias = "GTK_SORTER_CHANGE_MORE_STRICT")]
11760    MoreStrict,
11761    #[doc(hidden)]
11762    __Unknown(i32),
11763}
11764
11765#[doc(hidden)]
11766impl IntoGlib for SorterChange {
11767    type GlibType = ffi::GtkSorterChange;
11768
11769    #[inline]
11770    fn into_glib(self) -> ffi::GtkSorterChange {
11771        match self {
11772            Self::Different => ffi::GTK_SORTER_CHANGE_DIFFERENT,
11773            Self::Inverted => ffi::GTK_SORTER_CHANGE_INVERTED,
11774            Self::LessStrict => ffi::GTK_SORTER_CHANGE_LESS_STRICT,
11775            Self::MoreStrict => ffi::GTK_SORTER_CHANGE_MORE_STRICT,
11776            Self::__Unknown(value) => value,
11777        }
11778    }
11779}
11780
11781#[doc(hidden)]
11782impl FromGlib<ffi::GtkSorterChange> for SorterChange {
11783    #[inline]
11784    unsafe fn from_glib(value: ffi::GtkSorterChange) -> Self {
11785        skip_assert_initialized!();
11786
11787        match value {
11788            ffi::GTK_SORTER_CHANGE_DIFFERENT => Self::Different,
11789            ffi::GTK_SORTER_CHANGE_INVERTED => Self::Inverted,
11790            ffi::GTK_SORTER_CHANGE_LESS_STRICT => Self::LessStrict,
11791            ffi::GTK_SORTER_CHANGE_MORE_STRICT => Self::MoreStrict,
11792            value => Self::__Unknown(value),
11793        }
11794    }
11795}
11796
11797impl StaticType for SorterChange {
11798    #[inline]
11799    #[doc(alias = "gtk_sorter_change_get_type")]
11800    fn static_type() -> glib::Type {
11801        unsafe { from_glib(ffi::gtk_sorter_change_get_type()) }
11802    }
11803}
11804
11805impl glib::HasParamSpec for SorterChange {
11806    type ParamSpec = glib::ParamSpecEnum;
11807    type SetValue = Self;
11808    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
11809
11810    fn param_spec_builder() -> Self::BuilderFn {
11811        Self::ParamSpec::builder_with_default
11812    }
11813}
11814
11815impl glib::value::ValueType for SorterChange {
11816    type Type = Self;
11817}
11818
11819unsafe impl<'a> glib::value::FromValue<'a> for SorterChange {
11820    type Checker = glib::value::GenericValueTypeChecker<Self>;
11821
11822    #[inline]
11823    unsafe fn from_value(value: &'a glib::Value) -> Self {
11824        skip_assert_initialized!();
11825        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
11826    }
11827}
11828
11829impl ToValue for SorterChange {
11830    #[inline]
11831    fn to_value(&self) -> glib::Value {
11832        let mut value = glib::Value::for_value_type::<Self>();
11833        unsafe {
11834            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
11835        }
11836        value
11837    }
11838
11839    #[inline]
11840    fn value_type(&self) -> glib::Type {
11841        Self::static_type()
11842    }
11843}
11844
11845impl From<SorterChange> for glib::Value {
11846    #[inline]
11847    fn from(v: SorterChange) -> Self {
11848        skip_assert_initialized!();
11849        ToValue::to_value(&v)
11850    }
11851}
11852
11853/// Describes the type of order that a [`Sorter`][crate::Sorter] may produce.
11854#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
11855#[non_exhaustive]
11856#[doc(alias = "GtkSorterOrder")]
11857pub enum SorterOrder {
11858    /// A partial order. Any [`Ordering`][crate::Ordering] is possible.
11859    #[doc(alias = "GTK_SORTER_ORDER_PARTIAL")]
11860    Partial,
11861    /// No order, all elements are considered equal.
11862    ///   gtk_sorter_compare() will only return [`Ordering::Equal`][crate::Ordering::Equal].
11863    #[doc(alias = "GTK_SORTER_ORDER_NONE")]
11864    None,
11865    /// A total order. gtk_sorter_compare() will only
11866    ///   return [`Ordering::Equal`][crate::Ordering::Equal] if an item is compared with itself. Two
11867    ///   different items will never cause this value to be returned.
11868    #[doc(alias = "GTK_SORTER_ORDER_TOTAL")]
11869    Total,
11870    #[doc(hidden)]
11871    __Unknown(i32),
11872}
11873
11874#[doc(hidden)]
11875impl IntoGlib for SorterOrder {
11876    type GlibType = ffi::GtkSorterOrder;
11877
11878    #[inline]
11879    fn into_glib(self) -> ffi::GtkSorterOrder {
11880        match self {
11881            Self::Partial => ffi::GTK_SORTER_ORDER_PARTIAL,
11882            Self::None => ffi::GTK_SORTER_ORDER_NONE,
11883            Self::Total => ffi::GTK_SORTER_ORDER_TOTAL,
11884            Self::__Unknown(value) => value,
11885        }
11886    }
11887}
11888
11889#[doc(hidden)]
11890impl FromGlib<ffi::GtkSorterOrder> for SorterOrder {
11891    #[inline]
11892    unsafe fn from_glib(value: ffi::GtkSorterOrder) -> Self {
11893        skip_assert_initialized!();
11894
11895        match value {
11896            ffi::GTK_SORTER_ORDER_PARTIAL => Self::Partial,
11897            ffi::GTK_SORTER_ORDER_NONE => Self::None,
11898            ffi::GTK_SORTER_ORDER_TOTAL => Self::Total,
11899            value => Self::__Unknown(value),
11900        }
11901    }
11902}
11903
11904impl StaticType for SorterOrder {
11905    #[inline]
11906    #[doc(alias = "gtk_sorter_order_get_type")]
11907    fn static_type() -> glib::Type {
11908        unsafe { from_glib(ffi::gtk_sorter_order_get_type()) }
11909    }
11910}
11911
11912impl glib::HasParamSpec for SorterOrder {
11913    type ParamSpec = glib::ParamSpecEnum;
11914    type SetValue = Self;
11915    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
11916
11917    fn param_spec_builder() -> Self::BuilderFn {
11918        Self::ParamSpec::builder_with_default
11919    }
11920}
11921
11922impl glib::value::ValueType for SorterOrder {
11923    type Type = Self;
11924}
11925
11926unsafe impl<'a> glib::value::FromValue<'a> for SorterOrder {
11927    type Checker = glib::value::GenericValueTypeChecker<Self>;
11928
11929    #[inline]
11930    unsafe fn from_value(value: &'a glib::Value) -> Self {
11931        skip_assert_initialized!();
11932        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
11933    }
11934}
11935
11936impl ToValue for SorterOrder {
11937    #[inline]
11938    fn to_value(&self) -> glib::Value {
11939        let mut value = glib::Value::for_value_type::<Self>();
11940        unsafe {
11941            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
11942        }
11943        value
11944    }
11945
11946    #[inline]
11947    fn value_type(&self) -> glib::Type {
11948        Self::static_type()
11949    }
11950}
11951
11952impl From<SorterOrder> for glib::Value {
11953    #[inline]
11954    fn from(v: SorterOrder) -> Self {
11955        skip_assert_initialized!();
11956        ToValue::to_value(&v)
11957    }
11958}
11959
11960/// Determines whether the spin button displays values outside the adjustment
11961/// bounds.
11962///
11963/// See [`SpinButton::set_update_policy()`][crate::SpinButton::set_update_policy()].
11964#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
11965#[non_exhaustive]
11966#[doc(alias = "GtkSpinButtonUpdatePolicy")]
11967pub enum SpinButtonUpdatePolicy {
11968    /// When refreshing your [`SpinButton`][crate::SpinButton], the value is
11969    ///   always displayed
11970    #[doc(alias = "GTK_UPDATE_ALWAYS")]
11971    Always,
11972    /// When refreshing your [`SpinButton`][crate::SpinButton], the value is
11973    ///   only displayed if it is valid within the bounds of the spin button's
11974    ///   adjustment
11975    #[doc(alias = "GTK_UPDATE_IF_VALID")]
11976    IfValid,
11977    #[doc(hidden)]
11978    __Unknown(i32),
11979}
11980
11981#[doc(hidden)]
11982impl IntoGlib for SpinButtonUpdatePolicy {
11983    type GlibType = ffi::GtkSpinButtonUpdatePolicy;
11984
11985    #[inline]
11986    fn into_glib(self) -> ffi::GtkSpinButtonUpdatePolicy {
11987        match self {
11988            Self::Always => ffi::GTK_UPDATE_ALWAYS,
11989            Self::IfValid => ffi::GTK_UPDATE_IF_VALID,
11990            Self::__Unknown(value) => value,
11991        }
11992    }
11993}
11994
11995#[doc(hidden)]
11996impl FromGlib<ffi::GtkSpinButtonUpdatePolicy> for SpinButtonUpdatePolicy {
11997    #[inline]
11998    unsafe fn from_glib(value: ffi::GtkSpinButtonUpdatePolicy) -> Self {
11999        skip_assert_initialized!();
12000
12001        match value {
12002            ffi::GTK_UPDATE_ALWAYS => Self::Always,
12003            ffi::GTK_UPDATE_IF_VALID => Self::IfValid,
12004            value => Self::__Unknown(value),
12005        }
12006    }
12007}
12008
12009impl StaticType for SpinButtonUpdatePolicy {
12010    #[inline]
12011    #[doc(alias = "gtk_spin_button_update_policy_get_type")]
12012    fn static_type() -> glib::Type {
12013        unsafe { from_glib(ffi::gtk_spin_button_update_policy_get_type()) }
12014    }
12015}
12016
12017impl glib::HasParamSpec for SpinButtonUpdatePolicy {
12018    type ParamSpec = glib::ParamSpecEnum;
12019    type SetValue = Self;
12020    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
12021
12022    fn param_spec_builder() -> Self::BuilderFn {
12023        Self::ParamSpec::builder_with_default
12024    }
12025}
12026
12027impl glib::value::ValueType for SpinButtonUpdatePolicy {
12028    type Type = Self;
12029}
12030
12031unsafe impl<'a> glib::value::FromValue<'a> for SpinButtonUpdatePolicy {
12032    type Checker = glib::value::GenericValueTypeChecker<Self>;
12033
12034    #[inline]
12035    unsafe fn from_value(value: &'a glib::Value) -> Self {
12036        skip_assert_initialized!();
12037        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
12038    }
12039}
12040
12041impl ToValue for SpinButtonUpdatePolicy {
12042    #[inline]
12043    fn to_value(&self) -> glib::Value {
12044        let mut value = glib::Value::for_value_type::<Self>();
12045        unsafe {
12046            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
12047        }
12048        value
12049    }
12050
12051    #[inline]
12052    fn value_type(&self) -> glib::Type {
12053        Self::static_type()
12054    }
12055}
12056
12057impl From<SpinButtonUpdatePolicy> for glib::Value {
12058    #[inline]
12059    fn from(v: SpinButtonUpdatePolicy) -> Self {
12060        skip_assert_initialized!();
12061        ToValue::to_value(&v)
12062    }
12063}
12064
12065/// The values of the GtkSpinType enumeration are used to specify the
12066/// change to make in gtk_spin_button_spin().
12067#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
12068#[non_exhaustive]
12069#[doc(alias = "GtkSpinType")]
12070pub enum SpinType {
12071    /// Increment by the adjustments step increment.
12072    #[doc(alias = "GTK_SPIN_STEP_FORWARD")]
12073    StepForward,
12074    /// Decrement by the adjustments step increment.
12075    #[doc(alias = "GTK_SPIN_STEP_BACKWARD")]
12076    StepBackward,
12077    /// Increment by the adjustments page increment.
12078    #[doc(alias = "GTK_SPIN_PAGE_FORWARD")]
12079    PageForward,
12080    /// Decrement by the adjustments page increment.
12081    #[doc(alias = "GTK_SPIN_PAGE_BACKWARD")]
12082    PageBackward,
12083    /// Go to the adjustments lower bound.
12084    #[doc(alias = "GTK_SPIN_HOME")]
12085    Home,
12086    /// Go to the adjustments upper bound.
12087    #[doc(alias = "GTK_SPIN_END")]
12088    End,
12089    /// Change by a specified amount.
12090    #[doc(alias = "GTK_SPIN_USER_DEFINED")]
12091    UserDefined,
12092    #[doc(hidden)]
12093    __Unknown(i32),
12094}
12095
12096#[doc(hidden)]
12097impl IntoGlib for SpinType {
12098    type GlibType = ffi::GtkSpinType;
12099
12100    #[inline]
12101    fn into_glib(self) -> ffi::GtkSpinType {
12102        match self {
12103            Self::StepForward => ffi::GTK_SPIN_STEP_FORWARD,
12104            Self::StepBackward => ffi::GTK_SPIN_STEP_BACKWARD,
12105            Self::PageForward => ffi::GTK_SPIN_PAGE_FORWARD,
12106            Self::PageBackward => ffi::GTK_SPIN_PAGE_BACKWARD,
12107            Self::Home => ffi::GTK_SPIN_HOME,
12108            Self::End => ffi::GTK_SPIN_END,
12109            Self::UserDefined => ffi::GTK_SPIN_USER_DEFINED,
12110            Self::__Unknown(value) => value,
12111        }
12112    }
12113}
12114
12115#[doc(hidden)]
12116impl FromGlib<ffi::GtkSpinType> for SpinType {
12117    #[inline]
12118    unsafe fn from_glib(value: ffi::GtkSpinType) -> Self {
12119        skip_assert_initialized!();
12120
12121        match value {
12122            ffi::GTK_SPIN_STEP_FORWARD => Self::StepForward,
12123            ffi::GTK_SPIN_STEP_BACKWARD => Self::StepBackward,
12124            ffi::GTK_SPIN_PAGE_FORWARD => Self::PageForward,
12125            ffi::GTK_SPIN_PAGE_BACKWARD => Self::PageBackward,
12126            ffi::GTK_SPIN_HOME => Self::Home,
12127            ffi::GTK_SPIN_END => Self::End,
12128            ffi::GTK_SPIN_USER_DEFINED => Self::UserDefined,
12129            value => Self::__Unknown(value),
12130        }
12131    }
12132}
12133
12134impl StaticType for SpinType {
12135    #[inline]
12136    #[doc(alias = "gtk_spin_type_get_type")]
12137    fn static_type() -> glib::Type {
12138        unsafe { from_glib(ffi::gtk_spin_type_get_type()) }
12139    }
12140}
12141
12142impl glib::HasParamSpec for SpinType {
12143    type ParamSpec = glib::ParamSpecEnum;
12144    type SetValue = Self;
12145    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
12146
12147    fn param_spec_builder() -> Self::BuilderFn {
12148        Self::ParamSpec::builder_with_default
12149    }
12150}
12151
12152impl glib::value::ValueType for SpinType {
12153    type Type = Self;
12154}
12155
12156unsafe impl<'a> glib::value::FromValue<'a> for SpinType {
12157    type Checker = glib::value::GenericValueTypeChecker<Self>;
12158
12159    #[inline]
12160    unsafe fn from_value(value: &'a glib::Value) -> Self {
12161        skip_assert_initialized!();
12162        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
12163    }
12164}
12165
12166impl ToValue for SpinType {
12167    #[inline]
12168    fn to_value(&self) -> glib::Value {
12169        let mut value = glib::Value::for_value_type::<Self>();
12170        unsafe {
12171            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
12172        }
12173        value
12174    }
12175
12176    #[inline]
12177    fn value_type(&self) -> glib::Type {
12178        Self::static_type()
12179    }
12180}
12181
12182impl From<SpinType> for glib::Value {
12183    #[inline]
12184    fn from(v: SpinType) -> Self {
12185        skip_assert_initialized!();
12186        ToValue::to_value(&v)
12187    }
12188}
12189
12190/// Possible transitions between pages in a [`Stack`][crate::Stack] widget.
12191///
12192/// New values may be added to this enumeration over time.
12193#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
12194#[non_exhaustive]
12195#[doc(alias = "GtkStackTransitionType")]
12196pub enum StackTransitionType {
12197    /// No transition
12198    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_NONE")]
12199    None,
12200    /// A cross-fade
12201    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_CROSSFADE")]
12202    Crossfade,
12203    /// Slide from left to right
12204    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT")]
12205    SlideRight,
12206    /// Slide from right to left
12207    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT")]
12208    SlideLeft,
12209    /// Slide from bottom up
12210    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_SLIDE_UP")]
12211    SlideUp,
12212    /// Slide from top down
12213    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN")]
12214    SlideDown,
12215    /// Slide from left or right according to the children order
12216    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT")]
12217    SlideLeftRight,
12218    /// Slide from top down or bottom up according to the order
12219    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN")]
12220    SlideUpDown,
12221    /// Cover the old page by sliding up
12222    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_OVER_UP")]
12223    OverUp,
12224    /// Cover the old page by sliding down
12225    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_OVER_DOWN")]
12226    OverDown,
12227    /// Cover the old page by sliding to the left
12228    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_OVER_LEFT")]
12229    OverLeft,
12230    /// Cover the old page by sliding to the right
12231    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_OVER_RIGHT")]
12232    OverRight,
12233    /// Uncover the new page by sliding up
12234    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_UNDER_UP")]
12235    UnderUp,
12236    /// Uncover the new page by sliding down
12237    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_UNDER_DOWN")]
12238    UnderDown,
12239    /// Uncover the new page by sliding to the left
12240    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_UNDER_LEFT")]
12241    UnderLeft,
12242    /// Uncover the new page by sliding to the right
12243    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT")]
12244    UnderRight,
12245    /// Cover the old page sliding up or uncover the new page sliding down, according to order
12246    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_OVER_UP_DOWN")]
12247    OverUpDown,
12248    /// Cover the old page sliding down or uncover the new page sliding up, according to order
12249    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_OVER_DOWN_UP")]
12250    OverDownUp,
12251    /// Cover the old page sliding left or uncover the new page sliding right, according to order
12252    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_OVER_LEFT_RIGHT")]
12253    OverLeftRight,
12254    /// Cover the old page sliding right or uncover the new page sliding left, according to order
12255    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT")]
12256    OverRightLeft,
12257    /// Pretend the pages are sides of a cube and rotate that cube to the left
12258    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT")]
12259    RotateLeft,
12260    /// Pretend the pages are sides of a cube and rotate that cube to the right
12261    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_ROTATE_RIGHT")]
12262    RotateRight,
12263    /// Pretend the pages are sides of a cube and rotate that cube to the left or right according to the children order
12264    #[doc(alias = "GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT_RIGHT")]
12265    RotateLeftRight,
12266    #[doc(hidden)]
12267    __Unknown(i32),
12268}
12269
12270#[doc(hidden)]
12271impl IntoGlib for StackTransitionType {
12272    type GlibType = ffi::GtkStackTransitionType;
12273
12274    fn into_glib(self) -> ffi::GtkStackTransitionType {
12275        match self {
12276            Self::None => ffi::GTK_STACK_TRANSITION_TYPE_NONE,
12277            Self::Crossfade => ffi::GTK_STACK_TRANSITION_TYPE_CROSSFADE,
12278            Self::SlideRight => ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT,
12279            Self::SlideLeft => ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT,
12280            Self::SlideUp => ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_UP,
12281            Self::SlideDown => ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN,
12282            Self::SlideLeftRight => ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT,
12283            Self::SlideUpDown => ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN,
12284            Self::OverUp => ffi::GTK_STACK_TRANSITION_TYPE_OVER_UP,
12285            Self::OverDown => ffi::GTK_STACK_TRANSITION_TYPE_OVER_DOWN,
12286            Self::OverLeft => ffi::GTK_STACK_TRANSITION_TYPE_OVER_LEFT,
12287            Self::OverRight => ffi::GTK_STACK_TRANSITION_TYPE_OVER_RIGHT,
12288            Self::UnderUp => ffi::GTK_STACK_TRANSITION_TYPE_UNDER_UP,
12289            Self::UnderDown => ffi::GTK_STACK_TRANSITION_TYPE_UNDER_DOWN,
12290            Self::UnderLeft => ffi::GTK_STACK_TRANSITION_TYPE_UNDER_LEFT,
12291            Self::UnderRight => ffi::GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT,
12292            Self::OverUpDown => ffi::GTK_STACK_TRANSITION_TYPE_OVER_UP_DOWN,
12293            Self::OverDownUp => ffi::GTK_STACK_TRANSITION_TYPE_OVER_DOWN_UP,
12294            Self::OverLeftRight => ffi::GTK_STACK_TRANSITION_TYPE_OVER_LEFT_RIGHT,
12295            Self::OverRightLeft => ffi::GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT,
12296            Self::RotateLeft => ffi::GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT,
12297            Self::RotateRight => ffi::GTK_STACK_TRANSITION_TYPE_ROTATE_RIGHT,
12298            Self::RotateLeftRight => ffi::GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT_RIGHT,
12299            Self::__Unknown(value) => value,
12300        }
12301    }
12302}
12303
12304#[doc(hidden)]
12305impl FromGlib<ffi::GtkStackTransitionType> for StackTransitionType {
12306    unsafe fn from_glib(value: ffi::GtkStackTransitionType) -> Self {
12307        skip_assert_initialized!();
12308
12309        match value {
12310            ffi::GTK_STACK_TRANSITION_TYPE_NONE => Self::None,
12311            ffi::GTK_STACK_TRANSITION_TYPE_CROSSFADE => Self::Crossfade,
12312            ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT => Self::SlideRight,
12313            ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT => Self::SlideLeft,
12314            ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_UP => Self::SlideUp,
12315            ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN => Self::SlideDown,
12316            ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT => Self::SlideLeftRight,
12317            ffi::GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN => Self::SlideUpDown,
12318            ffi::GTK_STACK_TRANSITION_TYPE_OVER_UP => Self::OverUp,
12319            ffi::GTK_STACK_TRANSITION_TYPE_OVER_DOWN => Self::OverDown,
12320            ffi::GTK_STACK_TRANSITION_TYPE_OVER_LEFT => Self::OverLeft,
12321            ffi::GTK_STACK_TRANSITION_TYPE_OVER_RIGHT => Self::OverRight,
12322            ffi::GTK_STACK_TRANSITION_TYPE_UNDER_UP => Self::UnderUp,
12323            ffi::GTK_STACK_TRANSITION_TYPE_UNDER_DOWN => Self::UnderDown,
12324            ffi::GTK_STACK_TRANSITION_TYPE_UNDER_LEFT => Self::UnderLeft,
12325            ffi::GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT => Self::UnderRight,
12326            ffi::GTK_STACK_TRANSITION_TYPE_OVER_UP_DOWN => Self::OverUpDown,
12327            ffi::GTK_STACK_TRANSITION_TYPE_OVER_DOWN_UP => Self::OverDownUp,
12328            ffi::GTK_STACK_TRANSITION_TYPE_OVER_LEFT_RIGHT => Self::OverLeftRight,
12329            ffi::GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT => Self::OverRightLeft,
12330            ffi::GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT => Self::RotateLeft,
12331            ffi::GTK_STACK_TRANSITION_TYPE_ROTATE_RIGHT => Self::RotateRight,
12332            ffi::GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT_RIGHT => Self::RotateLeftRight,
12333            value => Self::__Unknown(value),
12334        }
12335    }
12336}
12337
12338impl StaticType for StackTransitionType {
12339    #[inline]
12340    #[doc(alias = "gtk_stack_transition_type_get_type")]
12341    fn static_type() -> glib::Type {
12342        unsafe { from_glib(ffi::gtk_stack_transition_type_get_type()) }
12343    }
12344}
12345
12346impl glib::HasParamSpec for StackTransitionType {
12347    type ParamSpec = glib::ParamSpecEnum;
12348    type SetValue = Self;
12349    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
12350
12351    fn param_spec_builder() -> Self::BuilderFn {
12352        Self::ParamSpec::builder_with_default
12353    }
12354}
12355
12356impl glib::value::ValueType for StackTransitionType {
12357    type Type = Self;
12358}
12359
12360unsafe impl<'a> glib::value::FromValue<'a> for StackTransitionType {
12361    type Checker = glib::value::GenericValueTypeChecker<Self>;
12362
12363    #[inline]
12364    unsafe fn from_value(value: &'a glib::Value) -> Self {
12365        skip_assert_initialized!();
12366        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
12367    }
12368}
12369
12370impl ToValue for StackTransitionType {
12371    #[inline]
12372    fn to_value(&self) -> glib::Value {
12373        let mut value = glib::Value::for_value_type::<Self>();
12374        unsafe {
12375            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
12376        }
12377        value
12378    }
12379
12380    #[inline]
12381    fn value_type(&self) -> glib::Type {
12382        Self::static_type()
12383    }
12384}
12385
12386impl From<StackTransitionType> for glib::Value {
12387    #[inline]
12388    fn from(v: StackTransitionType) -> Self {
12389        skip_assert_initialized!();
12390        ToValue::to_value(&v)
12391    }
12392}
12393
12394/// Specifies how search strings are matched inside text.
12395#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
12396#[non_exhaustive]
12397#[doc(alias = "GtkStringFilterMatchMode")]
12398pub enum StringFilterMatchMode {
12399    /// The search string and
12400    ///   text must match exactly
12401    #[doc(alias = "GTK_STRING_FILTER_MATCH_MODE_EXACT")]
12402    Exact,
12403    /// The search string
12404    ///   must be contained as a substring inside the text
12405    #[doc(alias = "GTK_STRING_FILTER_MATCH_MODE_SUBSTRING")]
12406    Substring,
12407    /// The text must begin
12408    ///   with the search string
12409    #[doc(alias = "GTK_STRING_FILTER_MATCH_MODE_PREFIX")]
12410    Prefix,
12411    #[doc(hidden)]
12412    __Unknown(i32),
12413}
12414
12415#[doc(hidden)]
12416impl IntoGlib for StringFilterMatchMode {
12417    type GlibType = ffi::GtkStringFilterMatchMode;
12418
12419    #[inline]
12420    fn into_glib(self) -> ffi::GtkStringFilterMatchMode {
12421        match self {
12422            Self::Exact => ffi::GTK_STRING_FILTER_MATCH_MODE_EXACT,
12423            Self::Substring => ffi::GTK_STRING_FILTER_MATCH_MODE_SUBSTRING,
12424            Self::Prefix => ffi::GTK_STRING_FILTER_MATCH_MODE_PREFIX,
12425            Self::__Unknown(value) => value,
12426        }
12427    }
12428}
12429
12430#[doc(hidden)]
12431impl FromGlib<ffi::GtkStringFilterMatchMode> for StringFilterMatchMode {
12432    #[inline]
12433    unsafe fn from_glib(value: ffi::GtkStringFilterMatchMode) -> Self {
12434        skip_assert_initialized!();
12435
12436        match value {
12437            ffi::GTK_STRING_FILTER_MATCH_MODE_EXACT => Self::Exact,
12438            ffi::GTK_STRING_FILTER_MATCH_MODE_SUBSTRING => Self::Substring,
12439            ffi::GTK_STRING_FILTER_MATCH_MODE_PREFIX => Self::Prefix,
12440            value => Self::__Unknown(value),
12441        }
12442    }
12443}
12444
12445impl StaticType for StringFilterMatchMode {
12446    #[inline]
12447    #[doc(alias = "gtk_string_filter_match_mode_get_type")]
12448    fn static_type() -> glib::Type {
12449        unsafe { from_glib(ffi::gtk_string_filter_match_mode_get_type()) }
12450    }
12451}
12452
12453impl glib::HasParamSpec for StringFilterMatchMode {
12454    type ParamSpec = glib::ParamSpecEnum;
12455    type SetValue = Self;
12456    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
12457
12458    fn param_spec_builder() -> Self::BuilderFn {
12459        Self::ParamSpec::builder_with_default
12460    }
12461}
12462
12463impl glib::value::ValueType for StringFilterMatchMode {
12464    type Type = Self;
12465}
12466
12467unsafe impl<'a> glib::value::FromValue<'a> for StringFilterMatchMode {
12468    type Checker = glib::value::GenericValueTypeChecker<Self>;
12469
12470    #[inline]
12471    unsafe fn from_value(value: &'a glib::Value) -> Self {
12472        skip_assert_initialized!();
12473        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
12474    }
12475}
12476
12477impl ToValue for StringFilterMatchMode {
12478    #[inline]
12479    fn to_value(&self) -> glib::Value {
12480        let mut value = glib::Value::for_value_type::<Self>();
12481        unsafe {
12482            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
12483        }
12484        value
12485    }
12486
12487    #[inline]
12488    fn value_type(&self) -> glib::Type {
12489        Self::static_type()
12490    }
12491}
12492
12493impl From<StringFilterMatchMode> for glib::Value {
12494    #[inline]
12495    fn from(v: StringFilterMatchMode) -> Self {
12496        skip_assert_initialized!();
12497        ToValue::to_value(&v)
12498    }
12499}
12500
12501/// The indexes of colors passed to symbolic color rendering, such as
12502/// `vfunc::Gtk::SymbolicPaintable::snapshot_symbolic`.
12503///
12504/// More values may be added over time.
12505#[cfg(feature = "v4_6")]
12506#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
12507#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
12508#[non_exhaustive]
12509#[doc(alias = "GtkSymbolicColor")]
12510pub enum SymbolicColor {
12511    /// The default foreground color
12512    #[doc(alias = "GTK_SYMBOLIC_COLOR_FOREGROUND")]
12513    Foreground,
12514    /// Indication color for errors
12515    #[doc(alias = "GTK_SYMBOLIC_COLOR_ERROR")]
12516    Error,
12517    /// Indication color for warnings
12518    #[doc(alias = "GTK_SYMBOLIC_COLOR_WARNING")]
12519    Warning,
12520    /// Indication color for success
12521    #[doc(alias = "GTK_SYMBOLIC_COLOR_SUCCESS")]
12522    Success,
12523    #[doc(hidden)]
12524    __Unknown(i32),
12525}
12526
12527#[cfg(feature = "v4_6")]
12528#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
12529#[doc(hidden)]
12530impl IntoGlib for SymbolicColor {
12531    type GlibType = ffi::GtkSymbolicColor;
12532
12533    #[inline]
12534    fn into_glib(self) -> ffi::GtkSymbolicColor {
12535        match self {
12536            Self::Foreground => ffi::GTK_SYMBOLIC_COLOR_FOREGROUND,
12537            Self::Error => ffi::GTK_SYMBOLIC_COLOR_ERROR,
12538            Self::Warning => ffi::GTK_SYMBOLIC_COLOR_WARNING,
12539            Self::Success => ffi::GTK_SYMBOLIC_COLOR_SUCCESS,
12540            Self::__Unknown(value) => value,
12541        }
12542    }
12543}
12544
12545#[cfg(feature = "v4_6")]
12546#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
12547#[doc(hidden)]
12548impl FromGlib<ffi::GtkSymbolicColor> for SymbolicColor {
12549    #[inline]
12550    unsafe fn from_glib(value: ffi::GtkSymbolicColor) -> Self {
12551        skip_assert_initialized!();
12552
12553        match value {
12554            ffi::GTK_SYMBOLIC_COLOR_FOREGROUND => Self::Foreground,
12555            ffi::GTK_SYMBOLIC_COLOR_ERROR => Self::Error,
12556            ffi::GTK_SYMBOLIC_COLOR_WARNING => Self::Warning,
12557            ffi::GTK_SYMBOLIC_COLOR_SUCCESS => Self::Success,
12558            value => Self::__Unknown(value),
12559        }
12560    }
12561}
12562
12563#[cfg(feature = "v4_6")]
12564#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
12565impl StaticType for SymbolicColor {
12566    #[inline]
12567    #[doc(alias = "gtk_symbolic_color_get_type")]
12568    fn static_type() -> glib::Type {
12569        unsafe { from_glib(ffi::gtk_symbolic_color_get_type()) }
12570    }
12571}
12572
12573#[cfg(feature = "v4_6")]
12574#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
12575impl glib::HasParamSpec for SymbolicColor {
12576    type ParamSpec = glib::ParamSpecEnum;
12577    type SetValue = Self;
12578    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
12579
12580    fn param_spec_builder() -> Self::BuilderFn {
12581        Self::ParamSpec::builder_with_default
12582    }
12583}
12584
12585#[cfg(feature = "v4_6")]
12586#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
12587impl glib::value::ValueType for SymbolicColor {
12588    type Type = Self;
12589}
12590
12591#[cfg(feature = "v4_6")]
12592#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
12593unsafe impl<'a> glib::value::FromValue<'a> for SymbolicColor {
12594    type Checker = glib::value::GenericValueTypeChecker<Self>;
12595
12596    #[inline]
12597    unsafe fn from_value(value: &'a glib::Value) -> Self {
12598        skip_assert_initialized!();
12599        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
12600    }
12601}
12602
12603#[cfg(feature = "v4_6")]
12604#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
12605impl ToValue for SymbolicColor {
12606    #[inline]
12607    fn to_value(&self) -> glib::Value {
12608        let mut value = glib::Value::for_value_type::<Self>();
12609        unsafe {
12610            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
12611        }
12612        value
12613    }
12614
12615    #[inline]
12616    fn value_type(&self) -> glib::Type {
12617        Self::static_type()
12618    }
12619}
12620
12621#[cfg(feature = "v4_6")]
12622#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
12623impl From<SymbolicColor> for glib::Value {
12624    #[inline]
12625    fn from(v: SymbolicColor) -> Self {
12626        skip_assert_initialized!();
12627        ToValue::to_value(&v)
12628    }
12629}
12630
12631/// Values that can be passed to the [`WidgetImpl::system_setting_changed()`][crate::subclass::prelude::WidgetImpl::system_setting_changed()]
12632/// vfunc.
12633///
12634/// The values indicate which system setting has changed.
12635/// Widgets may need to drop caches, or react otherwise.
12636///
12637/// Most of the values correspond to [`Settings`][crate::Settings] properties.
12638///
12639/// More values may be added over time.
12640#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
12641#[non_exhaustive]
12642#[doc(alias = "GtkSystemSetting")]
12643pub enum SystemSetting {
12644    /// the [`gtk-xft-dpi`][struct@crate::Settings#gtk-xft-dpi] setting has changed
12645    #[doc(alias = "GTK_SYSTEM_SETTING_DPI")]
12646    Dpi,
12647    /// The [`gtk-font-name`][struct@crate::Settings#gtk-font-name] setting has changed
12648    #[doc(alias = "GTK_SYSTEM_SETTING_FONT_NAME")]
12649    FontName,
12650    /// The font configuration has changed in a way that
12651    ///   requires text to be redrawn. This can be any of the
12652    ///   [`gtk-xft-antialias`][struct@crate::Settings#gtk-xft-antialias],
12653    ///   [`gtk-xft-hinting`][struct@crate::Settings#gtk-xft-hinting],
12654    ///   [`gtk-xft-hintstyle`][struct@crate::Settings#gtk-xft-hintstyle],
12655    ///   [`gtk-xft-rgba`][struct@crate::Settings#gtk-xft-rgba] or
12656    ///   [`gtk-fontconfig-timestamp`][struct@crate::Settings#gtk-fontconfig-timestamp] settings
12657    #[doc(alias = "GTK_SYSTEM_SETTING_FONT_CONFIG")]
12658    FontConfig,
12659    /// The display has changed
12660    #[doc(alias = "GTK_SYSTEM_SETTING_DISPLAY")]
12661    Display,
12662    /// The icon theme has changed in a way that requires
12663    ///   icons to be looked up again
12664    #[doc(alias = "GTK_SYSTEM_SETTING_ICON_THEME")]
12665    IconTheme,
12666    #[doc(hidden)]
12667    __Unknown(i32),
12668}
12669
12670#[doc(hidden)]
12671impl IntoGlib for SystemSetting {
12672    type GlibType = ffi::GtkSystemSetting;
12673
12674    #[inline]
12675    fn into_glib(self) -> ffi::GtkSystemSetting {
12676        match self {
12677            Self::Dpi => ffi::GTK_SYSTEM_SETTING_DPI,
12678            Self::FontName => ffi::GTK_SYSTEM_SETTING_FONT_NAME,
12679            Self::FontConfig => ffi::GTK_SYSTEM_SETTING_FONT_CONFIG,
12680            Self::Display => ffi::GTK_SYSTEM_SETTING_DISPLAY,
12681            Self::IconTheme => ffi::GTK_SYSTEM_SETTING_ICON_THEME,
12682            Self::__Unknown(value) => value,
12683        }
12684    }
12685}
12686
12687#[doc(hidden)]
12688impl FromGlib<ffi::GtkSystemSetting> for SystemSetting {
12689    #[inline]
12690    unsafe fn from_glib(value: ffi::GtkSystemSetting) -> Self {
12691        skip_assert_initialized!();
12692
12693        match value {
12694            ffi::GTK_SYSTEM_SETTING_DPI => Self::Dpi,
12695            ffi::GTK_SYSTEM_SETTING_FONT_NAME => Self::FontName,
12696            ffi::GTK_SYSTEM_SETTING_FONT_CONFIG => Self::FontConfig,
12697            ffi::GTK_SYSTEM_SETTING_DISPLAY => Self::Display,
12698            ffi::GTK_SYSTEM_SETTING_ICON_THEME => Self::IconTheme,
12699            value => Self::__Unknown(value),
12700        }
12701    }
12702}
12703
12704impl StaticType for SystemSetting {
12705    #[inline]
12706    #[doc(alias = "gtk_system_setting_get_type")]
12707    fn static_type() -> glib::Type {
12708        unsafe { from_glib(ffi::gtk_system_setting_get_type()) }
12709    }
12710}
12711
12712impl glib::HasParamSpec for SystemSetting {
12713    type ParamSpec = glib::ParamSpecEnum;
12714    type SetValue = Self;
12715    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
12716
12717    fn param_spec_builder() -> Self::BuilderFn {
12718        Self::ParamSpec::builder_with_default
12719    }
12720}
12721
12722impl glib::value::ValueType for SystemSetting {
12723    type Type = Self;
12724}
12725
12726unsafe impl<'a> glib::value::FromValue<'a> for SystemSetting {
12727    type Checker = glib::value::GenericValueTypeChecker<Self>;
12728
12729    #[inline]
12730    unsafe fn from_value(value: &'a glib::Value) -> Self {
12731        skip_assert_initialized!();
12732        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
12733    }
12734}
12735
12736impl ToValue for SystemSetting {
12737    #[inline]
12738    fn to_value(&self) -> glib::Value {
12739        let mut value = glib::Value::for_value_type::<Self>();
12740        unsafe {
12741            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
12742        }
12743        value
12744    }
12745
12746    #[inline]
12747    fn value_type(&self) -> glib::Type {
12748        Self::static_type()
12749    }
12750}
12751
12752impl From<SystemSetting> for glib::Value {
12753    #[inline]
12754    fn from(v: SystemSetting) -> Self {
12755        skip_assert_initialized!();
12756        ToValue::to_value(&v)
12757    }
12758}
12759
12760/// Reading directions for text.
12761#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
12762#[non_exhaustive]
12763#[doc(alias = "GtkTextDirection")]
12764pub enum TextDirection {
12765    /// No direction.
12766    #[doc(alias = "GTK_TEXT_DIR_NONE")]
12767    None,
12768    /// Left to right text direction.
12769    #[doc(alias = "GTK_TEXT_DIR_LTR")]
12770    Ltr,
12771    /// Right to left text direction.
12772    #[doc(alias = "GTK_TEXT_DIR_RTL")]
12773    Rtl,
12774    #[doc(hidden)]
12775    __Unknown(i32),
12776}
12777
12778#[doc(hidden)]
12779impl IntoGlib for TextDirection {
12780    type GlibType = ffi::GtkTextDirection;
12781
12782    #[inline]
12783    fn into_glib(self) -> ffi::GtkTextDirection {
12784        match self {
12785            Self::None => ffi::GTK_TEXT_DIR_NONE,
12786            Self::Ltr => ffi::GTK_TEXT_DIR_LTR,
12787            Self::Rtl => ffi::GTK_TEXT_DIR_RTL,
12788            Self::__Unknown(value) => value,
12789        }
12790    }
12791}
12792
12793#[doc(hidden)]
12794impl FromGlib<ffi::GtkTextDirection> for TextDirection {
12795    #[inline]
12796    unsafe fn from_glib(value: ffi::GtkTextDirection) -> Self {
12797        skip_assert_initialized!();
12798
12799        match value {
12800            ffi::GTK_TEXT_DIR_NONE => Self::None,
12801            ffi::GTK_TEXT_DIR_LTR => Self::Ltr,
12802            ffi::GTK_TEXT_DIR_RTL => Self::Rtl,
12803            value => Self::__Unknown(value),
12804        }
12805    }
12806}
12807
12808impl StaticType for TextDirection {
12809    #[inline]
12810    #[doc(alias = "gtk_text_direction_get_type")]
12811    fn static_type() -> glib::Type {
12812        unsafe { from_glib(ffi::gtk_text_direction_get_type()) }
12813    }
12814}
12815
12816impl glib::HasParamSpec for TextDirection {
12817    type ParamSpec = glib::ParamSpecEnum;
12818    type SetValue = Self;
12819    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
12820
12821    fn param_spec_builder() -> Self::BuilderFn {
12822        Self::ParamSpec::builder_with_default
12823    }
12824}
12825
12826impl glib::value::ValueType for TextDirection {
12827    type Type = Self;
12828}
12829
12830unsafe impl<'a> glib::value::FromValue<'a> for TextDirection {
12831    type Checker = glib::value::GenericValueTypeChecker<Self>;
12832
12833    #[inline]
12834    unsafe fn from_value(value: &'a glib::Value) -> Self {
12835        skip_assert_initialized!();
12836        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
12837    }
12838}
12839
12840impl ToValue for TextDirection {
12841    #[inline]
12842    fn to_value(&self) -> glib::Value {
12843        let mut value = glib::Value::for_value_type::<Self>();
12844        unsafe {
12845            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
12846        }
12847        value
12848    }
12849
12850    #[inline]
12851    fn value_type(&self) -> glib::Type {
12852        Self::static_type()
12853    }
12854}
12855
12856impl From<TextDirection> for glib::Value {
12857    #[inline]
12858    fn from(v: TextDirection) -> Self {
12859        skip_assert_initialized!();
12860        ToValue::to_value(&v)
12861    }
12862}
12863
12864/// Granularity types that extend the text selection. Use the
12865/// `GtkTextView::extend-selection` signal to customize the selection.
12866#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
12867#[non_exhaustive]
12868#[doc(alias = "GtkTextExtendSelection")]
12869pub enum TextExtendSelection {
12870    /// Selects the current word. It is triggered by
12871    ///   a double-click for example.
12872    #[doc(alias = "GTK_TEXT_EXTEND_SELECTION_WORD")]
12873    Word,
12874    /// Selects the current line. It is triggered by
12875    ///   a triple-click for example.
12876    #[doc(alias = "GTK_TEXT_EXTEND_SELECTION_LINE")]
12877    Line,
12878    #[doc(hidden)]
12879    __Unknown(i32),
12880}
12881
12882#[doc(hidden)]
12883impl IntoGlib for TextExtendSelection {
12884    type GlibType = ffi::GtkTextExtendSelection;
12885
12886    #[inline]
12887    fn into_glib(self) -> ffi::GtkTextExtendSelection {
12888        match self {
12889            Self::Word => ffi::GTK_TEXT_EXTEND_SELECTION_WORD,
12890            Self::Line => ffi::GTK_TEXT_EXTEND_SELECTION_LINE,
12891            Self::__Unknown(value) => value,
12892        }
12893    }
12894}
12895
12896#[doc(hidden)]
12897impl FromGlib<ffi::GtkTextExtendSelection> for TextExtendSelection {
12898    #[inline]
12899    unsafe fn from_glib(value: ffi::GtkTextExtendSelection) -> Self {
12900        skip_assert_initialized!();
12901
12902        match value {
12903            ffi::GTK_TEXT_EXTEND_SELECTION_WORD => Self::Word,
12904            ffi::GTK_TEXT_EXTEND_SELECTION_LINE => Self::Line,
12905            value => Self::__Unknown(value),
12906        }
12907    }
12908}
12909
12910impl StaticType for TextExtendSelection {
12911    #[inline]
12912    #[doc(alias = "gtk_text_extend_selection_get_type")]
12913    fn static_type() -> glib::Type {
12914        unsafe { from_glib(ffi::gtk_text_extend_selection_get_type()) }
12915    }
12916}
12917
12918impl glib::HasParamSpec for TextExtendSelection {
12919    type ParamSpec = glib::ParamSpecEnum;
12920    type SetValue = Self;
12921    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
12922
12923    fn param_spec_builder() -> Self::BuilderFn {
12924        Self::ParamSpec::builder_with_default
12925    }
12926}
12927
12928impl glib::value::ValueType for TextExtendSelection {
12929    type Type = Self;
12930}
12931
12932unsafe impl<'a> glib::value::FromValue<'a> for TextExtendSelection {
12933    type Checker = glib::value::GenericValueTypeChecker<Self>;
12934
12935    #[inline]
12936    unsafe fn from_value(value: &'a glib::Value) -> Self {
12937        skip_assert_initialized!();
12938        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
12939    }
12940}
12941
12942impl ToValue for TextExtendSelection {
12943    #[inline]
12944    fn to_value(&self) -> glib::Value {
12945        let mut value = glib::Value::for_value_type::<Self>();
12946        unsafe {
12947            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
12948        }
12949        value
12950    }
12951
12952    #[inline]
12953    fn value_type(&self) -> glib::Type {
12954        Self::static_type()
12955    }
12956}
12957
12958impl From<TextExtendSelection> for glib::Value {
12959    #[inline]
12960    fn from(v: TextExtendSelection) -> Self {
12961        skip_assert_initialized!();
12962        ToValue::to_value(&v)
12963    }
12964}
12965
12966/// Used to reference the layers of [`TextView`][crate::TextView] for the purpose of customized
12967/// drawing with the ::snapshot_layer vfunc.
12968#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
12969#[non_exhaustive]
12970#[doc(alias = "GtkTextViewLayer")]
12971pub enum TextViewLayer {
12972    /// The layer rendered below the text (but above the background).
12973    #[doc(alias = "GTK_TEXT_VIEW_LAYER_BELOW_TEXT")]
12974    BelowText,
12975    /// The layer rendered above the text.
12976    #[doc(alias = "GTK_TEXT_VIEW_LAYER_ABOVE_TEXT")]
12977    AboveText,
12978    #[doc(hidden)]
12979    __Unknown(i32),
12980}
12981
12982#[doc(hidden)]
12983impl IntoGlib for TextViewLayer {
12984    type GlibType = ffi::GtkTextViewLayer;
12985
12986    #[inline]
12987    fn into_glib(self) -> ffi::GtkTextViewLayer {
12988        match self {
12989            Self::BelowText => ffi::GTK_TEXT_VIEW_LAYER_BELOW_TEXT,
12990            Self::AboveText => ffi::GTK_TEXT_VIEW_LAYER_ABOVE_TEXT,
12991            Self::__Unknown(value) => value,
12992        }
12993    }
12994}
12995
12996#[doc(hidden)]
12997impl FromGlib<ffi::GtkTextViewLayer> for TextViewLayer {
12998    #[inline]
12999    unsafe fn from_glib(value: ffi::GtkTextViewLayer) -> Self {
13000        skip_assert_initialized!();
13001
13002        match value {
13003            ffi::GTK_TEXT_VIEW_LAYER_BELOW_TEXT => Self::BelowText,
13004            ffi::GTK_TEXT_VIEW_LAYER_ABOVE_TEXT => Self::AboveText,
13005            value => Self::__Unknown(value),
13006        }
13007    }
13008}
13009
13010impl StaticType for TextViewLayer {
13011    #[inline]
13012    #[doc(alias = "gtk_text_view_layer_get_type")]
13013    fn static_type() -> glib::Type {
13014        unsafe { from_glib(ffi::gtk_text_view_layer_get_type()) }
13015    }
13016}
13017
13018impl glib::HasParamSpec for TextViewLayer {
13019    type ParamSpec = glib::ParamSpecEnum;
13020    type SetValue = Self;
13021    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
13022
13023    fn param_spec_builder() -> Self::BuilderFn {
13024        Self::ParamSpec::builder_with_default
13025    }
13026}
13027
13028impl glib::value::ValueType for TextViewLayer {
13029    type Type = Self;
13030}
13031
13032unsafe impl<'a> glib::value::FromValue<'a> for TextViewLayer {
13033    type Checker = glib::value::GenericValueTypeChecker<Self>;
13034
13035    #[inline]
13036    unsafe fn from_value(value: &'a glib::Value) -> Self {
13037        skip_assert_initialized!();
13038        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
13039    }
13040}
13041
13042impl ToValue for TextViewLayer {
13043    #[inline]
13044    fn to_value(&self) -> glib::Value {
13045        let mut value = glib::Value::for_value_type::<Self>();
13046        unsafe {
13047            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
13048        }
13049        value
13050    }
13051
13052    #[inline]
13053    fn value_type(&self) -> glib::Type {
13054        Self::static_type()
13055    }
13056}
13057
13058impl From<TextViewLayer> for glib::Value {
13059    #[inline]
13060    fn from(v: TextViewLayer) -> Self {
13061        skip_assert_initialized!();
13062        ToValue::to_value(&v)
13063    }
13064}
13065
13066/// Used to reference the parts of [`TextView`][crate::TextView].
13067#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
13068#[non_exhaustive]
13069#[doc(alias = "GtkTextWindowType")]
13070pub enum TextWindowType {
13071    /// Window that floats over scrolling areas.
13072    #[doc(alias = "GTK_TEXT_WINDOW_WIDGET")]
13073    Widget,
13074    /// Scrollable text window.
13075    #[doc(alias = "GTK_TEXT_WINDOW_TEXT")]
13076    Text,
13077    /// Left side border window.
13078    #[doc(alias = "GTK_TEXT_WINDOW_LEFT")]
13079    Left,
13080    /// Right side border window.
13081    #[doc(alias = "GTK_TEXT_WINDOW_RIGHT")]
13082    Right,
13083    /// Top border window.
13084    #[doc(alias = "GTK_TEXT_WINDOW_TOP")]
13085    Top,
13086    /// Bottom border window.
13087    #[doc(alias = "GTK_TEXT_WINDOW_BOTTOM")]
13088    Bottom,
13089    #[doc(hidden)]
13090    __Unknown(i32),
13091}
13092
13093#[doc(hidden)]
13094impl IntoGlib for TextWindowType {
13095    type GlibType = ffi::GtkTextWindowType;
13096
13097    #[inline]
13098    fn into_glib(self) -> ffi::GtkTextWindowType {
13099        match self {
13100            Self::Widget => ffi::GTK_TEXT_WINDOW_WIDGET,
13101            Self::Text => ffi::GTK_TEXT_WINDOW_TEXT,
13102            Self::Left => ffi::GTK_TEXT_WINDOW_LEFT,
13103            Self::Right => ffi::GTK_TEXT_WINDOW_RIGHT,
13104            Self::Top => ffi::GTK_TEXT_WINDOW_TOP,
13105            Self::Bottom => ffi::GTK_TEXT_WINDOW_BOTTOM,
13106            Self::__Unknown(value) => value,
13107        }
13108    }
13109}
13110
13111#[doc(hidden)]
13112impl FromGlib<ffi::GtkTextWindowType> for TextWindowType {
13113    #[inline]
13114    unsafe fn from_glib(value: ffi::GtkTextWindowType) -> Self {
13115        skip_assert_initialized!();
13116
13117        match value {
13118            ffi::GTK_TEXT_WINDOW_WIDGET => Self::Widget,
13119            ffi::GTK_TEXT_WINDOW_TEXT => Self::Text,
13120            ffi::GTK_TEXT_WINDOW_LEFT => Self::Left,
13121            ffi::GTK_TEXT_WINDOW_RIGHT => Self::Right,
13122            ffi::GTK_TEXT_WINDOW_TOP => Self::Top,
13123            ffi::GTK_TEXT_WINDOW_BOTTOM => Self::Bottom,
13124            value => Self::__Unknown(value),
13125        }
13126    }
13127}
13128
13129impl StaticType for TextWindowType {
13130    #[inline]
13131    #[doc(alias = "gtk_text_window_type_get_type")]
13132    fn static_type() -> glib::Type {
13133        unsafe { from_glib(ffi::gtk_text_window_type_get_type()) }
13134    }
13135}
13136
13137impl glib::HasParamSpec for TextWindowType {
13138    type ParamSpec = glib::ParamSpecEnum;
13139    type SetValue = Self;
13140    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
13141
13142    fn param_spec_builder() -> Self::BuilderFn {
13143        Self::ParamSpec::builder_with_default
13144    }
13145}
13146
13147impl glib::value::ValueType for TextWindowType {
13148    type Type = Self;
13149}
13150
13151unsafe impl<'a> glib::value::FromValue<'a> for TextWindowType {
13152    type Checker = glib::value::GenericValueTypeChecker<Self>;
13153
13154    #[inline]
13155    unsafe fn from_value(value: &'a glib::Value) -> Self {
13156        skip_assert_initialized!();
13157        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
13158    }
13159}
13160
13161impl ToValue for TextWindowType {
13162    #[inline]
13163    fn to_value(&self) -> glib::Value {
13164        let mut value = glib::Value::for_value_type::<Self>();
13165        unsafe {
13166            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
13167        }
13168        value
13169    }
13170
13171    #[inline]
13172    fn value_type(&self) -> glib::Type {
13173        Self::static_type()
13174    }
13175}
13176
13177impl From<TextWindowType> for glib::Value {
13178    #[inline]
13179    fn from(v: TextWindowType) -> Self {
13180        skip_assert_initialized!();
13181        ToValue::to_value(&v)
13182    }
13183}
13184
13185/// The sizing method the column uses to determine its width.  Please note
13186/// that [`Autosize`][Self::Autosize] are inefficient for large views, and
13187/// can make columns appear choppy.
13188///
13189/// # Deprecated since 4.20
13190///
13191/// There is no replacement.
13192#[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
13193#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
13194#[non_exhaustive]
13195#[doc(alias = "GtkTreeViewColumnSizing")]
13196pub enum TreeViewColumnSizing {
13197    /// Columns only get bigger in reaction to changes in the model
13198    #[doc(alias = "GTK_TREE_VIEW_COLUMN_GROW_ONLY")]
13199    GrowOnly,
13200    /// Columns resize to be the optimal size every time the model changes.
13201    #[doc(alias = "GTK_TREE_VIEW_COLUMN_AUTOSIZE")]
13202    Autosize,
13203    /// Columns are a fixed numbers of pixels wide.
13204    #[doc(alias = "GTK_TREE_VIEW_COLUMN_FIXED")]
13205    Fixed,
13206    #[doc(hidden)]
13207    __Unknown(i32),
13208}
13209
13210#[allow(deprecated)]
13211#[doc(hidden)]
13212impl IntoGlib for TreeViewColumnSizing {
13213    type GlibType = ffi::GtkTreeViewColumnSizing;
13214
13215    #[inline]
13216    fn into_glib(self) -> ffi::GtkTreeViewColumnSizing {
13217        match self {
13218            Self::GrowOnly => ffi::GTK_TREE_VIEW_COLUMN_GROW_ONLY,
13219            Self::Autosize => ffi::GTK_TREE_VIEW_COLUMN_AUTOSIZE,
13220            Self::Fixed => ffi::GTK_TREE_VIEW_COLUMN_FIXED,
13221            Self::__Unknown(value) => value,
13222        }
13223    }
13224}
13225
13226#[allow(deprecated)]
13227#[doc(hidden)]
13228impl FromGlib<ffi::GtkTreeViewColumnSizing> for TreeViewColumnSizing {
13229    #[inline]
13230    unsafe fn from_glib(value: ffi::GtkTreeViewColumnSizing) -> Self {
13231        skip_assert_initialized!();
13232
13233        match value {
13234            ffi::GTK_TREE_VIEW_COLUMN_GROW_ONLY => Self::GrowOnly,
13235            ffi::GTK_TREE_VIEW_COLUMN_AUTOSIZE => Self::Autosize,
13236            ffi::GTK_TREE_VIEW_COLUMN_FIXED => Self::Fixed,
13237            value => Self::__Unknown(value),
13238        }
13239    }
13240}
13241
13242#[allow(deprecated)]
13243impl StaticType for TreeViewColumnSizing {
13244    #[inline]
13245    #[doc(alias = "gtk_tree_view_column_sizing_get_type")]
13246    fn static_type() -> glib::Type {
13247        unsafe { from_glib(ffi::gtk_tree_view_column_sizing_get_type()) }
13248    }
13249}
13250
13251#[allow(deprecated)]
13252impl glib::HasParamSpec for TreeViewColumnSizing {
13253    type ParamSpec = glib::ParamSpecEnum;
13254    type SetValue = Self;
13255    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
13256
13257    fn param_spec_builder() -> Self::BuilderFn {
13258        Self::ParamSpec::builder_with_default
13259    }
13260}
13261
13262#[allow(deprecated)]
13263impl glib::value::ValueType for TreeViewColumnSizing {
13264    type Type = Self;
13265}
13266
13267#[allow(deprecated)]
13268unsafe impl<'a> glib::value::FromValue<'a> for TreeViewColumnSizing {
13269    type Checker = glib::value::GenericValueTypeChecker<Self>;
13270
13271    #[inline]
13272    unsafe fn from_value(value: &'a glib::Value) -> Self {
13273        skip_assert_initialized!();
13274        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
13275    }
13276}
13277
13278#[allow(deprecated)]
13279impl ToValue for TreeViewColumnSizing {
13280    #[inline]
13281    fn to_value(&self) -> glib::Value {
13282        let mut value = glib::Value::for_value_type::<Self>();
13283        unsafe {
13284            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
13285        }
13286        value
13287    }
13288
13289    #[inline]
13290    fn value_type(&self) -> glib::Type {
13291        Self::static_type()
13292    }
13293}
13294
13295#[allow(deprecated)]
13296impl From<TreeViewColumnSizing> for glib::Value {
13297    #[inline]
13298    fn from(v: TreeViewColumnSizing) -> Self {
13299        skip_assert_initialized!();
13300        ToValue::to_value(&v)
13301    }
13302}
13303
13304/// An enum for determining where a dropped row goes.
13305///
13306/// # Deprecated since 4.20
13307///
13308/// There is no replacement.
13309#[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
13310#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
13311#[non_exhaustive]
13312#[doc(alias = "GtkTreeViewDropPosition")]
13313pub enum TreeViewDropPosition {
13314    /// dropped row is inserted before
13315    #[doc(alias = "GTK_TREE_VIEW_DROP_BEFORE")]
13316    Before,
13317    /// dropped row is inserted after
13318    #[doc(alias = "GTK_TREE_VIEW_DROP_AFTER")]
13319    After,
13320    /// dropped row becomes a child or is inserted before
13321    #[doc(alias = "GTK_TREE_VIEW_DROP_INTO_OR_BEFORE")]
13322    IntoOrBefore,
13323    /// dropped row becomes a child or is inserted after
13324    #[doc(alias = "GTK_TREE_VIEW_DROP_INTO_OR_AFTER")]
13325    IntoOrAfter,
13326    #[doc(hidden)]
13327    __Unknown(i32),
13328}
13329
13330#[allow(deprecated)]
13331#[doc(hidden)]
13332impl IntoGlib for TreeViewDropPosition {
13333    type GlibType = ffi::GtkTreeViewDropPosition;
13334
13335    #[inline]
13336    fn into_glib(self) -> ffi::GtkTreeViewDropPosition {
13337        match self {
13338            Self::Before => ffi::GTK_TREE_VIEW_DROP_BEFORE,
13339            Self::After => ffi::GTK_TREE_VIEW_DROP_AFTER,
13340            Self::IntoOrBefore => ffi::GTK_TREE_VIEW_DROP_INTO_OR_BEFORE,
13341            Self::IntoOrAfter => ffi::GTK_TREE_VIEW_DROP_INTO_OR_AFTER,
13342            Self::__Unknown(value) => value,
13343        }
13344    }
13345}
13346
13347#[allow(deprecated)]
13348#[doc(hidden)]
13349impl FromGlib<ffi::GtkTreeViewDropPosition> for TreeViewDropPosition {
13350    #[inline]
13351    unsafe fn from_glib(value: ffi::GtkTreeViewDropPosition) -> Self {
13352        skip_assert_initialized!();
13353
13354        match value {
13355            ffi::GTK_TREE_VIEW_DROP_BEFORE => Self::Before,
13356            ffi::GTK_TREE_VIEW_DROP_AFTER => Self::After,
13357            ffi::GTK_TREE_VIEW_DROP_INTO_OR_BEFORE => Self::IntoOrBefore,
13358            ffi::GTK_TREE_VIEW_DROP_INTO_OR_AFTER => Self::IntoOrAfter,
13359            value => Self::__Unknown(value),
13360        }
13361    }
13362}
13363
13364#[allow(deprecated)]
13365impl StaticType for TreeViewDropPosition {
13366    #[inline]
13367    #[doc(alias = "gtk_tree_view_drop_position_get_type")]
13368    fn static_type() -> glib::Type {
13369        unsafe { from_glib(ffi::gtk_tree_view_drop_position_get_type()) }
13370    }
13371}
13372
13373#[allow(deprecated)]
13374impl glib::HasParamSpec for TreeViewDropPosition {
13375    type ParamSpec = glib::ParamSpecEnum;
13376    type SetValue = Self;
13377    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
13378
13379    fn param_spec_builder() -> Self::BuilderFn {
13380        Self::ParamSpec::builder_with_default
13381    }
13382}
13383
13384#[allow(deprecated)]
13385impl glib::value::ValueType for TreeViewDropPosition {
13386    type Type = Self;
13387}
13388
13389#[allow(deprecated)]
13390unsafe impl<'a> glib::value::FromValue<'a> for TreeViewDropPosition {
13391    type Checker = glib::value::GenericValueTypeChecker<Self>;
13392
13393    #[inline]
13394    unsafe fn from_value(value: &'a glib::Value) -> Self {
13395        skip_assert_initialized!();
13396        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
13397    }
13398}
13399
13400#[allow(deprecated)]
13401impl ToValue for TreeViewDropPosition {
13402    #[inline]
13403    fn to_value(&self) -> glib::Value {
13404        let mut value = glib::Value::for_value_type::<Self>();
13405        unsafe {
13406            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
13407        }
13408        value
13409    }
13410
13411    #[inline]
13412    fn value_type(&self) -> glib::Type {
13413        Self::static_type()
13414    }
13415}
13416
13417#[allow(deprecated)]
13418impl From<TreeViewDropPosition> for glib::Value {
13419    #[inline]
13420    fn from(v: TreeViewDropPosition) -> Self {
13421        skip_assert_initialized!();
13422        ToValue::to_value(&v)
13423    }
13424}
13425
13426/// Used to indicate which grid lines to draw in a tree view.
13427///
13428/// # Deprecated since 4.20
13429///
13430/// There is no replacement
13431#[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
13432#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
13433#[non_exhaustive]
13434#[doc(alias = "GtkTreeViewGridLines")]
13435pub enum TreeViewGridLines {
13436    /// No grid lines.
13437    #[doc(alias = "GTK_TREE_VIEW_GRID_LINES_NONE")]
13438    None,
13439    /// Horizontal grid lines.
13440    #[doc(alias = "GTK_TREE_VIEW_GRID_LINES_HORIZONTAL")]
13441    Horizontal,
13442    /// Vertical grid lines.
13443    #[doc(alias = "GTK_TREE_VIEW_GRID_LINES_VERTICAL")]
13444    Vertical,
13445    /// Horizontal and vertical grid lines.
13446    #[doc(alias = "GTK_TREE_VIEW_GRID_LINES_BOTH")]
13447    Both,
13448    #[doc(hidden)]
13449    __Unknown(i32),
13450}
13451
13452#[allow(deprecated)]
13453#[doc(hidden)]
13454impl IntoGlib for TreeViewGridLines {
13455    type GlibType = ffi::GtkTreeViewGridLines;
13456
13457    #[inline]
13458    fn into_glib(self) -> ffi::GtkTreeViewGridLines {
13459        match self {
13460            Self::None => ffi::GTK_TREE_VIEW_GRID_LINES_NONE,
13461            Self::Horizontal => ffi::GTK_TREE_VIEW_GRID_LINES_HORIZONTAL,
13462            Self::Vertical => ffi::GTK_TREE_VIEW_GRID_LINES_VERTICAL,
13463            Self::Both => ffi::GTK_TREE_VIEW_GRID_LINES_BOTH,
13464            Self::__Unknown(value) => value,
13465        }
13466    }
13467}
13468
13469#[allow(deprecated)]
13470#[doc(hidden)]
13471impl FromGlib<ffi::GtkTreeViewGridLines> for TreeViewGridLines {
13472    #[inline]
13473    unsafe fn from_glib(value: ffi::GtkTreeViewGridLines) -> Self {
13474        skip_assert_initialized!();
13475
13476        match value {
13477            ffi::GTK_TREE_VIEW_GRID_LINES_NONE => Self::None,
13478            ffi::GTK_TREE_VIEW_GRID_LINES_HORIZONTAL => Self::Horizontal,
13479            ffi::GTK_TREE_VIEW_GRID_LINES_VERTICAL => Self::Vertical,
13480            ffi::GTK_TREE_VIEW_GRID_LINES_BOTH => Self::Both,
13481            value => Self::__Unknown(value),
13482        }
13483    }
13484}
13485
13486#[allow(deprecated)]
13487impl StaticType for TreeViewGridLines {
13488    #[inline]
13489    #[doc(alias = "gtk_tree_view_grid_lines_get_type")]
13490    fn static_type() -> glib::Type {
13491        unsafe { from_glib(ffi::gtk_tree_view_grid_lines_get_type()) }
13492    }
13493}
13494
13495#[allow(deprecated)]
13496impl glib::HasParamSpec for TreeViewGridLines {
13497    type ParamSpec = glib::ParamSpecEnum;
13498    type SetValue = Self;
13499    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
13500
13501    fn param_spec_builder() -> Self::BuilderFn {
13502        Self::ParamSpec::builder_with_default
13503    }
13504}
13505
13506#[allow(deprecated)]
13507impl glib::value::ValueType for TreeViewGridLines {
13508    type Type = Self;
13509}
13510
13511#[allow(deprecated)]
13512unsafe impl<'a> glib::value::FromValue<'a> for TreeViewGridLines {
13513    type Checker = glib::value::GenericValueTypeChecker<Self>;
13514
13515    #[inline]
13516    unsafe fn from_value(value: &'a glib::Value) -> Self {
13517        skip_assert_initialized!();
13518        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
13519    }
13520}
13521
13522#[allow(deprecated)]
13523impl ToValue for TreeViewGridLines {
13524    #[inline]
13525    fn to_value(&self) -> glib::Value {
13526        let mut value = glib::Value::for_value_type::<Self>();
13527        unsafe {
13528            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
13529        }
13530        value
13531    }
13532
13533    #[inline]
13534    fn value_type(&self) -> glib::Type {
13535        Self::static_type()
13536    }
13537}
13538
13539#[allow(deprecated)]
13540impl From<TreeViewGridLines> for glib::Value {
13541    #[inline]
13542    fn from(v: TreeViewGridLines) -> Self {
13543        skip_assert_initialized!();
13544        ToValue::to_value(&v)
13545    }
13546}
13547
13548/// See also gtk_print_settings_set_paper_width().
13549#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
13550#[non_exhaustive]
13551#[doc(alias = "GtkUnit")]
13552pub enum Unit {
13553    /// No units.
13554    #[doc(alias = "GTK_UNIT_NONE")]
13555    None,
13556    /// Dimensions in points.
13557    #[doc(alias = "GTK_UNIT_POINTS")]
13558    Points,
13559    /// Dimensions in inches.
13560    #[doc(alias = "GTK_UNIT_INCH")]
13561    Inch,
13562    /// Dimensions in millimeters
13563    #[doc(alias = "GTK_UNIT_MM")]
13564    Mm,
13565    #[doc(hidden)]
13566    __Unknown(i32),
13567}
13568
13569#[doc(hidden)]
13570impl IntoGlib for Unit {
13571    type GlibType = ffi::GtkUnit;
13572
13573    #[inline]
13574    fn into_glib(self) -> ffi::GtkUnit {
13575        match self {
13576            Self::None => ffi::GTK_UNIT_NONE,
13577            Self::Points => ffi::GTK_UNIT_POINTS,
13578            Self::Inch => ffi::GTK_UNIT_INCH,
13579            Self::Mm => ffi::GTK_UNIT_MM,
13580            Self::__Unknown(value) => value,
13581        }
13582    }
13583}
13584
13585#[doc(hidden)]
13586impl FromGlib<ffi::GtkUnit> for Unit {
13587    #[inline]
13588    unsafe fn from_glib(value: ffi::GtkUnit) -> Self {
13589        skip_assert_initialized!();
13590
13591        match value {
13592            ffi::GTK_UNIT_NONE => Self::None,
13593            ffi::GTK_UNIT_POINTS => Self::Points,
13594            ffi::GTK_UNIT_INCH => Self::Inch,
13595            ffi::GTK_UNIT_MM => Self::Mm,
13596            value => Self::__Unknown(value),
13597        }
13598    }
13599}
13600
13601impl StaticType for Unit {
13602    #[inline]
13603    #[doc(alias = "gtk_unit_get_type")]
13604    fn static_type() -> glib::Type {
13605        unsafe { from_glib(ffi::gtk_unit_get_type()) }
13606    }
13607}
13608
13609impl glib::HasParamSpec for Unit {
13610    type ParamSpec = glib::ParamSpecEnum;
13611    type SetValue = Self;
13612    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
13613
13614    fn param_spec_builder() -> Self::BuilderFn {
13615        Self::ParamSpec::builder_with_default
13616    }
13617}
13618
13619impl glib::value::ValueType for Unit {
13620    type Type = Self;
13621}
13622
13623unsafe impl<'a> glib::value::FromValue<'a> for Unit {
13624    type Checker = glib::value::GenericValueTypeChecker<Self>;
13625
13626    #[inline]
13627    unsafe fn from_value(value: &'a glib::Value) -> Self {
13628        skip_assert_initialized!();
13629        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
13630    }
13631}
13632
13633impl ToValue for Unit {
13634    #[inline]
13635    fn to_value(&self) -> glib::Value {
13636        let mut value = glib::Value::for_value_type::<Self>();
13637        unsafe {
13638            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
13639        }
13640        value
13641    }
13642
13643    #[inline]
13644    fn value_type(&self) -> glib::Type {
13645        Self::static_type()
13646    }
13647}
13648
13649impl From<Unit> for glib::Value {
13650    #[inline]
13651    fn from(v: Unit) -> Self {
13652        skip_assert_initialized!();
13653        ToValue::to_value(&v)
13654    }
13655}
13656
13657/// Determines which point or edge of a window is meant to remain fixed
13658/// when a window changes size.
13659#[cfg(feature = "v4_20")]
13660#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
13661#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
13662#[non_exhaustive]
13663#[doc(alias = "GtkWindowGravity")]
13664pub enum WindowGravity {
13665    /// The top left corner
13666    #[doc(alias = "GTK_WINDOW_GRAVITY_TOP_LEFT")]
13667    TopLeft,
13668    /// The top edge
13669    #[doc(alias = "GTK_WINDOW_GRAVITY_TOP")]
13670    Top,
13671    /// The top right corner
13672    #[doc(alias = "GTK_WINDOW_GRAVITY_TOP_RIGHT")]
13673    TopRight,
13674    /// The left edge
13675    #[doc(alias = "GTK_WINDOW_GRAVITY_LEFT")]
13676    Left,
13677    /// The center pointer
13678    #[doc(alias = "GTK_WINDOW_GRAVITY_CENTER")]
13679    Center,
13680    /// The right edge
13681    #[doc(alias = "GTK_WINDOW_GRAVITY_RIGHT")]
13682    Right,
13683    /// The bottom left corner
13684    #[doc(alias = "GTK_WINDOW_GRAVITY_BOTTOM_LEFT")]
13685    BottomLeft,
13686    /// the bottom edge
13687    #[doc(alias = "GTK_WINDOW_GRAVITY_BOTTOM")]
13688    Bottom,
13689    /// The bottom right corner
13690    #[doc(alias = "GTK_WINDOW_GRAVITY_BOTTOM_RIGHT")]
13691    BottomRight,
13692    /// The top left or top right corner,
13693    ///   depending on the text direction
13694    #[doc(alias = "GTK_WINDOW_GRAVITY_TOP_START")]
13695    TopStart,
13696    /// The top right or top left corner,
13697    ///   depending on the text direction
13698    #[doc(alias = "GTK_WINDOW_GRAVITY_TOP_END")]
13699    TopEnd,
13700    /// The left or right edge,
13701    ///   depending on the text direction
13702    #[doc(alias = "GTK_WINDOW_GRAVITY_START")]
13703    Start,
13704    /// The right or left edge,
13705    ///   depending on the text direction
13706    #[doc(alias = "GTK_WINDOW_GRAVITY_END")]
13707    End,
13708    /// The bottom left or top right corner,
13709    ///   depending on the text direction
13710    #[doc(alias = "GTK_WINDOW_GRAVITY_BOTTOM_START")]
13711    BottomStart,
13712    /// The bottom right or top left corner,
13713    ///   depending on the text direction
13714    #[doc(alias = "GTK_WINDOW_GRAVITY_BOTTOM_END")]
13715    BottomEnd,
13716    #[doc(hidden)]
13717    __Unknown(i32),
13718}
13719
13720#[cfg(feature = "v4_20")]
13721#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
13722#[doc(hidden)]
13723impl IntoGlib for WindowGravity {
13724    type GlibType = ffi::GtkWindowGravity;
13725
13726    fn into_glib(self) -> ffi::GtkWindowGravity {
13727        match self {
13728            Self::TopLeft => ffi::GTK_WINDOW_GRAVITY_TOP_LEFT,
13729            Self::Top => ffi::GTK_WINDOW_GRAVITY_TOP,
13730            Self::TopRight => ffi::GTK_WINDOW_GRAVITY_TOP_RIGHT,
13731            Self::Left => ffi::GTK_WINDOW_GRAVITY_LEFT,
13732            Self::Center => ffi::GTK_WINDOW_GRAVITY_CENTER,
13733            Self::Right => ffi::GTK_WINDOW_GRAVITY_RIGHT,
13734            Self::BottomLeft => ffi::GTK_WINDOW_GRAVITY_BOTTOM_LEFT,
13735            Self::Bottom => ffi::GTK_WINDOW_GRAVITY_BOTTOM,
13736            Self::BottomRight => ffi::GTK_WINDOW_GRAVITY_BOTTOM_RIGHT,
13737            Self::TopStart => ffi::GTK_WINDOW_GRAVITY_TOP_START,
13738            Self::TopEnd => ffi::GTK_WINDOW_GRAVITY_TOP_END,
13739            Self::Start => ffi::GTK_WINDOW_GRAVITY_START,
13740            Self::End => ffi::GTK_WINDOW_GRAVITY_END,
13741            Self::BottomStart => ffi::GTK_WINDOW_GRAVITY_BOTTOM_START,
13742            Self::BottomEnd => ffi::GTK_WINDOW_GRAVITY_BOTTOM_END,
13743            Self::__Unknown(value) => value,
13744        }
13745    }
13746}
13747
13748#[cfg(feature = "v4_20")]
13749#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
13750#[doc(hidden)]
13751impl FromGlib<ffi::GtkWindowGravity> for WindowGravity {
13752    unsafe fn from_glib(value: ffi::GtkWindowGravity) -> Self {
13753        skip_assert_initialized!();
13754
13755        match value {
13756            ffi::GTK_WINDOW_GRAVITY_TOP_LEFT => Self::TopLeft,
13757            ffi::GTK_WINDOW_GRAVITY_TOP => Self::Top,
13758            ffi::GTK_WINDOW_GRAVITY_TOP_RIGHT => Self::TopRight,
13759            ffi::GTK_WINDOW_GRAVITY_LEFT => Self::Left,
13760            ffi::GTK_WINDOW_GRAVITY_CENTER => Self::Center,
13761            ffi::GTK_WINDOW_GRAVITY_RIGHT => Self::Right,
13762            ffi::GTK_WINDOW_GRAVITY_BOTTOM_LEFT => Self::BottomLeft,
13763            ffi::GTK_WINDOW_GRAVITY_BOTTOM => Self::Bottom,
13764            ffi::GTK_WINDOW_GRAVITY_BOTTOM_RIGHT => Self::BottomRight,
13765            ffi::GTK_WINDOW_GRAVITY_TOP_START => Self::TopStart,
13766            ffi::GTK_WINDOW_GRAVITY_TOP_END => Self::TopEnd,
13767            ffi::GTK_WINDOW_GRAVITY_START => Self::Start,
13768            ffi::GTK_WINDOW_GRAVITY_END => Self::End,
13769            ffi::GTK_WINDOW_GRAVITY_BOTTOM_START => Self::BottomStart,
13770            ffi::GTK_WINDOW_GRAVITY_BOTTOM_END => Self::BottomEnd,
13771            value => Self::__Unknown(value),
13772        }
13773    }
13774}
13775
13776#[cfg(feature = "v4_20")]
13777#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
13778impl StaticType for WindowGravity {
13779    #[inline]
13780    #[doc(alias = "gtk_window_gravity_get_type")]
13781    fn static_type() -> glib::Type {
13782        unsafe { from_glib(ffi::gtk_window_gravity_get_type()) }
13783    }
13784}
13785
13786#[cfg(feature = "v4_20")]
13787#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
13788impl glib::HasParamSpec for WindowGravity {
13789    type ParamSpec = glib::ParamSpecEnum;
13790    type SetValue = Self;
13791    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
13792
13793    fn param_spec_builder() -> Self::BuilderFn {
13794        Self::ParamSpec::builder_with_default
13795    }
13796}
13797
13798#[cfg(feature = "v4_20")]
13799#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
13800impl glib::value::ValueType for WindowGravity {
13801    type Type = Self;
13802}
13803
13804#[cfg(feature = "v4_20")]
13805#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
13806unsafe impl<'a> glib::value::FromValue<'a> for WindowGravity {
13807    type Checker = glib::value::GenericValueTypeChecker<Self>;
13808
13809    #[inline]
13810    unsafe fn from_value(value: &'a glib::Value) -> Self {
13811        skip_assert_initialized!();
13812        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
13813    }
13814}
13815
13816#[cfg(feature = "v4_20")]
13817#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
13818impl ToValue for WindowGravity {
13819    #[inline]
13820    fn to_value(&self) -> glib::Value {
13821        let mut value = glib::Value::for_value_type::<Self>();
13822        unsafe {
13823            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
13824        }
13825        value
13826    }
13827
13828    #[inline]
13829    fn value_type(&self) -> glib::Type {
13830        Self::static_type()
13831    }
13832}
13833
13834#[cfg(feature = "v4_20")]
13835#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
13836impl From<WindowGravity> for glib::Value {
13837    #[inline]
13838    fn from(v: WindowGravity) -> Self {
13839        skip_assert_initialized!();
13840        ToValue::to_value(&v)
13841    }
13842}
13843
13844/// Describes a type of line wrapping.
13845#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
13846#[non_exhaustive]
13847#[doc(alias = "GtkWrapMode")]
13848pub enum WrapMode {
13849    /// do not wrap lines; just make the text area wider
13850    #[doc(alias = "GTK_WRAP_NONE")]
13851    None,
13852    /// wrap text, breaking lines anywhere the cursor can
13853    ///   appear (between characters, usually - if you want to be technical,
13854    ///   between graphemes, see pango_get_log_attrs())
13855    #[doc(alias = "GTK_WRAP_CHAR")]
13856    Char,
13857    /// wrap text, breaking lines in between words
13858    #[doc(alias = "GTK_WRAP_WORD")]
13859    Word,
13860    /// wrap text, breaking lines in between words, or if
13861    ///   that is not enough, also between graphemes
13862    #[doc(alias = "GTK_WRAP_WORD_CHAR")]
13863    WordChar,
13864    #[doc(hidden)]
13865    __Unknown(i32),
13866}
13867
13868#[doc(hidden)]
13869impl IntoGlib for WrapMode {
13870    type GlibType = ffi::GtkWrapMode;
13871
13872    #[inline]
13873    fn into_glib(self) -> ffi::GtkWrapMode {
13874        match self {
13875            Self::None => ffi::GTK_WRAP_NONE,
13876            Self::Char => ffi::GTK_WRAP_CHAR,
13877            Self::Word => ffi::GTK_WRAP_WORD,
13878            Self::WordChar => ffi::GTK_WRAP_WORD_CHAR,
13879            Self::__Unknown(value) => value,
13880        }
13881    }
13882}
13883
13884#[doc(hidden)]
13885impl FromGlib<ffi::GtkWrapMode> for WrapMode {
13886    #[inline]
13887    unsafe fn from_glib(value: ffi::GtkWrapMode) -> Self {
13888        skip_assert_initialized!();
13889
13890        match value {
13891            ffi::GTK_WRAP_NONE => Self::None,
13892            ffi::GTK_WRAP_CHAR => Self::Char,
13893            ffi::GTK_WRAP_WORD => Self::Word,
13894            ffi::GTK_WRAP_WORD_CHAR => Self::WordChar,
13895            value => Self::__Unknown(value),
13896        }
13897    }
13898}
13899
13900impl StaticType for WrapMode {
13901    #[inline]
13902    #[doc(alias = "gtk_wrap_mode_get_type")]
13903    fn static_type() -> glib::Type {
13904        unsafe { from_glib(ffi::gtk_wrap_mode_get_type()) }
13905    }
13906}
13907
13908impl glib::HasParamSpec for WrapMode {
13909    type ParamSpec = glib::ParamSpecEnum;
13910    type SetValue = Self;
13911    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
13912
13913    fn param_spec_builder() -> Self::BuilderFn {
13914        Self::ParamSpec::builder_with_default
13915    }
13916}
13917
13918impl glib::value::ValueType for WrapMode {
13919    type Type = Self;
13920}
13921
13922unsafe impl<'a> glib::value::FromValue<'a> for WrapMode {
13923    type Checker = glib::value::GenericValueTypeChecker<Self>;
13924
13925    #[inline]
13926    unsafe fn from_value(value: &'a glib::Value) -> Self {
13927        skip_assert_initialized!();
13928        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
13929    }
13930}
13931
13932impl ToValue for WrapMode {
13933    #[inline]
13934    fn to_value(&self) -> glib::Value {
13935        let mut value = glib::Value::for_value_type::<Self>();
13936        unsafe {
13937            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
13938        }
13939        value
13940    }
13941
13942    #[inline]
13943    fn value_type(&self) -> glib::Type {
13944        Self::static_type()
13945    }
13946}
13947
13948impl From<WrapMode> for glib::Value {
13949    #[inline]
13950    fn from(v: WrapMode) -> Self {
13951        skip_assert_initialized!();
13952        ToValue::to_value(&v)
13953    }
13954}