gtk-sys 0.1.0

FFI bindings to GTK+ 3
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
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
// Copyright 2013-2015, The Rust-GNOME Project Developers.
// See the COPYRIGHT file at the top-level directory of this distribution.
// Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT>

//! Enumeration used with widgets

/// A gtk::Window can be one of these types. Most things you'd consider a "window"
/// should have type WindowTopLevel; windows with this type are managed by the window manager
/// and have a frame by default (call gtk::window::set_decorated() to toggle the frame).
///
/// Windows with type WindowPopUp are ignored by the window manager; window manager keybindings won't work on them,
/// the window manager won't decorate the window with a frame, many GTK+ features that rely on the window manager will not work
/// (e.g. resize grips and maximization/minimization).
///
/// GGtkWindowPopUp is used to implement widgets such as gtk::Menu
/// or tooltips that you normally don't think of as windows per se. Nearly all windows should be WindowTopLevel.
/// In particular, do not use WindowPopUp just to turn off the window borders; use gtk_window_set_decorated() for that.

#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum WindowType {
    /// A regular window, such as a dialog.
    TopLevel,
    /// A special window such as a tooltip.
    PopUp
}

/// Reading directions for text
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum TextDirection {
    None,
    Ltr,
    Rtl
}

/// Window placement can be influenced using this enumeration.
/// Note that using WinPosCenterAlways is almost always a bad idea.
/// It won't necessarily work well with all window managers or on all windowing systems.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum WindowPosition {
    /// No influence is made on placement.
    None,
    /// Windows should be placed in the center of the screen.
    Center,
    /// Windows should be placed at the current mouse position.
    Mouse,
    /// Keep window centered as it changes size, etc.
    CenterAlways,
    /// Center the window on its transient parent (see window.set_transient_for()).
    CenterOnParent
}

/// Used to dictate the style that a gtk::ButtonBox uses to layout the buttons it contains.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ButtonBoxStyle {
    /// Buttons are evenly spread across the box.
    Spread = 1,
    /// Buttons are placed at the edges of the box.
    Edge,
    /// Buttons are grouped towards the start of the box, (on the left for a HBox, or the top for a VBox).
    Start,
    /// Buttons are grouped towards the end of the box, (on the right for a HBox, or the bottom for a VBox).
    End,
    /// Buttons are centered in the box. Since 2.12.
    Center
}

/// Represents the orientation of widgets which can be switched between
/// horizontal and vertical orientation on the fly, like gtk::Toolbar.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum Orientation {
    /// The widget is in horizontal orientation.
    Horizontal,
    /// The widget is in vertical orientation.
    Vertical
}

/// Availables direction types
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum DirectionType {
    TabForward,
    TabBackward,
    Up,
    Down,
    Left,
    Right
}

/// Specifies which corner a child widget should be placed in when packed into a gtk::ScrolledWindow.
/// This is effectively the opposite of where the scroll bars are placed.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum CornerType {
    /// Place the scrollbars on the right and bottom of the widget (default behaviour).
    TopLeft,
    /// Place the scrollbars on the top and right of the widget.
    BottomLeft,
    /// Place the scrollbars on the left and bottom of the widget.
    TopRight,
    /// Place the scrollbars on the top and left of the widget.
    BottomRight
}

/// Availables resize modes
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ResizeMode{
    /// Pass resize request to the parent
    Parent,
    /// Queue resizes on this widget
    Queue,
    /// Resize immediately. Deprecated.
    Immediate
}

/// Describes how the border of a UI element should be rendered.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum BorderStyle{
    /// No visible border
    None,
    /// A single line segment
    Solid,
    /// Looks as if the content is sunken into the canvas
    Inset,
    /// Looks as if the content is coming out of the canvas
    Outset,
    /// Same as BorderStyleNone
    Hidden,
    /// A series of round dots
    Dotted,
    /// A series of square-ended dashes
    Dashed,
    /// Two parallel lines with some space between them
    Double,
    /// Looks as if it were carved in the canvas
    Groove,
    /// Looks as if it were coming out of the canvas
    Ridge
}

/// Determines the direction of a sort.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum SortType{
    /// Sorting is in ascending order
    Ascending,
    /// Sorting is in descending order.
    Descending
}

/// Describes a widget state. Widget states are used to match the widget against CSS pseudo-classes.
/// Note that GTK extends the regular CSS classes and sometimes uses different names.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum StateFlags {
    /// State during normal operation.
    Normal       = 0,
    /// Widget is active.
    Active       = 1 << 0,
    /// Widget has a mouse pointer over it.
    Prelight     = 1 << 1,
    /// Widget is selected.
    Selected     = 1 << 2,
    /// Widget is insensitive.
    Insensitive  = 1 << 3,
    /// Widget is inconsistent.
    Inconsistent = 1 << 4,
    /// Widget has the keyboard focus.
    Focused      = 1 << 5,
    /// Widget is in a background toplevel window.
    BackDrop     = 1 << 6,
    /// Widget is in left-to-right text direction. Since 3.8
    DirLTR       = 1 << 7,
    /// Widget is in right-to-left text direction. Since 3.8
    DirRTL       = 1 << 8
}

/// Gives an indication why a drag operation failed.
/// The value can by obtained by connecting to the "drag-failed" signal.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum DragResult{
    /// The drag operation was successful.
    Success,
    /// No suitable drag target.
    NoTarget,
    /// The user cancelled the drag operation.
    UserCanceled,
    /// The drag operation timed out.
    TimeoutExpired,
    /// The pointer or keyboard grab used for the drag operation was broken.
    GrabBroken,
    /// The drag operation failed due to some unspecified error.
    Error
}

/// Availables accel flags
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum AccelFlags{
    /// display in AccelLabel?
    Visible        = 1 << 0,
    /// is it removable?
    Locked         = 1 << 1,
    /// Comparison mask
    Mask           = 0x07
}

/// Used to specify the placement of scroll arrows in scrolling menus.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ArrowPlacement{
    /// Place one arrow on each end of the menu.
    Both,
    /// Place both arrows at the top of the menu.
    Start,
    /// Place both arrows at the bottom of the menu.
    End
}

/// Used to indicate the direction in which a Arrow should point.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ArrowType{
    /// Represents an upward pointing arrow.
    Up,
    /// Represents a downward pointing arrow.
    Down,
    /// Represents a left pointing arrow.
    Left,
    /// Represents a right pointing arrow.
    Right,
    /// No arrow. Since 2.10.
    None
}

/// Denotes the expansion properties that a widget will have when it (or its parent) is resized.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum AttachOptions{
    /// the widget should expand to take up any extra space in its container that has been allocated.
    Expand = 1 << 0,
    /// the widget should shrink as and when possible.
    Shrink = 1 << 1,
    /// the widget should fill the space allocated to it.
    Fill   = 1 << 2
}

/// Deleting modes
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum DeleteType{
    /// delete chars
    Chars,
    /// delete only the portion of the word to the left/right of cursor if we're in the middle of a word
    WordsEnd,
    /// delete words
    Words,
    /// delete lines
    DisplayLines,
    /// deletes lines end
    DisplayLineEnd,
    /// like C-k in Emacs (or its reverse)
    ParagraphEnds,
    /// C-k in pico, kill whole line
    Paragraphs,
    /// M-\ in Emacs
    Whitespac
}

/// Used to specify the style of the expanders drawn by a TreeView.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ExpanderStyle{
    /// The style used for a collapsed subtree.
    Collapsed,
    /// Intermediate style used during animation.
    SemiCollapsed,
    /// Intermediate style used during animation.
    SemiExpanded,
    /// The style used for an expanded subtree.
    Expanded
}

/// preedit style
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum IMPreeditStyle{
    Nothing,
    Callback,
    None
}

/// Status styles
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum IMStatusStyle{
    Nothing,
    Callback,
    None
}

/// Used for justifying the text inside a Label widget. (See also Alignment).
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum Justification{
    /// The text is placed at the left edge of the label.
    Left,
    /// The text is placed at the right edge of the label.
    Right,
    /// The text is placed in the center of the label.
    Center,
    /// The text is placed is distributed across the label.
    Fill
}

/// Availables movement steps
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum MovementStep{
    /// Move forward or back by graphemes
    LogicalPosition,
    /// Move left or right by graphemes
    VisualPositions,
    /// Move forward or back by words
    Words,
    /// Move up or down lines (wrapped lines)
    DisplayLines,
    /// Move to either end of a line
    DisplayLineEnds,
    /// Move up or down paragraphs (newline-ended lines)
    Paragraphs,
    /// Move to either end of a paragraph
    ParagraphEnds,
    /// Move by pages
    Pages,
    /// Move to ends of the buffer
    BufferEnds,
    /// Move horizontally by pages
    HorizontalPages
}

/// Represents the packing location Box children. (See: VBox, HBox, and ButtonBox).
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum PackType{
    /// The child is packed into the start of the box
    Start,
    /// The child is packed into the end of the box
    End
}


/// Availables Gtk path priority
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum PathPriorityType{
    Lowest       = 0,
    Gtk          = 4,
    Application  = 8,
    Theme        = 10,
    Rc           = 12,
    Highest      = 15
}

/// Availables Gtk path types
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum PathType{
    Widget,
    WidgetClass,
    Class
}

/// Determines when a scroll bar will be visible.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum PolicyType {
    /// The scrollbar is always visible.
    Always,
    /// The scrollbar will appear and disappear as necessary. For example, when all of a CList can not be seen.
    Automatic,
    /// The scrollbar will never appear.
    Never
}

/// Describes which edge of a widget a certain feature is positioned at, e.g. the tabs of a Notebook,
/// the handle of a HandleBox or the label of a Scale.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum PositionType{
    /// The feature is at the left edge.
    Left,
    /// The feature is at the right edge.
    Right,
    /// The feature is at the top edge.
    Top,
    /// The feature is at the bottom edge.
    Bottom
}

/// Indicated the relief to be drawn around a Button.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ReliefStyle{
    /// Draw a normal relief.
    Normal,
    /// A half relief.
    Half,
    /// No relief.
    None
}

/// Available scroll steps
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ScrollStep{
    Steps,
    Pages,
    Ends,
    HorizontalSteps,
    HorizontalPages,
    HorizontalEnds
}

/// Available scroll types
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ScrollType{
    None,
    Jump,
    StepBackward,
    StepForward,
    PageBackward,
    PageForward,
    StepUp,
    StepDown,
    PageUp,
    PageDown,
    StepLeft,
    StepRight,
    PageLeft,
    PageRight,
    Start,
    End
}

/// Used to control what selections users are allowed to make.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum SelectionMode{
    /// No selection is possible.
    None,
    /// Zero or one element may be selected.
    Single,
    /// Exactly one element is selected.
    Browse,
    /// Any number of elements may be selected.
    Multiple
}

/// Used to change the appearance of an outline typically provided by a Frame
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ShadowType{
    /// No outline.
    None,
    /// The outline is bevelled inwards.
    Im,
    /// The outline is bevelled outwards like a button.
    Out,
    /// The outline has a sunken 3d appearance.
    EtchedIn,
    /// The outline has a raised 3d appearance.
    EtchedOut
}

/// This type indicates the current state of a widget; the state determines how the widget is drawn.
///
/// The StateType enumeration is also used to identify different colors in a Style for drawing,
/// so states can be used for subparts of a widget as well as entire widgets.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum StateType{
    /// State during normal operation.
    Normal,
    /// State of a currently active widget, such as a depressed button.
    Active,
    /// State indicating that the mouse pointer is over the widget and the widget will respond to mouse clicks.
    Prelight,
    /// State of a selected item, such the selected row in a list.
    Selected,
    /// State indicating that the widget is unresponsive to user actions.
    Insensitive,
    /// The widget is inconsistent, such as checkbuttons or radiobuttons that aren't either set to true nor false,
    /// or buttons requiring the user attention.
    Inconsistent,
    /// The widget has the keyboard focus
    Focused
}

/// Used to customize the appearance of a Toolbar.
///
/// Note that setting the toolbar style overrides the user's preferences for the default toolbar style.
/// Note that if the button has only a label set and GTK_TOOLBAR_ICONS is used, the label will be visible, and vice versa.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ToolbarStyle {
    /// Buttons display only icons in the toolbar.
    Icons,
    /// Buttons display only text labels in the toolbar.
    Text,
    /// Buttons display text and icons in the toolbar.
    Both,
    /// Buttons display icons and text alongside each other, rather than vertically stacked
    BothHoriz
}

/// Describes how a rendered element connects to adjacent elements.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum JunctionSides {
    /// No junctions.
    None               = 0,
    /// Element connects on the top-left corner.
    CornerTopleft      = 1 << 0,
    /// Element connects on the top-right corner.
    CornerTopRight     = 1 << 1,
    /// Element connects on the bottom-left corner.
    CornerBottomLeft   = 1 << 2,
    /// Element connects on the bottom-right corner.
    CornerBottomRight  = 1 << 3,
    /// Element connects on the top side.
    Top                = (1 << 0 | 1 << 1),
    /// Element connects on the bottom side.
    Bottom             = (1 << 2 | 1 << 3),
    /// Element connects on the left side.
    Left               = (1 << 0 | 1 << 2),
    /// Element connects on the right side.
    Right              = (1 << 1 | 1 << 3)
}

/// Describes a region within a widget.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum RegionFlags{
    /// Region has an even number within a set.
    Even    = 1 << 0,
    /// Region has an odd number within a set.
    Odd     = 1 << 1,
    /// Region is the first one within a set.
    First   = 1 << 2,
    /// Region is the last one within a set.
    Last    = 1 << 3,
    /// Region is the only one within a set.
    Only    = 1 << 4,
    /// Region is part of a sorted area.
    Sorted  = 1 << 5
}

/// Built-in stock icon sizes
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum IconSize {
    // Invalid size
    Invalid,
    // Size appropriate for menus (16px)
    Menu,
    // Size appropriate for small toolbars (16px)
    SmallToolbar,
    // Size appropriate for large toolbars (24px)
    LargeToolbar,
    // Size appropriate for buttons (16px)
    Button,
    // Size appropriate for drag and drop (32px)
    Dnd,
    // Size appropriate for dialogs (48px)
    Dialog
}

/// Specifies the side of the entry at which an icon is placed.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum EntryIconPosition{
    /// At the beginning of the entry (depending on the text direction).
    Primary,
    /// At the end of the entry (depending on the text direction).
    Secondary
}

/// Describes hints that might be taken into account by input methods or applications.
/// Note that input methods may already tailor their behaviour according to the InputPurpose of the entry.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum InputHints{
    /// No special behaviour suggested
    None                = 0,
    /// Suggest checking for typos
    Spellcheck          = 1 << 0,
    /// Suggest not checking for typos
    NoSpellcheck        = 1 << 1,
    /// Suggest word completion
    WordCompletion      = 1 << 2,
    /// Suggest to convert all text to lowercase
    Lowercase           = 1 << 3,
    /// Suggest to capitalize all text
    UppercaseChars      = 1 << 4,
    /// Suggest to capitalize the first character of each word
    UppercaseWords      = 1 << 5,
    /// Suggest to capitalize the first word of each sentence
    UppercaseSentences  = 1 << 6,
    /// Suggest to not show an onscreen keyboard (e.g for a calculator that already has all the keys).
    InhibitOsk          = 1 << 7
}

/// Describes primary purpose of the input widget.
/// This information is useful for on-screen keyboards
/// and similar input methods to decide which keys should be presented to the user.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum InputPurpose{
    /// Allow any character
    FreeForm,
    /// Allow only alphabetic characters
    Alpha,
    /// Allow only digits
    Digits,
    /// Edited field expects numbers
    Number,
    /// Edited field expects phone number
    Phone,
    /// Edited field expects URL
    Url,
    /// Edited field expects email address
    Email,
    /// Edited field expects the name of a person
    Name,
    /// Like InputPurposeFreeForm, but characters are hidden
    Password,
    /// Like InputPurposeDigits, but characters are hidden
    Pin
}

/// Describes the image data representation used by a Image.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ImageType{
    /// there is no image displayed by the widget
    Empty,
    /// the widget contains a Gdk::Pixbuf
    Pixbuf,
    /// the widget contains a stock icon name (see Stock Items(3))
    Stock,
    /// the widget contains a Gtk::IconSet
    IconSet,
    /// the widget contains a Gdk::PixbufAnimation
    Animation,
    /// the widget contains a named icon. This image type was added in GTK+ 2.6
    IconName,
    /// the widget contains a GIcon. This image type was added in GTK+ 2.14
    GIcon,
    /// the widget contains a cairo_surface_t. This image type was added in GTK+ 3.10
    Surface
}

/// The values of the SpinType enumeration are used
/// to specify the change to make in gtk::SpinButton::spin().
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum SpinType{
    /// Increment by the adjustments step increment.
    StepForward,
    /// Decrement by the adjustments step increment.
    StepBackward,
    /// Increment by the adjustments page increment.
    PageForward,
    /// Decrement by the adjustments page increment.
    PageBackward,
    /// Go to the adjustments lower bound.
    Home,
    /// Go to the adjustments upper bound.
    End,
    /// Change by a specified amount.
    UserDefined
}

/// The spin button update policy determines whether the spin button displays values
/// even if they are outside the bounds of its adjustment. See gtk::SpinButton::set_update_policy().
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum SpinButtonUpdatePolicy{
    /// When refreshing your Gtk::SpinButton, the value is always displayed
    Always,
    /// When refreshing your Gtk::SpinButton, the value is only displayed
    /// if it is valid within the bounds of the spin button's adjustment
    IfValid
}

/// Describes how LevelBar contents should be rendered.
/// Note that this enumeration could be extended with additional modes in the future.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum LevelBarMode{
    /// the bar has a continuous mode
    Continuous,
    /// the bar has a discrete mode
    Discrete
}

/// These options can be used to influence the display and behaviour of a gtk::Calendar.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum CalendarDisplayOptions{
    /// Specifies that the month and year should be displayed.
    ShowHeading        = 1 << 0,
    /// Specifies that three letter day descriptions should be present.
    ShowDayNames       = 1 << 1,
    /// Prevents the user from switching months with the calendar.
    NoMonthChange      = 1 << 2,
    /// Displays each week numbers of the current year, down the left side of the calendar.
    ShowWeekNumbers    = 1 << 3,
    /// Just show an indicator, not the full details text when details are provided. See gtk::Calendar::set_detail_func().
    ShowDetails        = 1 << 5
}

/// The type of message being displayed in the dialog.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum MessageType {
    /// Informational message
    Info,
    /// Non-fatal warning message
    Warning,
    /// Question requiring a choice
    Question,
    /// Fatal error message
    Error,
    /// None of the above, doesn't get an icon
    Other
}

/// Prebuilt sets of buttons for the dialog.
/// If none of these choices are appropriate, simply use GTK_BUTTONS_NONE then call gtk_dialog_add_buttons().
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ButtonsType {
    /// no buttons at all
    None,
    /// an OK button
    Ok,
    /// a Close button
    Close,
    /// a Cancel button
    Cancel,
    /// Yes and No buttons
    YesNo,
    /// OK and Cancel buttons
    OkCancel
}

/// Flags used to influence dialog construction.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum DialogFlags {
    /// Make the constructed dialog modal, see gtk_window_set_modal()
    Modal,
    /// Destroy the dialog when its parent is destroyed, see gtk_window_set_destroy_with_parent()
    DestroyWithParents,
    /// Create dialog with actions in header bar instead of action area.
    UseHeaderBar
}

/// The type of license for an application.
/// This enumeration can be expanded at later date.
#[allow(non_camel_case_types)]
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum License {
    /// No license specified
    Unknown,
    /// A license text is going to be specified by the developer
    Custom,
    /// The GNU General Public License, version 2.0 or later
    GPL_2_0,
    /// The GNU General Public License, version 3.0 or later
    GPL_3_0,
    /// The GNU Lesser General Public License, version 2.1 or later
    LGPL_2_1,
    /// The GNU Lesser General Public License, version 3.0 or later
    LGPL_3_0,
    /// The BSD standard license
    BSD,
    /// The MIT/X11 standard license
    MIT_X11,
    /// The Artistic License, version 2.0
    Artistic,
    /// The GNU General Public License, version 2.0 only
    GPL_2_0_Only,
    /// The GNU General Public License, version 3.0 only
    GPL_3_0_Only,
    /// The GNU Lesser General Public License, version 2.1 only
    LGPL_2_1_Only,
    /// The GNU Lesser General Public License, version 3.0 only
    LGPL_3_0_Only
}

/// Predefined values for use as response ids in gtk_dialog_add_button().
/// All predefined values are negative, GTK+ leaves positive values for application-defined response ids.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ResponseType {
    /// Returned if an action widget has no response id, or if the dialog gets programmatically hidden or destroyed
    None        = -1,
    /// Generic response id, not used by GTK+ dialogs
    Reject      = -2,
    /// Generic response id, not used by GTK+ dialogs
    Accept      = -3,
    /// Returned if the dialog is deleted
    DeleteEvent = -4,
    /// Returned by OK buttons in GTK+ dialogs
    Ok          = -5,
    /// Returned by Cancel buttons in GTK+ dialogs
    Cancel      = -6,
    /// Returned by Close buttons in GTK+ dialogs
    Close       = -7,
    /// Returned by Yes buttons in GTK+ dialogs
    Yes         = -8,
    /// Returned by No buttons in GTK+ dialogs
    No          = -9,
    /// Returned by Apply buttons in GTK+ dialogs
    Apply       = -10,
    /// Returned by Help buttons in GTK+ dialogs
    Help        = -11
}

/// Describes whether a GtkFileChooser is being used to open existing files or to save to a possibly new file.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum FileChooserAction {
    /// Indicates open mode. The file chooser will only let the user pick an existing file.
    Open,
    /// Indicates save mode. The file chooser will let the user pick an existing file, or type in a new filename.
    Save,
    /// Indicates an Open mode for selecting folders. The file chooser will let the user pick an existing folder.
    SelectFolder,
    /// Indicates a mode for creating a new folder. The file chooser will let the user name an existing or new folder.
    CreateFolder
}

/// These flags indicate what parts of a GtkFileFilterInfo struct are filled or need to be filled.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum FileFilterFlags {
    /// the filename of the file being tested
    Filename,
    /// the URI for the file being tested
    Uri,
    /// the string that will be used to display the file in the file chooser
    DisplayName,
    /// the mime type of the file
    MimeType
}

/// Describe the possible transitions between pages in a GtkStack widget.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum StackTransitionType {
    /// No transition
    None,
    /// A cross-fade
    CrossFade,
    /// Slide from left to right
    SlideRight,
    /// Slide from right to left
    SlideLeft,
    /// Slide from bottom up
    SlideUp,
    /// Slide from top down
    SlideDown,
    /// Slide from left or right according to the children order
    SlideLeftRight,
    /// Slide from top down or bottom up according to the order
    SlideUpDown,
    /// Cover the old page by sliding up. Since 3.12
    OverUp,
    /// Cover the old page by sliding down. Since: 3.12
    OverDown,
    /// Cover the old page by sliding to the left. Since: 3.12
    OverLeft,
    /// Cover the old page by sliding to the right. Since: 3.12
    OverRight,
    /// Uncover the new page by sliding up. Since 3.12
    UnderUp,
    /// Uncover the new page by sliding down. Since: 3.12
    UnderDown,
    /// Uncover the new page by sliding to the left. Since: 3.12
    UnderLeft,
    /// Uncover the new page by sliding to the right. Since: 3.12
    UnderRight,
    /// Cover the old page or uncover the new page, according to order. Since: 3.12
    OverUpDown
}

/// Describe the possible transitions when the child of a GtkRevealer widget is shown or hidden.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum RevealerTransitionType {
    /// No transition
    None,
    /// Fade in
    CrossFade,
    /// Slide in from the left
    SlideRight,
    /// Slide in from the right
    SlideLeft,
    /// Slide in from the bottom
    SlideUp,
    /// Slide in from the top
    SlideDown
}

/// The policy to be used in a scrollable widget when updating the scrolled window adjustments in
/// a given orientation.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ScrollablePolicy {
    /// Scrollable adjustments are based on the minimum size
    Minimum,
    /// Scrollable adjustments are based on the natural size
    Natural
}

/// Flags used when creating a GAppInfo.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum AppInfoCreateFlags {
    /// No flags.
    None,
    /// Application opens in a terminal window.
    NeedsTerminal,
    /// Application supports URI arguments.
    SupportsUris,
    /// Application supports startup notification.
    SupportsStartupNotification
}

/// Specifies a preference for height-for-width or width-for-height geometry management.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum SizeRequestMode {
    /// Prefer height-for-width geometry management
    HeightForWidth,
    /// Prefer width-for-height geometry management
    WidthForHeight,
    /// Don’t trade height-for-width or width-for-height
    ConstantSize
}

/// Controls how a widget deals with extra space in a single (x or y) dimension.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum Align {
    /// stretch to fill all space if possible, center if no meaningful way to stretch
    Fill,
    /// snap to left or top side, leaving space on right or bottom
    Start,
    /// snap to right or bottom side, leaving space on left or top
    End,
    /// center natural width of widget inside the allocation
    Center,
    /// align the widget according to the baseline.
    AlignBaseline
}

/// The connection flags are used to specify the behaviour of a signal's connection.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum GConnectFlags {
    /// whether the handler should be called before or after the default handler of the signal.
    After,
    /// whether the instance and data should be swapped when calling the handler; see g_signal_connect_swapped() for an example.
    Swapped
}

/// Error codes that identify various errors that can occur while using GtkBuilder.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum BuilderError {
    /// A type-func attribute didn’t name a function that returns a GType.
    InvalidTypeFunction,
    /// The input contained a tag that GtkBuilder can’t handle.
    UnhandledTag,
    /// An attribute that is required by GtkBuilder was missing.
    MissingAttribute,
    /// GtkBuilder found an attribute that it doesn’t understand.
    InvalidAttribute,
    /// GtkBuilder found a tag that it doesn’t understand.
    InvalidTag,
    /// A required property value was missing.
    MissingPropertyValue,
    /// GtkBuilder couldn’t parse some attribute value.
    InvalidValue,
    /// The input file requires a newer version of GTK+.
    VersionMismatch,
    /// An object id occurred twice.
    DuplicateID,
    /// A specified object type is of the same type or derived from the type of the composite class being extended with builder XML.
    ObjectTypeRefused,
    /// The wrong type was specified in a composite class’s template XML
    TemplateMismatch
}

/// Orientation of a page
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum PageOrientation {
    /// Portrait mode.
    Portrait,
    /// Landscape mode.
    Landscape,
    /// Reverse portrait mode.
    ReversePortrait,
    /// Reverse landscape mode.
    ReverseLandscape
}

/// Unit systems
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum Unit {
    /// No units.
    None,
    /// Dimensions in points.
    Points,
    /// Dimensions in inches.
    Inch,
    /// Dimensions in millimeters
    MM
}

/// Used to determine the layout of pages on a sheet when printing multiple pages per sheet.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum NumberUpLayout {
    /// 1 2 3 4
    LeftToRight_TopToBottom,
    /// 3 4 2 1
    LeftToRight_BottomToTop,
    /// 2 1 4 3
    RightToLeft_TopToBottom,
    /// 4 3 2 1
    RightToLeft_BottomToTop,
    /// 1 3 2 4
    TopToBottom_LeftToRight,
    /// 3 1 4 2
    TopToBottom_RightToLeft,
    /// 2 4 1 3
    BottomToTop_LeftToRight,
    /// 4 2 3 1
    BottomToTop_RightToLeft
}

/// Used to know which quantity you want to print
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum PrintPages {
    /// All pages.
    All,
    /// Current page.
    Current,
    /// Range of pages.
    Ranges,
    /// Selected pages.
    Selection
}

/// Different types of page to set
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum PageSet {
    /// All pages.
    All,
    /// Even pages.
    Even,
    /// Odd pages.
    Odd
}

/// Used to specify the sorting method to be applyed to the recently used resource list.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum RecentSortType {
    /// Do not sort the returned list of recently used resources.
    None,
    /// Sort the returned list with the most recently used items first.
    MRU,
    /// Sort the returned list with the least recently used items first.
    LRU,
    /// Sort the returned list using a custom sorting function passed using gtk_recent_chooser_set_sort_func().
    Custom
}

/// These flags indicate what parts of a GtkRecentFilterInfo struct are filled or need to be filled.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum RecentFilterFlags {
    /// the URI of the file being tested
    URI,
    /// the string that will be used to display the file in the recent chooser
    DisplayName,
    /// the string that will be used to display the file in the recent chooser
    MimeType,
    /// the list of applications that have registered the file
    Application,
    /// the groups to which the file belongs to
    Group,
    /// the number of days elapsed since the file has been registered
    Age
}

/// Kinds of widget-specific help. Used by the ::show-help signal.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum WidgetHelpType {
    /// Tooltip
    WidgetHelpTooltip,
    /// What’s this
    WidgetHelpWhatsThis
}

/// Used to reference the parts of GtkTextView.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum TextWindowType {
    /// Window that floats over scrolling areas.
    Widget,
    /// Scrollable text window.
    Text,
    /// Left side border window.
    Left,
    /// Right side border window.
    Right,
    /// Top border window.
    Top,
    // Bottom border window.
    Bottom
}

/// Describes a type of line wrapping.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum WrapMode {
    /// do not wrap lines; just make the text area wider
    None,
    /// wrap text, breaking lines anywhere the cursor can appear (between characters, usually - if you want to be technical, between graphemes, see pango_get_log_attrs())
    Char,
    /// wrap text, breaking lines in between words
    Word,
    /// wrap text, breaking lines in between words, or if that is not enough, also between graphemes
    WordChar
}

/// Used to indicate which grid lines to draw in a tree view.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum TreeViewGridLines {
    /// No grid lines.
    None,
    /// Horizontal grid lines.
    Horizontal,
    /// Vertical grid lines.
    Vertical,
    /// Horizontal and vertical grid lines.
    Both
}

/// The sizing method the column uses to determine its width.
/// Please note that AutoSize are inefficient for large views,
/// and can make columns appear choppy.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum TreeViewColumnSizing {
    /// Columns only get bigger in reaction to changes in the model
    GrowOnly,
    /// Columns resize to be the optimal size everytime the model changes.
    AutoSize,
    /// Columns are a fixed numbers of pixels wide.
    Fixed

}

/// Tells how a cell is to be rendered.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum CellRendererState {
    /// The cell is currently selected, and probably has a selection colored background to render to.
    Selected,
    /// The mouse is hovering over the cell.
    Prelit,
    /// The cell is drawn in an insensitive manner.
    Insensitive,
    /// The cell is in a sorted row.
    Sorted,
    /// The cell is in the focus row.
    Focused,
    /// The cell is in a row that can be expanded.
    Expandable,
    /// The cell is in a row that is expanded.
    Expanded
}

/// These flags indicate various properties of a GtkTreeModel.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum TreeModelFlags {
    /// iterators survive all signals emitted by the tree
    ItersPersist,
    /// the model is a list only, and never has children
    ListOnly,
}

/// An enum for determining where a dropped item goes.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum IconViewDropPosition {
    /// no drop possible
    NoDrop,
    /// dropped item replaces the item
    DropInto,
    /// droppped item is inserted to the left
    DropLeft,
    /// dropped item is inserted to the right
    DropRight,
    /// dropped item is inserted above
    DropAbove,
    /// dropped item is inserted below
    DropBelow
}

/// Determines how GTK+ handles the sensitivity of stepper arrows at the end of range widgets.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum SensitivityType {
    /// The arrow is made insensitive if the thumb is at the end
    Auto,
    /// The arrow is always sensitive
    On,
    /// The arrow is always insensitive
    Off
}

#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum GType {
    /// An invalid GType used as error return value in some functions which return a GType.
    Invalid,
    /// A fundamental type which is used as a replacement for the C void return type.
    None,
    /// The fundamental type from which all interfaces are derived.
    Interface,
    /// The fundamental type corresponding to gchar. The type designated by G_TYPE_CHAR is unconditionally
    /// an 8-bit signed integer. This may or may not be the same type a the C type "gchar".
    Char,
    /// The fundamental type corresponding to guchar.
    UChar,
    /// The fundamental type corresponding to gboolean.
    Boolean,
    /// The fundamental type corresponding to gint.
    Int,
    /// The fundamental type corresponding to guint.
    UInt,
    /// The fundamental type corresponding to glong.
    Long,
    /// The fundamental type corresponding to gulong.
    ULong,
    /// The fundamental type corresponding to gint64.
    Int64,
    /// The fundamental type corresponding to guint64.
    UInt64,
    /// The fundamental type from which all enumeration types are derived.
    Enum,
    /// The fundamental type from which all flags types are derived.
    Flags,
    /// The fundamental type corresponding to gfloat.
    Float,
    /// The fundamental type corresponding to gdouble.
    Double,
    /// The fundamental type corresponding to nul-terminated C strings.
    String,
    /// The fundamental type corresponding to gpointer.
    Pointer,
    /// The fundamental type from which all boxed types are derived.
    Boxed,
    /// The fundamental type from which all GParamSpec types are derived.
    Param,
    /// The fundamental type for GObject.
    Object,
    /// The fundamental type corresponding to GVariant.
    /// All floating GVariant instances passed through the GType system are consumed.
    /// Note that callbacks in closures, and signal handlers for signals of return type G_TYPE_VARIANT, must never return floating variants.
    /// Note: GLib 2.24 did include a boxed type with this name. It was replaced with this fundamental type in 2.26.
    Variant,
    /// First fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
    ReservedGLibFirst,
    /// Last fundamental type number reserved for GLib.
    ReservedGLibLast = 31,
    /// First fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
    ReservedGLibBSEFirst = 32,
    /// Last fundamental type number reserved for BSE.
    ReservedGLibBSELast = 48,
    /// First available fundamental type number to create new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL().
    ReservedUserFirst = 49
}

/// Flags affecting how a search is done.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum TextSearchFlags {
    /// Search only visible data. A search match may have invisible text interspersed.
    VisibleOnly,
    /// Search only text. A match may have pixbufs or child widgets mixed inside the matched range.
    TextOnly,
    /// The text will be matched regardless of what case it is in.
    CaseInsensitive
}

/// These flags serve two purposes. First, the application can call gtk_places_sidebar_set_open_flags() using these flags as a bitmask. This
/// tells the sidebar that the application is able to open folders selected from the sidebar in various ways, for example, in new tabs or in
/// new windows in addition to the normal mode.
/// 
/// Second, when one of these values gets passed back to the application in the “open-location” signal, it means that the application should
/// open the selected location in the normal way, in a new tab, or in a new window. The sidebar takes care of determining the desired way to
/// open the location, based on the modifier keys that the user is pressing at the time the selection is made.
/// 
/// If the application never calls gtk_places_sidebar_set_open_flags(), then the sidebar will only use Normal in the
/// “open-location” signal. This is the default mode of operation.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum PlacesOpenFlags {
    /// This is the default mode that GtkPlacesSidebar uses if no other flags are specified. It indicates that the calling application
    /// should open the selected location in the normal way, for example, in the folder view beside the sidebar.
    Normal,
    /// When passed to gtk_places_sidebar_set_open_flags(), this indicates that the application can open folders selected from the
    /// sidebar in new tabs. This value will be passed to the “open-location” signal when the user selects that a location be opened
    /// in a new tab instead of in the standard fashion.
    NewTab,
    /// Similar to NewTab , but indicates that the application can open folders in new windows.
    NewWindow
}

/// Flags used to specify the supported drag targets.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum ToolPaletteDragTargets {
    /// Support drag of items.
    Items,
    /// Support drag of groups.
    Groups
}

/// The GtkDestDefaults enumeration specifies the various types of action that will be taken on behalf of the user for a drag destination site.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum DestDefaults {
    /// If set for a widget, GTK+, during a drag over this widget will check if the drag matches this widget’s list of possible targets
    /// and actions. GTK+ will then call gdk_drag_status() as appropriate.
    Motion,
    /// If set for a widget, GTK+ will draw a highlight on this widget as long as a drag is over this widget and the widget drag format
    /// and action are acceptable.
    Highlight,
    /// If set for a widget, when a drop occurs, GTK+ will will check if the drag matches this widget’s list of possible targets and
    /// actions. If so, GTK+ will call gtk_drag_get_data() on behalf of the widget. Whether or not the drop is successful, GTK+ will
    /// call gtk_drag_finish(). If the action was a move, then if the drag was successful, then TRUE will be passed for the delete
    /// parameter to gtk_drag_finish().
    Drop,
    /// If set, specifies that all default actions should be taken.
    All
}

/// The mode of the size group determines the directions in which the size group affects the requested sizes of its component widgets.
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum SizeGroupMode {
    /// group has no effect
    None,
    /// group affects horizontal requisition
    Horizontal,
    /// group affects vertical requisition
    Vertical,
    /// group affects both horizontal and vertical requisition
    Both
}