gstreamer_editing_services/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// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::ffi;
7#[cfg(feature = "v1_16")]
8#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
9use glib::GStr;
10use glib::{prelude::*, translate::*};
11
12#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
13#[non_exhaustive]
14#[doc(alias = "GESAssetLoadingReturn")]
15pub enum AssetLoadingReturn {
16    /// Indicates that an error occurred
17    #[doc(alias = "GES_ASSET_LOADING_ERROR")]
18    Error,
19    /// Indicates that the loading is being performed
20    /// asynchronously
21    #[doc(alias = "GES_ASSET_LOADING_ASYNC")]
22    Async,
23    /// Indicates that the loading is complete, without
24    /// error
25    #[doc(alias = "GES_ASSET_LOADING_OK")]
26    Ok,
27    #[doc(hidden)]
28    __Unknown(i32),
29}
30
31#[doc(hidden)]
32impl IntoGlib for AssetLoadingReturn {
33    type GlibType = ffi::GESAssetLoadingReturn;
34
35    #[inline]
36    fn into_glib(self) -> ffi::GESAssetLoadingReturn {
37        match self {
38            Self::Error => ffi::GES_ASSET_LOADING_ERROR,
39            Self::Async => ffi::GES_ASSET_LOADING_ASYNC,
40            Self::Ok => ffi::GES_ASSET_LOADING_OK,
41            Self::__Unknown(value) => value,
42        }
43    }
44}
45
46#[doc(hidden)]
47impl FromGlib<ffi::GESAssetLoadingReturn> for AssetLoadingReturn {
48    #[inline]
49    unsafe fn from_glib(value: ffi::GESAssetLoadingReturn) -> Self {
50        skip_assert_initialized!();
51
52        match value {
53            ffi::GES_ASSET_LOADING_ERROR => Self::Error,
54            ffi::GES_ASSET_LOADING_ASYNC => Self::Async,
55            ffi::GES_ASSET_LOADING_OK => Self::Ok,
56            value => Self::__Unknown(value),
57        }
58    }
59}
60
61/// To be used by subclasses only. This indicate how to handle a change in
62/// a child.
63#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
64#[non_exhaustive]
65#[doc(alias = "GESChildrenControlMode")]
66pub enum ChildrenControlMode {
67    #[doc(alias = "GES_CHILDREN_UPDATE")]
68    Update,
69    #[doc(alias = "GES_CHILDREN_IGNORE_NOTIFIES")]
70    IgnoreNotifies,
71    #[doc(alias = "GES_CHILDREN_UPDATE_OFFSETS")]
72    UpdateOffsets,
73    #[doc(alias = "GES_CHILDREN_UPDATE_ALL_VALUES")]
74    UpdateAllValues,
75    #[doc(alias = "GES_CHILDREN_LAST")]
76    Last,
77    #[doc(hidden)]
78    __Unknown(i32),
79}
80
81#[doc(hidden)]
82impl IntoGlib for ChildrenControlMode {
83    type GlibType = ffi::GESChildrenControlMode;
84
85    #[inline]
86    fn into_glib(self) -> ffi::GESChildrenControlMode {
87        match self {
88            Self::Update => ffi::GES_CHILDREN_UPDATE,
89            Self::IgnoreNotifies => ffi::GES_CHILDREN_IGNORE_NOTIFIES,
90            Self::UpdateOffsets => ffi::GES_CHILDREN_UPDATE_OFFSETS,
91            Self::UpdateAllValues => ffi::GES_CHILDREN_UPDATE_ALL_VALUES,
92            Self::Last => ffi::GES_CHILDREN_LAST,
93            Self::__Unknown(value) => value,
94        }
95    }
96}
97
98#[doc(hidden)]
99impl FromGlib<ffi::GESChildrenControlMode> for ChildrenControlMode {
100    #[inline]
101    unsafe fn from_glib(value: ffi::GESChildrenControlMode) -> Self {
102        skip_assert_initialized!();
103
104        match value {
105            ffi::GES_CHILDREN_UPDATE => Self::Update,
106            ffi::GES_CHILDREN_IGNORE_NOTIFIES => Self::IgnoreNotifies,
107            ffi::GES_CHILDREN_UPDATE_OFFSETS => Self::UpdateOffsets,
108            ffi::GES_CHILDREN_UPDATE_ALL_VALUES => Self::UpdateAllValues,
109            ffi::GES_CHILDREN_LAST => Self::Last,
110            value => Self::__Unknown(value),
111        }
112    }
113}
114
115/// The edges of an object contain in a [`Timeline`][crate::Timeline] or [`Track`][crate::Track]
116#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
117#[non_exhaustive]
118#[doc(alias = "GESEdge")]
119pub enum Edge {
120    /// Represents the start of an object.
121    #[doc(alias = "GES_EDGE_START")]
122    Start,
123    /// Represents the end of an object.
124    #[doc(alias = "GES_EDGE_END")]
125    End,
126    /// Represent the fact we are not working with any edge of an
127    ///  object.
128    #[doc(alias = "GES_EDGE_NONE")]
129    None,
130    #[doc(hidden)]
131    __Unknown(i32),
132}
133
134impl Edge {
135    #[cfg(feature = "v1_16")]
136    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
137    pub fn name<'a>(self) -> &'a GStr {
138        unsafe {
139            GStr::from_ptr(
140                ffi::ges_edge_name(self.into_glib())
141                    .as_ref()
142                    .expect("ges_edge_name returned NULL"),
143            )
144        }
145    }
146}
147
148#[cfg(feature = "v1_16")]
149#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
150impl std::fmt::Display for Edge {
151    #[inline]
152    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
153        f.write_str(&self.name())
154    }
155}
156
157#[doc(hidden)]
158impl IntoGlib for Edge {
159    type GlibType = ffi::GESEdge;
160
161    #[inline]
162    fn into_glib(self) -> ffi::GESEdge {
163        match self {
164            Self::Start => ffi::GES_EDGE_START,
165            Self::End => ffi::GES_EDGE_END,
166            Self::None => ffi::GES_EDGE_NONE,
167            Self::__Unknown(value) => value,
168        }
169    }
170}
171
172#[doc(hidden)]
173impl FromGlib<ffi::GESEdge> for Edge {
174    #[inline]
175    unsafe fn from_glib(value: ffi::GESEdge) -> Self {
176        skip_assert_initialized!();
177
178        match value {
179            ffi::GES_EDGE_START => Self::Start,
180            ffi::GES_EDGE_END => Self::End,
181            ffi::GES_EDGE_NONE => Self::None,
182            value => Self::__Unknown(value),
183        }
184    }
185}
186
187impl StaticType for Edge {
188    #[inline]
189    #[doc(alias = "ges_edge_get_type")]
190    fn static_type() -> glib::Type {
191        unsafe { from_glib(ffi::ges_edge_get_type()) }
192    }
193}
194
195impl glib::HasParamSpec for Edge {
196    type ParamSpec = glib::ParamSpecEnum;
197    type SetValue = Self;
198    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
199
200    fn param_spec_builder() -> Self::BuilderFn {
201        Self::ParamSpec::builder_with_default
202    }
203}
204
205impl glib::value::ValueType for Edge {
206    type Type = Self;
207}
208
209unsafe impl<'a> glib::value::FromValue<'a> for Edge {
210    type Checker = glib::value::GenericValueTypeChecker<Self>;
211
212    #[inline]
213    unsafe fn from_value(value: &'a glib::Value) -> Self {
214        skip_assert_initialized!();
215        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
216    }
217}
218
219impl ToValue for Edge {
220    #[inline]
221    fn to_value(&self) -> glib::Value {
222        let mut value = glib::Value::for_value_type::<Self>();
223        unsafe {
224            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
225        }
226        value
227    }
228
229    #[inline]
230    fn value_type(&self) -> glib::Type {
231        Self::static_type()
232    }
233}
234
235impl From<Edge> for glib::Value {
236    #[inline]
237    fn from(v: Edge) -> Self {
238        skip_assert_initialized!();
239        ToValue::to_value(&v)
240    }
241}
242
243/// When a single timeline element is edited within its timeline at some
244/// position, using [`TimelineElementExt::edit()`][crate::prelude::TimelineElementExt::edit()], depending on the edit
245/// mode, its [`start`][struct@crate::TimelineElement#start], [`duration`][struct@crate::TimelineElement#duration] or
246/// [`in-point`][struct@crate::TimelineElement#in-point] will be adjusted accordingly. In addition,
247/// any clips may change [`layer`][struct@crate::Clip#layer].
248///
249/// Each edit can be broken down into a combination of three basic edits:
250///
251/// + MOVE: This moves the start of the element to the edit position.
252/// + START-TRIM: This cuts or grows the start of the element, whilst
253///  maintaining the time at which its internal content appears in the
254///  timeline data output. If the element is made shorter, the data that
255///  appeared at the edit position will still appear in the timeline at
256///  the same time. If the element is made longer, the data that appeared
257///  at the previous start of the element will still appear in the
258///  timeline at the same time.
259/// + END-TRIM: Similar to START-TRIM, but the end of the element is cut or
260///  grown.
261///
262/// In particular, when editing a [`Clip`][crate::Clip]:
263///
264/// + MOVE: This will set the [`start`][struct@crate::TimelineElement#start] of the clip to the
265///  edit position.
266/// + START-TRIM: This will set the [`start`][struct@crate::TimelineElement#start] of the clip
267///  to the edit position. To keep the end time the same, the
268///  [`duration`][struct@crate::TimelineElement#duration] of the clip will be adjusted in the
269///  opposite direction. In addition, the [`in-point`][struct@crate::TimelineElement#in-point] of
270///  the clip will be shifted such that the content that appeared at the
271///  new or previous start time, whichever is latest, still appears at the
272///  same timeline time. For example, if a frame appeared at the start of
273///  the clip, and the start of the clip is reduced, the in-point of the
274///  clip will also reduce such that the frame will appear later within
275///  the clip, but at the same timeline position.
276/// + END-TRIM: This will set the [`duration`][struct@crate::TimelineElement#duration] of the clip
277///  such that its end time will match the edit position.
278///
279/// When editing a [`Group`][crate::Group]:
280///
281/// + MOVE: This will set the [`start`][struct@crate::Group#start] of the clip to the edit
282///  position by shifting all of its children by the same amount. So each
283///  child will maintain their relative positions.
284/// + START-TRIM: If the group is made shorter, this will START-TRIM any
285///  clips under the group that start after the edit position to the same
286///  edit position. If the group is made longer, this will START-TRIM any
287///  clip under the group whose start matches the start of the group to
288///  the same edit position.
289/// + END-TRIM: If the group is made shorter, this will END-TRIM any clips
290///  under the group that end after the edit position to the same edit
291///  position. If the group is made longer, this will END-TRIM any clip
292///  under the group whose end matches the end of the group to the same
293///  edit position.
294///
295/// When editing a [`TrackElement`][crate::TrackElement], if it has a [`Clip`][crate::Clip] parent, this
296/// will be edited instead. Otherwise it is edited in the same way as a
297/// [`Clip`][crate::Clip].
298///
299/// The layer priority of a [`Group`][crate::Group] is the lowest layer priority of any
300/// [`Clip`][crate::Clip] underneath it. When a group is edited to a new layer
301/// priority, it will shift all clips underneath it by the same amount,
302/// such that their relative layers stay the same.
303///
304/// If the [`Timeline`][crate::Timeline] has a [`snapping-distance`][struct@crate::Timeline#snapping-distance], then snapping
305/// may occur for some of the edges of the **main** edited element:
306///
307/// + MOVE: The start or end edge of *any* [`Source`][crate::Source] under the element may
308///  be snapped.
309/// + START-TRIM: The start edge of a [`Source`][crate::Source] whose start edge touches
310///  the start edge of the element may snap.
311/// + END-TRIM: The end edge of a [`Source`][crate::Source] whose end edge touches the end
312///  edge of the element may snap.
313///
314/// These edges may snap with either the start or end edge of *any* other
315/// [`Source`][crate::Source] in the timeline that is not also being moved by the element,
316/// including those in different layers, if they are within the
317/// [`snapping-distance`][struct@crate::Timeline#snapping-distance]. During an edit, only up to one snap can
318/// occur. This will shift the edit position such that the snapped edges
319/// will touch once the edit has completed.
320///
321/// Note that snapping can cause an edit to fail where it would have
322/// otherwise succeeded because it may push the edit position such that the
323/// edit would result in an unsupported timeline configuration. Similarly,
324/// snapping can cause an edit to succeed where it would have otherwise
325/// failed.
326///
327/// For example, in [`Ripple`][Self::Ripple] acting on [`Edge::None`][crate::Edge::None], the
328/// main element is the MOVED toplevel of the edited element. Any source
329/// under the main MOVED toplevel may have its start or end edge snapped.
330/// Note, these sources cannot snap with each other. The edit may also
331/// push other elements, but any sources under these elements cannot snap,
332/// nor can they be snapped with. If a snap does occur, the MOVE of the
333/// toplevel *and* all other elements pushed by the ripple will be shifted
334/// by the same amount such that the snapped edges will touch.
335///
336/// You can also find more explanation about the behaviour of those modes at:
337/// [trim, ripple and roll](http://pitivi.org/manual/trimming.html)
338/// and [clip management](http://pitivi.org/manual/usingclips.html).
339#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
340#[non_exhaustive]
341#[doc(alias = "GESEditMode")]
342pub enum EditMode {
343    /// The element is edited the normal way (default).
344    ///  If acting on the element as a whole ([`Edge::None`][crate::Edge::None]), this will MOVE
345    ///  the element by MOVING its toplevel. When acting on the start of the
346    ///  element ([`Edge::Start`][crate::Edge::Start]), this will only MOVE the element, but not
347    ///  its toplevel parent. This can allow you to move a [`Clip`][crate::Clip] or
348    ///  [`Group`][crate::Group] to a new start time or layer within its container group,
349    ///  without effecting other members of the group. When acting on the end
350    ///  of the element ([`Edge::End`][crate::Edge::End]), this will END-TRIM the element,
351    ///  leaving its toplevel unchanged.
352    #[doc(alias = "GES_EDIT_MODE_NORMAL")]
353    Normal,
354    /// The element is edited in ripple mode: moving
355    ///  itself as well as later elements, keeping their relative times. This
356    ///  edits the element the same as [`Normal`][Self::Normal]. In addition, if
357    ///  acting on the element as a whole, or the start of the element, any
358    ///  toplevel element in the same timeline (including different layers)
359    ///  whose start time is later than the *current* start time of the MOVED
360    ///  element will also be MOVED by the same shift as the edited element.
361    ///  If acting on the end of the element, any toplevel element whose start
362    ///  time is later than the *current* end time of the edited element will
363    ///  also be MOVED by the same shift as the change in the end of the
364    ///  edited element. These additional elements will also be shifted by
365    ///  the same shift in layers as the edited element.
366    #[doc(alias = "GES_EDIT_MODE_RIPPLE")]
367    Ripple,
368    /// The element is edited in roll mode: swapping its
369    ///  content for its neighbour's, or vis versa, in the timeline output.
370    ///  This edits the element the same as [`Trim`][Self::Trim]. In addition,
371    ///  any neighbours are also TRIMMED at their opposite edge to the same
372    ///  timeline position. When acting on the start of the element, a
373    ///  neighbour is any earlier element in the timeline whose end time
374    ///  matches the *current* start time of the edited element. When acting on
375    ///  the end of the element, a neighbour is any later element in the
376    ///  timeline whose start time matches the *current* start time of the
377    ///  edited element. In addition, a neighbour have a [`Source`][crate::Source] at its
378    ///  end/start edge that shares a track with a [`Source`][crate::Source] at the start/end
379    ///  edge of the edited element. Basically, a neighbour is an element that
380    ///  can be extended, or cut, to have its content replace, or be replaced
381    ///  by, the content of the edited element. Acting on the element as a
382    ///  whole ([`Edge::None`][crate::Edge::None]) is not defined. The element can not shift
383    ///  layers under this mode.
384    #[doc(alias = "GES_EDIT_MODE_ROLL")]
385    Roll,
386    /// The element is edited in trim mode. When acting
387    ///  on the start of the element, this will START-TRIM it. When acting on
388    ///  the end of the element, this will END-TRIM it. Acting on the element
389    ///  as a whole ([`Edge::None`][crate::Edge::None]) is not defined.
390    #[doc(alias = "GES_EDIT_MODE_TRIM")]
391    Trim,
392    /// The element is edited in slide mode (not yet
393    ///  implemented): moving the element replacing or consuming content on
394    ///  each end. When acting on the element as a whole, this will MOVE the
395    ///  element, and TRIM any neighbours on either side. A neighbour is
396    ///  defined in the same way as in [`Roll`][Self::Roll], but they may be on
397    ///  either side of the edited elements. Elements at the end with be
398    ///  START-TRIMMED to the new end position of the edited element. Elements
399    ///  at the start will be END-TRIMMED to the new start position of the
400    ///  edited element. Acting on the start or end of the element
401    ///  ([`Edge::Start`][crate::Edge::Start] and [`Edge::End`][crate::Edge::End]) is not defined. The element can
402    ///  not shift layers under this mode.
403    #[doc(alias = "GES_EDIT_MODE_SLIDE")]
404    Slide,
405    #[doc(hidden)]
406    __Unknown(i32),
407}
408
409impl EditMode {
410    #[cfg(feature = "v1_18")]
411    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
412    pub fn name<'a>(self) -> &'a GStr {
413        unsafe {
414            GStr::from_ptr(
415                ffi::ges_edit_mode_name(self.into_glib())
416                    .as_ref()
417                    .expect("ges_edit_mode_name returned NULL"),
418            )
419        }
420    }
421}
422
423#[cfg(feature = "v1_18")]
424#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
425impl std::fmt::Display for EditMode {
426    #[inline]
427    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
428        f.write_str(&self.name())
429    }
430}
431
432#[doc(hidden)]
433impl IntoGlib for EditMode {
434    type GlibType = ffi::GESEditMode;
435
436    #[inline]
437    fn into_glib(self) -> ffi::GESEditMode {
438        match self {
439            Self::Normal => ffi::GES_EDIT_MODE_NORMAL,
440            Self::Ripple => ffi::GES_EDIT_MODE_RIPPLE,
441            Self::Roll => ffi::GES_EDIT_MODE_ROLL,
442            Self::Trim => ffi::GES_EDIT_MODE_TRIM,
443            Self::Slide => ffi::GES_EDIT_MODE_SLIDE,
444            Self::__Unknown(value) => value,
445        }
446    }
447}
448
449#[doc(hidden)]
450impl FromGlib<ffi::GESEditMode> for EditMode {
451    #[inline]
452    unsafe fn from_glib(value: ffi::GESEditMode) -> Self {
453        skip_assert_initialized!();
454
455        match value {
456            ffi::GES_EDIT_MODE_NORMAL => Self::Normal,
457            ffi::GES_EDIT_MODE_RIPPLE => Self::Ripple,
458            ffi::GES_EDIT_MODE_ROLL => Self::Roll,
459            ffi::GES_EDIT_MODE_TRIM => Self::Trim,
460            ffi::GES_EDIT_MODE_SLIDE => Self::Slide,
461            value => Self::__Unknown(value),
462        }
463    }
464}
465
466impl StaticType for EditMode {
467    #[inline]
468    #[doc(alias = "ges_edit_mode_get_type")]
469    fn static_type() -> glib::Type {
470        unsafe { from_glib(ffi::ges_edit_mode_get_type()) }
471    }
472}
473
474impl glib::HasParamSpec for EditMode {
475    type ParamSpec = glib::ParamSpecEnum;
476    type SetValue = Self;
477    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
478
479    fn param_spec_builder() -> Self::BuilderFn {
480        Self::ParamSpec::builder_with_default
481    }
482}
483
484impl glib::value::ValueType for EditMode {
485    type Type = Self;
486}
487
488unsafe impl<'a> glib::value::FromValue<'a> for EditMode {
489    type Checker = glib::value::GenericValueTypeChecker<Self>;
490
491    #[inline]
492    unsafe fn from_value(value: &'a glib::Value) -> Self {
493        skip_assert_initialized!();
494        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
495    }
496}
497
498impl ToValue for EditMode {
499    #[inline]
500    fn to_value(&self) -> glib::Value {
501        let mut value = glib::Value::for_value_type::<Self>();
502        unsafe {
503            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
504        }
505        value
506    }
507
508    #[inline]
509    fn value_type(&self) -> glib::Type {
510        Self::static_type()
511    }
512}
513
514impl From<EditMode> for glib::Value {
515    #[inline]
516    fn from(v: EditMode) -> Self {
517        skip_assert_initialized!();
518        ToValue::to_value(&v)
519    }
520}
521
522#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
523#[non_exhaustive]
524#[doc(alias = "GESError")]
525pub enum Error {
526    /// The ID passed is malformed
527    #[doc(alias = "GES_ERROR_ASSET_WRONG_ID")]
528    AssetWrongId,
529    /// An error happened while loading the asset
530    #[doc(alias = "GES_ERROR_ASSET_LOADING")]
531    AssetLoading,
532    /// The formatted files was malformed
533    #[doc(alias = "GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE")]
534    FormatterMalformedInputFile,
535    /// The frame number is invalid
536    #[doc(alias = "GES_ERROR_INVALID_FRAME_NUMBER")]
537    InvalidFrameNumber,
538    /// The operation would lead to a negative
539    /// `GES_TIMELINE_ELEMENT_LAYER_PRIORITY`. (Since: 1.18)
540    #[doc(alias = "GES_ERROR_NEGATIVE_LAYER")]
541    NegativeLayer,
542    /// The operation would lead to a negative time.
543    /// E.g. for the [`start`][struct@crate::TimelineElement#start] [`duration`][struct@crate::TimelineElement#duration] or
544    /// [`in-point`][struct@crate::TimelineElement#in-point]. (Since: 1.18)
545    #[doc(alias = "GES_ERROR_NEGATIVE_TIME")]
546    NegativeTime,
547    /// Some [`TimelineElement`][crate::TimelineElement] does
548    /// not have a large enough [`max-duration`][struct@crate::TimelineElement#max-duration] to cover the
549    /// desired operation. (Since: 1.18)
550    #[doc(alias = "GES_ERROR_NOT_ENOUGH_INTERNAL_CONTENT")]
551    NotEnoughInternalContent,
552    /// The operation would break one of
553    /// the overlap conditions for the [`Timeline`][crate::Timeline]. (Since: 1.18)
554    #[doc(alias = "GES_ERROR_INVALID_OVERLAP_IN_TRACK")]
555    InvalidOverlapInTrack,
556    #[doc(alias = "GES_ERROR_INVALID_EFFECT_BIN_DESCRIPTION")]
557    InvalidEffectBinDescription,
558    #[doc(hidden)]
559    __Unknown(i32),
560}
561
562#[doc(hidden)]
563impl IntoGlib for Error {
564    type GlibType = ffi::GESError;
565
566    #[inline]
567    fn into_glib(self) -> ffi::GESError {
568        match self {
569            Self::AssetWrongId => ffi::GES_ERROR_ASSET_WRONG_ID,
570            Self::AssetLoading => ffi::GES_ERROR_ASSET_LOADING,
571            Self::FormatterMalformedInputFile => ffi::GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE,
572            Self::InvalidFrameNumber => ffi::GES_ERROR_INVALID_FRAME_NUMBER,
573            Self::NegativeLayer => ffi::GES_ERROR_NEGATIVE_LAYER,
574            Self::NegativeTime => ffi::GES_ERROR_NEGATIVE_TIME,
575            Self::NotEnoughInternalContent => ffi::GES_ERROR_NOT_ENOUGH_INTERNAL_CONTENT,
576            Self::InvalidOverlapInTrack => ffi::GES_ERROR_INVALID_OVERLAP_IN_TRACK,
577            Self::InvalidEffectBinDescription => ffi::GES_ERROR_INVALID_EFFECT_BIN_DESCRIPTION,
578            Self::__Unknown(value) => value,
579        }
580    }
581}
582
583#[doc(hidden)]
584impl FromGlib<ffi::GESError> for Error {
585    #[inline]
586    unsafe fn from_glib(value: ffi::GESError) -> Self {
587        skip_assert_initialized!();
588
589        match value {
590            ffi::GES_ERROR_ASSET_WRONG_ID => Self::AssetWrongId,
591            ffi::GES_ERROR_ASSET_LOADING => Self::AssetLoading,
592            ffi::GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE => Self::FormatterMalformedInputFile,
593            ffi::GES_ERROR_INVALID_FRAME_NUMBER => Self::InvalidFrameNumber,
594            ffi::GES_ERROR_NEGATIVE_LAYER => Self::NegativeLayer,
595            ffi::GES_ERROR_NEGATIVE_TIME => Self::NegativeTime,
596            ffi::GES_ERROR_NOT_ENOUGH_INTERNAL_CONTENT => Self::NotEnoughInternalContent,
597            ffi::GES_ERROR_INVALID_OVERLAP_IN_TRACK => Self::InvalidOverlapInTrack,
598            ffi::GES_ERROR_INVALID_EFFECT_BIN_DESCRIPTION => Self::InvalidEffectBinDescription,
599            value => Self::__Unknown(value),
600        }
601    }
602}
603
604/// Horizontal alignment of the text.
605#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
606#[non_exhaustive]
607#[doc(alias = "GESTextHAlign")]
608pub enum TextHAlign {
609    /// align text left
610    #[doc(alias = "GES_TEXT_HALIGN_LEFT")]
611    Left,
612    /// align text center
613    #[doc(alias = "GES_TEXT_HALIGN_CENTER")]
614    Center,
615    /// align text right
616    #[doc(alias = "GES_TEXT_HALIGN_RIGHT")]
617    Right,
618    /// align text on xpos position
619    #[doc(alias = "GES_TEXT_HALIGN_POSITION")]
620    Position,
621    #[doc(alias = "GES_TEXT_HALIGN_ABSOLUTE")]
622    Absolute,
623    #[doc(hidden)]
624    __Unknown(i32),
625}
626
627#[doc(hidden)]
628impl IntoGlib for TextHAlign {
629    type GlibType = ffi::GESTextHAlign;
630
631    #[inline]
632    fn into_glib(self) -> ffi::GESTextHAlign {
633        match self {
634            Self::Left => ffi::GES_TEXT_HALIGN_LEFT,
635            Self::Center => ffi::GES_TEXT_HALIGN_CENTER,
636            Self::Right => ffi::GES_TEXT_HALIGN_RIGHT,
637            Self::Position => ffi::GES_TEXT_HALIGN_POSITION,
638            Self::Absolute => ffi::GES_TEXT_HALIGN_ABSOLUTE,
639            Self::__Unknown(value) => value,
640        }
641    }
642}
643
644#[doc(hidden)]
645impl FromGlib<ffi::GESTextHAlign> for TextHAlign {
646    #[inline]
647    unsafe fn from_glib(value: ffi::GESTextHAlign) -> Self {
648        skip_assert_initialized!();
649
650        match value {
651            ffi::GES_TEXT_HALIGN_LEFT => Self::Left,
652            ffi::GES_TEXT_HALIGN_CENTER => Self::Center,
653            ffi::GES_TEXT_HALIGN_RIGHT => Self::Right,
654            ffi::GES_TEXT_HALIGN_POSITION => Self::Position,
655            ffi::GES_TEXT_HALIGN_ABSOLUTE => Self::Absolute,
656            value => Self::__Unknown(value),
657        }
658    }
659}
660
661impl StaticType for TextHAlign {
662    #[inline]
663    #[doc(alias = "ges_text_halign_get_type")]
664    fn static_type() -> glib::Type {
665        unsafe { from_glib(ffi::ges_text_halign_get_type()) }
666    }
667}
668
669impl glib::HasParamSpec for TextHAlign {
670    type ParamSpec = glib::ParamSpecEnum;
671    type SetValue = Self;
672    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
673
674    fn param_spec_builder() -> Self::BuilderFn {
675        Self::ParamSpec::builder_with_default
676    }
677}
678
679impl glib::value::ValueType for TextHAlign {
680    type Type = Self;
681}
682
683unsafe impl<'a> glib::value::FromValue<'a> for TextHAlign {
684    type Checker = glib::value::GenericValueTypeChecker<Self>;
685
686    #[inline]
687    unsafe fn from_value(value: &'a glib::Value) -> Self {
688        skip_assert_initialized!();
689        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
690    }
691}
692
693impl ToValue for TextHAlign {
694    #[inline]
695    fn to_value(&self) -> glib::Value {
696        let mut value = glib::Value::for_value_type::<Self>();
697        unsafe {
698            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
699        }
700        value
701    }
702
703    #[inline]
704    fn value_type(&self) -> glib::Type {
705        Self::static_type()
706    }
707}
708
709impl From<TextHAlign> for glib::Value {
710    #[inline]
711    fn from(v: TextHAlign) -> Self {
712        skip_assert_initialized!();
713        ToValue::to_value(&v)
714    }
715}
716
717/// Vertical alignment of the text.
718#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
719#[non_exhaustive]
720#[doc(alias = "GESTextVAlign")]
721pub enum TextVAlign {
722    /// draw text on the baseline
723    #[doc(alias = "GES_TEXT_VALIGN_BASELINE")]
724    Baseline,
725    /// draw text on the bottom
726    #[doc(alias = "GES_TEXT_VALIGN_BOTTOM")]
727    Bottom,
728    /// draw text on top
729    #[doc(alias = "GES_TEXT_VALIGN_TOP")]
730    Top,
731    /// draw text on ypos position
732    #[doc(alias = "GES_TEXT_VALIGN_POSITION")]
733    Position,
734    /// draw text on the center
735    #[doc(alias = "GES_TEXT_VALIGN_CENTER")]
736    Center,
737    #[doc(alias = "GES_TEXT_VALIGN_ABSOLUTE")]
738    Absolute,
739    #[doc(hidden)]
740    __Unknown(i32),
741}
742
743#[doc(hidden)]
744impl IntoGlib for TextVAlign {
745    type GlibType = ffi::GESTextVAlign;
746
747    #[inline]
748    fn into_glib(self) -> ffi::GESTextVAlign {
749        match self {
750            Self::Baseline => ffi::GES_TEXT_VALIGN_BASELINE,
751            Self::Bottom => ffi::GES_TEXT_VALIGN_BOTTOM,
752            Self::Top => ffi::GES_TEXT_VALIGN_TOP,
753            Self::Position => ffi::GES_TEXT_VALIGN_POSITION,
754            Self::Center => ffi::GES_TEXT_VALIGN_CENTER,
755            Self::Absolute => ffi::GES_TEXT_VALIGN_ABSOLUTE,
756            Self::__Unknown(value) => value,
757        }
758    }
759}
760
761#[doc(hidden)]
762impl FromGlib<ffi::GESTextVAlign> for TextVAlign {
763    #[inline]
764    unsafe fn from_glib(value: ffi::GESTextVAlign) -> Self {
765        skip_assert_initialized!();
766
767        match value {
768            ffi::GES_TEXT_VALIGN_BASELINE => Self::Baseline,
769            ffi::GES_TEXT_VALIGN_BOTTOM => Self::Bottom,
770            ffi::GES_TEXT_VALIGN_TOP => Self::Top,
771            ffi::GES_TEXT_VALIGN_POSITION => Self::Position,
772            ffi::GES_TEXT_VALIGN_CENTER => Self::Center,
773            ffi::GES_TEXT_VALIGN_ABSOLUTE => Self::Absolute,
774            value => Self::__Unknown(value),
775        }
776    }
777}
778
779impl StaticType for TextVAlign {
780    #[inline]
781    #[doc(alias = "ges_text_valign_get_type")]
782    fn static_type() -> glib::Type {
783        unsafe { from_glib(ffi::ges_text_valign_get_type()) }
784    }
785}
786
787impl glib::HasParamSpec for TextVAlign {
788    type ParamSpec = glib::ParamSpecEnum;
789    type SetValue = Self;
790    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
791
792    fn param_spec_builder() -> Self::BuilderFn {
793        Self::ParamSpec::builder_with_default
794    }
795}
796
797impl glib::value::ValueType for TextVAlign {
798    type Type = Self;
799}
800
801unsafe impl<'a> glib::value::FromValue<'a> for TextVAlign {
802    type Checker = glib::value::GenericValueTypeChecker<Self>;
803
804    #[inline]
805    unsafe fn from_value(value: &'a glib::Value) -> Self {
806        skip_assert_initialized!();
807        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
808    }
809}
810
811impl ToValue for TextVAlign {
812    #[inline]
813    fn to_value(&self) -> glib::Value {
814        let mut value = glib::Value::for_value_type::<Self>();
815        unsafe {
816            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
817        }
818        value
819    }
820
821    #[inline]
822    fn value_type(&self) -> glib::Type {
823        Self::static_type()
824    }
825}
826
827impl From<TextVAlign> for glib::Value {
828    #[inline]
829    fn from(v: TextVAlign) -> Self {
830        skip_assert_initialized!();
831        ToValue::to_value(&v)
832    }
833}
834
835#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
836#[non_exhaustive]
837#[doc(alias = "GESVideoStandardTransitionType")]
838pub enum VideoStandardTransitionType {
839    /// Transition type has not been set,
840    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE")]
841    None,
842    /// A bar moves from left to right,
843    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR")]
844    BarWipeLr,
845    /// A bar moves from top to bottom,
846    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB")]
847    BarWipeTb,
848    /// A box expands from the upper-left corner to the lower-right corner,
849    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL")]
850    BoxWipeTl,
851    /// A box expands from the upper-right corner to the lower-left corner,
852    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR")]
853    BoxWipeTr,
854    /// A box expands from the lower-right corner to the upper-left corner,
855    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR")]
856    BoxWipeBr,
857    /// A box expands from the lower-left corner to the upper-right corner,
858    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL")]
859    BoxWipeBl,
860    /// A box shape expands from each of the four corners toward the center,
861    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI")]
862    FourBoxWipeCi,
863    /// A box shape expands from the center of each quadrant toward the corners of each quadrant,
864    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO")]
865    FourBoxWipeCo,
866    /// A central, vertical line splits and expands toward the left and right edges,
867    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V")]
868    BarndoorV,
869    /// A central, horizontal line splits and expands toward the top and bottom edges,
870    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H")]
871    BarndoorH,
872    /// A box expands from the top edge's midpoint to the bottom corners,
873    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC")]
874    BoxWipeTc,
875    /// A box expands from the right edge's midpoint to the left corners,
876    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC")]
877    BoxWipeRc,
878    /// A box expands from the bottom edge's midpoint to the top corners,
879    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC")]
880    BoxWipeBc,
881    /// A box expands from the left edge's midpoint to the right corners,
882    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC")]
883    BoxWipeLc,
884    /// A diagonal line moves from the upper-left corner to the lower-right corner,
885    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL")]
886    DiagonalTl,
887    /// A diagonal line moves from the upper right corner to the lower-left corner,
888    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR")]
889    DiagonalTr,
890    /// Two wedge shapes slide in from the top and bottom edges toward the center,
891    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V")]
892    BowtieV,
893    /// Two wedge shapes slide in from the left and right edges toward the center,
894    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H")]
895    BowtieH,
896    /// A diagonal line from the lower-left to upper-right corners splits and expands toward the opposite corners,
897    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL")]
898    BarndoorDbl,
899    /// A diagonal line from upper-left to lower-right corners splits and expands toward the opposite corners,
900    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL")]
901    BarndoorDtl,
902    /// Four wedge shapes split from the center and retract toward the four edges,
903    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD")]
904    MiscDiagonalDbd,
905    /// A diamond connecting the four edge midpoints simultaneously contracts toward the center and expands toward the edges,
906    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD")]
907    MiscDiagonalDd,
908    /// A wedge shape moves from top to bottom,
909    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D")]
910    VeeD,
911    /// A wedge shape moves from right to left,
912    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L")]
913    VeeL,
914    /// A wedge shape moves from bottom to top,
915    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U")]
916    VeeU,
917    /// A wedge shape moves from left to right,
918    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R")]
919    VeeR,
920    /// A 'V' shape extending from the bottom edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
921    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D")]
922    BarnveeD,
923    /// A 'V' shape extending from the left edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
924    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L")]
925    BarnveeL,
926    /// A 'V' shape extending from the top edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
927    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U")]
928    BarnveeU,
929    /// A 'V' shape extending from the right edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
930    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R")]
931    BarnveeR,
932    /// A rectangle expands from the center.,
933    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT")]
934    IrisRect,
935    /// A radial hand sweeps clockwise from the twelve o'clock position,
936    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12")]
937    ClockCw12,
938    /// A radial hand sweeps clockwise from the three o'clock position,
939    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3")]
940    ClockCw3,
941    /// A radial hand sweeps clockwise from the six o'clock position,
942    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6")]
943    ClockCw6,
944    /// A radial hand sweeps clockwise from the nine o'clock position,
945    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9")]
946    ClockCw9,
947    /// Two radial hands sweep clockwise from the twelve and six o'clock positions,
948    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV")]
949    PinwheelTbv,
950    /// Two radial hands sweep clockwise from the nine and three o'clock positions,
951    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH")]
952    PinwheelTbh,
953    /// Four radial hands sweep clockwise,
954    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB")]
955    PinwheelFb,
956    /// A fan unfolds from the top edge, the fan axis at the center,
957    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT")]
958    FanCt,
959    /// A fan unfolds from the right edge, the fan axis at the center,
960    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR")]
961    FanCr,
962    /// Two fans, their axes at the center, unfold from the top and bottom,
963    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV")]
964    DoublefanFov,
965    /// Two fans, their axes at the center, unfold from the left and right,
966    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH")]
967    DoublefanFoh,
968    /// A radial hand sweeps clockwise from the top edge's midpoint,
969    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT")]
970    SinglesweepCwt,
971    /// A radial hand sweeps clockwise from the right edge's midpoint,
972    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR")]
973    SinglesweepCwr,
974    /// A radial hand sweeps clockwise from the bottom edge's midpoint,
975    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB")]
976    SinglesweepCwb,
977    /// A radial hand sweeps clockwise from the left edge's midpoint,
978    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL")]
979    SinglesweepCwl,
980    /// Two radial hands sweep clockwise and counter-clockwise from the top and bottom edges' midpoints,
981    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV")]
982    DoublesweepPv,
983    /// Two radial hands sweep clockwise and counter-clockwise from the left and right edges' midpoints,
984    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD")]
985    DoublesweepPd,
986    /// Two radial hands attached at the top and bottom edges' midpoints sweep from right to left,
987    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV")]
988    DoublesweepOv,
989    /// Two radial hands attached at the left and right edges' midpoints sweep from top to bottom,
990    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH")]
991    DoublesweepOh,
992    /// A fan unfolds from the bottom, the fan axis at the top edge's midpoint,
993    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T")]
994    FanT,
995    /// A fan unfolds from the left, the fan axis at the right edge's midpoint,
996    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R")]
997    FanR,
998    /// A fan unfolds from the top, the fan axis at the bottom edge's midpoint,
999    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B")]
1000    FanB,
1001    /// A fan unfolds from the right, the fan axis at the left edge's midpoint,
1002    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L")]
1003    FanL,
1004    /// Two fans, their axes at the top and bottom, unfold from the center,
1005    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV")]
1006    DoublefanFiv,
1007    /// Two fans, their axes at the left and right, unfold from the center,
1008    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH")]
1009    DoublefanFih,
1010    /// A radial hand sweeps clockwise from the upper-left corner,
1011    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL")]
1012    SinglesweepCwtl,
1013    /// A radial hand sweeps counter-clockwise from the lower-left corner.,
1014    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL")]
1015    SinglesweepCwbl,
1016    /// A radial hand sweeps clockwise from the lower-right corner,
1017    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR")]
1018    SinglesweepCwbr,
1019    /// A radial hand sweeps counter-clockwise from the upper-right corner,
1020    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR")]
1021    SinglesweepCwtr,
1022    /// Two radial hands attached at the upper-left and lower-right corners sweep down and up,
1023    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL")]
1024    DoublesweepPdtl,
1025    /// Two radial hands attached at the lower-left and upper-right corners sweep down and up,
1026    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL")]
1027    DoublesweepPdbl,
1028    /// Two radial hands attached at the upper-left and upper-right corners sweep down,
1029    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T")]
1030    SaloondoorT,
1031    /// Two radial hands attached at the upper-left and lower-left corners sweep to the right,
1032    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L")]
1033    SaloondoorL,
1034    /// Two radial hands attached at the lower-left and lower-right corners sweep up,
1035    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B")]
1036    SaloondoorB,
1037    /// Two radial hands attached at the upper-right and lower-right corners sweep to the left,
1038    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R")]
1039    SaloondoorR,
1040    /// Two radial hands attached at the midpoints of the top and bottom halves sweep from right to left,
1041    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R")]
1042    WindshieldR,
1043    /// Two radial hands attached at the midpoints of the left and right halves sweep from top to bottom,
1044    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U")]
1045    WindshieldU,
1046    /// Two sets of radial hands attached at the midpoints of the top and bottom halves sweep from top to bottom and bottom to top,
1047    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V")]
1048    WindshieldV,
1049    /// Two sets of radial hands attached at the midpoints of the left and right halves sweep from left to right and right to left,
1050    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H")]
1051    WindshieldH,
1052    /// Crossfade
1053    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE")]
1054    Crossfade,
1055    /// Similar to crossfade, but fade in the front video without fading out
1056    /// the background one
1057    #[cfg(feature = "v1_22")]
1058    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1059    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FADE_IN")]
1060    FadeIn,
1061    #[doc(hidden)]
1062    __Unknown(i32),
1063}
1064
1065#[doc(hidden)]
1066impl IntoGlib for VideoStandardTransitionType {
1067    type GlibType = ffi::GESVideoStandardTransitionType;
1068
1069    fn into_glib(self) -> ffi::GESVideoStandardTransitionType {
1070        match self {
1071            Self::None => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE,
1072            Self::BarWipeLr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR,
1073            Self::BarWipeTb => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB,
1074            Self::BoxWipeTl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL,
1075            Self::BoxWipeTr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR,
1076            Self::BoxWipeBr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR,
1077            Self::BoxWipeBl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL,
1078            Self::FourBoxWipeCi => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI,
1079            Self::FourBoxWipeCo => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO,
1080            Self::BarndoorV => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V,
1081            Self::BarndoorH => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H,
1082            Self::BoxWipeTc => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC,
1083            Self::BoxWipeRc => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC,
1084            Self::BoxWipeBc => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC,
1085            Self::BoxWipeLc => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC,
1086            Self::DiagonalTl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL,
1087            Self::DiagonalTr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR,
1088            Self::BowtieV => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V,
1089            Self::BowtieH => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H,
1090            Self::BarndoorDbl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL,
1091            Self::BarndoorDtl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL,
1092            Self::MiscDiagonalDbd => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD,
1093            Self::MiscDiagonalDd => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD,
1094            Self::VeeD => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D,
1095            Self::VeeL => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L,
1096            Self::VeeU => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U,
1097            Self::VeeR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R,
1098            Self::BarnveeD => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D,
1099            Self::BarnveeL => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L,
1100            Self::BarnveeU => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U,
1101            Self::BarnveeR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R,
1102            Self::IrisRect => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT,
1103            Self::ClockCw12 => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12,
1104            Self::ClockCw3 => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3,
1105            Self::ClockCw6 => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6,
1106            Self::ClockCw9 => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9,
1107            Self::PinwheelTbv => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV,
1108            Self::PinwheelTbh => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH,
1109            Self::PinwheelFb => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB,
1110            Self::FanCt => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT,
1111            Self::FanCr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR,
1112            Self::DoublefanFov => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV,
1113            Self::DoublefanFoh => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH,
1114            Self::SinglesweepCwt => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT,
1115            Self::SinglesweepCwr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR,
1116            Self::SinglesweepCwb => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB,
1117            Self::SinglesweepCwl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL,
1118            Self::DoublesweepPv => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV,
1119            Self::DoublesweepPd => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD,
1120            Self::DoublesweepOv => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV,
1121            Self::DoublesweepOh => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH,
1122            Self::FanT => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T,
1123            Self::FanR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R,
1124            Self::FanB => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B,
1125            Self::FanL => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L,
1126            Self::DoublefanFiv => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV,
1127            Self::DoublefanFih => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH,
1128            Self::SinglesweepCwtl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL,
1129            Self::SinglesweepCwbl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL,
1130            Self::SinglesweepCwbr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR,
1131            Self::SinglesweepCwtr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR,
1132            Self::DoublesweepPdtl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL,
1133            Self::DoublesweepPdbl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL,
1134            Self::SaloondoorT => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T,
1135            Self::SaloondoorL => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L,
1136            Self::SaloondoorB => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B,
1137            Self::SaloondoorR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R,
1138            Self::WindshieldR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R,
1139            Self::WindshieldU => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U,
1140            Self::WindshieldV => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V,
1141            Self::WindshieldH => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H,
1142            Self::Crossfade => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE,
1143            #[cfg(feature = "v1_22")]
1144            Self::FadeIn => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FADE_IN,
1145            Self::__Unknown(value) => value,
1146        }
1147    }
1148}
1149
1150#[doc(hidden)]
1151impl FromGlib<ffi::GESVideoStandardTransitionType> for VideoStandardTransitionType {
1152    unsafe fn from_glib(value: ffi::GESVideoStandardTransitionType) -> Self {
1153        skip_assert_initialized!();
1154
1155        match value {
1156            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE => Self::None,
1157            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR => Self::BarWipeLr,
1158            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB => Self::BarWipeTb,
1159            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL => Self::BoxWipeTl,
1160            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR => Self::BoxWipeTr,
1161            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR => Self::BoxWipeBr,
1162            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL => Self::BoxWipeBl,
1163            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI => Self::FourBoxWipeCi,
1164            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO => Self::FourBoxWipeCo,
1165            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V => Self::BarndoorV,
1166            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H => Self::BarndoorH,
1167            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC => Self::BoxWipeTc,
1168            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC => Self::BoxWipeRc,
1169            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC => Self::BoxWipeBc,
1170            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC => Self::BoxWipeLc,
1171            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL => Self::DiagonalTl,
1172            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR => Self::DiagonalTr,
1173            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V => Self::BowtieV,
1174            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H => Self::BowtieH,
1175            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL => Self::BarndoorDbl,
1176            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL => Self::BarndoorDtl,
1177            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD => Self::MiscDiagonalDbd,
1178            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD => Self::MiscDiagonalDd,
1179            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D => Self::VeeD,
1180            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L => Self::VeeL,
1181            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U => Self::VeeU,
1182            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R => Self::VeeR,
1183            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D => Self::BarnveeD,
1184            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L => Self::BarnveeL,
1185            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U => Self::BarnveeU,
1186            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R => Self::BarnveeR,
1187            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT => Self::IrisRect,
1188            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12 => Self::ClockCw12,
1189            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3 => Self::ClockCw3,
1190            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6 => Self::ClockCw6,
1191            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9 => Self::ClockCw9,
1192            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV => Self::PinwheelTbv,
1193            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH => Self::PinwheelTbh,
1194            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB => Self::PinwheelFb,
1195            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT => Self::FanCt,
1196            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR => Self::FanCr,
1197            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV => Self::DoublefanFov,
1198            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH => Self::DoublefanFoh,
1199            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT => Self::SinglesweepCwt,
1200            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR => Self::SinglesweepCwr,
1201            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB => Self::SinglesweepCwb,
1202            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL => Self::SinglesweepCwl,
1203            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV => Self::DoublesweepPv,
1204            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD => Self::DoublesweepPd,
1205            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV => Self::DoublesweepOv,
1206            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH => Self::DoublesweepOh,
1207            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T => Self::FanT,
1208            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R => Self::FanR,
1209            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B => Self::FanB,
1210            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L => Self::FanL,
1211            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV => Self::DoublefanFiv,
1212            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH => Self::DoublefanFih,
1213            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL => Self::SinglesweepCwtl,
1214            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL => Self::SinglesweepCwbl,
1215            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR => Self::SinglesweepCwbr,
1216            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR => Self::SinglesweepCwtr,
1217            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL => Self::DoublesweepPdtl,
1218            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL => Self::DoublesweepPdbl,
1219            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T => Self::SaloondoorT,
1220            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L => Self::SaloondoorL,
1221            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B => Self::SaloondoorB,
1222            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R => Self::SaloondoorR,
1223            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R => Self::WindshieldR,
1224            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U => Self::WindshieldU,
1225            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V => Self::WindshieldV,
1226            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H => Self::WindshieldH,
1227            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE => Self::Crossfade,
1228            #[cfg(feature = "v1_22")]
1229            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FADE_IN => Self::FadeIn,
1230            value => Self::__Unknown(value),
1231        }
1232    }
1233}
1234
1235impl StaticType for VideoStandardTransitionType {
1236    #[inline]
1237    #[doc(alias = "ges_video_standard_transition_type_get_type")]
1238    fn static_type() -> glib::Type {
1239        unsafe { from_glib(ffi::ges_video_standard_transition_type_get_type()) }
1240    }
1241}
1242
1243impl glib::HasParamSpec for VideoStandardTransitionType {
1244    type ParamSpec = glib::ParamSpecEnum;
1245    type SetValue = Self;
1246    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
1247
1248    fn param_spec_builder() -> Self::BuilderFn {
1249        Self::ParamSpec::builder_with_default
1250    }
1251}
1252
1253impl glib::value::ValueType for VideoStandardTransitionType {
1254    type Type = Self;
1255}
1256
1257unsafe impl<'a> glib::value::FromValue<'a> for VideoStandardTransitionType {
1258    type Checker = glib::value::GenericValueTypeChecker<Self>;
1259
1260    #[inline]
1261    unsafe fn from_value(value: &'a glib::Value) -> Self {
1262        skip_assert_initialized!();
1263        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1264    }
1265}
1266
1267impl ToValue for VideoStandardTransitionType {
1268    #[inline]
1269    fn to_value(&self) -> glib::Value {
1270        let mut value = glib::Value::for_value_type::<Self>();
1271        unsafe {
1272            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1273        }
1274        value
1275    }
1276
1277    #[inline]
1278    fn value_type(&self) -> glib::Type {
1279        Self::static_type()
1280    }
1281}
1282
1283impl From<VideoStandardTransitionType> for glib::Value {
1284    #[inline]
1285    fn from(v: VideoStandardTransitionType) -> Self {
1286        skip_assert_initialized!();
1287        ToValue::to_value(&v)
1288    }
1289}
1290
1291/// The test pattern to produce
1292#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1293#[non_exhaustive]
1294#[doc(alias = "GESVideoTestPattern")]
1295pub enum VideoTestPattern {
1296    /// A standard SMPTE test pattern
1297    #[doc(alias = "GES_VIDEO_TEST_PATTERN_SMPTE")]
1298    Smpte,
1299    /// Random noise
1300    #[doc(alias = "GES_VIDEO_TEST_PATTERN_SNOW")]
1301    Snow,
1302    /// A black image
1303    #[doc(alias = "GES_VIDEO_TEST_PATTERN_BLACK")]
1304    Black,
1305    /// A white image
1306    #[doc(alias = "GES_VIDEO_TEST_PATTERN_WHITE")]
1307    White,
1308    /// A red image
1309    #[doc(alias = "GES_VIDEO_TEST_PATTERN_RED")]
1310    Red,
1311    /// A green image
1312    #[doc(alias = "GES_VIDEO_TEST_PATTERN_GREEN")]
1313    Green,
1314    /// A blue image
1315    #[doc(alias = "GES_VIDEO_TEST_PATTERN_BLUE")]
1316    Blue,
1317    /// Checkers pattern (1px)
1318    #[doc(alias = "GES_VIDEO_TEST_PATTERN_CHECKERS1")]
1319    Checkers1,
1320    /// Checkers pattern (2px)
1321    #[doc(alias = "GES_VIDEO_TEST_PATTERN_CHECKERS2")]
1322    Checkers2,
1323    /// Checkers pattern (4px)
1324    #[doc(alias = "GES_VIDEO_TEST_PATTERN_CHECKERS4")]
1325    Checkers4,
1326    /// Checkers pattern (8px)
1327    #[doc(alias = "GES_VIDEO_TEST_PATTERN_CHECKERS8")]
1328    Checkers8,
1329    /// Circular pattern
1330    #[doc(alias = "GES_VIDEO_TEST_PATTERN_CIRCULAR")]
1331    Circular,
1332    /// Alternate between black and white
1333    #[doc(alias = "GES_VIDEO_TEST_PATTERN_BLINK")]
1334    Blink,
1335    /// SMPTE test pattern (75% color bars)
1336    #[doc(alias = "GES_VIDEO_TEST_PATTERN_SMPTE75")]
1337    Smpte75,
1338    /// Zone plate
1339    #[doc(alias = "GES_VIDEO_TEST_ZONE_PLATE")]
1340    ZonePlate,
1341    /// Gamut checkers
1342    #[doc(alias = "GES_VIDEO_TEST_GAMUT")]
1343    Gamut,
1344    /// Chroma zone plate
1345    #[doc(alias = "GES_VIDEO_TEST_CHROMA_ZONE_PLATE")]
1346    ChromaZonePlate,
1347    /// Solid color
1348    #[doc(alias = "GES_VIDEO_TEST_PATTERN_SOLID")]
1349    SolidColor,
1350    #[doc(hidden)]
1351    __Unknown(i32),
1352}
1353
1354#[doc(hidden)]
1355impl IntoGlib for VideoTestPattern {
1356    type GlibType = ffi::GESVideoTestPattern;
1357
1358    fn into_glib(self) -> ffi::GESVideoTestPattern {
1359        match self {
1360            Self::Smpte => ffi::GES_VIDEO_TEST_PATTERN_SMPTE,
1361            Self::Snow => ffi::GES_VIDEO_TEST_PATTERN_SNOW,
1362            Self::Black => ffi::GES_VIDEO_TEST_PATTERN_BLACK,
1363            Self::White => ffi::GES_VIDEO_TEST_PATTERN_WHITE,
1364            Self::Red => ffi::GES_VIDEO_TEST_PATTERN_RED,
1365            Self::Green => ffi::GES_VIDEO_TEST_PATTERN_GREEN,
1366            Self::Blue => ffi::GES_VIDEO_TEST_PATTERN_BLUE,
1367            Self::Checkers1 => ffi::GES_VIDEO_TEST_PATTERN_CHECKERS1,
1368            Self::Checkers2 => ffi::GES_VIDEO_TEST_PATTERN_CHECKERS2,
1369            Self::Checkers4 => ffi::GES_VIDEO_TEST_PATTERN_CHECKERS4,
1370            Self::Checkers8 => ffi::GES_VIDEO_TEST_PATTERN_CHECKERS8,
1371            Self::Circular => ffi::GES_VIDEO_TEST_PATTERN_CIRCULAR,
1372            Self::Blink => ffi::GES_VIDEO_TEST_PATTERN_BLINK,
1373            Self::Smpte75 => ffi::GES_VIDEO_TEST_PATTERN_SMPTE75,
1374            Self::ZonePlate => ffi::GES_VIDEO_TEST_ZONE_PLATE,
1375            Self::Gamut => ffi::GES_VIDEO_TEST_GAMUT,
1376            Self::ChromaZonePlate => ffi::GES_VIDEO_TEST_CHROMA_ZONE_PLATE,
1377            Self::SolidColor => ffi::GES_VIDEO_TEST_PATTERN_SOLID,
1378            Self::__Unknown(value) => value,
1379        }
1380    }
1381}
1382
1383#[doc(hidden)]
1384impl FromGlib<ffi::GESVideoTestPattern> for VideoTestPattern {
1385    unsafe fn from_glib(value: ffi::GESVideoTestPattern) -> Self {
1386        skip_assert_initialized!();
1387
1388        match value {
1389            ffi::GES_VIDEO_TEST_PATTERN_SMPTE => Self::Smpte,
1390            ffi::GES_VIDEO_TEST_PATTERN_SNOW => Self::Snow,
1391            ffi::GES_VIDEO_TEST_PATTERN_BLACK => Self::Black,
1392            ffi::GES_VIDEO_TEST_PATTERN_WHITE => Self::White,
1393            ffi::GES_VIDEO_TEST_PATTERN_RED => Self::Red,
1394            ffi::GES_VIDEO_TEST_PATTERN_GREEN => Self::Green,
1395            ffi::GES_VIDEO_TEST_PATTERN_BLUE => Self::Blue,
1396            ffi::GES_VIDEO_TEST_PATTERN_CHECKERS1 => Self::Checkers1,
1397            ffi::GES_VIDEO_TEST_PATTERN_CHECKERS2 => Self::Checkers2,
1398            ffi::GES_VIDEO_TEST_PATTERN_CHECKERS4 => Self::Checkers4,
1399            ffi::GES_VIDEO_TEST_PATTERN_CHECKERS8 => Self::Checkers8,
1400            ffi::GES_VIDEO_TEST_PATTERN_CIRCULAR => Self::Circular,
1401            ffi::GES_VIDEO_TEST_PATTERN_BLINK => Self::Blink,
1402            ffi::GES_VIDEO_TEST_PATTERN_SMPTE75 => Self::Smpte75,
1403            ffi::GES_VIDEO_TEST_ZONE_PLATE => Self::ZonePlate,
1404            ffi::GES_VIDEO_TEST_GAMUT => Self::Gamut,
1405            ffi::GES_VIDEO_TEST_CHROMA_ZONE_PLATE => Self::ChromaZonePlate,
1406            ffi::GES_VIDEO_TEST_PATTERN_SOLID => Self::SolidColor,
1407            value => Self::__Unknown(value),
1408        }
1409    }
1410}
1411
1412impl StaticType for VideoTestPattern {
1413    #[inline]
1414    #[doc(alias = "ges_video_test_pattern_get_type")]
1415    fn static_type() -> glib::Type {
1416        unsafe { from_glib(ffi::ges_video_test_pattern_get_type()) }
1417    }
1418}
1419
1420impl glib::HasParamSpec for VideoTestPattern {
1421    type ParamSpec = glib::ParamSpecEnum;
1422    type SetValue = Self;
1423    type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
1424
1425    fn param_spec_builder() -> Self::BuilderFn {
1426        Self::ParamSpec::builder_with_default
1427    }
1428}
1429
1430impl glib::value::ValueType for VideoTestPattern {
1431    type Type = Self;
1432}
1433
1434unsafe impl<'a> glib::value::FromValue<'a> for VideoTestPattern {
1435    type Checker = glib::value::GenericValueTypeChecker<Self>;
1436
1437    #[inline]
1438    unsafe fn from_value(value: &'a glib::Value) -> Self {
1439        skip_assert_initialized!();
1440        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1441    }
1442}
1443
1444impl ToValue for VideoTestPattern {
1445    #[inline]
1446    fn to_value(&self) -> glib::Value {
1447        let mut value = glib::Value::for_value_type::<Self>();
1448        unsafe {
1449            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1450        }
1451        value
1452    }
1453
1454    #[inline]
1455    fn value_type(&self) -> glib::Type {
1456        Self::static_type()
1457    }
1458}
1459
1460impl From<VideoTestPattern> for glib::Value {
1461    #[inline]
1462    fn from(v: VideoTestPattern) -> Self {
1463        skip_assert_initialized!();
1464        ToValue::to_value(&v)
1465    }
1466}