zoha-vte-sys 0.7.0

GTK VTE bindings for rust, c bindings crate
Documentation
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
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from /a/zoha-vte-rs/gir-files
// from /a/zoha-vte-rs/vte/share/gir-1.0
// DO NOT EDIT

#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
#![allow(
    clippy::approx_constant,
    clippy::type_complexity,
    clippy::unreadable_literal,
    clippy::upper_case_acronyms
)]
#![cfg_attr(docsrs, feature(doc_cfg))]

use cairo_sys as cairo;
use gdk_pixbuf_sys as gdk_pixbuf;
use gdk_sys as gdk;
use gio_sys as gio;
use glib_sys as glib;
use gobject_sys as gobject;
use gtk_sys as gtk;
use pango_sys as pango;

#[allow(unused_imports)]
use libc::{FILE, intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use std::ffi::{
    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
};

#[allow(unused_imports)]
use glib::{GType, gboolean, gconstpointer, gpointer};

// Enums
pub type VteAlign = c_int;
pub const VTE_ALIGN_START: VteAlign = 0;
pub const VTE_ALIGN_CENTER: VteAlign = 1;
pub const VTE_ALIGN_END: VteAlign = 2;

pub type VteCursorBlinkMode = c_int;
pub const VTE_CURSOR_BLINK_SYSTEM: VteCursorBlinkMode = 0;
pub const VTE_CURSOR_BLINK_ON: VteCursorBlinkMode = 1;
pub const VTE_CURSOR_BLINK_OFF: VteCursorBlinkMode = 2;

pub type VteCursorShape = c_int;
pub const VTE_CURSOR_SHAPE_BLOCK: VteCursorShape = 0;
pub const VTE_CURSOR_SHAPE_IBEAM: VteCursorShape = 1;
pub const VTE_CURSOR_SHAPE_UNDERLINE: VteCursorShape = 2;

pub type VteEraseBinding = c_int;
pub const VTE_ERASE_AUTO: VteEraseBinding = 0;
pub const VTE_ERASE_ASCII_BACKSPACE: VteEraseBinding = 1;
pub const VTE_ERASE_ASCII_DELETE: VteEraseBinding = 2;
pub const VTE_ERASE_DELETE_SEQUENCE: VteEraseBinding = 3;
pub const VTE_ERASE_TTY: VteEraseBinding = 4;

pub type VteFormat = c_int;
pub const VTE_FORMAT_TEXT: VteFormat = 1;
pub const VTE_FORMAT_HTML: VteFormat = 2;

pub type VteProgressHint = c_int;
pub const VTE_PROGRESS_HINT_INACTIVE: VteProgressHint = 0;
pub const VTE_PROGRESS_HINT_ACTIVE: VteProgressHint = 1;
pub const VTE_PROGRESS_HINT_ERROR: VteProgressHint = 2;
pub const VTE_PROGRESS_HINT_INDETERMINATE: VteProgressHint = 3;
pub const VTE_PROGRESS_HINT_PAUSED: VteProgressHint = 4;

pub type VtePropertyId = c_int;
pub const VTE_PROPERTY_ID_CURRENT_DIRECTORY_URI: VtePropertyId = 0;
pub const VTE_PROPERTY_ID_CURRENT_FILE_URI: VtePropertyId = 1;
pub const VTE_PROPERTY_ID_XTERM_TITLE: VtePropertyId = 2;
pub const VTE_PROPERTY_ID_CONTAINER_NAME: VtePropertyId = 3;
pub const VTE_PROPERTY_ID_CONTAINER_RUNTIME: VtePropertyId = 4;
pub const VTE_PROPERTY_ID_CONTAINER_UID: VtePropertyId = 5;
pub const VTE_PROPERTY_ID_SHELL_PRECMD: VtePropertyId = 6;
pub const VTE_PROPERTY_ID_SHELL_PREEXEC: VtePropertyId = 7;
pub const VTE_PROPERTY_ID_SHELL_POSTEXEC: VtePropertyId = 8;
pub const VTE_PROPERTY_ID_PROGRESS_HINT: VtePropertyId = 9;
pub const VTE_PROPERTY_ID_PROGRESS_VALUE: VtePropertyId = 10;
pub const VTE_PROPERTY_ID_ICON_COLOR: VtePropertyId = 11;
pub const VTE_PROPERTY_ID_ICON_IMAGE: VtePropertyId = 12;

pub type VtePropertyType = c_int;
pub const VTE_PROPERTY_VALUELESS: VtePropertyType = 0;
pub const VTE_PROPERTY_BOOL: VtePropertyType = 1;
pub const VTE_PROPERTY_INT: VtePropertyType = 2;
pub const VTE_PROPERTY_UINT: VtePropertyType = 3;
pub const VTE_PROPERTY_DOUBLE: VtePropertyType = 4;
pub const VTE_PROPERTY_RGB: VtePropertyType = 5;
pub const VTE_PROPERTY_RGBA: VtePropertyType = 6;
pub const VTE_PROPERTY_STRING: VtePropertyType = 7;
pub const VTE_PROPERTY_DATA: VtePropertyType = 8;
pub const VTE_PROPERTY_UUID: VtePropertyType = 9;
pub const VTE_PROPERTY_URI: VtePropertyType = 10;
pub const VTE_PROPERTY_IMAGE: VtePropertyType = 11;

pub type VtePtyError = c_int;
pub const VTE_PTY_ERROR_PTY_HELPER_FAILED: VtePtyError = 0;
pub const VTE_PTY_ERROR_PTY98_FAILED: VtePtyError = 1;

pub type VteRegexError = c_int;
pub const VTE_REGEX_ERROR_INCOMPATIBLE: VteRegexError = 2147483646;
pub const VTE_REGEX_ERROR_NOT_SUPPORTED: VteRegexError = 2147483647;

pub type VteSystemdContextExitCondition = c_int;
pub const VTE_SYSTEMD_CONTEXT_EXIT_CONDITION_SUCCESS: VteSystemdContextExitCondition = 0;
pub const VTE_SYSTEMD_CONTEXT_EXIT_CONDITION_CRASH: VteSystemdContextExitCondition = 1;
pub const VTE_SYSTEMD_CONTEXT_EXIT_CONDITION_FAILURE: VteSystemdContextExitCondition = 2;
pub const VTE_SYSTEMD_CONTEXT_EXIT_CONDITION_INTERRUPT: VteSystemdContextExitCondition = 3;

pub type VteSystemdContextOperation = c_int;
pub const VTE_SYSTEMD_CONTEXT_OPERATION_START: VteSystemdContextOperation = 1;
pub const VTE_SYSTEMD_CONTEXT_OPERATION_END: VteSystemdContextOperation = 2;

pub type VteSystemdContextType = c_int;
pub const VTE_SYSTEMD_CONTEXT_TYPE_BUILTIN: VteSystemdContextType = 0;
pub const VTE_SYSTEMD_CONTEXT_TYPE_APP: VteSystemdContextType = 1;
pub const VTE_SYSTEMD_CONTEXT_TYPE_BOOT: VteSystemdContextType = 2;
pub const VTE_SYSTEMD_CONTEXT_TYPE_CHPRIV: VteSystemdContextType = 3;
pub const VTE_SYSTEMD_CONTEXT_TYPE_COMMAND: VteSystemdContextType = 4;
pub const VTE_SYSTEMD_CONTEXT_TYPE_CONTAINER: VteSystemdContextType = 5;
pub const VTE_SYSTEMD_CONTEXT_TYPE_ELEVATE: VteSystemdContextType = 6;
pub const VTE_SYSTEMD_CONTEXT_TYPE_REMOTE: VteSystemdContextType = 7;
pub const VTE_SYSTEMD_CONTEXT_TYPE_SERVICE: VteSystemdContextType = 8;
pub const VTE_SYSTEMD_CONTEXT_TYPE_SESSION: VteSystemdContextType = 9;
pub const VTE_SYSTEMD_CONTEXT_TYPE_SHELL: VteSystemdContextType = 10;
pub const VTE_SYSTEMD_CONTEXT_TYPE_SUBCONTEXT: VteSystemdContextType = 11;
pub const VTE_SYSTEMD_CONTEXT_TYPE_VM: VteSystemdContextType = 12;

pub type VteSystemdPropertyId = c_int;
pub const VTE_SYSTEMD_PROPERTY_ID_CONTEXT_ID: VteSystemdPropertyId = 0;
pub const VTE_SYSTEMD_PROPERTY_ID_BOOT_ID: VteSystemdPropertyId = 1;
pub const VTE_SYSTEMD_PROPERTY_ID_COMM: VteSystemdPropertyId = 2;
pub const VTE_SYSTEMD_PROPERTY_ID_COMMAND_LINE: VteSystemdPropertyId = 3;
pub const VTE_SYSTEMD_PROPERTY_ID_CONTAINER: VteSystemdPropertyId = 4;
pub const VTE_SYSTEMD_PROPERTY_ID_CONTEXT_TYPE: VteSystemdPropertyId = 5;
pub const VTE_SYSTEMD_PROPERTY_ID_CURRENT_DIRECTORY: VteSystemdPropertyId = 6;
pub const VTE_SYSTEMD_PROPERTY_ID_EXIT_CONDITION: VteSystemdPropertyId = 7;
pub const VTE_SYSTEMD_PROPERTY_ID_EXIT_SIGNAL: VteSystemdPropertyId = 8;
pub const VTE_SYSTEMD_PROPERTY_ID_EXIT_STATUS: VteSystemdPropertyId = 9;
pub const VTE_SYSTEMD_PROPERTY_ID_HOSTNAME: VteSystemdPropertyId = 10;
pub const VTE_SYSTEMD_PROPERTY_ID_MACHINE_ID: VteSystemdPropertyId = 11;
pub const VTE_SYSTEMD_PROPERTY_ID_PID: VteSystemdPropertyId = 12;
pub const VTE_SYSTEMD_PROPERTY_ID_PIDFD_INODE: VteSystemdPropertyId = 13;
pub const VTE_SYSTEMD_PROPERTY_ID_TARGET_HOST: VteSystemdPropertyId = 14;
pub const VTE_SYSTEMD_PROPERTY_ID_TARGET_USER: VteSystemdPropertyId = 15;
pub const VTE_SYSTEMD_PROPERTY_ID_USER: VteSystemdPropertyId = 16;
pub const VTE_SYSTEMD_PROPERTY_ID_VM: VteSystemdPropertyId = 17;

pub type VteTextBlinkMode = c_int;
pub const VTE_TEXT_BLINK_NEVER: VteTextBlinkMode = 0;
pub const VTE_TEXT_BLINK_FOCUSED: VteTextBlinkMode = 1;
pub const VTE_TEXT_BLINK_UNFOCUSED: VteTextBlinkMode = 2;
pub const VTE_TEXT_BLINK_ALWAYS: VteTextBlinkMode = 3;

pub type VteWriteFlags = c_int;
pub const VTE_WRITE_DEFAULT: VteWriteFlags = 0;

// Constants
pub const VTE_MAJOR_VERSION: c_int = 0;
pub const VTE_MICRO_VERSION: c_int = 0;
pub const VTE_MINOR_VERSION: c_int = 85;
pub const VTE_REGEX_FLAGS_DEFAULT: c_int = 1075314688;
pub const VTE_SPAWN_NO_PARENT_ENVV: c_int = 33554432;
pub const VTE_SPAWN_NO_SYSTEMD_SCOPE: c_int = 67108864;
pub const VTE_SPAWN_REQUIRE_SYSTEMD_SCOPE: c_int = 134217728;
pub const VTE_SYSTEMD_PROPERTY_BOOT_ID: &[u8] = b"bootid\0";
pub const VTE_SYSTEMD_PROPERTY_COMM: &[u8] = b"comm\0";
pub const VTE_SYSTEMD_PROPERTY_COMMAND_LINE: &[u8] = b"cmdline\0";
pub const VTE_SYSTEMD_PROPERTY_CONTAINER: &[u8] = b"container\0";
pub const VTE_SYSTEMD_PROPERTY_CONTEXT_ID: &[u8] = b"context-id\0";
pub const VTE_SYSTEMD_PROPERTY_CONTEXT_TYPE: &[u8] = b"type\0";
pub const VTE_SYSTEMD_PROPERTY_CURRENT_DIRECTORY: &[u8] = b"cwd\0";
pub const VTE_SYSTEMD_PROPERTY_EXIT_CONDITION: &[u8] = b"exit\0";
pub const VTE_SYSTEMD_PROPERTY_EXIT_SIGNAL: &[u8] = b"signal\0";
pub const VTE_SYSTEMD_PROPERTY_EXIT_STATUS: &[u8] = b"status\0";
pub const VTE_SYSTEMD_PROPERTY_HOSTNAME: &[u8] = b"hostname\0";
pub const VTE_SYSTEMD_PROPERTY_MACHINE_ID: &[u8] = b"machineid\0";
pub const VTE_SYSTEMD_PROPERTY_PID: &[u8] = b"pid\0";
pub const VTE_SYSTEMD_PROPERTY_PIDFD_INODE: &[u8] = b"pidfdid\0";
pub const VTE_SYSTEMD_PROPERTY_TARGET_HOST: &[u8] = b"targethost\0";
pub const VTE_SYSTEMD_PROPERTY_TARGET_USER: &[u8] = b"targetuser\0";
pub const VTE_SYSTEMD_PROPERTY_USER: &[u8] = b"user\0";
pub const VTE_SYSTEMD_PROPERTY_VM: &[u8] = b"vm\0";
pub const VTE_TERMPROP_CONTAINER_NAME: &[u8] = b"vte.container.name\0";
pub const VTE_TERMPROP_CONTAINER_RUNTIME: &[u8] = b"vte.container.runtime\0";
pub const VTE_TERMPROP_CONTAINER_UID: &[u8] = b"vte.container.uid\0";
pub const VTE_TERMPROP_CURRENT_DIRECTORY_URI: &[u8] = b"vte.cwd\0";
pub const VTE_TERMPROP_CURRENT_FILE_URI: &[u8] = b"vte.cwf\0";
pub const VTE_TERMPROP_ICON_COLOR: &[u8] = b"vte.icon.color\0";
pub const VTE_TERMPROP_ICON_IMAGE: &[u8] = b"vte.icon.image\0";
pub const VTE_TERMPROP_NAME_PREFIX: &[u8] = b"vte.ext.\0";
pub const VTE_TERMPROP_PROGRESS_HINT: &[u8] = b"vte.progress.hint\0";
pub const VTE_TERMPROP_PROGRESS_VALUE: &[u8] = b"vte.progress.value\0";
pub const VTE_TERMPROP_SHELL_POSTEXEC: &[u8] = b"vte.shell.postexec\0";
pub const VTE_TERMPROP_SHELL_PRECMD: &[u8] = b"vte.shell.precmd\0";
pub const VTE_TERMPROP_SHELL_PREEXEC: &[u8] = b"vte.shell.preexec\0";
pub const VTE_TERMPROP_XTERM_TITLE: &[u8] = b"xterm.title\0";
pub const VTE_TEST_FLAGS_ALL: u64 = 18446744073709551615;
pub const VTE_TEST_FLAGS_NONE: u64 = 0;

// Flags
pub type VteFeatureFlags = c_uint;
pub const VTE_FEATURE_FLAG_BIDI: VteFeatureFlags = 1;
pub const VTE_FEATURE_FLAG_ICU: VteFeatureFlags = 2;
pub const VTE_FEATURE_FLAG_SYSTEMD: VteFeatureFlags = 4;
pub const VTE_FEATURE_FLAG_SIXEL: VteFeatureFlags = 8;
pub const VTE_FEATURE_FLAGS_MASK: VteFeatureFlags = 4294967295;

pub type VtePropertyFlags = c_uint;
pub const VTE_PROPERTY_FLAG_NONE: VtePropertyFlags = 0;
pub const VTE_PROPERTY_FLAG_EPHEMERAL: VtePropertyFlags = 1;

pub type VtePtyFlags = c_uint;
pub const VTE_PTY_NO_LASTLOG: VtePtyFlags = 1;
pub const VTE_PTY_NO_UTMP: VtePtyFlags = 2;
pub const VTE_PTY_NO_WTMP: VtePtyFlags = 4;
pub const VTE_PTY_NO_HELPER: VtePtyFlags = 8;
pub const VTE_PTY_NO_FALLBACK: VtePtyFlags = 16;
pub const VTE_PTY_NO_SESSION: VtePtyFlags = 32;
pub const VTE_PTY_NO_CTTY: VtePtyFlags = 64;
pub const VTE_PTY_DEFAULT: VtePtyFlags = 0;

pub type VteUuidFormat = c_uint;
pub const VTE_UUID_FORMAT_SIMPLE: VteUuidFormat = 1;
pub const VTE_UUID_FORMAT_BRACED: VteUuidFormat = 2;
pub const VTE_UUID_FORMAT_URN: VteUuidFormat = 4;
pub const VTE_UUID_FORMAT_ANY: VteUuidFormat = 7;
pub const VTE_UUID_FORMAT_ID128: VteUuidFormat = 8;
pub const VTE_UUID_FORMAT_ANY_ID128: VteUuidFormat = 15;

// Callbacks
pub type VteSelectionFunc =
    Option<unsafe extern "C" fn(*mut VteTerminal, c_long, c_long, gpointer) -> gboolean>;
pub type VteTerminalSpawnAsyncCallback =
    Option<unsafe extern "C" fn(*mut VteTerminal, glib::GPid, *mut glib::GError, gpointer)>;

// Records
#[repr(C)]
#[allow(dead_code)]
pub struct VteCharAttributes {
    pub row: c_long,
    pub column: c_long,
    pub fore: pango::PangoColor,
    pub back: pango::PangoColor,
    pub underline: c_uint,
    _truncated_record_marker: c_void,
    // field strikethrough has incomplete type
}

impl ::std::fmt::Debug for VteCharAttributes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("VteCharAttributes @ {self:p}"))
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct _VteEventContext {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

pub type VteEventContext = _VteEventContext;

#[repr(C)]
#[allow(dead_code)]
pub struct _VteProperties {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

pub type VteProperties = _VteProperties;

#[repr(C)]
#[allow(dead_code)]
pub struct _VtePropertiesRegistry {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

pub type VtePropertiesRegistry = _VtePropertiesRegistry;

#[repr(C)]
#[allow(dead_code)]
pub struct _VtePtyClass {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

pub type VtePtyClass = _VtePtyClass;

#[repr(C)]
#[allow(dead_code)]
pub struct VteRegex {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for VteRegex {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("VteRegex @ {self:p}")).finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct VteTerminalClass {
    pub parent_class: gtk::GtkWidgetClass,
    pub eof: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub child_exited: Option<unsafe extern "C" fn(*mut VteTerminal, c_int)>,
    pub encoding_changed: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub char_size_changed: Option<unsafe extern "C" fn(*mut VteTerminal, c_uint, c_uint)>,
    pub window_title_changed: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub icon_title_changed: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub selection_changed: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub contents_changed: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub cursor_moved: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub commit: Option<unsafe extern "C" fn(*mut VteTerminal, *const c_char, c_uint)>,
    pub deiconify_window: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub iconify_window: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub raise_window: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub lower_window: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub refresh_window: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub restore_window: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub maximize_window: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub resize_window: Option<unsafe extern "C" fn(*mut VteTerminal, c_uint, c_uint)>,
    pub move_window: Option<unsafe extern "C" fn(*mut VteTerminal, c_uint, c_uint)>,
    pub increase_font_size: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub decrease_font_size: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub text_modified: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub text_inserted: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub text_deleted: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub text_scrolled: Option<unsafe extern "C" fn(*mut VteTerminal, c_int)>,
    pub copy_clipboard: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub paste_clipboard: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub bell: Option<unsafe extern "C" fn(*mut VteTerminal)>,
    pub _extra_padding: [gpointer; 3],
    pub setup_context_menu: Option<unsafe extern "C" fn(*mut VteTerminal, *const VteEventContext)>,
    pub termprops_changed:
        Option<unsafe extern "C" fn(*mut VteTerminal, *const c_int, c_int) -> gboolean>,
    pub termprop_changed: Option<unsafe extern "C" fn(*mut VteTerminal, *const c_char)>,
    pub systemd_context: Option<
        unsafe extern "C" fn(*mut VteTerminal, VteSystemdContextOperation, *const VteProperties),
    >,
    pub _padding: [gpointer; 9],
    pub priv_: *mut VteTerminalClassPrivate,
}

impl ::std::fmt::Debug for VteTerminalClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("VteTerminalClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .field("eof", &self.eof)
            .field("child_exited", &self.child_exited)
            .field("encoding_changed", &self.encoding_changed)
            .field("char_size_changed", &self.char_size_changed)
            .field("window_title_changed", &self.window_title_changed)
            .field("icon_title_changed", &self.icon_title_changed)
            .field("selection_changed", &self.selection_changed)
            .field("contents_changed", &self.contents_changed)
            .field("cursor_moved", &self.cursor_moved)
            .field("commit", &self.commit)
            .field("deiconify_window", &self.deiconify_window)
            .field("iconify_window", &self.iconify_window)
            .field("raise_window", &self.raise_window)
            .field("lower_window", &self.lower_window)
            .field("refresh_window", &self.refresh_window)
            .field("restore_window", &self.restore_window)
            .field("maximize_window", &self.maximize_window)
            .field("resize_window", &self.resize_window)
            .field("move_window", &self.move_window)
            .field("increase_font_size", &self.increase_font_size)
            .field("decrease_font_size", &self.decrease_font_size)
            .field("text_modified", &self.text_modified)
            .field("text_inserted", &self.text_inserted)
            .field("text_deleted", &self.text_deleted)
            .field("text_scrolled", &self.text_scrolled)
            .field("copy_clipboard", &self.copy_clipboard)
            .field("paste_clipboard", &self.paste_clipboard)
            .field("bell", &self.bell)
            .field("setup_context_menu", &self.setup_context_menu)
            .field("termprops_changed", &self.termprops_changed)
            .field("termprop_changed", &self.termprop_changed)
            .field("systemd_context", &self.systemd_context)
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct _VteTerminalClassPrivate {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

pub type VteTerminalClassPrivate = _VteTerminalClassPrivate;

#[repr(C)]
#[allow(dead_code)]
pub struct VteUuid {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for VteUuid {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("VteUuid @ {self:p}")).finish()
    }
}

// Classes
#[repr(C)]
#[allow(dead_code)]
pub struct VtePty {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for VtePty {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("VtePty @ {self:p}")).finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct VteTerminal {
    pub widget: gtk::GtkWidget,
    pub _unused_padding: [*mut gpointer; 1],
}

impl ::std::fmt::Debug for VteTerminal {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("VteTerminal @ {self:p}"))
            .field("widget", &self.widget)
            .finish()
    }
}

unsafe extern "C" {

    //=========================================================================
    // VteAlign
    //=========================================================================
    pub fn vte_align_get_type() -> GType;

    //=========================================================================
    // VteCursorBlinkMode
    //=========================================================================
    pub fn vte_cursor_blink_mode_get_type() -> GType;

    //=========================================================================
    // VteCursorShape
    //=========================================================================
    pub fn vte_cursor_shape_get_type() -> GType;

    //=========================================================================
    // VteEraseBinding
    //=========================================================================
    pub fn vte_erase_binding_get_type() -> GType;

    //=========================================================================
    // VteFormat
    //=========================================================================
    pub fn vte_format_get_type() -> GType;

    //=========================================================================
    // VteProgressHint
    //=========================================================================
    pub fn vte_progress_hint_get_type() -> GType;

    //=========================================================================
    // VtePropertyId
    //=========================================================================
    pub fn vte_property_id_get_type() -> GType;

    //=========================================================================
    // VtePropertyType
    //=========================================================================
    pub fn vte_property_type_get_type() -> GType;

    //=========================================================================
    // VtePtyError
    //=========================================================================
    pub fn vte_pty_error_get_type() -> GType;
    pub fn vte_pty_error_quark() -> glib::GQuark;

    //=========================================================================
    // VteRegexError
    //=========================================================================
    pub fn vte_regex_error_get_type() -> GType;
    pub fn vte_regex_error_quark() -> glib::GQuark;

    //=========================================================================
    // VteSystemdContextExitCondition
    //=========================================================================
    pub fn vte_systemd_context_exit_condition_get_type() -> GType;

    //=========================================================================
    // VteSystemdContextOperation
    //=========================================================================
    pub fn vte_systemd_context_operation_get_type() -> GType;

    //=========================================================================
    // VteSystemdContextType
    //=========================================================================
    pub fn vte_systemd_context_type_get_type() -> GType;

    //=========================================================================
    // VteSystemdPropertyId
    //=========================================================================
    pub fn vte_systemd_property_id_get_type() -> GType;

    //=========================================================================
    // VteTextBlinkMode
    //=========================================================================
    pub fn vte_text_blink_mode_get_type() -> GType;

    //=========================================================================
    // VteWriteFlags
    //=========================================================================
    pub fn vte_write_flags_get_type() -> GType;

    //=========================================================================
    // VtePropertyFlags
    //=========================================================================
    pub fn vte_property_flags_get_type() -> GType;

    //=========================================================================
    // VtePtyFlags
    //=========================================================================
    pub fn vte_pty_flags_get_type() -> GType;

    //=========================================================================
    // VteUuidFormat
    //=========================================================================
    pub fn vte_uuid_format_get_type() -> GType;

    //=========================================================================
    // VteEventContext
    //=========================================================================
    pub fn vte_event_context_get_type() -> GType;
    pub fn vte_event_context_get_event(context: *const VteEventContext) -> *mut gdk::GdkEvent;

    //=========================================================================
    // VteProperties
    //=========================================================================
    pub fn vte_properties_dup_property_string(
        properties: *const VteProperties,
        prop: *const c_char,
        size: *mut size_t,
    ) -> *mut c_char;
    pub fn vte_properties_dup_property_string_by_id(
        properties: *const VteProperties,
        prop: c_int,
        size: *mut size_t,
    ) -> *mut c_char;
    pub fn vte_properties_dup_property_uuid(
        properties: *const VteProperties,
        prop: *const c_char,
    ) -> *mut VteUuid;
    pub fn vte_properties_dup_property_uuid_by_id(
        properties: *const VteProperties,
        prop: c_int,
    ) -> *mut VteUuid;
    pub fn vte_properties_get_property_bool(
        properties: *const VteProperties,
        prop: *const c_char,
        valuep: *mut gboolean,
    ) -> gboolean;
    pub fn vte_properties_get_property_bool_by_id(
        properties: *const VteProperties,
        prop: c_int,
        valuep: *mut gboolean,
    ) -> gboolean;
    pub fn vte_properties_get_property_data(
        properties: *const VteProperties,
        prop: *const c_char,
        size: *mut size_t,
    ) -> *const u8;
    pub fn vte_properties_get_property_data_by_id(
        properties: *const VteProperties,
        prop: c_int,
        size: *mut size_t,
    ) -> *const u8;
    pub fn vte_properties_get_property_double(
        properties: *const VteProperties,
        prop: *const c_char,
        valuep: *mut c_double,
    ) -> gboolean;
    pub fn vte_properties_get_property_double_by_id(
        properties: *const VteProperties,
        prop: c_int,
        valuep: *mut c_double,
    ) -> gboolean;
    pub fn vte_properties_get_property_enum(
        properties: *const VteProperties,
        prop: *const c_char,
        gtype: GType,
        valuep: *mut i64,
    ) -> gboolean;
    pub fn vte_properties_get_property_enum_by_id(
        properties: *const VteProperties,
        prop: c_int,
        gtype: GType,
        valuep: *mut i64,
    ) -> gboolean;
    pub fn vte_properties_get_property_flags(
        properties: *const VteProperties,
        prop: *const c_char,
        gtype: GType,
        ignore_unknown_flags: gboolean,
        valuep: *mut u64,
    ) -> gboolean;
    pub fn vte_properties_get_property_flags_by_id(
        properties: *const VteProperties,
        prop: c_int,
        gtype: GType,
        ignore_unknown_flags: gboolean,
        valuep: *mut u64,
    ) -> gboolean;
    pub fn vte_properties_get_property_int(
        properties: *const VteProperties,
        prop: *const c_char,
        valuep: *mut i64,
    ) -> gboolean;
    pub fn vte_properties_get_property_int_by_id(
        properties: *const VteProperties,
        prop: c_int,
        valuep: *mut i64,
    ) -> gboolean;
    pub fn vte_properties_get_property_rgba(
        properties: *const VteProperties,
        prop: *const c_char,
        color: *mut gdk::GdkRGBA,
    ) -> gboolean;
    pub fn vte_properties_get_property_rgba_by_id(
        properties: *const VteProperties,
        prop: c_int,
        color: *mut gdk::GdkRGBA,
    ) -> gboolean;
    pub fn vte_properties_get_property_string(
        properties: *const VteProperties,
        prop: *const c_char,
        size: *mut size_t,
    ) -> *const c_char;
    pub fn vte_properties_get_property_string_by_id(
        properties: *const VteProperties,
        prop: c_int,
        size: *mut size_t,
    ) -> *const c_char;
    pub fn vte_properties_get_property_uint(
        properties: *const VteProperties,
        prop: *const c_char,
        valuep: *mut u64,
    ) -> gboolean;
    pub fn vte_properties_get_property_uint_by_id(
        properties: *const VteProperties,
        prop: c_int,
        valuep: *mut u64,
    ) -> gboolean;
    pub fn vte_properties_get_property_value(
        properties: *const VteProperties,
        prop: *const c_char,
        gvalue: *mut gobject::GValue,
    ) -> gboolean;
    pub fn vte_properties_get_property_value_by_id(
        properties: *const VteProperties,
        prop: c_int,
        gvalue: *mut gobject::GValue,
    ) -> gboolean;
    pub fn vte_properties_get_registry(
        properties: *const VteProperties,
    ) -> *const VtePropertiesRegistry;
    pub fn vte_properties_ref_property_data_bytes(
        properties: *const VteProperties,
        prop: *const c_char,
    ) -> *mut glib::GBytes;
    pub fn vte_properties_ref_property_data_bytes_by_id(
        properties: *const VteProperties,
        prop: c_int,
    ) -> *mut glib::GBytes;
    pub fn vte_properties_ref_property_image_pixbuf(
        properties: *const VteProperties,
        prop: *const c_char,
    ) -> *mut gdk_pixbuf::GdkPixbuf;
    pub fn vte_properties_ref_property_image_pixbuf_by_id(
        properties: *const VteProperties,
        prop: c_int,
    ) -> *mut gdk_pixbuf::GdkPixbuf;
    pub fn vte_properties_ref_property_image_surface(
        properties: *const VteProperties,
        prop: *const c_char,
    ) -> *mut cairo::cairo_surface_t;
    pub fn vte_properties_ref_property_image_surface_by_id(
        properties: *const VteProperties,
        prop: c_int,
    ) -> *mut cairo::cairo_surface_t;
    pub fn vte_properties_ref_property_uri(
        properties: *const VteProperties,
        prop: *const c_char,
    ) -> *mut glib::GUri;
    pub fn vte_properties_ref_property_uri_by_id(
        properties: *const VteProperties,
        prop: c_int,
    ) -> *mut glib::GUri;
    pub fn vte_properties_ref_property_variant(
        properties: *const VteProperties,
        prop: *const c_char,
    ) -> *mut glib::GVariant;
    pub fn vte_properties_ref_property_variant_by_id(
        properties: *const VteProperties,
        prop: c_int,
    ) -> *mut glib::GVariant;

    //=========================================================================
    // VtePropertiesRegistry
    //=========================================================================
    pub fn vte_properties_registry_get_type() -> GType;
    pub fn vte_properties_registry_get_properties(
        registry: *const VtePropertiesRegistry,
        length: *mut size_t,
    ) -> *mut *const c_char;
    pub fn vte_properties_registry_query(
        registry: *const VtePropertiesRegistry,
        name: *const c_char,
        resolved_name: *mut *const c_char,
        prop: *mut c_int,
        type_: *mut VtePropertyType,
        flags: *mut VtePropertyFlags,
    ) -> gboolean;
    pub fn vte_properties_registry_query_by_id(
        registry: *const VtePropertiesRegistry,
        prop: c_int,
        name: *mut *const c_char,
        type_: *mut VtePropertyType,
        flags: *mut VtePropertyFlags,
    ) -> gboolean;

    //=========================================================================
    // VteRegex
    //=========================================================================
    pub fn vte_regex_get_type() -> GType;
    pub fn vte_regex_new_for_match(
        pattern: *const c_char,
        pattern_length: ssize_t,
        flags: u32,
        error: *mut *mut glib::GError,
    ) -> *mut VteRegex;
    pub fn vte_regex_new_for_match_full(
        pattern: *const c_char,
        pattern_length: ssize_t,
        flags: u32,
        extra_flags: u32,
        error_offset: *mut size_t,
        error: *mut *mut glib::GError,
    ) -> *mut VteRegex;
    pub fn vte_regex_new_for_search(
        pattern: *const c_char,
        pattern_length: ssize_t,
        flags: u32,
        error: *mut *mut glib::GError,
    ) -> *mut VteRegex;
    pub fn vte_regex_new_for_search_full(
        pattern: *const c_char,
        pattern_length: ssize_t,
        flags: u32,
        extra_flags: u32,
        error_offset: *mut size_t,
        error: *mut *mut glib::GError,
    ) -> *mut VteRegex;
    pub fn vte_regex_jit(
        regex: *mut VteRegex,
        flags: u32,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn vte_regex_ref(regex: *mut VteRegex) -> *mut VteRegex;
    pub fn vte_regex_substitute(
        regex: *mut VteRegex,
        subject: *const c_char,
        replacement: *const c_char,
        flags: u32,
        error: *mut *mut glib::GError,
    ) -> *mut c_char;
    pub fn vte_regex_unref(regex: *mut VteRegex) -> *mut VteRegex;

    //=========================================================================
    // VteUuid
    //=========================================================================
    pub fn vte_uuid_get_type() -> GType;
    pub fn vte_uuid_new_from_string(
        str: *const c_char,
        len: ssize_t,
        fmt: VteUuidFormat,
    ) -> *mut VteUuid;
    pub fn vte_uuid_new_v4() -> *mut VteUuid;
    pub fn vte_uuid_dup(uuid: *const VteUuid) -> *mut VteUuid;
    pub fn vte_uuid_equal(uuid: *const VteUuid, other: *const VteUuid) -> gboolean;
    pub fn vte_uuid_free(uuid: *mut VteUuid);
    pub fn vte_uuid_free_to_string(
        uuid: *mut VteUuid,
        fmt: VteUuidFormat,
        len: *mut size_t,
    ) -> *mut c_char;
    pub fn vte_uuid_new_v5(ns: *const VteUuid, data: *const c_char, len: ssize_t) -> *mut VteUuid;
    pub fn vte_uuid_to_string(
        uuid: *const VteUuid,
        fmt: VteUuidFormat,
        len: *mut size_t,
    ) -> *mut c_char;
    pub fn vte_uuid_validate_string(
        str: *const c_char,
        len: ssize_t,
        fmt: VteUuidFormat,
    ) -> gboolean;

    //=========================================================================
    // VtePty
    //=========================================================================
    pub fn vte_pty_get_type() -> GType;
    pub fn vte_pty_new_foreign_sync(
        fd: c_int,
        cancellable: *mut gio::GCancellable,
        error: *mut *mut glib::GError,
    ) -> *mut VtePty;
    pub fn vte_pty_new_sync(
        flags: VtePtyFlags,
        cancellable: *mut gio::GCancellable,
        error: *mut *mut glib::GError,
    ) -> *mut VtePty;
    pub fn vte_pty_child_setup(pty: *mut VtePty);
    pub fn vte_pty_close(pty: *mut VtePty);
    pub fn vte_pty_get_fd(pty: *mut VtePty) -> c_int;
    pub fn vte_pty_get_size(
        pty: *mut VtePty,
        rows: *mut c_int,
        columns: *mut c_int,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn vte_pty_set_size(
        pty: *mut VtePty,
        rows: c_int,
        columns: c_int,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn vte_pty_set_utf8(
        pty: *mut VtePty,
        utf8: gboolean,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn vte_pty_spawn_async(
        pty: *mut VtePty,
        working_directory: *const c_char,
        argv: *mut *mut c_char,
        envv: *mut *mut c_char,
        spawn_flags: glib::GSpawnFlags,
        child_setup: glib::GSpawnChildSetupFunc,
        child_setup_data: gpointer,
        child_setup_data_destroy: glib::GDestroyNotify,
        timeout: c_int,
        cancellable: *mut gio::GCancellable,
        callback: gio::GAsyncReadyCallback,
        user_data: gpointer,
    );
    pub fn vte_pty_spawn_finish(
        pty: *mut VtePty,
        result: *mut gio::GAsyncResult,
        child_pid: *mut glib::GPid,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn vte_pty_spawn_with_fds_async(
        pty: *mut VtePty,
        working_directory: *const c_char,
        argv: *const *const c_char,
        envv: *const *const c_char,
        fds: *const c_int,
        n_fds: c_int,
        map_fds: *const c_int,
        n_map_fds: c_int,
        spawn_flags: glib::GSpawnFlags,
        child_setup: glib::GSpawnChildSetupFunc,
        child_setup_data: gpointer,
        child_setup_data_destroy: glib::GDestroyNotify,
        timeout: c_int,
        cancellable: *mut gio::GCancellable,
        callback: gio::GAsyncReadyCallback,
        user_data: gpointer,
    );

    //=========================================================================
    // VteTerminal
    //=========================================================================
    pub fn vte_terminal_get_type() -> GType;
    pub fn vte_terminal_new() -> *mut VteTerminal;
    pub fn vte_terminal_copy_clipboard(terminal: *mut VteTerminal);
    pub fn vte_terminal_copy_clipboard_format(terminal: *mut VteTerminal, format: VteFormat);
    pub fn vte_terminal_copy_primary(terminal: *mut VteTerminal);
    pub fn vte_terminal_dup_termprop_string(
        terminal: *mut VteTerminal,
        prop: *const c_char,
        size: *mut size_t,
    ) -> *mut c_char;
    pub fn vte_terminal_dup_termprop_string_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
        size: *mut size_t,
    ) -> *mut c_char;
    pub fn vte_terminal_dup_termprop_uuid(
        terminal: *mut VteTerminal,
        prop: *const c_char,
    ) -> *mut VteUuid;
    pub fn vte_terminal_dup_termprop_uuid_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
    ) -> *mut VteUuid;
    pub fn vte_terminal_event_check_gregex_simple(
        terminal: *mut VteTerminal,
        event: *mut gdk::GdkEvent,
        regexes: *mut *mut glib::GRegex,
        n_regexes: size_t,
        match_flags: glib::GRegexMatchFlags,
        matches: *mut *mut c_char,
    ) -> gboolean;
    pub fn vte_terminal_event_check_regex_array(
        terminal: *mut VteTerminal,
        event: *mut gdk::GdkEvent,
        regexes: *mut *mut VteRegex,
        n_regexes: size_t,
        match_flags: u32,
        n_matches: *mut size_t,
    ) -> *mut *mut c_char;
    pub fn vte_terminal_event_check_regex_simple(
        terminal: *mut VteTerminal,
        event: *mut gdk::GdkEvent,
        regexes: *mut *mut VteRegex,
        n_regexes: size_t,
        match_flags: u32,
        matches: *mut *mut c_char,
    ) -> gboolean;
    pub fn vte_terminal_feed(terminal: *mut VteTerminal, data: *const u8, length: ssize_t);
    pub fn vte_terminal_feed_child(terminal: *mut VteTerminal, text: *const u8, length: ssize_t);
    pub fn vte_terminal_feed_child_binary(
        terminal: *mut VteTerminal,
        data: *const u8,
        length: size_t,
    );
    pub fn vte_terminal_get_allow_bold(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_allow_hyperlink(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_audible_bell(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_bold_is_bright(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_cell_height_scale(terminal: *mut VteTerminal) -> c_double;
    pub fn vte_terminal_get_cell_width_scale(terminal: *mut VteTerminal) -> c_double;
    pub fn vte_terminal_get_char_height(terminal: *mut VteTerminal) -> c_long;
    pub fn vte_terminal_get_char_width(terminal: *mut VteTerminal) -> c_long;
    pub fn vte_terminal_get_cjk_ambiguous_width(terminal: *mut VteTerminal) -> c_int;
    pub fn vte_terminal_get_color_background_for_draw(
        terminal: *mut VteTerminal,
        color: *mut gdk::GdkRGBA,
    );
    pub fn vte_terminal_get_column_count(terminal: *mut VteTerminal) -> c_long;
    pub fn vte_terminal_get_context_menu(terminal: *mut VteTerminal) -> *mut gtk::GtkWidget;
    pub fn vte_terminal_get_context_menu_model(terminal: *mut VteTerminal) -> *mut gio::GMenuModel;
    pub fn vte_terminal_get_current_directory_uri(terminal: *mut VteTerminal) -> *const c_char;
    pub fn vte_terminal_get_current_file_uri(terminal: *mut VteTerminal) -> *const c_char;
    pub fn vte_terminal_get_cursor_blink_mode(terminal: *mut VteTerminal) -> VteCursorBlinkMode;
    pub fn vte_terminal_get_cursor_position(
        terminal: *mut VteTerminal,
        column: *mut c_long,
        row: *mut c_long,
    );
    pub fn vte_terminal_get_cursor_shape(terminal: *mut VteTerminal) -> VteCursorShape;
    pub fn vte_terminal_get_enable_a11y(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_enable_bidi(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_enable_fallback_scrolling(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_enable_legacy_osc777(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_enable_shaping(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_enable_sixel(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_encoding(terminal: *mut VteTerminal) -> *const c_char;
    pub fn vte_terminal_get_font(terminal: *mut VteTerminal) -> *const pango::PangoFontDescription;
    pub fn vte_terminal_get_font_options(
        terminal: *mut VteTerminal,
    ) -> *const cairo::cairo_font_options_t;
    pub fn vte_terminal_get_font_scale(terminal: *mut VteTerminal) -> c_double;
    pub fn vte_terminal_get_geometry_hints(
        terminal: *mut VteTerminal,
        hints: *mut gdk::GdkGeometry,
        min_rows: c_int,
        min_columns: c_int,
    );
    pub fn vte_terminal_get_has_selection(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_icon_title(terminal: *mut VteTerminal) -> *const c_char;
    pub fn vte_terminal_get_input_enabled(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_mouse_autohide(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_pty(terminal: *mut VteTerminal) -> *mut VtePty;
    pub fn vte_terminal_get_rewrap_on_resize(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_row_count(terminal: *mut VteTerminal) -> c_long;
    pub fn vte_terminal_get_scroll_on_insert(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_scroll_on_keystroke(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_scroll_on_output(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_scroll_unit_is_pixels(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_scrollback_lines(terminal: *mut VteTerminal) -> c_long;
    pub fn vte_terminal_get_termprop_bool(
        terminal: *mut VteTerminal,
        prop: *const c_char,
        valuep: *mut gboolean,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_bool_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
        valuep: *mut gboolean,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_data(
        terminal: *mut VteTerminal,
        prop: *const c_char,
        size: *mut size_t,
    ) -> *const u8;
    pub fn vte_terminal_get_termprop_data_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
        size: *mut size_t,
    ) -> *const u8;
    pub fn vte_terminal_get_termprop_double(
        terminal: *mut VteTerminal,
        prop: *const c_char,
        valuep: *mut c_double,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_double_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
        valuep: *mut c_double,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_enum(
        terminal: *mut VteTerminal,
        prop: *const c_char,
        gtype: GType,
        valuep: *mut i64,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_enum_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
        gtype: GType,
        valuep: *mut i64,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_flags(
        terminal: *mut VteTerminal,
        prop: *const c_char,
        gtype: GType,
        ignore_unknown_flags: gboolean,
        valuep: *mut u64,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_flags_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
        gtype: GType,
        ignore_unknown_flags: gboolean,
        valuep: *mut u64,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_int(
        terminal: *mut VteTerminal,
        prop: *const c_char,
        valuep: *mut i64,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_int_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
        valuep: *mut i64,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_rgba(
        terminal: *mut VteTerminal,
        prop: *const c_char,
        color: *mut gdk::GdkRGBA,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_rgba_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
        color: *mut gdk::GdkRGBA,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_string(
        terminal: *mut VteTerminal,
        prop: *const c_char,
        size: *mut size_t,
    ) -> *const c_char;
    pub fn vte_terminal_get_termprop_string_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
        size: *mut size_t,
    ) -> *const c_char;
    pub fn vte_terminal_get_termprop_uint(
        terminal: *mut VteTerminal,
        prop: *const c_char,
        valuep: *mut u64,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_uint_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
        valuep: *mut u64,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_value(
        terminal: *mut VteTerminal,
        prop: *const c_char,
        gvalue: *mut gobject::GValue,
    ) -> gboolean;
    pub fn vte_terminal_get_termprop_value_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
        gvalue: *mut gobject::GValue,
    ) -> gboolean;
    pub fn vte_terminal_get_termprops(terminal: *mut VteTerminal) -> *const VteProperties;
    pub fn vte_terminal_get_text(
        terminal: *mut VteTerminal,
        is_selected: VteSelectionFunc,
        user_data: gpointer,
        attributes: *mut glib::GArray,
    ) -> *mut c_char;
    pub fn vte_terminal_get_text_blink_mode(terminal: *mut VteTerminal) -> VteTextBlinkMode;
    pub fn vte_terminal_get_text_format(
        terminal: *mut VteTerminal,
        format: VteFormat,
    ) -> *mut c_char;
    pub fn vte_terminal_get_text_include_trailing_spaces(
        terminal: *mut VteTerminal,
        is_selected: VteSelectionFunc,
        user_data: gpointer,
        attributes: *mut glib::GArray,
    ) -> *mut c_char;
    pub fn vte_terminal_get_text_range(
        terminal: *mut VteTerminal,
        start_row: c_long,
        start_col: c_long,
        end_row: c_long,
        end_col: c_long,
        is_selected: VteSelectionFunc,
        user_data: gpointer,
        attributes: *mut glib::GArray,
    ) -> *mut c_char;
    pub fn vte_terminal_get_text_range_format(
        terminal: *mut VteTerminal,
        format: VteFormat,
        start_row: c_long,
        start_col: c_long,
        end_row: c_long,
        end_col: c_long,
        length: *mut size_t,
    ) -> *mut c_char;
    pub fn vte_terminal_get_text_selected(
        terminal: *mut VteTerminal,
        format: VteFormat,
    ) -> *mut c_char;
    pub fn vte_terminal_get_text_selected_full(
        terminal: *mut VteTerminal,
        format: VteFormat,
        length: *mut size_t,
    ) -> *mut c_char;
    pub fn vte_terminal_get_window_title(terminal: *mut VteTerminal) -> *const c_char;
    pub fn vte_terminal_get_word_char_exceptions(terminal: *mut VteTerminal) -> *const c_char;
    pub fn vte_terminal_get_xalign(terminal: *mut VteTerminal) -> VteAlign;
    pub fn vte_terminal_get_xfill(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_get_yalign(terminal: *mut VteTerminal) -> VteAlign;
    pub fn vte_terminal_get_yfill(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_hyperlink_check_event(
        terminal: *mut VteTerminal,
        event: *mut gdk::GdkEvent,
    ) -> *mut c_char;
    pub fn vte_terminal_match_add_gregex(
        terminal: *mut VteTerminal,
        gregex: *mut glib::GRegex,
        gflags: glib::GRegexMatchFlags,
    ) -> c_int;
    pub fn vte_terminal_match_add_regex(
        terminal: *mut VteTerminal,
        regex: *mut VteRegex,
        flags: u32,
    ) -> c_int;
    pub fn vte_terminal_match_check(
        terminal: *mut VteTerminal,
        column: c_long,
        row: c_long,
        tag: *mut c_int,
    ) -> *mut c_char;
    pub fn vte_terminal_match_check_event(
        terminal: *mut VteTerminal,
        event: *mut gdk::GdkEvent,
        tag: *mut c_int,
    ) -> *mut c_char;
    pub fn vte_terminal_match_remove(terminal: *mut VteTerminal, tag: c_int);
    pub fn vte_terminal_match_remove_all(terminal: *mut VteTerminal);
    pub fn vte_terminal_match_set_cursor(
        terminal: *mut VteTerminal,
        tag: c_int,
        cursor: *mut gdk::GdkCursor,
    );
    pub fn vte_terminal_match_set_cursor_name(
        terminal: *mut VteTerminal,
        tag: c_int,
        cursor_name: *const c_char,
    );
    pub fn vte_terminal_match_set_cursor_type(
        terminal: *mut VteTerminal,
        tag: c_int,
        cursor_type: gdk::GdkCursorType,
    );
    pub fn vte_terminal_paste_clipboard(terminal: *mut VteTerminal);
    pub fn vte_terminal_paste_primary(terminal: *mut VteTerminal);
    pub fn vte_terminal_paste_text(terminal: *mut VteTerminal, text: *const c_char);
    pub fn vte_terminal_pty_new_sync(
        terminal: *mut VteTerminal,
        flags: VtePtyFlags,
        cancellable: *mut gio::GCancellable,
        error: *mut *mut glib::GError,
    ) -> *mut VtePty;
    pub fn vte_terminal_ref_termprop_data_bytes(
        terminal: *mut VteTerminal,
        prop: *const c_char,
    ) -> *mut glib::GBytes;
    pub fn vte_terminal_ref_termprop_data_bytes_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
    ) -> *mut glib::GBytes;
    pub fn vte_terminal_ref_termprop_image_pixbuf(
        terminal: *mut VteTerminal,
        prop: *const c_char,
    ) -> *mut gdk_pixbuf::GdkPixbuf;
    pub fn vte_terminal_ref_termprop_image_pixbuf_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
    ) -> *mut gdk_pixbuf::GdkPixbuf;
    pub fn vte_terminal_ref_termprop_image_surface(
        terminal: *mut VteTerminal,
        prop: *const c_char,
    ) -> *mut cairo::cairo_surface_t;
    pub fn vte_terminal_ref_termprop_image_surface_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
    ) -> *mut cairo::cairo_surface_t;
    pub fn vte_terminal_ref_termprop_uri(
        terminal: *mut VteTerminal,
        prop: *const c_char,
    ) -> *mut glib::GUri;
    pub fn vte_terminal_ref_termprop_uri_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
    ) -> *mut glib::GUri;
    pub fn vte_terminal_ref_termprop_variant(
        terminal: *mut VteTerminal,
        prop: *const c_char,
    ) -> *mut glib::GVariant;
    pub fn vte_terminal_ref_termprop_variant_by_id(
        terminal: *mut VteTerminal,
        prop: c_int,
    ) -> *mut glib::GVariant;
    pub fn vte_terminal_reset(
        terminal: *mut VteTerminal,
        clear_tabstops: gboolean,
        clear_history: gboolean,
    );
    pub fn vte_terminal_reset_termprop(terminal: *mut VteTerminal, prop: *const c_char);
    pub fn vte_terminal_reset_termprop_by_id(terminal: *mut VteTerminal, prop: c_int);
    pub fn vte_terminal_search_find_next(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_search_find_previous(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_search_get_gregex(terminal: *mut VteTerminal) -> *mut glib::GRegex;
    pub fn vte_terminal_search_get_regex(terminal: *mut VteTerminal) -> *mut VteRegex;
    pub fn vte_terminal_search_get_wrap_around(terminal: *mut VteTerminal) -> gboolean;
    pub fn vte_terminal_search_set_gregex(
        terminal: *mut VteTerminal,
        gregex: *mut glib::GRegex,
        gflags: glib::GRegexMatchFlags,
    );
    pub fn vte_terminal_search_set_regex(
        terminal: *mut VteTerminal,
        regex: *mut VteRegex,
        flags: u32,
    );
    pub fn vte_terminal_search_set_wrap_around(terminal: *mut VteTerminal, wrap_around: gboolean);
    pub fn vte_terminal_select_all(terminal: *mut VteTerminal);
    pub fn vte_terminal_set_allow_bold(terminal: *mut VteTerminal, allow_bold: gboolean);
    pub fn vte_terminal_set_allow_hyperlink(terminal: *mut VteTerminal, allow_hyperlink: gboolean);
    pub fn vte_terminal_set_audible_bell(terminal: *mut VteTerminal, is_audible: gboolean);
    pub fn vte_terminal_set_backspace_binding(terminal: *mut VteTerminal, binding: VteEraseBinding);
    pub fn vte_terminal_set_bold_is_bright(terminal: *mut VteTerminal, bold_is_bright: gboolean);
    pub fn vte_terminal_set_cell_height_scale(terminal: *mut VteTerminal, scale: c_double);
    pub fn vte_terminal_set_cell_width_scale(terminal: *mut VteTerminal, scale: c_double);
    pub fn vte_terminal_set_cjk_ambiguous_width(terminal: *mut VteTerminal, width: c_int);
    pub fn vte_terminal_set_clear_background(terminal: *mut VteTerminal, setting: gboolean);
    pub fn vte_terminal_set_color_background(
        terminal: *mut VteTerminal,
        background: *const gdk::GdkRGBA,
    );
    pub fn vte_terminal_set_color_bold(terminal: *mut VteTerminal, bold: *const gdk::GdkRGBA);
    pub fn vte_terminal_set_color_cursor(
        terminal: *mut VteTerminal,
        cursor_background: *const gdk::GdkRGBA,
    );
    pub fn vte_terminal_set_color_cursor_foreground(
        terminal: *mut VteTerminal,
        cursor_foreground: *const gdk::GdkRGBA,
    );
    pub fn vte_terminal_set_color_foreground(
        terminal: *mut VteTerminal,
        foreground: *const gdk::GdkRGBA,
    );
    pub fn vte_terminal_set_color_highlight(
        terminal: *mut VteTerminal,
        highlight_background: *const gdk::GdkRGBA,
    );
    pub fn vte_terminal_set_color_highlight_foreground(
        terminal: *mut VteTerminal,
        highlight_foreground: *const gdk::GdkRGBA,
    );
    pub fn vte_terminal_set_colors(
        terminal: *mut VteTerminal,
        foreground: *const gdk::GdkRGBA,
        background: *const gdk::GdkRGBA,
        palette: *const gdk::GdkRGBA,
        palette_size: size_t,
    );
    pub fn vte_terminal_set_context_menu(terminal: *mut VteTerminal, menu: *mut gtk::GtkWidget);
    pub fn vte_terminal_set_context_menu_model(
        terminal: *mut VteTerminal,
        model: *mut gio::GMenuModel,
    );
    pub fn vte_terminal_set_cursor_blink_mode(terminal: *mut VteTerminal, mode: VteCursorBlinkMode);
    pub fn vte_terminal_set_cursor_shape(terminal: *mut VteTerminal, shape: VteCursorShape);
    pub fn vte_terminal_set_default_colors(terminal: *mut VteTerminal);
    pub fn vte_terminal_set_delete_binding(terminal: *mut VteTerminal, binding: VteEraseBinding);
    pub fn vte_terminal_set_enable_a11y(terminal: *mut VteTerminal, enable_a11y: gboolean);
    pub fn vte_terminal_set_enable_bidi(terminal: *mut VteTerminal, enable_bidi: gboolean);
    pub fn vte_terminal_set_enable_fallback_scrolling(terminal: *mut VteTerminal, enable: gboolean);
    pub fn vte_terminal_set_enable_legacy_osc777(terminal: *mut VteTerminal, enable: gboolean);
    pub fn vte_terminal_set_enable_shaping(terminal: *mut VteTerminal, enable_shaping: gboolean);
    pub fn vte_terminal_set_enable_sixel(terminal: *mut VteTerminal, enabled: gboolean);
    pub fn vte_terminal_set_encoding(
        terminal: *mut VteTerminal,
        codeset: *const c_char,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn vte_terminal_set_font(
        terminal: *mut VteTerminal,
        font_desc: *const pango::PangoFontDescription,
    );
    pub fn vte_terminal_set_font_options(
        terminal: *mut VteTerminal,
        font_options: *const cairo::cairo_font_options_t,
    );
    pub fn vte_terminal_set_font_scale(terminal: *mut VteTerminal, scale: c_double);
    pub fn vte_terminal_set_geometry_hints_for_window(
        terminal: *mut VteTerminal,
        window: *mut gtk::GtkWindow,
    );
    pub fn vte_terminal_set_input_enabled(terminal: *mut VteTerminal, enabled: gboolean);
    pub fn vte_terminal_set_mouse_autohide(terminal: *mut VteTerminal, setting: gboolean);
    pub fn vte_terminal_set_pty(terminal: *mut VteTerminal, pty: *mut VtePty);
    pub fn vte_terminal_set_rewrap_on_resize(terminal: *mut VteTerminal, rewrap: gboolean);
    pub fn vte_terminal_set_scroll_on_insert(terminal: *mut VteTerminal, scroll: gboolean);
    pub fn vte_terminal_set_scroll_on_keystroke(terminal: *mut VteTerminal, scroll: gboolean);
    pub fn vte_terminal_set_scroll_on_output(terminal: *mut VteTerminal, scroll: gboolean);
    pub fn vte_terminal_set_scroll_unit_is_pixels(terminal: *mut VteTerminal, enable: gboolean);
    pub fn vte_terminal_set_scrollback_lines(terminal: *mut VteTerminal, lines: c_long);
    pub fn vte_terminal_set_size(terminal: *mut VteTerminal, columns: c_long, rows: c_long);
    pub fn vte_terminal_set_suppress_legacy_signals(terminal: *mut VteTerminal);
    pub fn vte_terminal_set_text_blink_mode(
        terminal: *mut VteTerminal,
        text_blink_mode: VteTextBlinkMode,
    );
    pub fn vte_terminal_set_word_char_exceptions(
        terminal: *mut VteTerminal,
        exceptions: *const c_char,
    );
    pub fn vte_terminal_set_xalign(terminal: *mut VteTerminal, align: VteAlign);
    pub fn vte_terminal_set_xfill(terminal: *mut VteTerminal, fill: gboolean);
    pub fn vte_terminal_set_yalign(terminal: *mut VteTerminal, align: VteAlign);
    pub fn vte_terminal_set_yfill(terminal: *mut VteTerminal, fill: gboolean);
    pub fn vte_terminal_spawn_async(
        terminal: *mut VteTerminal,
        pty_flags: VtePtyFlags,
        working_directory: *const c_char,
        argv: *mut *mut c_char,
        envv: *mut *mut c_char,
        spawn_flags: glib::GSpawnFlags,
        child_setup: glib::GSpawnChildSetupFunc,
        child_setup_data: gpointer,
        child_setup_data_destroy: glib::GDestroyNotify,
        timeout: c_int,
        cancellable: *mut gio::GCancellable,
        callback: VteTerminalSpawnAsyncCallback,
        user_data: gpointer,
    );
    pub fn vte_terminal_spawn_sync(
        terminal: *mut VteTerminal,
        pty_flags: VtePtyFlags,
        working_directory: *const c_char,
        argv: *mut *mut c_char,
        envv: *mut *mut c_char,
        spawn_flags: glib::GSpawnFlags,
        child_setup: glib::GSpawnChildSetupFunc,
        child_setup_data: gpointer,
        child_pid: *mut glib::GPid,
        cancellable: *mut gio::GCancellable,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn vte_terminal_spawn_with_fds_async(
        terminal: *mut VteTerminal,
        pty_flags: VtePtyFlags,
        working_directory: *const c_char,
        argv: *const *const c_char,
        envv: *const *const c_char,
        fds: *const c_int,
        n_fds: c_int,
        map_fds: *const c_int,
        n_map_fds: c_int,
        spawn_flags: glib::GSpawnFlags,
        child_setup: glib::GSpawnChildSetupFunc,
        child_setup_data: gpointer,
        child_setup_data_destroy: glib::GDestroyNotify,
        timeout: c_int,
        cancellable: *mut gio::GCancellable,
        callback: VteTerminalSpawnAsyncCallback,
        user_data: gpointer,
    );
    pub fn vte_terminal_unselect_all(terminal: *mut VteTerminal);
    pub fn vte_terminal_watch_child(terminal: *mut VteTerminal, child_pid: glib::GPid);
    pub fn vte_terminal_write_contents_sync(
        terminal: *mut VteTerminal,
        stream: *mut gio::GOutputStream,
        flags: VteWriteFlags,
        cancellable: *mut gio::GCancellable,
        error: *mut *mut glib::GError,
    ) -> gboolean;

    //=========================================================================
    // Other functions
    //=========================================================================
    pub fn vte_get_encoding_supported(encoding: *const c_char) -> gboolean;
    pub fn vte_get_encodings(include_aliases: gboolean) -> *mut *mut c_char;
    pub fn vte_get_feature_flags() -> VteFeatureFlags;
    pub fn vte_get_features() -> *const c_char;
    pub fn vte_get_major_version() -> c_uint;
    pub fn vte_get_micro_version() -> c_uint;
    pub fn vte_get_minor_version() -> c_uint;
    pub fn vte_get_termprops(length: *mut size_t) -> *mut *const c_char;
    pub fn vte_get_termprops_registry() -> *const VtePropertiesRegistry;
    pub fn vte_get_test_flags() -> u64;
    pub fn vte_get_user_shell() -> *mut c_char;
    pub fn vte_install_termprop(
        name: *const c_char,
        type_: VtePropertyType,
        flags: VtePropertyFlags,
    ) -> c_int;
    pub fn vte_install_termprop_alias(name: *const c_char, target_name: *const c_char) -> c_int;
    pub fn vte_properties_get_type() -> GType;
    pub fn vte_query_termprop(
        name: *const c_char,
        resolved_name: *mut *const c_char,
        prop: *mut c_int,
        type_: *mut VtePropertyType,
        flags: *mut VtePropertyFlags,
    ) -> gboolean;
    pub fn vte_query_termprop_by_id(
        prop: c_int,
        name: *mut *const c_char,
        type_: *mut VtePropertyType,
        flags: *mut VtePropertyFlags,
    ) -> gboolean;
    pub fn vte_set_test_flags(flags: u64);

}