1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT

use glib::translate::*;
use glib::value::FromValue;
use glib::value::ToValue;
use glib::StaticType;
use glib::Type;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::ffi::CStr;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::fmt;

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GESAssetLoadingReturn")]
pub enum AssetLoadingReturn {
    /// Indicates that an error occurred
    #[doc(alias = "GES_ASSET_LOADING_ERROR")]
    Error,
    /// Indicates that the loading is being performed
    /// asynchronously
    #[doc(alias = "GES_ASSET_LOADING_ASYNC")]
    Async,
    /// Indicates that the loading is complete, without
    /// error
    #[doc(alias = "GES_ASSET_LOADING_OK")]
    Ok,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    fn into_glib(self) -> ffi::GESAssetLoadingReturn {
        match self {
            Self::Error => ffi::GES_ASSET_LOADING_ERROR,
            Self::Async => ffi::GES_ASSET_LOADING_ASYNC,
            Self::Ok => ffi::GES_ASSET_LOADING_OK,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::GESAssetLoadingReturn> for AssetLoadingReturn {
    unsafe fn from_glib(value: ffi::GESAssetLoadingReturn) -> Self {
        skip_assert_initialized!();
        match value {
            ffi::GES_ASSET_LOADING_ERROR => Self::Error,
            ffi::GES_ASSET_LOADING_ASYNC => Self::Async,
            ffi::GES_ASSET_LOADING_OK => Self::Ok,
            value => Self::__Unknown(value),
        }
    }
}

/// To be used by subclasses only. This indicate how to handle a change in
/// a child.
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GESChildrenControlMode")]
pub enum ChildrenControlMode {
    #[doc(alias = "GES_CHILDREN_UPDATE")]
    Update,
    #[doc(alias = "GES_CHILDREN_IGNORE_NOTIFIES")]
    IgnoreNotifies,
    #[doc(alias = "GES_CHILDREN_UPDATE_OFFSETS")]
    UpdateOffsets,
    #[doc(alias = "GES_CHILDREN_UPDATE_ALL_VALUES")]
    UpdateAllValues,
    #[doc(alias = "GES_CHILDREN_LAST")]
    Last,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    fn into_glib(self) -> ffi::GESChildrenControlMode {
        match self {
            Self::Update => ffi::GES_CHILDREN_UPDATE,
            Self::IgnoreNotifies => ffi::GES_CHILDREN_IGNORE_NOTIFIES,
            Self::UpdateOffsets => ffi::GES_CHILDREN_UPDATE_OFFSETS,
            Self::UpdateAllValues => ffi::GES_CHILDREN_UPDATE_ALL_VALUES,
            Self::Last => ffi::GES_CHILDREN_LAST,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::GESChildrenControlMode> for ChildrenControlMode {
    unsafe fn from_glib(value: ffi::GESChildrenControlMode) -> Self {
        skip_assert_initialized!();
        match value {
            ffi::GES_CHILDREN_UPDATE => Self::Update,
            ffi::GES_CHILDREN_IGNORE_NOTIFIES => Self::IgnoreNotifies,
            ffi::GES_CHILDREN_UPDATE_OFFSETS => Self::UpdateOffsets,
            ffi::GES_CHILDREN_UPDATE_ALL_VALUES => Self::UpdateAllValues,
            ffi::GES_CHILDREN_LAST => Self::Last,
            value => Self::__Unknown(value),
        }
    }
}

/// The edges of an object contain in a [`Timeline`][crate::Timeline] or [`Track`][crate::Track]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GESEdge")]
pub enum Edge {
    /// Represents the start of an object.
    #[doc(alias = "GES_EDGE_START")]
    Start,
    /// Represents the end of an object.
    #[doc(alias = "GES_EDGE_END")]
    End,
    /// Represent the fact we are not working with any edge of an
    ///  object.
    #[doc(alias = "GES_EDGE_NONE")]
    None,
    #[doc(hidden)]
    __Unknown(i32),
}

impl Edge {
    #[cfg(any(feature = "v1_16", feature = "dox"))]
    #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
    pub fn name<'a>(self) -> &'a str {
        unsafe {
            CStr::from_ptr(
                ffi::ges_edge_name(self.into_glib())
                    .as_ref()
                    .expect("ges_edge_name returned NULL"),
            )
            .to_str()
            .expect("ges_edge_name returned an invalid string")
        }
    }
}

#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl fmt::Display for Edge {
    #[inline]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        f.write_str(&self.name())
    }
}

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

    fn into_glib(self) -> ffi::GESEdge {
        match self {
            Self::Start => ffi::GES_EDGE_START,
            Self::End => ffi::GES_EDGE_END,
            Self::None => ffi::GES_EDGE_NONE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::GESEdge> for Edge {
    unsafe fn from_glib(value: ffi::GESEdge) -> Self {
        skip_assert_initialized!();
        match value {
            ffi::GES_EDGE_START => Self::Start,
            ffi::GES_EDGE_END => Self::End,
            ffi::GES_EDGE_NONE => Self::None,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for Edge {
    fn static_type() -> Type {
        unsafe { from_glib(ffi::ges_edge_get_type()) }
    }
}

impl glib::value::ValueType for Edge {
    type Type = Self;
}

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

    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
    }
}

impl ToValue for Edge {
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

/// When a single timeline element is edited within its timeline at some
/// position, using [`TimelineElementExt::edit()`][crate::prelude::TimelineElementExt::edit()], depending on the edit
/// mode, its `property::TimelineElement::start`, `property::TimelineElement::duration` or
/// `property::TimelineElement::in-point` will be adjusted accordingly. In addition,
/// any clips may change `property::Clip::layer`.
///
/// Each edit can be broken down into a combination of three basic edits:
///
/// + MOVE: This moves the start of the element to the edit position.
/// + START-TRIM: This cuts or grows the start of the element, whilst
///  maintaining the time at which its internal content appears in the
///  timeline data output. If the element is made shorter, the data that
///  appeared at the edit position will still appear in the timeline at
///  the same time. If the element is made longer, the data that appeared
///  at the previous start of the element will still appear in the
///  timeline at the same time.
/// + END-TRIM: Similar to START-TRIM, but the end of the element is cut or
///  grown.
///
/// In particular, when editing a [`Clip`][crate::Clip]:
///
/// + MOVE: This will set the `property::TimelineElement::start` of the clip to the
///  edit position.
/// + START-TRIM: This will set the `property::TimelineElement::start` of the clip
///  to the edit position. To keep the end time the same, the
///  `property::TimelineElement::duration` of the clip will be adjusted in the
///  opposite direction. In addition, the `property::TimelineElement::in-point` of
///  the clip will be shifted such that the content that appeared at the
///  new or previous start time, whichever is latest, still appears at the
///  same timeline time. For example, if a frame appeared at the start of
///  the clip, and the start of the clip is reduced, the in-point of the
///  clip will also reduce such that the frame will appear later within
///  the clip, but at the same timeline position.
/// + END-TRIM: This will set the `property::TimelineElement::duration` of the clip
///  such that its end time will match the edit position.
///
/// When editing a [`Group`][crate::Group]:
///
/// + MOVE: This will set the `property::Group::start` of the clip to the edit
///  position by shifting all of its children by the same amount. So each
///  child will maintain their relative positions.
/// + START-TRIM: If the group is made shorter, this will START-TRIM any
///  clips under the group that start after the edit position to the same
///  edit position. If the group is made longer, this will START-TRIM any
///  clip under the group whose start matches the start of the group to
///  the same edit position.
/// + END-TRIM: If the group is made shorter, this will END-TRIM any clips
///  under the group that end after the edit position to the same edit
///  position. If the group is made longer, this will END-TRIM any clip
///  under the group whose end matches the end of the group to the same
///  edit position.
///
/// When editing a [`TrackElement`][crate::TrackElement], if it has a [`Clip`][crate::Clip] parent, this
/// will be edited instead. Otherwise it is edited in the same way as a
/// [`Clip`][crate::Clip].
///
/// The layer priority of a [`Group`][crate::Group] is the lowest layer priority of any
/// [`Clip`][crate::Clip] underneath it. When a group is edited to a new layer
/// priority, it will shift all clips underneath it by the same amount,
/// such that their relative layers stay the same.
///
/// If the [`Timeline`][crate::Timeline] has a `property::Timeline::snapping-distance`, then snapping
/// may occur for some of the edges of the **main** edited element:
///
/// + MOVE: The start or end edge of *any* [`Source`][crate::Source] under the element may
///  be snapped.
/// + START-TRIM: The start edge of a [`Source`][crate::Source] whose start edge touches
///  the start edge of the element may snap.
/// + END-TRIM: The end edge of a [`Source`][crate::Source] whose end edge touches the end
///  edge of the element may snap.
///
/// These edges may snap with either the start or end edge of *any* other
/// [`Source`][crate::Source] in the timeline that is not also being moved by the element,
/// including those in different layers, if they are within the
/// `property::Timeline::snapping-distance`. During an edit, only up to one snap can
/// occur. This will shift the edit position such that the snapped edges
/// will touch once the edit has completed.
///
/// Note that snapping can cause an edit to fail where it would have
/// otherwise succeeded because it may push the edit position such that the
/// edit would result in an unsupported timeline configuration. Similarly,
/// snapping can cause an edit to succeed where it would have otherwise
/// failed.
///
/// For example, in [`Ripple`][Self::Ripple] acting on [`Edge::None`][crate::Edge::None], the
/// main element is the MOVED toplevel of the edited element. Any source
/// under the main MOVED toplevel may have its start or end edge snapped.
/// Note, these sources cannot snap with each other. The edit may also
/// push other elements, but any sources under these elements cannot snap,
/// nor can they be snapped with. If a snap does occur, the MOVE of the
/// toplevel *and* all other elements pushed by the ripple will be shifted
/// by the same amount such that the snapped edges will touch.
///
/// You can also find more explanation about the behaviour of those modes at:
/// [trim, ripple and roll](http://pitivi.org/manual/trimming.html)
/// and [clip management](http://pitivi.org/manual/usingclips.html).
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GESEditMode")]
pub enum EditMode {
    /// The element is edited the normal way (default).
    ///  If acting on the element as a whole ([`Edge::None`][crate::Edge::None]), this will MOVE
    ///  the element by MOVING its toplevel. When acting on the start of the
    ///  element ([`Edge::Start`][crate::Edge::Start]), this will only MOVE the element, but not
    ///  its toplevel parent. This can allow you to move a [`Clip`][crate::Clip] or
    ///  [`Group`][crate::Group] to a new start time or layer within its container group,
    ///  without effecting other members of the group. When acting on the end
    ///  of the element ([`Edge::End`][crate::Edge::End]), this will END-TRIM the element,
    ///  leaving its toplevel unchanged.
    #[doc(alias = "GES_EDIT_MODE_NORMAL")]
    Normal,
    /// The element is edited in ripple mode: moving
    ///  itself as well as later elements, keeping their relative times. This
    ///  edits the element the same as [`Normal`][Self::Normal]. In addition, if
    ///  acting on the element as a whole, or the start of the element, any
    ///  toplevel element in the same timeline (including different layers)
    ///  whose start time is later than the *current* start time of the MOVED
    ///  element will also be MOVED by the same shift as the edited element.
    ///  If acting on the end of the element, any toplevel element whose start
    ///  time is later than the *current* end time of the edited element will
    ///  also be MOVED by the same shift as the change in the end of the
    ///  edited element. These additional elements will also be shifted by
    ///  the same shift in layers as the edited element.
    #[doc(alias = "GES_EDIT_MODE_RIPPLE")]
    Ripple,
    /// The element is edited in roll mode: swapping its
    ///  content for its neighbour's, or vis versa, in the timeline output.
    ///  This edits the element the same as [`Trim`][Self::Trim]. In addition,
    ///  any neighbours are also TRIMMED at their opposite edge to the same
    ///  timeline position. When acting on the start of the element, a
    ///  neighbour is any earlier element in the timeline whose end time
    ///  matches the *current* start time of the edited element. When acting on
    ///  the end of the element, a neighbour is any later element in the
    ///  timeline whose start time matches the *current* start time of the
    ///  edited element. In addition, a neighbour have a [`Source`][crate::Source] at its
    ///  end/start edge that shares a track with a [`Source`][crate::Source] at the start/end
    ///  edge of the edited element. Basically, a neighbour is an element that
    ///  can be extended, or cut, to have its content replace, or be replaced
    ///  by, the content of the edited element. Acting on the element as a
    ///  whole ([`Edge::None`][crate::Edge::None]) is not defined. The element can not shift
    ///  layers under this mode.
    #[doc(alias = "GES_EDIT_MODE_ROLL")]
    Roll,
    /// The element is edited in trim mode. When acting
    ///  on the start of the element, this will START-TRIM it. When acting on
    ///  the end of the element, this will END-TRIM it. Acting on the element
    ///  as a whole ([`Edge::None`][crate::Edge::None]) is not defined.
    #[doc(alias = "GES_EDIT_MODE_TRIM")]
    Trim,
    /// The element is edited in slide mode (not yet
    ///  implemented): moving the element replacing or consuming content on
    ///  each end. When acting on the element as a whole, this will MOVE the
    ///  element, and TRIM any neighbours on either side. A neighbour is
    ///  defined in the same way as in [`Roll`][Self::Roll], but they may be on
    ///  either side of the edited elements. Elements at the end with be
    ///  START-TRIMMED to the new end position of the edited element. Elements
    ///  at the start will be END-TRIMMED to the new start position of the
    ///  edited element. Acting on the start or end of the element
    ///  ([`Edge::Start`][crate::Edge::Start] and [`Edge::End`][crate::Edge::End]) is not defined. The element can
    ///  not shift layers under this mode.
    #[doc(alias = "GES_EDIT_MODE_SLIDE")]
    Slide,
    #[doc(hidden)]
    __Unknown(i32),
}

impl EditMode {
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
    pub fn name<'a>(self) -> &'a str {
        unsafe {
            CStr::from_ptr(
                ffi::ges_edit_mode_name(self.into_glib())
                    .as_ref()
                    .expect("ges_edit_mode_name returned NULL"),
            )
            .to_str()
            .expect("ges_edit_mode_name returned an invalid string")
        }
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl fmt::Display for EditMode {
    #[inline]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        f.write_str(&self.name())
    }
}

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

    fn into_glib(self) -> ffi::GESEditMode {
        match self {
            Self::Normal => ffi::GES_EDIT_MODE_NORMAL,
            Self::Ripple => ffi::GES_EDIT_MODE_RIPPLE,
            Self::Roll => ffi::GES_EDIT_MODE_ROLL,
            Self::Trim => ffi::GES_EDIT_MODE_TRIM,
            Self::Slide => ffi::GES_EDIT_MODE_SLIDE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::GESEditMode> for EditMode {
    unsafe fn from_glib(value: ffi::GESEditMode) -> Self {
        skip_assert_initialized!();
        match value {
            ffi::GES_EDIT_MODE_NORMAL => Self::Normal,
            ffi::GES_EDIT_MODE_RIPPLE => Self::Ripple,
            ffi::GES_EDIT_MODE_ROLL => Self::Roll,
            ffi::GES_EDIT_MODE_TRIM => Self::Trim,
            ffi::GES_EDIT_MODE_SLIDE => Self::Slide,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for EditMode {
    fn static_type() -> Type {
        unsafe { from_glib(ffi::ges_edit_mode_get_type()) }
    }
}

impl glib::value::ValueType for EditMode {
    type Type = Self;
}

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

    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
    }
}

impl ToValue for EditMode {
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GESError")]
pub enum Error {
    /// The ID passed is malformed
    #[doc(alias = "GES_ERROR_ASSET_WRONG_ID")]
    AssetWrongId,
    /// An error happened while loading the asset
    #[doc(alias = "GES_ERROR_ASSET_LOADING")]
    AssetLoading,
    /// The formatted files was malformed
    #[doc(alias = "GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE")]
    FormatterMalformedInputFile,
    /// The frame number is invalid
    #[doc(alias = "GES_ERROR_INVALID_FRAME_NUMBER")]
    InvalidFrameNumber,
    /// The operation would lead to a negative
    /// `GES_TIMELINE_ELEMENT_LAYER_PRIORITY`. (Since: 1.18)
    #[doc(alias = "GES_ERROR_NEGATIVE_LAYER")]
    NegativeLayer,
    /// The operation would lead to a negative time.
    /// E.g. for the `property::TimelineElement::start` `property::TimelineElement::duration` or
    /// `property::TimelineElement::in-point`. (Since: 1.18)
    #[doc(alias = "GES_ERROR_NEGATIVE_TIME")]
    NegativeTime,
    /// Some [`TimelineElement`][crate::TimelineElement] does
    /// not have a large enough `property::TimelineElement::max-duration` to cover the
    /// desired operation. (Since: 1.18)
    #[doc(alias = "GES_ERROR_NOT_ENOUGH_INTERNAL_CONTENT")]
    NotEnoughInternalContent,
    /// The operation would break one of
    /// the overlap conditions for the [`Timeline`][crate::Timeline]. (Since: 1.18)
    #[doc(alias = "GES_ERROR_INVALID_OVERLAP_IN_TRACK")]
    InvalidOverlapInTrack,
    #[doc(alias = "GES_ERROR_INVALID_EFFECT_BIN_DESCRIPTION")]
    InvalidEffectBinDescription,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    fn into_glib(self) -> ffi::GESError {
        match self {
            Self::AssetWrongId => ffi::GES_ERROR_ASSET_WRONG_ID,
            Self::AssetLoading => ffi::GES_ERROR_ASSET_LOADING,
            Self::FormatterMalformedInputFile => ffi::GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE,
            Self::InvalidFrameNumber => ffi::GES_ERROR_INVALID_FRAME_NUMBER,
            Self::NegativeLayer => ffi::GES_ERROR_NEGATIVE_LAYER,
            Self::NegativeTime => ffi::GES_ERROR_NEGATIVE_TIME,
            Self::NotEnoughInternalContent => ffi::GES_ERROR_NOT_ENOUGH_INTERNAL_CONTENT,
            Self::InvalidOverlapInTrack => ffi::GES_ERROR_INVALID_OVERLAP_IN_TRACK,
            Self::InvalidEffectBinDescription => ffi::GES_ERROR_INVALID_EFFECT_BIN_DESCRIPTION,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::GESError> for Error {
    unsafe fn from_glib(value: ffi::GESError) -> Self {
        skip_assert_initialized!();
        match value {
            ffi::GES_ERROR_ASSET_WRONG_ID => Self::AssetWrongId,
            ffi::GES_ERROR_ASSET_LOADING => Self::AssetLoading,
            ffi::GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE => Self::FormatterMalformedInputFile,
            ffi::GES_ERROR_INVALID_FRAME_NUMBER => Self::InvalidFrameNumber,
            ffi::GES_ERROR_NEGATIVE_LAYER => Self::NegativeLayer,
            ffi::GES_ERROR_NEGATIVE_TIME => Self::NegativeTime,
            ffi::GES_ERROR_NOT_ENOUGH_INTERNAL_CONTENT => Self::NotEnoughInternalContent,
            ffi::GES_ERROR_INVALID_OVERLAP_IN_TRACK => Self::InvalidOverlapInTrack,
            ffi::GES_ERROR_INVALID_EFFECT_BIN_DESCRIPTION => Self::InvalidEffectBinDescription,
            value => Self::__Unknown(value),
        }
    }
}

/// Horizontal alignment of the text.
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GESTextHAlign")]
pub enum TextHAlign {
    /// align text left
    #[doc(alias = "GES_TEXT_HALIGN_LEFT")]
    Left,
    /// align text center
    #[doc(alias = "GES_TEXT_HALIGN_CENTER")]
    Center,
    /// align text right
    #[doc(alias = "GES_TEXT_HALIGN_RIGHT")]
    Right,
    /// align text on xpos position
    #[doc(alias = "GES_TEXT_HALIGN_POSITION")]
    Position,
    #[doc(alias = "GES_TEXT_HALIGN_ABSOLUTE")]
    Absolute,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    fn into_glib(self) -> ffi::GESTextHAlign {
        match self {
            Self::Left => ffi::GES_TEXT_HALIGN_LEFT,
            Self::Center => ffi::GES_TEXT_HALIGN_CENTER,
            Self::Right => ffi::GES_TEXT_HALIGN_RIGHT,
            Self::Position => ffi::GES_TEXT_HALIGN_POSITION,
            Self::Absolute => ffi::GES_TEXT_HALIGN_ABSOLUTE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::GESTextHAlign> for TextHAlign {
    unsafe fn from_glib(value: ffi::GESTextHAlign) -> Self {
        skip_assert_initialized!();
        match value {
            ffi::GES_TEXT_HALIGN_LEFT => Self::Left,
            ffi::GES_TEXT_HALIGN_CENTER => Self::Center,
            ffi::GES_TEXT_HALIGN_RIGHT => Self::Right,
            ffi::GES_TEXT_HALIGN_POSITION => Self::Position,
            ffi::GES_TEXT_HALIGN_ABSOLUTE => Self::Absolute,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for TextHAlign {
    fn static_type() -> Type {
        unsafe { from_glib(ffi::ges_text_halign_get_type()) }
    }
}

impl glib::value::ValueType for TextHAlign {
    type Type = Self;
}

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

    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
    }
}

impl ToValue for TextHAlign {
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

/// Vertical alignment of the text.
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GESTextVAlign")]
pub enum TextVAlign {
    /// draw text on the baseline
    #[doc(alias = "GES_TEXT_VALIGN_BASELINE")]
    Baseline,
    /// draw text on the bottom
    #[doc(alias = "GES_TEXT_VALIGN_BOTTOM")]
    Bottom,
    /// draw text on top
    #[doc(alias = "GES_TEXT_VALIGN_TOP")]
    Top,
    /// draw text on ypos position
    #[doc(alias = "GES_TEXT_VALIGN_POSITION")]
    Position,
    /// draw text on the center
    #[doc(alias = "GES_TEXT_VALIGN_CENTER")]
    Center,
    #[doc(alias = "GES_TEXT_VALIGN_ABSOLUTE")]
    Absolute,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    fn into_glib(self) -> ffi::GESTextVAlign {
        match self {
            Self::Baseline => ffi::GES_TEXT_VALIGN_BASELINE,
            Self::Bottom => ffi::GES_TEXT_VALIGN_BOTTOM,
            Self::Top => ffi::GES_TEXT_VALIGN_TOP,
            Self::Position => ffi::GES_TEXT_VALIGN_POSITION,
            Self::Center => ffi::GES_TEXT_VALIGN_CENTER,
            Self::Absolute => ffi::GES_TEXT_VALIGN_ABSOLUTE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::GESTextVAlign> for TextVAlign {
    unsafe fn from_glib(value: ffi::GESTextVAlign) -> Self {
        skip_assert_initialized!();
        match value {
            ffi::GES_TEXT_VALIGN_BASELINE => Self::Baseline,
            ffi::GES_TEXT_VALIGN_BOTTOM => Self::Bottom,
            ffi::GES_TEXT_VALIGN_TOP => Self::Top,
            ffi::GES_TEXT_VALIGN_POSITION => Self::Position,
            ffi::GES_TEXT_VALIGN_CENTER => Self::Center,
            ffi::GES_TEXT_VALIGN_ABSOLUTE => Self::Absolute,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for TextVAlign {
    fn static_type() -> Type {
        unsafe { from_glib(ffi::ges_text_valign_get_type()) }
    }
}

impl glib::value::ValueType for TextVAlign {
    type Type = Self;
}

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

    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
    }
}

impl ToValue for TextVAlign {
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GESVideoStandardTransitionType")]
pub enum VideoStandardTransitionType {
    /// Transition type has not been set,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE")]
    None,
    /// A bar moves from left to right,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR")]
    BarWipeLr,
    /// A bar moves from top to bottom,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB")]
    BarWipeTb,
    /// A box expands from the upper-left corner to the lower-right corner,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL")]
    BoxWipeTl,
    /// A box expands from the upper-right corner to the lower-left corner,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR")]
    BoxWipeTr,
    /// A box expands from the lower-right corner to the upper-left corner,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR")]
    BoxWipeBr,
    /// A box expands from the lower-left corner to the upper-right corner,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL")]
    BoxWipeBl,
    /// A box shape expands from each of the four corners toward the center,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI")]
    FourBoxWipeCi,
    /// A box shape expands from the center of each quadrant toward the corners of each quadrant,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO")]
    FourBoxWipeCo,
    /// A central, vertical line splits and expands toward the left and right edges,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V")]
    BarndoorV,
    /// A central, horizontal line splits and expands toward the top and bottom edges,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H")]
    BarndoorH,
    /// A box expands from the top edge's midpoint to the bottom corners,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC")]
    BoxWipeTc,
    /// A box expands from the right edge's midpoint to the left corners,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC")]
    BoxWipeRc,
    /// A box expands from the bottom edge's midpoint to the top corners,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC")]
    BoxWipeBc,
    /// A box expands from the left edge's midpoint to the right corners,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC")]
    BoxWipeLc,
    /// A diagonal line moves from the upper-left corner to the lower-right corner,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL")]
    DiagonalTl,
    /// A diagonal line moves from the upper right corner to the lower-left corner,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR")]
    DiagonalTr,
    /// Two wedge shapes slide in from the top and bottom edges toward the center,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V")]
    BowtieV,
    /// Two wedge shapes slide in from the left and right edges toward the center,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H")]
    BowtieH,
    /// A diagonal line from the lower-left to upper-right corners splits and expands toward the opposite corners,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL")]
    BarndoorDbl,
    /// A diagonal line from upper-left to lower-right corners splits and expands toward the opposite corners,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL")]
    BarndoorDtl,
    /// Four wedge shapes split from the center and retract toward the four edges,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD")]
    MiscDiagonalDbd,
    /// A diamond connecting the four edge midpoints simultaneously contracts toward the center and expands toward the edges,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD")]
    MiscDiagonalDd,
    /// A wedge shape moves from top to bottom,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D")]
    VeeD,
    /// A wedge shape moves from right to left,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L")]
    VeeL,
    /// A wedge shape moves from bottom to top,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U")]
    VeeU,
    /// A wedge shape moves from left to right,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R")]
    VeeR,
    /// A 'V' shape extending from the bottom edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D")]
    BarnveeD,
    /// A 'V' shape extending from the left edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L")]
    BarnveeL,
    /// A 'V' shape extending from the top edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U")]
    BarnveeU,
    /// A 'V' shape extending from the right edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R")]
    BarnveeR,
    /// A rectangle expands from the center.,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT")]
    IrisRect,
    /// A radial hand sweeps clockwise from the twelve o'clock position,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12")]
    ClockCw12,
    /// A radial hand sweeps clockwise from the three o'clock position,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3")]
    ClockCw3,
    /// A radial hand sweeps clockwise from the six o'clock position,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6")]
    ClockCw6,
    /// A radial hand sweeps clockwise from the nine o'clock position,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9")]
    ClockCw9,
    /// Two radial hands sweep clockwise from the twelve and six o'clock positions,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV")]
    PinwheelTbv,
    /// Two radial hands sweep clockwise from the nine and three o'clock positions,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH")]
    PinwheelTbh,
    /// Four radial hands sweep clockwise,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB")]
    PinwheelFb,
    /// A fan unfolds from the top edge, the fan axis at the center,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT")]
    FanCt,
    /// A fan unfolds from the right edge, the fan axis at the center,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR")]
    FanCr,
    /// Two fans, their axes at the center, unfold from the top and bottom,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV")]
    DoublefanFov,
    /// Two fans, their axes at the center, unfold from the left and right,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH")]
    DoublefanFoh,
    /// A radial hand sweeps clockwise from the top edge's midpoint,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT")]
    SinglesweepCwt,
    /// A radial hand sweeps clockwise from the right edge's midpoint,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR")]
    SinglesweepCwr,
    /// A radial hand sweeps clockwise from the bottom edge's midpoint,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB")]
    SinglesweepCwb,
    /// A radial hand sweeps clockwise from the left edge's midpoint,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL")]
    SinglesweepCwl,
    /// Two radial hands sweep clockwise and counter-clockwise from the top and bottom edges' midpoints,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV")]
    DoublesweepPv,
    /// Two radial hands sweep clockwise and counter-clockwise from the left and right edges' midpoints,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD")]
    DoublesweepPd,
    /// Two radial hands attached at the top and bottom edges' midpoints sweep from right to left,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV")]
    DoublesweepOv,
    /// Two radial hands attached at the left and right edges' midpoints sweep from top to bottom,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH")]
    DoublesweepOh,
    /// A fan unfolds from the bottom, the fan axis at the top edge's midpoint,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T")]
    FanT,
    /// A fan unfolds from the left, the fan axis at the right edge's midpoint,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R")]
    FanR,
    /// A fan unfolds from the top, the fan axis at the bottom edge's midpoint,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B")]
    FanB,
    /// A fan unfolds from the right, the fan axis at the left edge's midpoint,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L")]
    FanL,
    /// Two fans, their axes at the top and bottom, unfold from the center,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV")]
    DoublefanFiv,
    /// Two fans, their axes at the left and right, unfold from the center,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH")]
    DoublefanFih,
    /// A radial hand sweeps clockwise from the upper-left corner,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL")]
    SinglesweepCwtl,
    /// A radial hand sweeps counter-clockwise from the lower-left corner.,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL")]
    SinglesweepCwbl,
    /// A radial hand sweeps clockwise from the lower-right corner,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR")]
    SinglesweepCwbr,
    /// A radial hand sweeps counter-clockwise from the upper-right corner,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR")]
    SinglesweepCwtr,
    /// Two radial hands attached at the upper-left and lower-right corners sweep down and up,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL")]
    DoublesweepPdtl,
    /// Two radial hands attached at the lower-left and upper-right corners sweep down and up,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL")]
    DoublesweepPdbl,
    /// Two radial hands attached at the upper-left and upper-right corners sweep down,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T")]
    SaloondoorT,
    /// Two radial hands attached at the upper-left and lower-left corners sweep to the right,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L")]
    SaloondoorL,
    /// Two radial hands attached at the lower-left and lower-right corners sweep up,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B")]
    SaloondoorB,
    /// Two radial hands attached at the upper-right and lower-right corners sweep to the left,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R")]
    SaloondoorR,
    /// Two radial hands attached at the midpoints of the top and bottom halves sweep from right to left,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R")]
    WindshieldR,
    /// Two radial hands attached at the midpoints of the left and right halves sweep from top to bottom,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U")]
    WindshieldU,
    /// Two sets of radial hands attached at the midpoints of the top and bottom halves sweep from top to bottom and bottom to top,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V")]
    WindshieldV,
    /// Two sets of radial hands attached at the midpoints of the left and right halves sweep from left to right and right to left,
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H")]
    WindshieldH,
    /// Crossfade
    #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE")]
    Crossfade,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    fn into_glib(self) -> ffi::GESVideoStandardTransitionType {
        match self {
            Self::None => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE,
            Self::BarWipeLr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR,
            Self::BarWipeTb => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB,
            Self::BoxWipeTl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL,
            Self::BoxWipeTr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR,
            Self::BoxWipeBr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR,
            Self::BoxWipeBl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL,
            Self::FourBoxWipeCi => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI,
            Self::FourBoxWipeCo => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO,
            Self::BarndoorV => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V,
            Self::BarndoorH => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H,
            Self::BoxWipeTc => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC,
            Self::BoxWipeRc => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC,
            Self::BoxWipeBc => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC,
            Self::BoxWipeLc => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC,
            Self::DiagonalTl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL,
            Self::DiagonalTr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR,
            Self::BowtieV => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V,
            Self::BowtieH => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H,
            Self::BarndoorDbl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL,
            Self::BarndoorDtl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL,
            Self::MiscDiagonalDbd => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD,
            Self::MiscDiagonalDd => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD,
            Self::VeeD => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D,
            Self::VeeL => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L,
            Self::VeeU => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U,
            Self::VeeR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R,
            Self::BarnveeD => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D,
            Self::BarnveeL => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L,
            Self::BarnveeU => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U,
            Self::BarnveeR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R,
            Self::IrisRect => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT,
            Self::ClockCw12 => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12,
            Self::ClockCw3 => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3,
            Self::ClockCw6 => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6,
            Self::ClockCw9 => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9,
            Self::PinwheelTbv => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV,
            Self::PinwheelTbh => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH,
            Self::PinwheelFb => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB,
            Self::FanCt => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT,
            Self::FanCr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR,
            Self::DoublefanFov => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV,
            Self::DoublefanFoh => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH,
            Self::SinglesweepCwt => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT,
            Self::SinglesweepCwr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR,
            Self::SinglesweepCwb => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB,
            Self::SinglesweepCwl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL,
            Self::DoublesweepPv => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV,
            Self::DoublesweepPd => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD,
            Self::DoublesweepOv => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV,
            Self::DoublesweepOh => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH,
            Self::FanT => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T,
            Self::FanR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R,
            Self::FanB => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B,
            Self::FanL => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L,
            Self::DoublefanFiv => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV,
            Self::DoublefanFih => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH,
            Self::SinglesweepCwtl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL,
            Self::SinglesweepCwbl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL,
            Self::SinglesweepCwbr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR,
            Self::SinglesweepCwtr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR,
            Self::DoublesweepPdtl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL,
            Self::DoublesweepPdbl => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL,
            Self::SaloondoorT => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T,
            Self::SaloondoorL => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L,
            Self::SaloondoorB => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B,
            Self::SaloondoorR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R,
            Self::WindshieldR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R,
            Self::WindshieldU => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U,
            Self::WindshieldV => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V,
            Self::WindshieldH => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H,
            Self::Crossfade => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::GESVideoStandardTransitionType> for VideoStandardTransitionType {
    unsafe fn from_glib(value: ffi::GESVideoStandardTransitionType) -> Self {
        skip_assert_initialized!();
        match value {
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE => Self::None,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR => Self::BarWipeLr,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB => Self::BarWipeTb,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL => Self::BoxWipeTl,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR => Self::BoxWipeTr,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR => Self::BoxWipeBr,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL => Self::BoxWipeBl,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI => Self::FourBoxWipeCi,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO => Self::FourBoxWipeCo,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V => Self::BarndoorV,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H => Self::BarndoorH,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC => Self::BoxWipeTc,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC => Self::BoxWipeRc,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC => Self::BoxWipeBc,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC => Self::BoxWipeLc,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL => Self::DiagonalTl,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR => Self::DiagonalTr,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V => Self::BowtieV,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H => Self::BowtieH,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL => Self::BarndoorDbl,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL => Self::BarndoorDtl,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD => Self::MiscDiagonalDbd,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD => Self::MiscDiagonalDd,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D => Self::VeeD,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L => Self::VeeL,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U => Self::VeeU,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R => Self::VeeR,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D => Self::BarnveeD,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L => Self::BarnveeL,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U => Self::BarnveeU,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R => Self::BarnveeR,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT => Self::IrisRect,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12 => Self::ClockCw12,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3 => Self::ClockCw3,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6 => Self::ClockCw6,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9 => Self::ClockCw9,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV => Self::PinwheelTbv,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH => Self::PinwheelTbh,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB => Self::PinwheelFb,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT => Self::FanCt,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR => Self::FanCr,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV => Self::DoublefanFov,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH => Self::DoublefanFoh,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT => Self::SinglesweepCwt,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR => Self::SinglesweepCwr,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB => Self::SinglesweepCwb,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL => Self::SinglesweepCwl,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV => Self::DoublesweepPv,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD => Self::DoublesweepPd,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV => Self::DoublesweepOv,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH => Self::DoublesweepOh,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T => Self::FanT,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R => Self::FanR,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B => Self::FanB,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L => Self::FanL,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV => Self::DoublefanFiv,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH => Self::DoublefanFih,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL => Self::SinglesweepCwtl,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL => Self::SinglesweepCwbl,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR => Self::SinglesweepCwbr,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR => Self::SinglesweepCwtr,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL => Self::DoublesweepPdtl,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL => Self::DoublesweepPdbl,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T => Self::SaloondoorT,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L => Self::SaloondoorL,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B => Self::SaloondoorB,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R => Self::SaloondoorR,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R => Self::WindshieldR,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U => Self::WindshieldU,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V => Self::WindshieldV,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H => Self::WindshieldH,
            ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE => Self::Crossfade,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for VideoStandardTransitionType {
    fn static_type() -> Type {
        unsafe { from_glib(ffi::ges_video_standard_transition_type_get_type()) }
    }
}

impl glib::value::ValueType for VideoStandardTransitionType {
    type Type = Self;
}

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

    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
    }
}

impl ToValue for VideoStandardTransitionType {
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

/// The test pattern to produce
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GESVideoTestPattern")]
pub enum VideoTestPattern {
    /// A standard SMPTE test pattern
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_SMPTE")]
    Smpte,
    /// Random noise
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_SNOW")]
    Snow,
    /// A black image
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_BLACK")]
    Black,
    /// A white image
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_WHITE")]
    White,
    /// A red image
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_RED")]
    Red,
    /// A green image
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_GREEN")]
    Green,
    /// A blue image
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_BLUE")]
    Blue,
    /// Checkers pattern (1px)
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_CHECKERS1")]
    Checkers1,
    /// Checkers pattern (2px)
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_CHECKERS2")]
    Checkers2,
    /// Checkers pattern (4px)
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_CHECKERS4")]
    Checkers4,
    /// Checkers pattern (8px)
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_CHECKERS8")]
    Checkers8,
    /// Circular pattern
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_CIRCULAR")]
    Circular,
    /// Alternate between black and white
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_BLINK")]
    Blink,
    /// SMPTE test pattern (75% color bars)
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_SMPTE75")]
    Smpte75,
    /// Zone plate
    #[doc(alias = "GES_VIDEO_TEST_ZONE_PLATE")]
    ZonePlate,
    /// Gamut checkers
    #[doc(alias = "GES_VIDEO_TEST_GAMUT")]
    Gamut,
    /// Chroma zone plate
    #[doc(alias = "GES_VIDEO_TEST_CHROMA_ZONE_PLATE")]
    ChromaZonePlate,
    /// Solid color
    #[doc(alias = "GES_VIDEO_TEST_PATTERN_SOLID")]
    SolidColor,
    #[doc(hidden)]
    __Unknown(i32),
}

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

    fn into_glib(self) -> ffi::GESVideoTestPattern {
        match self {
            Self::Smpte => ffi::GES_VIDEO_TEST_PATTERN_SMPTE,
            Self::Snow => ffi::GES_VIDEO_TEST_PATTERN_SNOW,
            Self::Black => ffi::GES_VIDEO_TEST_PATTERN_BLACK,
            Self::White => ffi::GES_VIDEO_TEST_PATTERN_WHITE,
            Self::Red => ffi::GES_VIDEO_TEST_PATTERN_RED,
            Self::Green => ffi::GES_VIDEO_TEST_PATTERN_GREEN,
            Self::Blue => ffi::GES_VIDEO_TEST_PATTERN_BLUE,
            Self::Checkers1 => ffi::GES_VIDEO_TEST_PATTERN_CHECKERS1,
            Self::Checkers2 => ffi::GES_VIDEO_TEST_PATTERN_CHECKERS2,
            Self::Checkers4 => ffi::GES_VIDEO_TEST_PATTERN_CHECKERS4,
            Self::Checkers8 => ffi::GES_VIDEO_TEST_PATTERN_CHECKERS8,
            Self::Circular => ffi::GES_VIDEO_TEST_PATTERN_CIRCULAR,
            Self::Blink => ffi::GES_VIDEO_TEST_PATTERN_BLINK,
            Self::Smpte75 => ffi::GES_VIDEO_TEST_PATTERN_SMPTE75,
            Self::ZonePlate => ffi::GES_VIDEO_TEST_ZONE_PLATE,
            Self::Gamut => ffi::GES_VIDEO_TEST_GAMUT,
            Self::ChromaZonePlate => ffi::GES_VIDEO_TEST_CHROMA_ZONE_PLATE,
            Self::SolidColor => ffi::GES_VIDEO_TEST_PATTERN_SOLID,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::GESVideoTestPattern> for VideoTestPattern {
    unsafe fn from_glib(value: ffi::GESVideoTestPattern) -> Self {
        skip_assert_initialized!();
        match value {
            ffi::GES_VIDEO_TEST_PATTERN_SMPTE => Self::Smpte,
            ffi::GES_VIDEO_TEST_PATTERN_SNOW => Self::Snow,
            ffi::GES_VIDEO_TEST_PATTERN_BLACK => Self::Black,
            ffi::GES_VIDEO_TEST_PATTERN_WHITE => Self::White,
            ffi::GES_VIDEO_TEST_PATTERN_RED => Self::Red,
            ffi::GES_VIDEO_TEST_PATTERN_GREEN => Self::Green,
            ffi::GES_VIDEO_TEST_PATTERN_BLUE => Self::Blue,
            ffi::GES_VIDEO_TEST_PATTERN_CHECKERS1 => Self::Checkers1,
            ffi::GES_VIDEO_TEST_PATTERN_CHECKERS2 => Self::Checkers2,
            ffi::GES_VIDEO_TEST_PATTERN_CHECKERS4 => Self::Checkers4,
            ffi::GES_VIDEO_TEST_PATTERN_CHECKERS8 => Self::Checkers8,
            ffi::GES_VIDEO_TEST_PATTERN_CIRCULAR => Self::Circular,
            ffi::GES_VIDEO_TEST_PATTERN_BLINK => Self::Blink,
            ffi::GES_VIDEO_TEST_PATTERN_SMPTE75 => Self::Smpte75,
            ffi::GES_VIDEO_TEST_ZONE_PLATE => Self::ZonePlate,
            ffi::GES_VIDEO_TEST_GAMUT => Self::Gamut,
            ffi::GES_VIDEO_TEST_CHROMA_ZONE_PLATE => Self::ChromaZonePlate,
            ffi::GES_VIDEO_TEST_PATTERN_SOLID => Self::SolidColor,
            value => Self::__Unknown(value),
        }
    }
}

impl StaticType for VideoTestPattern {
    fn static_type() -> Type {
        unsafe { from_glib(ffi::ges_video_test_pattern_get_type()) }
    }
}

impl glib::value::ValueType for VideoTestPattern {
    type Type = Self;
}

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

    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
    }
}

impl ToValue for VideoTestPattern {
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}