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
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
// Generated by gir (https://github.com/gtk-rs/gir @ c537d4a59043)
// from
// from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)
// 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 babl_sys as babl;
use glib_sys as glib;
use gobject_sys as gobject;

#[allow(unused_imports)]
use libc::{
    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
    intptr_t, size_t, ssize_t, uintptr_t, FILE,
};

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

// Enums
pub type GeglAbyssPolicy = c_int;
pub const GEGL_ABYSS_NONE: GeglAbyssPolicy = 0;
pub const GEGL_ABYSS_CLAMP: GeglAbyssPolicy = 1;
pub const GEGL_ABYSS_LOOP: GeglAbyssPolicy = 2;
pub const GEGL_ABYSS_BLACK: GeglAbyssPolicy = 3;
pub const GEGL_ABYSS_WHITE: GeglAbyssPolicy = 4;

pub type GeglBablVariant = c_int;
pub const GEGL_BABL_VARIANT_FLOAT: GeglBablVariant = 0;
pub const GEGL_BABL_VARIANT_LINEAR: GeglBablVariant = 1;
pub const GEGL_BABL_VARIANT_NONLINEAR: GeglBablVariant = 2;
pub const GEGL_BABL_VARIANT_PERCEPTUAL: GeglBablVariant = 3;
pub const GEGL_BABL_VARIANT_LINEAR_PREMULTIPLIED: GeglBablVariant = 4;
pub const GEGL_BABL_VARIANT_PERCEPTUAL_PREMULTIPLIED: GeglBablVariant = 5;
pub const GEGL_BABL_VARIANT_LINEAR_PREMULTIPLIED_IF_ALPHA: GeglBablVariant = 6;
pub const GEGL_BABL_VARIANT_PERCEPTUAL_PREMULTIPLIED_IF_ALPHA: GeglBablVariant = 7;
pub const GEGL_BABL_VARIANT_ALPHA: GeglBablVariant = 8;

pub type GeglCachePolicy = c_int;
pub const GEGL_CACHE_POLICY_AUTO: GeglCachePolicy = 0;
pub const GEGL_CACHE_POLICY_NEVER: GeglCachePolicy = 1;
pub const GEGL_CACHE_POLICY_ALWAYS: GeglCachePolicy = 2;

pub type GeglDistanceMetric = c_int;
pub const GEGL_DISTANCE_METRIC_EUCLIDEAN: GeglDistanceMetric = 0;
pub const GEGL_DISTANCE_METRIC_MANHATTAN: GeglDistanceMetric = 1;
pub const GEGL_DISTANCE_METRIC_CHEBYSHEV: GeglDistanceMetric = 2;

pub type GeglDitherMethod = c_int;
pub const GEGL_DITHER_NONE: GeglDitherMethod = 0;
pub const GEGL_DITHER_FLOYD_STEINBERG: GeglDitherMethod = 1;
pub const GEGL_DITHER_BAYER: GeglDitherMethod = 2;
pub const GEGL_DITHER_RANDOM: GeglDitherMethod = 3;
pub const GEGL_DITHER_RANDOM_COVARIANT: GeglDitherMethod = 4;
pub const GEGL_DITHER_ARITHMETIC_ADD: GeglDitherMethod = 5;
pub const GEGL_DITHER_ARITHMETIC_ADD_COVARIANT: GeglDitherMethod = 6;
pub const GEGL_DITHER_ARITHMETIC_XOR: GeglDitherMethod = 7;
pub const GEGL_DITHER_ARITHMETIC_XOR_COVARIANT: GeglDitherMethod = 8;
pub const GEGL_DITHER_BLUE_NOISE: GeglDitherMethod = 9;
pub const GEGL_DITHER_BLUE_NOISE_COVARIANT: GeglDitherMethod = 10;

pub type GeglMapFlags = c_int;
pub const GEGL_MAP_EXCLUDE_UNMAPPED: GeglMapFlags = 1;

pub type GeglOrientation = c_int;
pub const GEGL_ORIENTATION_HORIZONTAL: GeglOrientation = 0;
pub const GEGL_ORIENTATION_VERTICAL: GeglOrientation = 1;

pub type GeglRectangleAlignment = c_int;
pub const GEGL_RECTANGLE_ALIGNMENT_SUBSET: GeglRectangleAlignment = 0;
pub const GEGL_RECTANGLE_ALIGNMENT_SUPERSET: GeglRectangleAlignment = 1;
pub const GEGL_RECTANGLE_ALIGNMENT_NEAREST: GeglRectangleAlignment = 2;

pub type GeglResolutionUnit = c_int;
pub const GEGL_RESOLUTION_UNIT_NONE: GeglResolutionUnit = 0;
pub const GEGL_RESOLUTION_UNIT_DPI: GeglResolutionUnit = 1;
pub const GEGL_RESOLUTION_UNIT_DPM: GeglResolutionUnit = 2;

pub type GeglSamplerType = c_int;
pub const GEGL_SAMPLER_NEAREST: GeglSamplerType = 0;
pub const GEGL_SAMPLER_LINEAR: GeglSamplerType = 1;
pub const GEGL_SAMPLER_CUBIC: GeglSamplerType = 2;
pub const GEGL_SAMPLER_NOHALO: GeglSamplerType = 3;
pub const GEGL_SAMPLER_LOHALO: GeglSamplerType = 4;

pub type GeglSplitStrategy = c_int;
pub const GEGL_SPLIT_STRATEGY_AUTO: GeglSplitStrategy = 0;
pub const GEGL_SPLIT_STRATEGY_HORIZONTAL: GeglSplitStrategy = 1;
pub const GEGL_SPLIT_STRATEGY_VERTICAL: GeglSplitStrategy = 2;

pub type GeglTileCommand = c_int;
pub const GEGL_TILE_IDLE: GeglTileCommand = 0;
pub const GEGL_TILE_SET: GeglTileCommand = 1;
pub const GEGL_TILE_GET: GeglTileCommand = 2;
pub const GEGL_TILE_IS_CACHED: GeglTileCommand = 3;
pub const GEGL_TILE_EXIST: GeglTileCommand = 4;
pub const GEGL_TILE_VOID: GeglTileCommand = 5;
pub const GEGL_TILE_FLUSH: GeglTileCommand = 6;
pub const GEGL_TILE_REFETCH: GeglTileCommand = 7;
pub const GEGL_TILE_REINIT: GeglTileCommand = 8;
pub const _GEGL_TILE_LAST_0_4_8_COMMAND: GeglTileCommand = 9;
pub const GEGL_TILE_COPY: GeglTileCommand = 9;
pub const GEGL_TILE_LAST_COMMAND: GeglTileCommand = 10;

// Constants
pub const GEGL_AUTO_ROWSTRIDE: c_int = 0;
pub const GEGL_CH_BACK_CENTER: c_int = 256;
pub const GEGL_CH_BACK_LEFT: c_int = 16;
pub const GEGL_CH_BACK_RIGHT: c_int = 32;
pub const GEGL_CH_FRONT_CENTER: c_int = 4;
pub const GEGL_CH_FRONT_LEFT: c_int = 1;
pub const GEGL_CH_FRONT_LEFT_OF_CENTER: c_int = 64;
pub const GEGL_CH_FRONT_RIGHT: c_int = 2;
pub const GEGL_CH_FRONT_RIGHT_OF_CENTER: c_int = 128;
pub const GEGL_CH_LAYOUT_2POINT1: c_int = 11;
pub const GEGL_CH_LAYOUT_2_1: c_int = 259;
pub const GEGL_CH_LAYOUT_2_2: c_int = 1539;
pub const GEGL_CH_LAYOUT_3POINT1: c_int = 15;
pub const GEGL_CH_LAYOUT_4POINT0: c_int = 263;
pub const GEGL_CH_LAYOUT_4POINT1: c_int = 271;
pub const GEGL_CH_LAYOUT_5POINT0: c_int = 1543;
pub const GEGL_CH_LAYOUT_5POINT0_BACK: c_int = 55;
pub const GEGL_CH_LAYOUT_5POINT1: c_int = 1551;
pub const GEGL_CH_LAYOUT_5POINT1_BACK: c_int = 63;
pub const GEGL_CH_LAYOUT_6POINT0: c_int = 1799;
pub const GEGL_CH_LAYOUT_6POINT0_FRONT: c_int = 1731;
pub const GEGL_CH_LAYOUT_6POINT1: c_int = 1807;
pub const GEGL_CH_LAYOUT_6POINT1_BACK: c_int = 319;
pub const GEGL_CH_LAYOUT_6POINT1_FRONT: c_int = 1739;
pub const GEGL_CH_LAYOUT_7POINT0: c_int = 1591;
pub const GEGL_CH_LAYOUT_7POINT0_FRONT: c_int = 1735;
pub const GEGL_CH_LAYOUT_7POINT1: c_int = 1599;
pub const GEGL_CH_LAYOUT_7POINT1_WIDE: c_int = 1743;
pub const GEGL_CH_LAYOUT_7POINT1_WIDE_BACK: c_int = 255;
pub const GEGL_CH_LAYOUT_HEXADECAGONAL: c_long = 6442710839;
pub const GEGL_CH_LAYOUT_HEXAGONAL: c_int = 311;
pub const GEGL_CH_LAYOUT_NATIVE: u64 = 9223372036854775808;
pub const GEGL_CH_LAYOUT_OCTAGONAL: c_int = 1847;
pub const GEGL_CH_LAYOUT_QUAD: c_int = 51;
pub const GEGL_CH_LAYOUT_STEREO: c_int = 3;
pub const GEGL_CH_LAYOUT_STEREO_DOWNMIX: c_int = 1610612736;
pub const GEGL_CH_LAYOUT_SURROUND: c_int = 7;
pub const GEGL_CH_LOW_FREQUENCY: c_int = 8;
pub const GEGL_CH_LOW_FREQUENCY_2: c_long = 34359738368;
pub const GEGL_CH_SIDE_LEFT: c_int = 512;
pub const GEGL_CH_SIDE_RIGHT: c_int = 1024;
pub const GEGL_CH_STEREO_LEFT: c_int = 536870912;
pub const GEGL_CH_STEREO_RIGHT: c_int = 1073741824;
pub const GEGL_CH_SURROUND_DIRECT_LEFT: c_long = 8589934592;
pub const GEGL_CH_SURROUND_DIRECT_RIGHT: c_long = 17179869184;
pub const GEGL_CH_TOP_BACK_CENTER: c_int = 65536;
pub const GEGL_CH_TOP_BACK_LEFT: c_int = 32768;
pub const GEGL_CH_TOP_BACK_RIGHT: c_int = 131072;
pub const GEGL_CH_TOP_CENTER: c_int = 2048;
pub const GEGL_CH_TOP_FRONT_CENTER: c_int = 8192;
pub const GEGL_CH_TOP_FRONT_LEFT: c_int = 4096;
pub const GEGL_CH_TOP_FRONT_RIGHT: c_int = 16384;
pub const GEGL_CH_WIDE_LEFT: c_long = 2147483648;
pub const GEGL_CH_WIDE_RIGHT: c_long = 4294967296;
pub const GEGL_FLOAT_EPSILON: c_double = 0.000010;
pub const GEGL_LOOKUP_MAX_ENTRIES: c_int = 819200;
pub const GEGL_MAX_AUDIO_CHANNELS: c_int = 8;

// Flags
pub type GeglAccessMode = c_uint;
pub const GEGL_ACCESS_READ: GeglAccessMode = 1;
pub const GEGL_ACCESS_WRITE: GeglAccessMode = 2;
pub const GEGL_ACCESS_READWRITE: GeglAccessMode = 3;

pub type GeglBlitFlags = c_uint;
pub const GEGL_BLIT_DEFAULT: GeglBlitFlags = 0;
pub const GEGL_BLIT_CACHE: GeglBlitFlags = 1;
pub const GEGL_BLIT_DIRTY: GeglBlitFlags = 2;

pub type GeglPadType = c_uint;
pub const GEGL_PARAM_PAD_OUTPUT: GeglPadType = 256;
pub const GEGL_PARAM_PAD_INPUT: GeglPadType = 512;

pub type GeglSerializeFlag = c_uint;
pub const GEGL_SERIALIZE_TRIM_DEFAULTS: GeglSerializeFlag = 1;
pub const GEGL_SERIALIZE_VERSION: GeglSerializeFlag = 2;
pub const GEGL_SERIALIZE_INDENT: GeglSerializeFlag = 4;
pub const GEGL_SERIALIZE_BAKE_ANIM: GeglSerializeFlag = 8;

// Callbacks
pub type GeglFlattenerFunc = Option<unsafe extern "C" fn(*mut GeglPathList) -> *mut GeglPathList>;
pub type GeglLookupFunction = Option<unsafe extern "C" fn(c_float, gpointer) -> c_float>;
pub type GeglNodeFunction = Option<unsafe extern "C" fn(*const GeglPathItem, gpointer)>;
pub type GeglParallelDistributeAreaFunc =
    Option<unsafe extern "C" fn(*const GeglRectangle, gpointer)>;
pub type GeglParallelDistributeFunc = Option<unsafe extern "C" fn(c_int, c_int, gpointer)>;
pub type GeglParallelDistributeRangeFunc = Option<unsafe extern "C" fn(size_t, size_t, gpointer)>;
pub type GeglSamplerGetFun = Option<
    unsafe extern "C" fn(
        *mut GeglSampler,
        c_double,
        c_double,
        *mut GeglBufferMatrix2,
        *mut c_void,
        GeglAbyssPolicy,
    ),
>;
pub type GeglTileCallback = Option<unsafe extern "C" fn(*mut GeglTile, gpointer)>;
pub type GeglTileSourceCommand = Option<
    unsafe extern "C" fn(
        *mut GeglTileSource,
        GeglTileCommand,
        c_int,
        c_int,
        c_int,
        gpointer,
    ) -> gpointer,
>;

// Records
#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglAudioFragmentClass {
    pub parent_class: gobject::GObjectClass,
}

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

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

pub type GeglAudioFragmentPrivate = _GeglAudioFragmentPrivate;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglBufferIterator {
    pub length: c_int,
    pub priv_: *mut GeglBufferIteratorPriv,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglBufferIteratorItem {
    pub data: gpointer,
    pub roi: GeglRectangle,
}

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

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

pub type GeglBufferIteratorPriv = _GeglBufferIteratorPriv;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglBufferMatrix2 {
    pub coeff: [c_double; 4],
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglColorClass {
    pub parent_class: gobject::GObjectClass,
}

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

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

pub type GeglColorPrivate = _GeglColorPrivate;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglCurveClass {
    pub parent_class: gobject::GObjectClass,
}

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

#[repr(C)]
pub struct GeglLookup {
    pub function: GeglLookupFunction,
    pub data: gpointer,
    pub shift: c_int,
    pub positive_min: u32,
    pub positive_max: u32,
    pub negative_min: u32,
    pub negative_max: u32,
    pub bitmask: [u32; 25600],
    _truncated_record_marker: c_void,
    // /*Ignored*/field table has empty c:type
}

impl ::std::fmt::Debug for GeglLookup {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GeglLookup @ {self:p}"))
            .field("function", &self.function)
            .field("data", &self.data)
            .field("shift", &self.shift)
            .field("positive_min", &self.positive_min)
            .field("positive_max", &self.positive_max)
            .field("negative_min", &self.negative_min)
            .field("negative_max", &self.negative_max)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglMatrix3 {
    pub coeff: [c_double; 9],
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglMetadataHashClass {
    pub parent_class: GeglMetadataStoreClass,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglMetadataInterface {
    pub base_iface: gobject::GTypeInterface,
    pub register_map: Option<
        unsafe extern "C" fn(
            *mut GeglMetadata,
            *const c_char,
            c_uint,
            *const GeglMetadataMap,
            size_t,
        ),
    >,
    pub set_resolution: Option<
        unsafe extern "C" fn(
            *mut GeglMetadata,
            *mut GeglResolutionUnit,
            *mut c_float,
            *mut c_float,
        ) -> gboolean,
    >,
    pub get_resolution: Option<
        unsafe extern "C" fn(
            *mut GeglMetadata,
            *mut GeglResolutionUnit,
            *mut c_float,
            *mut c_float,
        ) -> gboolean,
    >,
    pub iter_lookup: Option<
        unsafe extern "C" fn(*mut GeglMetadata, *mut GeglMetadataIter, *const c_char) -> gboolean,
    >,
    pub iter_init: Option<unsafe extern "C" fn(*mut GeglMetadata, *mut GeglMetadataIter)>,
    pub iter_next:
        Option<unsafe extern "C" fn(*mut GeglMetadata, *mut GeglMetadataIter) -> *const c_char>,
    pub iter_set_value: Option<
        unsafe extern "C" fn(
            *mut GeglMetadata,
            *mut GeglMetadataIter,
            *mut gobject::GValue,
        ) -> gboolean,
    >,
    pub iter_get_value: Option<
        unsafe extern "C" fn(
            *mut GeglMetadata,
            *mut GeglMetadataIter,
            *mut gobject::GValue,
        ) -> gboolean,
    >,
}

impl ::std::fmt::Debug for GeglMetadataInterface {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GeglMetadataInterface @ {self:p}"))
            .field("register_map", &self.register_map)
            .field("set_resolution", &self.set_resolution)
            .field("get_resolution", &self.get_resolution)
            .field("iter_lookup", &self.iter_lookup)
            .field("iter_init", &self.iter_init)
            .field("iter_next", &self.iter_next)
            .field("iter_set_value", &self.iter_set_value)
            .field("iter_get_value", &self.iter_get_value)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglMetadataIter {
    pub stamp: c_uint,
    pub user_data: gpointer,
    pub user_data2: gpointer,
    pub user_data3: gpointer,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglMetadataMap {
    pub local_name: *const c_char,
    pub name: *const c_char,
    pub transform: gobject::GValueTransform,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglMetadataStoreClass {
    pub parent_class: gobject::GObjectClass,
    pub _declare:
        Option<unsafe extern "C" fn(*mut GeglMetadataStore, *mut gobject::GParamSpec, gboolean)>,
    pub pspec: Option<
        unsafe extern "C" fn(*mut GeglMetadataStore, *const c_char) -> *mut gobject::GParamSpec,
    >,
    pub set_value:
        Option<unsafe extern "C" fn(*mut GeglMetadataStore, *const c_char, *const gobject::GValue)>,
    pub _get_value: Option<
        unsafe extern "C" fn(*mut GeglMetadataStore, *const c_char) -> *const gobject::GValue,
    >,
    pub has_value: Option<unsafe extern "C" fn(*mut GeglMetadataStore, *const c_char) -> gboolean>,
    pub register_hook: Option<unsafe extern "C" fn(*mut GeglMetadataStore, *const c_char, c_uint)>,
    pub parse_value: Option<
        unsafe extern "C" fn(
            *mut GeglMetadataStore,
            *mut gobject::GParamSpec,
            gobject::GValueTransform,
            *mut gobject::GValue,
        ) -> gboolean,
    >,
    pub generate_value: Option<
        unsafe extern "C" fn(
            *mut GeglMetadataStore,
            *mut gobject::GParamSpec,
            gobject::GValueTransform,
            *mut gobject::GValue,
        ) -> gboolean,
    >,
    pub padding: [gpointer; 4],
}

impl ::std::fmt::Debug for GeglMetadataStoreClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GeglMetadataStoreClass @ {self:p}"))
            .field("_declare", &self._declare)
            .field("pspec", &self.pspec)
            .field("set_value", &self.set_value)
            .field("_get_value", &self._get_value)
            .field("has_value", &self.has_value)
            .field("register_hook", &self.register_hook)
            .field("parse_value", &self.parse_value)
            .field("generate_value", &self.generate_value)
            .finish()
    }
}

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

pub type GeglOperationContext = _GeglOperationContext;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglParamSpecDouble {
    pub parent_instance: gobject::GParamSpecDouble,
    pub ui_minimum: c_double,
    pub ui_maximum: c_double,
    pub ui_gamma: c_double,
    pub ui_step_small: c_double,
    pub ui_step_big: c_double,
    pub ui_digits: c_int,
}

impl ::std::fmt::Debug for GeglParamSpecDouble {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GeglParamSpecDouble @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .field("ui_minimum", &self.ui_minimum)
            .field("ui_maximum", &self.ui_maximum)
            .field("ui_gamma", &self.ui_gamma)
            .field("ui_step_small", &self.ui_step_small)
            .field("ui_step_big", &self.ui_step_big)
            .field("ui_digits", &self.ui_digits)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglParamSpecEnum {
    pub parent_instance: gobject::GParamSpecEnum,
    pub excluded_values: *mut glib::GSList,
}

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

#[repr(C)]
pub struct GeglParamSpecFilePath {
    _truncated_record_marker: c_void,
    // /*Ignored*/field parent_instance has incomplete type
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglParamSpecFormat {
    pub parent_instance: gobject::GParamSpecPointer,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglParamSpecInt {
    pub parent_instance: gobject::GParamSpecInt,
    pub ui_minimum: c_int,
    pub ui_maximum: c_int,
    pub ui_gamma: c_double,
    pub ui_step_small: c_int,
    pub ui_step_big: c_int,
}

impl ::std::fmt::Debug for GeglParamSpecInt {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GeglParamSpecInt @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .field("ui_minimum", &self.ui_minimum)
            .field("ui_maximum", &self.ui_maximum)
            .field("ui_gamma", &self.ui_gamma)
            .field("ui_step_small", &self.ui_step_small)
            .field("ui_step_big", &self.ui_step_big)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglParamSpecSeed {
    pub parent_instance: gobject::GParamSpecUInt,
    pub ui_minimum: c_uint,
    pub ui_maximum: c_uint,
}

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

#[repr(C)]
pub struct GeglParamSpecString {
    _truncated_record_marker: c_void,
    // /*Ignored*/field parent_instance has incomplete type
}

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

#[repr(C)]
pub struct GeglParamSpecUri {
    _truncated_record_marker: c_void,
    // /*Ignored*/field parent_instance has incomplete type
}

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

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

pub type GeglPathClass = _GeglPathClass;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglPathItem {
    pub type_: c_char,
    pub point: [GeglPathPoint; 4],
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglPathList {
    pub next: *mut GeglPathList,
    pub d: GeglPathItem,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglPathPoint {
    pub x: c_float,
    pub y: c_float,
}

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglRectangle {
    pub x: c_int,
    pub y: c_int,
    pub width: c_int,
    pub height: c_int,
}

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

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

pub type GeglSampler = _GeglSampler;

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

pub type GeglTile = _GeglTile;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglTileBackendClass {
    pub parent_class: GeglTileSourceClass,
    pub padding: [gpointer; 4],
}

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

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

pub type GeglTileBackendPrivate = _GeglTileBackendPrivate;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglTileCopyParams {
    pub dst_buffer: *mut GeglBuffer,
    pub dst_x: c_int,
    pub dst_y: c_int,
    pub dst_z: c_int,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglTileHandlerClass {
    pub parent_class: GeglTileSourceClass,
}

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

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

pub type GeglTileHandlerPrivate = _GeglTileHandlerPrivate;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglTileSourceClass {
    pub parent_class: gobject::GObjectClass,
    pub padding: [gpointer; 4],
}

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

// Classes
#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglAudioFragment {
    pub parent_instance: gobject::GObject,
    pub data: [*mut c_float; 8],
    pub priv_: *mut GeglAudioFragmentPrivate,
}

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglColor {
    pub parent_instance: gobject::GObject,
    pub priv_: *mut GeglColorPrivate,
}

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglCurve {
    pub parent_instance: gobject::GObject,
}

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglMetadataStore {
    pub parent_instance: gobject::GObject,
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglPath {
    pub parent_instance: gobject::GObject,
}

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

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

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglTileBackend {
    pub parent_instance: GeglTileSource,
    pub priv_: *mut GeglTileBackendPrivate,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglTileHandler {
    pub parent_instance: GeglTileSource,
    pub source: *mut GeglTileSource,
    pub priv_: *mut GeglTileHandlerPrivate,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GeglTileSource {
    pub parent_instance: gobject::GObject,
    pub command: GeglTileSourceCommand,
    pub padding: [gpointer; 4],
}

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

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

impl ::std::fmt::Debug for GeglMetadata {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "GeglMetadata @ {self:p}")
    }
}

#[link(name = "gegl-0.4")]
extern "C" {

    //=========================================================================
    // GeglAbyssPolicy
    //=========================================================================
    pub fn gegl_abyss_policy_get_type() -> GType;

    //=========================================================================
    // GeglBablVariant
    //=========================================================================
    pub fn gegl_babl_variant_get_type() -> GType;

    //=========================================================================
    // GeglCachePolicy
    //=========================================================================
    pub fn gegl_cache_policy_get_type() -> GType;

    //=========================================================================
    // GeglDistanceMetric
    //=========================================================================
    pub fn gegl_distance_metric_get_type() -> GType;

    //=========================================================================
    // GeglDitherMethod
    //=========================================================================
    pub fn gegl_dither_method_get_type() -> GType;

    //=========================================================================
    // GeglOrientation
    //=========================================================================
    pub fn gegl_orientation_get_type() -> GType;

    //=========================================================================
    // GeglRectangleAlignment
    //=========================================================================
    pub fn gegl_rectangle_alignment_get_type() -> GType;

    //=========================================================================
    // GeglResolutionUnit
    //=========================================================================
    pub fn gegl_resolution_unit_get_type() -> GType;

    //=========================================================================
    // GeglSamplerType
    //=========================================================================
    pub fn gegl_sampler_type_get_type() -> GType;

    //=========================================================================
    // GeglAccessMode
    //=========================================================================
    pub fn gegl_access_mode_get_type() -> GType;

    //=========================================================================
    // GeglBufferIterator
    //=========================================================================
    pub fn gegl_buffer_iterator_add(
        iterator: *mut GeglBufferIterator,
        buffer: *mut GeglBuffer,
        roi: *const GeglRectangle,
        level: c_int,
        format: *const babl::Babl,
        access_mode: GeglAccessMode,
        abyss_policy: GeglAbyssPolicy,
    ) -> c_int;
    pub fn gegl_buffer_iterator_next(iterator: *mut GeglBufferIterator) -> gboolean;
    pub fn gegl_buffer_iterator_stop(iterator: *mut GeglBufferIterator);
    pub fn gegl_buffer_iterator_empty_new(max_slots: c_int) -> *mut GeglBufferIterator;

    //=========================================================================
    // GeglBufferMatrix2
    //=========================================================================
    pub fn gegl_buffer_matrix2_determinant(matrix: *mut GeglBufferMatrix2) -> c_double;
    pub fn gegl_buffer_matrix2_is_identity(matrix: *mut GeglBufferMatrix2) -> gboolean;
    pub fn gegl_buffer_matrix2_is_scale(matrix: *mut GeglBufferMatrix2) -> gboolean;

    //=========================================================================
    // GeglLookup
    //=========================================================================
    pub fn gegl_lookup_free(lookup: *mut GeglLookup);
    pub fn gegl_lookup_new(function: GeglLookupFunction, data: gpointer) -> *mut GeglLookup;
    pub fn gegl_lookup_new_full(
        function: GeglLookupFunction,
        data: gpointer,
        start: c_float,
        end: c_float,
        precision: c_float,
    ) -> *mut GeglLookup;

    //=========================================================================
    // GeglMatrix3
    //=========================================================================
    pub fn gegl_matrix3_get_type() -> GType;
    pub fn gegl_matrix3_new() -> *mut GeglMatrix3;
    pub fn gegl_matrix3_copy(matrix: *const GeglMatrix3) -> *mut GeglMatrix3;
    pub fn gegl_matrix3_copy_into(dst: *mut GeglMatrix3, src: *const GeglMatrix3);
    pub fn gegl_matrix3_determinant(matrix: *const GeglMatrix3) -> c_double;
    pub fn gegl_matrix3_equal(matrix1: *const GeglMatrix3, matrix2: *const GeglMatrix3)
        -> gboolean;
    pub fn gegl_matrix3_identity(matrix: *mut GeglMatrix3);
    pub fn gegl_matrix3_invert(matrix: *mut GeglMatrix3);
    pub fn gegl_matrix3_is_affine(matrix: *const GeglMatrix3) -> gboolean;
    pub fn gegl_matrix3_is_identity(matrix: *const GeglMatrix3) -> gboolean;
    pub fn gegl_matrix3_is_scale(matrix: *const GeglMatrix3) -> gboolean;
    pub fn gegl_matrix3_is_translate(matrix: *const GeglMatrix3) -> gboolean;
    pub fn gegl_matrix3_multiply(
        left: *const GeglMatrix3,
        right: *const GeglMatrix3,
        product: *mut GeglMatrix3,
    );
    pub fn gegl_matrix3_originate(matrix: *mut GeglMatrix3, x: c_double, y: c_double);
    pub fn gegl_matrix3_parse_string(matrix: *mut GeglMatrix3, string: *const c_char);
    pub fn gegl_matrix3_round_error(matrix: *mut GeglMatrix3);
    pub fn gegl_matrix3_to_string(matrix: *const GeglMatrix3) -> *mut c_char;
    pub fn gegl_matrix3_transform_point(
        matrix: *const GeglMatrix3,
        x: *mut c_double,
        y: *mut c_double,
    );

    //=========================================================================
    // GeglParamSpecDouble
    //=========================================================================
    pub fn gegl_param_spec_double_set_digits(pspec: *mut GeglParamSpecDouble, digits: c_int);
    pub fn gegl_param_spec_double_set_steps(
        pspec: *mut GeglParamSpecDouble,
        small_step: c_double,
        big_step: c_double,
    );

    //=========================================================================
    // GeglParamSpecEnum
    //=========================================================================
    pub fn gegl_param_spec_enum_exclude_value(espec: *mut GeglParamSpecEnum, value: c_int);

    //=========================================================================
    // GeglParamSpecInt
    //=========================================================================
    pub fn gegl_param_spec_int_set_steps(
        pspec: *mut GeglParamSpecInt,
        small_step: c_int,
        big_step: c_int,
    );

    //=========================================================================
    // GeglPathList
    //=========================================================================
    pub fn gegl_path_list_append(head: *mut GeglPathList, ...) -> *mut GeglPathList;
    pub fn gegl_path_list_destroy(path: *mut GeglPathList) -> *mut GeglPathList;

    //=========================================================================
    // GeglPathPoint
    //=========================================================================
    pub fn gegl_path_point_dist(a: *mut GeglPathPoint, b: *mut GeglPathPoint) -> c_double;
    pub fn gegl_path_point_lerp(
        dest: *mut GeglPathPoint,
        a: *mut GeglPathPoint,
        b: *mut GeglPathPoint,
        t: c_float,
    );

    //=========================================================================
    // GeglRandom
    //=========================================================================
    pub fn gegl_random_get_type() -> GType;
    pub fn gegl_random_new() -> *mut GeglRandom;
    pub fn gegl_random_new_with_seed(seed: u32) -> *mut GeglRandom;
    pub fn gegl_random_duplicate(rand: *mut GeglRandom) -> *mut GeglRandom;
    pub fn gegl_random_float(
        rand: *const GeglRandom,
        x: c_int,
        y: c_int,
        z: c_int,
        n: c_int,
    ) -> c_float;
    pub fn gegl_random_float_range(
        rand: *const GeglRandom,
        x: c_int,
        y: c_int,
        z: c_int,
        n: c_int,
        min: c_float,
        max: c_float,
    ) -> c_float;
    pub fn gegl_random_free(rand: *mut GeglRandom);
    pub fn gegl_random_int(rand: *const GeglRandom, x: c_int, y: c_int, z: c_int, n: c_int) -> u32;
    pub fn gegl_random_int_range(
        rand: *const GeglRandom,
        x: c_int,
        y: c_int,
        z: c_int,
        n: c_int,
        min: c_int,
        max: c_int,
    ) -> i32;
    pub fn gegl_random_set_seed(rand: *mut GeglRandom, seed: u32);

    //=========================================================================
    // GeglRectangle
    //=========================================================================
    pub fn gegl_rectangle_get_type() -> GType;
    pub fn gegl_rectangle_new(
        x: c_int,
        y: c_int,
        width: c_uint,
        height: c_uint,
    ) -> *mut GeglRectangle;
    pub fn gegl_rectangle_align(
        destination: *mut GeglRectangle,
        rectangle: *const GeglRectangle,
        tile: *const GeglRectangle,
        alignment: GeglRectangleAlignment,
    ) -> gboolean;
    pub fn gegl_rectangle_align_to_buffer(
        destination: *mut GeglRectangle,
        rectangle: *const GeglRectangle,
        buffer: *mut GeglBuffer,
        alignment: GeglRectangleAlignment,
    ) -> gboolean;
    pub fn gegl_rectangle_bounding_box(
        destination: *mut GeglRectangle,
        source1: *const GeglRectangle,
        source2: *const GeglRectangle,
    );
    pub fn gegl_rectangle_contains(
        parent: *const GeglRectangle,
        child: *const GeglRectangle,
    ) -> gboolean;
    pub fn gegl_rectangle_copy(destination: *mut GeglRectangle, source: *const GeglRectangle);
    pub fn gegl_rectangle_dump(rectangle: *const GeglRectangle);
    pub fn gegl_rectangle_dup(rectangle: *const GeglRectangle) -> *mut GeglRectangle;
    pub fn gegl_rectangle_equal(
        rectangle1: *const GeglRectangle,
        rectangle2: *const GeglRectangle,
    ) -> gboolean;
    pub fn gegl_rectangle_equal_coords(
        rectangle: *const GeglRectangle,
        x: c_int,
        y: c_int,
        width: c_int,
        height: c_int,
    ) -> gboolean;
    pub fn gegl_rectangle_intersect(
        dest: *mut GeglRectangle,
        src1: *const GeglRectangle,
        src2: *const GeglRectangle,
    ) -> gboolean;
    pub fn gegl_rectangle_is_empty(rectangle: *const GeglRectangle) -> gboolean;
    pub fn gegl_rectangle_is_infinite_plane(rectangle: *const GeglRectangle) -> gboolean;
    pub fn gegl_rectangle_set(
        rectangle: *mut GeglRectangle,
        x: c_int,
        y: c_int,
        width: c_uint,
        height: c_uint,
    );
    pub fn gegl_rectangle_subtract(
        destination: *mut GeglRectangle,
        minuend: *const GeglRectangle,
        subtrahend: *const GeglRectangle,
    ) -> c_int;
    pub fn gegl_rectangle_subtract_bounding_box(
        destination: *mut GeglRectangle,
        minuend: *const GeglRectangle,
        subtrahend: *const GeglRectangle,
    ) -> gboolean;
    pub fn gegl_rectangle_xor(
        destination: *mut GeglRectangle,
        source1: *const GeglRectangle,
        source2: *const GeglRectangle,
    ) -> c_int;
    pub fn gegl_rectangle_infinite_plane() -> GeglRectangle;

    //=========================================================================
    // GeglSampler
    //=========================================================================
    pub fn gegl_sampler_get(
        sampler: *mut GeglSampler,
        x: c_double,
        y: c_double,
        scale: *mut GeglBufferMatrix2,
        output: *mut c_void,
        repeat_mode: GeglAbyssPolicy,
    );
    pub fn gegl_sampler_get_context_rect(sampler: *mut GeglSampler) -> *const GeglRectangle;
    pub fn gegl_sampler_get_fun(sampler: *mut GeglSampler) -> GeglSamplerGetFun;

    //=========================================================================
    // GeglAudioFragment
    //=========================================================================
    pub fn gegl_audio_fragment_get_type() -> GType;
    pub fn gegl_audio_fragment_new(
        sample_rate: c_int,
        channels: c_int,
        channel_layout: c_int,
        max_samples: c_int,
    ) -> *mut GeglAudioFragment;
    pub fn gegl_audio_fragment_get_channel_layout(audio: *mut GeglAudioFragment) -> c_int;
    pub fn gegl_audio_fragment_get_channels(audio: *mut GeglAudioFragment) -> c_int;
    pub fn gegl_audio_fragment_get_max_samples(audio: *mut GeglAudioFragment) -> c_int;
    pub fn gegl_audio_fragment_get_pos(audio: *mut GeglAudioFragment) -> c_int;
    pub fn gegl_audio_fragment_get_sample_count(audio: *mut GeglAudioFragment) -> c_int;
    pub fn gegl_audio_fragment_get_sample_rate(audio: *mut GeglAudioFragment) -> c_int;
    pub fn gegl_audio_fragment_set_channel_layout(
        audio: *mut GeglAudioFragment,
        channel_layout: c_int,
    );
    pub fn gegl_audio_fragment_set_channels(audio: *mut GeglAudioFragment, channels: c_int);
    pub fn gegl_audio_fragment_set_max_samples(audio: *mut GeglAudioFragment, max_samples: c_int);
    pub fn gegl_audio_fragment_set_pos(audio: *mut GeglAudioFragment, pos: c_int);
    pub fn gegl_audio_fragment_set_sample_count(audio: *mut GeglAudioFragment, sample_count: c_int);
    pub fn gegl_audio_fragment_set_sample_rate(audio: *mut GeglAudioFragment, sample_rate: c_int);

    //=========================================================================
    // GeglBuffer
    //=========================================================================
    pub fn gegl_buffer_get_type() -> GType;
    pub fn gegl_buffer_introspectable_new(
        format_name: *const c_char,
        x: c_int,
        y: c_int,
        width: c_int,
        height: c_int,
    ) -> *mut GeglBuffer;
    pub fn gegl_buffer_linear_new(
        extent: *const GeglRectangle,
        format: *const babl::Babl,
    ) -> *mut GeglBuffer;
    pub fn gegl_buffer_linear_new_from_data(
        data: gpointer,
        format: *const babl::Babl,
        extent: *const GeglRectangle,
        rowstride: c_int,
        destroy_fn: glib::GDestroyNotify,
        destroy_fn_data: gpointer,
    ) -> *mut GeglBuffer;
    pub fn gegl_buffer_new(
        extent: *const GeglRectangle,
        format: *const babl::Babl,
    ) -> *mut GeglBuffer;
    pub fn gegl_buffer_new_for_backend(
        extent: *const GeglRectangle,
        backend: *mut GeglTileBackend,
    ) -> *mut GeglBuffer;
    pub fn gegl_buffer_load(path: *const c_char) -> *mut GeglBuffer;
    pub fn gegl_buffer_open(path: *const c_char) -> *mut GeglBuffer;
    pub fn gegl_buffer_swap_create_file(suffix: *const c_char) -> *mut c_char;
    pub fn gegl_buffer_swap_has_file(path: *const c_char) -> gboolean;
    pub fn gegl_buffer_swap_remove_file(path: *const c_char);
    pub fn gegl_buffer_add_handler(buffer: *mut GeglBuffer, handler: gpointer);
    pub fn gegl_buffer_clear(buffer: *mut GeglBuffer, roi: *const GeglRectangle);
    pub fn gegl_buffer_copy(
        src: *mut GeglBuffer,
        src_rect: *const GeglRectangle,
        repeat_mode: GeglAbyssPolicy,
        dst: *mut GeglBuffer,
        dst_rect: *const GeglRectangle,
    );
    pub fn gegl_buffer_create_sub_buffer(
        buffer: *mut GeglBuffer,
        extent: *const GeglRectangle,
    ) -> *mut GeglBuffer;
    pub fn gegl_buffer_dup(buffer: *mut GeglBuffer) -> *mut GeglBuffer;
    pub fn gegl_buffer_flush(buffer: *mut GeglBuffer);
    pub fn gegl_buffer_flush_ext(buffer: *mut GeglBuffer, rect: *const GeglRectangle);
    pub fn gegl_buffer_freeze_changed(buffer: *mut GeglBuffer);
    pub fn gegl_buffer_get(
        buffer: *mut GeglBuffer,
        rect: *const GeglRectangle,
        scale: c_double,
        format: *const babl::Babl,
        dest: gpointer,
        rowstride: c_int,
        repeat_mode: GeglAbyssPolicy,
    );
    pub fn gegl_buffer_get_abyss(buffer: *mut GeglBuffer) -> *const GeglRectangle;
    pub fn gegl_buffer_get_extent(buffer: *mut GeglBuffer) -> *const GeglRectangle;
    pub fn gegl_buffer_get_format(buffer: *mut GeglBuffer) -> *const babl::Babl;
    pub fn gegl_buffer_get_tile(
        buffer: *mut GeglBuffer,
        x: c_int,
        y: c_int,
        z: c_int,
    ) -> *mut GeglTile;
    pub fn gegl_buffer_introspectable_get(
        buffer: *mut GeglBuffer,
        rect: *const GeglRectangle,
        scale: c_double,
        format_name: *const c_char,
        repeat_mode: GeglAbyssPolicy,
        data_length: *mut c_uint,
    ) -> *mut u8;
    pub fn gegl_buffer_introspectable_set(
        buffer: *mut GeglBuffer,
        rect: *const GeglRectangle,
        format_name: *const c_char,
        src: *const u8,
        src_length: c_int,
    );
    pub fn gegl_buffer_iterator_new(
        buffer: *mut GeglBuffer,
        roi: *const GeglRectangle,
        level: c_int,
        format: *const babl::Babl,
        access_mode: GeglAccessMode,
        abyss_policy: GeglAbyssPolicy,
        max_slots: c_int,
    ) -> *mut GeglBufferIterator;
    pub fn gegl_buffer_linear_close(buffer: *mut GeglBuffer, linear: gpointer);
    pub fn gegl_buffer_linear_open(
        buffer: *mut GeglBuffer,
        extent: *const GeglRectangle,
        rowstride: *mut c_int,
        format: *const babl::Babl,
    ) -> gpointer;
    pub fn gegl_buffer_remove_handler(buffer: *mut GeglBuffer, handler: gpointer);
    pub fn gegl_buffer_sample(
        buffer: *mut GeglBuffer,
        x: c_double,
        y: c_double,
        scale: *mut GeglBufferMatrix2,
        dest: gpointer,
        format: *const babl::Babl,
        sampler_type: GeglSamplerType,
        repeat_mode: GeglAbyssPolicy,
    );
    pub fn gegl_buffer_sample_at_level(
        buffer: *mut GeglBuffer,
        x: c_double,
        y: c_double,
        scale: *mut GeglBufferMatrix2,
        dest: gpointer,
        format: *const babl::Babl,
        level: c_int,
        sampler_type: GeglSamplerType,
        repeat_mode: GeglAbyssPolicy,
    );
    pub fn gegl_buffer_sample_cleanup(buffer: *mut GeglBuffer);
    pub fn gegl_buffer_sampler_new(
        buffer: *mut GeglBuffer,
        format: *const babl::Babl,
        sampler_type: GeglSamplerType,
    ) -> *mut GeglSampler;
    pub fn gegl_buffer_sampler_new_at_level(
        buffer: *mut GeglBuffer,
        format: *const babl::Babl,
        sampler_type: GeglSamplerType,
        level: c_int,
    ) -> *mut GeglSampler;
    pub fn gegl_buffer_save(
        buffer: *mut GeglBuffer,
        path: *const c_char,
        roi: *const GeglRectangle,
    );
    pub fn gegl_buffer_set(
        buffer: *mut GeglBuffer,
        rect: *const GeglRectangle,
        mipmap_level: c_int,
        format: *const babl::Babl,
        src: *mut c_void,
        rowstride: c_int,
    );
    pub fn gegl_buffer_set_abyss(buffer: *mut GeglBuffer, abyss: *const GeglRectangle) -> gboolean;
    pub fn gegl_buffer_set_color(
        buffer: *mut GeglBuffer,
        rect: *const GeglRectangle,
        color: *mut GeglColor,
    );
    pub fn gegl_buffer_set_color_from_pixel(
        buffer: *mut GeglBuffer,
        rect: *const GeglRectangle,
        pixel: gconstpointer,
        pixel_format: *const babl::Babl,
    );
    pub fn gegl_buffer_set_extent(
        buffer: *mut GeglBuffer,
        extent: *const GeglRectangle,
    ) -> gboolean;
    pub fn gegl_buffer_set_format(
        buffer: *mut GeglBuffer,
        format: *const babl::Babl,
    ) -> *const babl::Babl;
    pub fn gegl_buffer_set_pattern(
        buffer: *mut GeglBuffer,
        rect: *const GeglRectangle,
        pattern: *mut GeglBuffer,
        x_offset: c_int,
        y_offset: c_int,
    );
    pub fn gegl_buffer_share_storage(
        buffer1: *mut GeglBuffer,
        buffer2: *mut GeglBuffer,
    ) -> gboolean;
    pub fn gegl_buffer_signal_connect(
        buffer: *mut GeglBuffer,
        detailed_signal: *const c_char,
        c_handler: gobject::GCallback,
        data: gpointer,
    ) -> c_long;
    pub fn gegl_buffer_thaw_changed(buffer: *mut GeglBuffer);

    //=========================================================================
    // GeglColor
    //=========================================================================
    pub fn gegl_color_get_type() -> GType;
    pub fn gegl_color_new(string: *const c_char) -> *mut GeglColor;
    pub fn gegl_color_duplicate(color: *mut GeglColor) -> *mut GeglColor;
    pub fn gegl_color_get_components(
        color: *mut GeglColor,
        format: *mut gobject::GValue,
        components_length: *mut c_int,
    ) -> *mut c_double;
    pub fn gegl_color_get_format(color: *mut GeglColor) -> *const babl::Babl;
    pub fn gegl_color_get_pixel(
        color: *mut GeglColor,
        format: *const babl::Babl,
        pixel: *mut c_void,
    );
    pub fn gegl_color_get_rgba(
        color: *mut GeglColor,
        red: *mut c_double,
        green: *mut c_double,
        blue: *mut c_double,
        alpha: *mut c_double,
    );
    pub fn gegl_color_set_components(
        color: *mut GeglColor,
        format: *mut gobject::GValue,
        components: *mut c_double,
        components_length: c_int,
    );
    pub fn gegl_color_set_pixel(
        color: *mut GeglColor,
        format: *const babl::Babl,
        pixel: *mut c_void,
    );
    pub fn gegl_color_set_rgba(
        color: *mut GeglColor,
        red: c_double,
        green: c_double,
        blue: c_double,
        alpha: c_double,
    );

    //=========================================================================
    // GeglConfig
    //=========================================================================
    pub fn gegl_config_get_type() -> GType;

    //=========================================================================
    // GeglCurve
    //=========================================================================
    pub fn gegl_curve_get_type() -> GType;
    pub fn gegl_curve_new(y_min: c_double, y_max: c_double) -> *mut GeglCurve;
    pub fn gegl_curve_new_default() -> *mut GeglCurve;
    pub fn gegl_curve_add_point(curve: *mut GeglCurve, x: c_double, y: c_double) -> c_uint;
    pub fn gegl_curve_calc_value(curve: *mut GeglCurve, x: c_double) -> c_double;
    pub fn gegl_curve_calc_values(
        curve: *mut GeglCurve,
        x_min: c_double,
        x_max: c_double,
        num_samples: c_uint,
        xs: *mut c_double,
        ys: *mut c_double,
    );
    pub fn gegl_curve_duplicate(curve: *mut GeglCurve) -> *mut GeglCurve;
    pub fn gegl_curve_get_point(
        curve: *mut GeglCurve,
        index: c_uint,
        x: *mut c_double,
        y: *mut c_double,
    );
    pub fn gegl_curve_get_y_bounds(
        curve: *mut GeglCurve,
        min_y: *mut c_double,
        max_y: *mut c_double,
    );
    pub fn gegl_curve_num_points(curve: *mut GeglCurve) -> c_uint;
    pub fn gegl_curve_set_point(curve: *mut GeglCurve, index: c_uint, x: c_double, y: c_double);

    //=========================================================================
    // GeglMetadataHash
    //=========================================================================
    pub fn gegl_metadata_hash_get_type() -> GType;
    pub fn gegl_metadata_hash_new() -> *mut GeglMetadataStore;

    //=========================================================================
    // GeglMetadataStore
    //=========================================================================
    pub fn gegl_metadata_store_get_type() -> GType;
    pub fn gegl_metadata_store_declare(
        self_: *mut GeglMetadataStore,
        pspec: *mut gobject::GParamSpec,
    );
    pub fn gegl_metadata_store_get_artist(self_: *mut GeglMetadataStore) -> *const c_char;
    pub fn gegl_metadata_store_get_comment(self_: *mut GeglMetadataStore) -> *const c_char;
    pub fn gegl_metadata_store_get_copyright(self_: *mut GeglMetadataStore) -> *const c_char;
    pub fn gegl_metadata_store_get_description(self_: *mut GeglMetadataStore) -> *const c_char;
    pub fn gegl_metadata_store_get_disclaimer(self_: *mut GeglMetadataStore) -> *const c_char;
    pub fn gegl_metadata_store_get_file_module_name(self_: *mut GeglMetadataStore)
        -> *const c_char;
    pub fn gegl_metadata_store_get_resolution_unit(
        self_: *mut GeglMetadataStore,
    ) -> GeglResolutionUnit;
    pub fn gegl_metadata_store_get_resolution_x(self_: *mut GeglMetadataStore) -> c_double;
    pub fn gegl_metadata_store_get_resolution_y(self_: *mut GeglMetadataStore) -> c_double;
    pub fn gegl_metadata_store_get_software(self_: *mut GeglMetadataStore) -> *const c_char;
    pub fn gegl_metadata_store_get_source(self_: *mut GeglMetadataStore) -> *const c_char;
    pub fn gegl_metadata_store_get_string(
        self_: *mut GeglMetadataStore,
        name: *const c_char,
    ) -> *const c_char;
    pub fn gegl_metadata_store_get_timestamp(self_: *mut GeglMetadataStore)
        -> *mut glib::GDateTime;
    pub fn gegl_metadata_store_get_title(self_: *mut GeglMetadataStore) -> *const c_char;
    pub fn gegl_metadata_store_get_value(
        self_: *mut GeglMetadataStore,
        name: *const c_char,
        value: *mut gobject::GValue,
    );
    pub fn gegl_metadata_store_get_warning(self_: *mut GeglMetadataStore) -> *const c_char;
    pub fn gegl_metadata_store_has_value(
        self_: *mut GeglMetadataStore,
        name: *const c_char,
    ) -> gboolean;
    pub fn gegl_metadata_store_notify(
        self_: *mut GeglMetadataStore,
        pspec: *mut gobject::GParamSpec,
        shadow: gboolean,
    );
    pub fn gegl_metadata_store_register(
        self_: *mut GeglMetadataStore,
        local_name: *const c_char,
        name: *const c_char,
        transform: gobject::GValueTransform,
    );
    pub fn gegl_metadata_store_set_artist(self_: *mut GeglMetadataStore, artist: *const c_char);
    pub fn gegl_metadata_store_set_comment(self_: *mut GeglMetadataStore, comment: *const c_char);
    pub fn gegl_metadata_store_set_copyright(
        self_: *mut GeglMetadataStore,
        copyright: *const c_char,
    );
    pub fn gegl_metadata_store_set_description(
        self_: *mut GeglMetadataStore,
        description: *const c_char,
    );
    pub fn gegl_metadata_store_set_disclaimer(
        self_: *mut GeglMetadataStore,
        disclaimer: *const c_char,
    );
    pub fn gegl_metadata_store_set_resolution_unit(
        self_: *mut GeglMetadataStore,
        unit: GeglResolutionUnit,
    );
    pub fn gegl_metadata_store_set_resolution_x(
        self_: *mut GeglMetadataStore,
        resolution_x: c_double,
    );
    pub fn gegl_metadata_store_set_resolution_y(
        self_: *mut GeglMetadataStore,
        resolution_y: c_double,
    );
    pub fn gegl_metadata_store_set_software(self_: *mut GeglMetadataStore, software: *const c_char);
    pub fn gegl_metadata_store_set_source(self_: *mut GeglMetadataStore, source: *const c_char);
    pub fn gegl_metadata_store_set_string(
        self_: *mut GeglMetadataStore,
        name: *const c_char,
        string: *const c_char,
    );
    pub fn gegl_metadata_store_set_timestamp(
        self_: *mut GeglMetadataStore,
        timestamp: *const glib::GDateTime,
    );
    pub fn gegl_metadata_store_set_title(self_: *mut GeglMetadataStore, title: *const c_char);
    pub fn gegl_metadata_store_set_value(
        self_: *mut GeglMetadataStore,
        name: *const c_char,
        value: *const gobject::GValue,
    );
    pub fn gegl_metadata_store_set_warning(self_: *mut GeglMetadataStore, warning: *const c_char);
    pub fn gegl_metadata_store_typeof_value(
        self_: *mut GeglMetadataStore,
        name: *const c_char,
    ) -> GType;

    //=========================================================================
    // GeglNode
    //=========================================================================
    pub fn gegl_node_get_type() -> GType;
    pub fn gegl_node_new() -> *mut GeglNode;
    pub fn gegl_node_new_from_file(path: *const c_char) -> *mut GeglNode;
    pub fn gegl_node_new_from_serialized(
        chaindata: *const c_char,
        path_root: *const c_char,
    ) -> *mut GeglNode;
    pub fn gegl_node_new_from_xml(
        xmldata: *const c_char,
        path_root: *const c_char,
    ) -> *mut GeglNode;
    pub fn gegl_node_add_child(graph: *mut GeglNode, child: *mut GeglNode) -> *mut GeglNode;
    pub fn gegl_node_blit(
        node: *mut GeglNode,
        scale: c_double,
        roi: *const GeglRectangle,
        format: *const babl::Babl,
        destination_buf: gpointer,
        rowstride: c_int,
        flags: GeglBlitFlags,
    );
    pub fn gegl_node_blit_buffer(
        node: *mut GeglNode,
        buffer: *mut GeglBuffer,
        roi: *const GeglRectangle,
        level: c_int,
        abyss_policy: GeglAbyssPolicy,
    );
    pub fn gegl_node_connect(
        a: *mut GeglNode,
        a_pad_name: *const c_char,
        b: *mut GeglNode,
        b_pad_name: *const c_char,
    ) -> gboolean;
    pub fn gegl_node_connect_from(
        sink: *mut GeglNode,
        input_pad_name: *const c_char,
        source: *mut GeglNode,
        output_pad_name: *const c_char,
    ) -> gboolean;
    pub fn gegl_node_connect_to(
        source: *mut GeglNode,
        output_pad_name: *const c_char,
        sink: *mut GeglNode,
        input_pad_name: *const c_char,
    ) -> gboolean;
    pub fn gegl_node_create_child(parent: *mut GeglNode, operation: *const c_char)
        -> *mut GeglNode;
    pub fn gegl_node_detect(node: *mut GeglNode, x: c_int, y: c_int) -> *mut GeglNode;
    pub fn gegl_node_disconnect(node: *mut GeglNode, input_pad: *const c_char) -> gboolean;
    pub fn gegl_node_find_property(
        node: *mut GeglNode,
        property_name: *const c_char,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_node_get(node: *mut GeglNode, first_property_name: *const c_char, ...);
    pub fn gegl_node_get_bounding_box(node: *mut GeglNode) -> GeglRectangle;
    pub fn gegl_node_get_children(node: *mut GeglNode) -> *mut glib::GSList;
    pub fn gegl_node_get_consumers(
        node: *mut GeglNode,
        output_pad: *const c_char,
        nodes: *mut *mut *mut GeglNode,
        pads: *mut *mut *const c_char,
    ) -> c_int;
    pub fn gegl_node_get_gegl_operation(node: *mut GeglNode) -> *mut GeglOperation;
    pub fn gegl_node_get_input_proxy(node: *mut GeglNode, pad_name: *const c_char)
        -> *mut GeglNode;
    pub fn gegl_node_get_operation(node: *const GeglNode) -> *const c_char;
    pub fn gegl_node_get_output_proxy(
        node: *mut GeglNode,
        pad_name: *const c_char,
    ) -> *mut GeglNode;
    pub fn gegl_node_get_parent(node: *mut GeglNode) -> *mut GeglNode;
    pub fn gegl_node_get_passthrough(node: *mut GeglNode) -> gboolean;
    pub fn gegl_node_get_producer(
        node: *mut GeglNode,
        input_pad_name: *const c_char,
        output_pad_name: *mut *mut c_char,
    ) -> *mut GeglNode;
    pub fn gegl_node_get_property(
        node: *mut GeglNode,
        property_name: *const c_char,
        value: *mut gobject::GValue,
    );
    //pub fn gegl_node_get_valist(node: *mut GeglNode, first_property_name: *const c_char, args: /*Unimplemented*/va_list);
    pub fn gegl_node_has_pad(node: *mut GeglNode, pad_name: *const c_char) -> gboolean;
    pub fn gegl_node_introspectable_get_bounding_box(node: *mut GeglNode) -> *mut GeglRectangle;
    pub fn gegl_node_introspectable_get_property(
        node: *mut GeglNode,
        property_name: *const c_char,
    ) -> *mut gobject::GValue;
    pub fn gegl_node_is_graph(node: *mut GeglNode) -> gboolean;
    pub fn gegl_node_link(source: *mut GeglNode, sink: *mut GeglNode);
    pub fn gegl_node_link_many(source: *mut GeglNode, first_sink: *mut GeglNode, ...);
    pub fn gegl_node_list_input_pads(node: *mut GeglNode) -> *mut *mut c_char;
    pub fn gegl_node_list_output_pads(node: *mut GeglNode) -> *mut *mut c_char;
    pub fn gegl_node_new_child(
        parent: *mut GeglNode,
        first_property_name: *const c_char,
        ...
    ) -> *mut GeglNode;
    pub fn gegl_node_new_processor(
        node: *mut GeglNode,
        rectangle: *const GeglRectangle,
    ) -> *mut GeglProcessor;
    pub fn gegl_node_process(sink_node: *mut GeglNode);
    pub fn gegl_node_progress(node: *mut GeglNode, progress: c_double, message: *mut c_char);
    pub fn gegl_node_remove_child(graph: *mut GeglNode, child: *mut GeglNode) -> *mut GeglNode;
    pub fn gegl_node_set(node: *mut GeglNode, first_property_name: *const c_char, ...);
    pub fn gegl_node_set_enum_as_string(
        node: *mut GeglNode,
        key: *const c_char,
        value: *const c_char,
    );
    pub fn gegl_node_set_passthrough(node: *mut GeglNode, passthrough: gboolean);
    pub fn gegl_node_set_property(
        node: *mut GeglNode,
        property_name: *const c_char,
        value: *const gobject::GValue,
    );
    pub fn gegl_node_set_time(node: *mut GeglNode, time: c_double);
    //pub fn gegl_node_set_valist(node: *mut GeglNode, first_property_name: *const c_char, args: /*Unimplemented*/va_list);
    pub fn gegl_node_to_xml(node: *mut GeglNode, path_root: *const c_char) -> *mut c_char;
    pub fn gegl_node_to_xml_full(
        head: *mut GeglNode,
        tail: *mut GeglNode,
        path_root: *const c_char,
    ) -> *mut c_char;

    //=========================================================================
    // GeglOperation
    //=========================================================================
    pub fn gegl_operation_get_type() -> GType;
    pub fn gegl_operation_find_property(
        operation_type: *const c_char,
        property_name: *const c_char,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_operation_get_key(
        operation_type: *const c_char,
        key_name: *const c_char,
    ) -> *const c_char;
    pub fn gegl_operation_get_op_version(op_name: *const c_char) -> *const c_char;
    pub fn gegl_operation_get_property_key(
        operation_type: *const c_char,
        property_name: *const c_char,
        property_key_name: *const c_char,
    ) -> *const c_char;
    pub fn gegl_operation_list_keys(
        operation_type: *const c_char,
        n_keys: *mut c_uint,
    ) -> *mut *mut c_char;
    pub fn gegl_operation_list_properties(
        operation_type: *const c_char,
        n_properties_p: *mut c_uint,
    ) -> *mut *mut gobject::GParamSpec;
    pub fn gegl_operation_list_property_keys(
        operation_type: *const c_char,
        property_name: *const c_char,
        n_keys: *mut c_uint,
    ) -> *mut *mut c_char;

    //=========================================================================
    // GeglParamAudioFragment
    //=========================================================================
    pub fn gegl_param_audio_fragment_get_type() -> GType;

    //=========================================================================
    // GeglParamColor
    //=========================================================================
    pub fn gegl_param_color_get_type() -> GType;

    //=========================================================================
    // GeglParamCurve
    //=========================================================================
    pub fn gegl_param_curve_get_type() -> GType;

    //=========================================================================
    // GeglParamDouble
    //=========================================================================
    pub fn gegl_param_double_get_type() -> GType;

    //=========================================================================
    // GeglParamEnum
    //=========================================================================
    pub fn gegl_param_enum_get_type() -> GType;

    //=========================================================================
    // GeglParamFilePath
    //=========================================================================
    pub fn gegl_param_file_path_get_type() -> GType;

    //=========================================================================
    // GeglParamFormat
    //=========================================================================
    pub fn gegl_param_format_get_type() -> GType;

    //=========================================================================
    // GeglParamInt
    //=========================================================================
    pub fn gegl_param_int_get_type() -> GType;

    //=========================================================================
    // GeglParamPath
    //=========================================================================
    pub fn gegl_param_path_get_type() -> GType;

    //=========================================================================
    // GeglParamSeed
    //=========================================================================
    pub fn gegl_param_seed_get_type() -> GType;

    //=========================================================================
    // GeglParamString
    //=========================================================================
    pub fn gegl_param_string_get_type() -> GType;

    //=========================================================================
    // GeglParamUri
    //=========================================================================
    pub fn gegl_param_uri_get_type() -> GType;

    //=========================================================================
    // GeglPath
    //=========================================================================
    pub fn gegl_path_get_type() -> GType;
    pub fn gegl_path_new() -> *mut GeglPath;
    pub fn gegl_path_new_from_string(instructions: *const c_char) -> *mut GeglPath;
    pub fn gegl_path_add_flattener(func: GeglFlattenerFunc);
    pub fn gegl_path_add_type(type_: c_char, items: c_int, description: *const c_char);
    pub fn gegl_path_append(path: *mut GeglPath, ...);
    pub fn gegl_path_calc(
        path: *mut GeglPath,
        pos: c_double,
        x: *mut c_double,
        y: *mut c_double,
    ) -> gboolean;
    pub fn gegl_path_calc_values(
        path: *mut GeglPath,
        num_samples: c_uint,
        xs: *mut c_double,
        ys: *mut c_double,
    );
    pub fn gegl_path_calc_y_for_x(path: *mut GeglPath, x: c_double, y: *mut c_double) -> c_int;
    pub fn gegl_path_clear(path: *mut GeglPath);
    pub fn gegl_path_closest_point(
        path: *mut GeglPath,
        x: c_double,
        y: c_double,
        on_path_x: *mut c_double,
        on_path_y: *mut c_double,
        node_pos_before: *mut c_int,
    ) -> c_double;
    pub fn gegl_path_dirty(path: *mut GeglPath);
    pub fn gegl_path_foreach(path: *mut GeglPath, each_item: GeglNodeFunction, user_data: gpointer);
    pub fn gegl_path_foreach_flat(
        path: *mut GeglPath,
        each_item: GeglNodeFunction,
        user_data: gpointer,
    );
    pub fn gegl_path_freeze(path: *mut GeglPath);
    pub fn gegl_path_get_bounds(
        self_: *mut GeglPath,
        min_x: *mut c_double,
        max_x: *mut c_double,
        min_y: *mut c_double,
        max_y: *mut c_double,
    );
    pub fn gegl_path_get_flat_path(path: *mut GeglPath) -> *mut GeglPathList;
    pub fn gegl_path_get_length(path: *mut GeglPath) -> c_double;
    pub fn gegl_path_get_matrix(path: *mut GeglPath, matrix: *mut GeglMatrix3);
    pub fn gegl_path_get_n_nodes(path: *mut GeglPath) -> c_int;
    pub fn gegl_path_get_node(
        path: *mut GeglPath,
        index: c_int,
        node: *mut GeglPathItem,
    ) -> gboolean;
    pub fn gegl_path_get_path(path: *mut GeglPath) -> *mut GeglPathList;
    pub fn gegl_path_insert_node(path: *mut GeglPath, pos: c_int, node: *const GeglPathItem);
    pub fn gegl_path_is_empty(path: *mut GeglPath) -> gboolean;
    pub fn gegl_path_parse_string(path: *mut GeglPath, instructions: *const c_char);
    pub fn gegl_path_remove_node(path: *mut GeglPath, pos: c_int);
    pub fn gegl_path_replace_node(path: *mut GeglPath, pos: c_int, node: *const GeglPathItem);
    pub fn gegl_path_set_matrix(path: *mut GeglPath, matrix: *mut GeglMatrix3);
    pub fn gegl_path_thaw(path: *mut GeglPath);
    pub fn gegl_path_to_string(path: *mut GeglPath) -> *mut c_char;

    //=========================================================================
    // GeglProcessor
    //=========================================================================
    pub fn gegl_processor_get_type() -> GType;
    pub fn gegl_processor_get_buffer(processor: *mut GeglProcessor) -> *mut GeglBuffer;
    pub fn gegl_processor_set_level(processor: *mut GeglProcessor, level: c_int);
    pub fn gegl_processor_set_rectangle(
        processor: *mut GeglProcessor,
        rectangle: *const GeglRectangle,
    );
    pub fn gegl_processor_set_scale(processor: *mut GeglProcessor, scale: c_double);
    pub fn gegl_processor_work(processor: *mut GeglProcessor, progress: *mut c_double) -> gboolean;

    //=========================================================================
    // GeglStats
    //=========================================================================
    pub fn gegl_stats_get_type() -> GType;

    //=========================================================================
    // GeglTileBackend
    //=========================================================================
    pub fn gegl_tile_backend_get_type() -> GType;
    pub fn gegl_tile_backend_unlink_swap(path: *mut c_char);
    pub fn gegl_tile_backend_command(
        backend: *mut GeglTileBackend,
        command: GeglTileCommand,
        x: c_int,
        y: c_int,
        z: c_int,
        data: gpointer,
    ) -> gpointer;
    pub fn gegl_tile_backend_get_extent(tile_backend: *mut GeglTileBackend) -> GeglRectangle;
    pub fn gegl_tile_backend_get_flush_on_destroy(tile_backend: *mut GeglTileBackend) -> gboolean;
    pub fn gegl_tile_backend_get_format(tile_backend: *mut GeglTileBackend) -> *const babl::Babl;
    pub fn gegl_tile_backend_get_tile_height(tile_backend: *mut GeglTileBackend) -> c_int;
    pub fn gegl_tile_backend_get_tile_size(tile_backend: *mut GeglTileBackend) -> c_int;
    pub fn gegl_tile_backend_get_tile_width(tile_backend: *mut GeglTileBackend) -> c_int;
    pub fn gegl_tile_backend_peek_storage(
        tile_backend: *mut GeglTileBackend,
    ) -> *mut GeglTileSource;
    pub fn gegl_tile_backend_set_extent(
        tile_backend: *mut GeglTileBackend,
        rectangle: *const GeglRectangle,
    );
    pub fn gegl_tile_backend_set_flush_on_destroy(
        tile_backend: *mut GeglTileBackend,
        flush_on_destroy: gboolean,
    );

    //=========================================================================
    // GeglTileHandler
    //=========================================================================
    pub fn gegl_tile_handler_get_type() -> GType;
    pub fn gegl_tile_handler_create_tile(
        handler: *mut GeglTileHandler,
        x: c_int,
        y: c_int,
        z: c_int,
    ) -> *mut GeglTile;
    pub fn gegl_tile_handler_damage_rect(handler: *mut GeglTileHandler, rect: *const GeglRectangle);
    pub fn gegl_tile_handler_damage_tile(
        handler: *mut GeglTileHandler,
        x: c_int,
        y: c_int,
        z: c_int,
        damage: u64,
    );
    pub fn gegl_tile_handler_dup_tile(
        handler: *mut GeglTileHandler,
        tile: *mut GeglTile,
        x: c_int,
        y: c_int,
        z: c_int,
    ) -> *mut GeglTile;
    pub fn gegl_tile_handler_get_source_tile(
        handler: *mut GeglTileHandler,
        x: c_int,
        y: c_int,
        z: c_int,
        preserve_data: gboolean,
    ) -> *mut GeglTile;
    pub fn gegl_tile_handler_get_tile(
        handler: *mut GeglTileHandler,
        x: c_int,
        y: c_int,
        z: c_int,
        preserve_data: gboolean,
    ) -> *mut GeglTile;
    pub fn gegl_tile_handler_lock(handler: *mut GeglTileHandler);
    pub fn gegl_tile_handler_set_source(handler: *mut GeglTileHandler, source: *mut GeglTileSource);
    pub fn gegl_tile_handler_unlock(handler: *mut GeglTileHandler);

    //=========================================================================
    // GeglTileSource
    //=========================================================================
    pub fn gegl_tile_source_get_type() -> GType;

    //=========================================================================
    // GeglMetadata
    //=========================================================================
    pub fn gegl_metadata_get_type() -> GType;
    pub fn gegl_metadata_get_resolution(
        metadata: *mut GeglMetadata,
        unit: *mut GeglResolutionUnit,
        x: *mut c_float,
        y: *mut c_float,
    ) -> gboolean;
    pub fn gegl_metadata_iter_get_value(
        metadata: *mut GeglMetadata,
        iter: *mut GeglMetadataIter,
        value: *mut gobject::GValue,
    ) -> gboolean;
    pub fn gegl_metadata_iter_init(metadata: *mut GeglMetadata, iter: *mut GeglMetadataIter);
    pub fn gegl_metadata_iter_lookup(
        metadata: *mut GeglMetadata,
        iter: *mut GeglMetadataIter,
        key: *const c_char,
    ) -> gboolean;
    pub fn gegl_metadata_iter_next(
        metadata: *mut GeglMetadata,
        iter: *mut GeglMetadataIter,
    ) -> *const c_char;
    pub fn gegl_metadata_iter_set_value(
        metadata: *mut GeglMetadata,
        iter: *mut GeglMetadataIter,
        value: *const gobject::GValue,
    ) -> gboolean;
    pub fn gegl_metadata_register_map(
        metadata: *mut GeglMetadata,
        file_module: *const c_char,
        flags: c_uint,
        map: *const GeglMetadataMap,
        n_map: size_t,
    );
    pub fn gegl_metadata_set_resolution(
        metadata: *mut GeglMetadata,
        unit: GeglResolutionUnit,
        x: c_float,
        y: c_float,
    ) -> gboolean;
    pub fn gegl_metadata_unregister_map(metadata: *mut GeglMetadata);

    //=========================================================================
    // Other functions
    //=========================================================================
    pub fn gegl_apply_op(buffer: *mut GeglBuffer, operation_name: *const c_char, ...);
    //pub fn gegl_apply_op_valist(buffer: *mut GeglBuffer, operation_name: *const c_char, var_args: /*Unimplemented*/va_list);
    pub fn gegl_babl_variant(
        format: *const babl::Babl,
        variant: GeglBablVariant,
    ) -> *const babl::Babl;
    pub fn gegl_calloc(size: size_t, n_memb: c_int) -> gpointer;
    pub fn gegl_cl_disable();
    pub fn gegl_cl_init(error: *mut *mut glib::GError) -> gboolean;
    pub fn gegl_cl_is_accelerated() -> gboolean;
    pub fn gegl_config() -> *mut GeglConfig;
    pub fn gegl_create_chain(
        ops: *const c_char,
        op_start: *mut GeglNode,
        op_end: *mut GeglNode,
        time: c_double,
        rel_dim: c_int,
        path_root: *const c_char,
        error: *mut *mut glib::GError,
    );
    pub fn gegl_create_chain_argv(
        ops: *mut *mut c_char,
        op_start: *mut GeglNode,
        op_end: *mut GeglNode,
        time: c_double,
        rel_dim: c_int,
        path_root: *const c_char,
        error: *mut *mut glib::GError,
    );
    pub fn gegl_exit();
    pub fn gegl_filter_op(
        source_buffer: *mut GeglBuffer,
        operation_name: *const c_char,
        ...
    ) -> *mut GeglBuffer;
    //pub fn gegl_filter_op_valist(source_buffer: *mut GeglBuffer, operation_name: *const c_char, var_args: /*Unimplemented*/va_list) -> *mut GeglBuffer;
    pub fn gegl_format(format_name: *const c_char) -> *mut gobject::GValue;
    pub fn gegl_format_get_name(format: *mut gobject::GValue) -> *const c_char;
    pub fn gegl_free(mem: gpointer);
    pub fn gegl_get_option_group() -> *mut glib::GOptionGroup;
    pub fn gegl_get_version(major: *mut c_int, minor: *mut c_int, micro: *mut c_int);
    pub fn gegl_graph_dump_outputs(node: *mut GeglNode);
    pub fn gegl_graph_dump_request(node: *mut GeglNode, roi: *const GeglRectangle);
    pub fn gegl_has_operation(operation_type: *const c_char) -> gboolean;
    pub fn gegl_init(argc: *mut c_int, argv: *mut *mut *mut c_char);
    pub fn gegl_is_main_thread() -> gboolean;
    pub fn gegl_list_operations(n_operations_p: *mut c_uint) -> *mut *mut c_char;
    pub fn gegl_load_module_directory(path: *const c_char);
    pub fn gegl_malloc(n_bytes: size_t) -> gpointer;
    pub fn gegl_memeq_zero(ptr: gconstpointer, size: size_t) -> gboolean;
    pub fn gegl_memset_pattern(
        dst_ptr: gpointer,
        src_ptr: gconstpointer,
        pattern_size: c_int,
        count: c_int,
    );
    pub fn gegl_parallel_distribute(
        max_n: c_int,
        func: GeglParallelDistributeFunc,
        user_data: gpointer,
    );
    pub fn gegl_parallel_distribute_area(
        area: *const GeglRectangle,
        thread_cost: c_double,
        split_strategy: GeglSplitStrategy,
        func: GeglParallelDistributeAreaFunc,
        user_data: gpointer,
    );
    pub fn gegl_parallel_distribute_range(
        size: size_t,
        thread_cost: c_double,
        func: GeglParallelDistributeRangeFunc,
        user_data: gpointer,
    );
    pub fn gegl_param_spec_audio_fragment(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_color(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        default_color: *mut GeglColor,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_color_from_string(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        default_color_string: *const c_char,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_color_get_default(self_: *mut gobject::GParamSpec) -> *mut GeglColor;
    pub fn gegl_param_spec_curve(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        default_curve: *mut GeglCurve,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_double(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        minimum: c_double,
        maximum: c_double,
        default_value: c_double,
        ui_minimum: c_double,
        ui_maximum: c_double,
        ui_gamma: c_double,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_enum(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        enum_type: GType,
        default_value: c_int,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_file_path(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        no_validate: gboolean,
        null_ok: gboolean,
        default_value: *const c_char,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_format(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_get_property_key(
        pspec: *mut gobject::GParamSpec,
        key_name: *const c_char,
    ) -> *const c_char;
    pub fn gegl_param_spec_int(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        minimum: c_int,
        maximum: c_int,
        default_value: c_int,
        ui_minimum: c_int,
        ui_maximum: c_int,
        ui_gamma: c_double,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_path(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        default_path: *mut GeglPath,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_seed(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_set_property_key(
        pspec: *mut gobject::GParamSpec,
        key_name: *const c_char,
        value: *const c_char,
    );
    pub fn gegl_param_spec_string(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        no_validate: gboolean,
        null_ok: gboolean,
        default_value: *const c_char,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_param_spec_uri(
        name: *const c_char,
        nick: *const c_char,
        blurb: *const c_char,
        no_validate: gboolean,
        null_ok: gboolean,
        default_value: *const c_char,
        flags: gobject::GParamFlags,
    ) -> *mut gobject::GParamSpec;
    pub fn gegl_render_op(
        source_buffer: *mut GeglBuffer,
        target_buffer: *mut GeglBuffer,
        operation_name: *const c_char,
        ...
    );
    //pub fn gegl_render_op_valist(source_buffer: *mut GeglBuffer, target_buffer: *mut GeglBuffer, operation_name: *const c_char, var_args: /*Unimplemented*/va_list);
    pub fn gegl_reset_stats();
    pub fn gegl_scratch_alloc(size: size_t) -> gpointer;
    pub fn gegl_scratch_alloc0(size: size_t) -> gpointer;
    pub fn gegl_scratch_free(ptr: gpointer);
    pub fn gegl_serialize(
        start: *mut GeglNode,
        end: *mut GeglNode,
        basepath: *const c_char,
        serialize_flags: GeglSerializeFlag,
    ) -> *mut c_char;
    pub fn gegl_stats() -> *mut GeglStats;
    pub fn gegl_try_malloc(n_bytes: size_t) -> gpointer;

}