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
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)]

extern crate libc;
extern crate glib_sys as glib;
extern crate gobject_sys as gobject;

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

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

// Aliases
pub type CoglAngle = i32;
pub type CoglBool = c_int;
pub type CoglBuffer = c_void;
pub type CoglHandle = *mut c_void;
pub type CoglMetaTexture = c_void;
pub type CoglPrimitiveTexture = c_void;
pub type CoglUserDataDestroyCallback = glib::GDestroyNotify;

// Enums
pub type CoglAttributeType = c_int;
pub const COGL_ATTRIBUTE_TYPE_BYTE: CoglAttributeType = 5120;
pub const COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE: CoglAttributeType = 5121;
pub const COGL_ATTRIBUTE_TYPE_SHORT: CoglAttributeType = 5122;
pub const COGL_ATTRIBUTE_TYPE_UNSIGNED_SHORT: CoglAttributeType = 5123;
pub const COGL_ATTRIBUTE_TYPE_FLOAT: CoglAttributeType = 5126;

pub type CoglBitmapError = c_int;
pub const COGL_BITMAP_ERROR_FAILED: CoglBitmapError = 0;
pub const COGL_BITMAP_ERROR_UNKNOWN_TYPE: CoglBitmapError = 1;
pub const COGL_BITMAP_ERROR_CORRUPT_IMAGE: CoglBitmapError = 2;

pub type CoglBlendStringError = c_int;
pub const COGL_BLEND_STRING_ERROR_PARSE_ERROR: CoglBlendStringError = 0;
pub const COGL_BLEND_STRING_ERROR_ARGUMENT_PARSE_ERROR: CoglBlendStringError = 1;
pub const COGL_BLEND_STRING_ERROR_INVALID_ERROR: CoglBlendStringError = 2;
pub const COGL_BLEND_STRING_ERROR_GPU_UNSUPPORTED_ERROR: CoglBlendStringError = 3;

pub type CoglBufferError = c_int;
pub const COGL_BUFFER_ERROR_MAP: CoglBufferError = 0;

pub type CoglBufferUpdateHint = c_int;
pub const COGL_BUFFER_UPDATE_HINT_STATIC: CoglBufferUpdateHint = 0;
pub const COGL_BUFFER_UPDATE_HINT_DYNAMIC: CoglBufferUpdateHint = 1;
pub const COGL_BUFFER_UPDATE_HINT_STREAM: CoglBufferUpdateHint = 2;

pub type CoglDepthTestFunction = c_int;
pub const COGL_DEPTH_TEST_FUNCTION_NEVER: CoglDepthTestFunction = 512;
pub const COGL_DEPTH_TEST_FUNCTION_LESS: CoglDepthTestFunction = 513;
pub const COGL_DEPTH_TEST_FUNCTION_EQUAL: CoglDepthTestFunction = 514;
pub const COGL_DEPTH_TEST_FUNCTION_LEQUAL: CoglDepthTestFunction = 515;
pub const COGL_DEPTH_TEST_FUNCTION_GREATER: CoglDepthTestFunction = 516;
pub const COGL_DEPTH_TEST_FUNCTION_NOTEQUAL: CoglDepthTestFunction = 517;
pub const COGL_DEPTH_TEST_FUNCTION_GEQUAL: CoglDepthTestFunction = 518;
pub const COGL_DEPTH_TEST_FUNCTION_ALWAYS: CoglDepthTestFunction = 519;

pub type CoglDriver = c_int;
pub const COGL_DRIVER_ANY: CoglDriver = 0;
pub const COGL_DRIVER_NOP: CoglDriver = 1;
pub const COGL_DRIVER_GL: CoglDriver = 2;
pub const COGL_DRIVER_GL3: CoglDriver = 3;
pub const COGL_DRIVER_GLES1: CoglDriver = 4;
pub const COGL_DRIVER_GLES2: CoglDriver = 5;
pub const COGL_DRIVER_WEBGL: CoglDriver = 6;

pub type CoglFeatureID = c_int;
pub const COGL_FEATURE_ID_TEXTURE_NPOT_BASIC: CoglFeatureID = 1;
pub const COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP: CoglFeatureID = 2;
pub const COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT: CoglFeatureID = 3;
pub const COGL_FEATURE_ID_TEXTURE_NPOT: CoglFeatureID = 4;
pub const COGL_FEATURE_ID_TEXTURE_RECTANGLE: CoglFeatureID = 5;
pub const COGL_FEATURE_ID_TEXTURE_3D: CoglFeatureID = 6;
pub const COGL_FEATURE_ID_GLSL: CoglFeatureID = 7;
pub const COGL_FEATURE_ID_ARBFP: CoglFeatureID = 8;
pub const COGL_FEATURE_ID_OFFSCREEN: CoglFeatureID = 9;
pub const COGL_FEATURE_ID_OFFSCREEN_MULTISAMPLE: CoglFeatureID = 10;
pub const COGL_FEATURE_ID_ONSCREEN_MULTIPLE: CoglFeatureID = 11;
pub const COGL_FEATURE_ID_UNSIGNED_INT_INDICES: CoglFeatureID = 12;
pub const COGL_FEATURE_ID_DEPTH_RANGE: CoglFeatureID = 13;
pub const COGL_FEATURE_ID_POINT_SPRITE: CoglFeatureID = 14;
pub const COGL_FEATURE_ID_MAP_BUFFER_FOR_READ: CoglFeatureID = 15;
pub const COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE: CoglFeatureID = 16;
pub const COGL_FEATURE_ID_MIRRORED_REPEAT: CoglFeatureID = 17;
pub const COGL_FEATURE_ID_SWAP_BUFFERS_EVENT: CoglFeatureID = 18;
pub const COGL_FEATURE_ID_GLES2_CONTEXT: CoglFeatureID = 19;
pub const COGL_FEATURE_ID_DEPTH_TEXTURE: CoglFeatureID = 20;
pub const COGL_FEATURE_ID_PRESENTATION_TIME: CoglFeatureID = 21;
pub const COGL_FEATURE_ID_FENCE: CoglFeatureID = 22;
pub const COGL_FEATURE_ID_PER_VERTEX_POINT_SIZE: CoglFeatureID = 23;
pub const COGL_FEATURE_ID_TEXTURE_RG: CoglFeatureID = 24;
pub const COGL_FEATURE_ID_BUFFER_AGE: CoglFeatureID = 25;

pub type CoglFilterReturn = c_int;
pub const COGL_FILTER_CONTINUE: CoglFilterReturn = 0;
pub const COGL_FILTER_REMOVE: CoglFilterReturn = 1;

pub type CoglFogMode = c_int;
pub const COGL_FOG_MODE_LINEAR: CoglFogMode = 0;
pub const COGL_FOG_MODE_EXPONENTIAL: CoglFogMode = 1;
pub const COGL_FOG_MODE_EXPONENTIAL_SQUARED: CoglFogMode = 2;

pub type CoglFrameEvent = c_int;
pub const COGL_FRAME_EVENT_SYNC: CoglFrameEvent = 1;
pub const COGL_FRAME_EVENT_COMPLETE: CoglFrameEvent = 2;

pub type CoglFramebufferError = c_int;
pub const COGL_FRAMEBUFFER_ERROR_ALLOCATE: CoglFramebufferError = 0;

pub type CoglGLES2ContextError = c_int;
pub const COGL_GLES2_CONTEXT_ERROR_UNSUPPORTED: CoglGLES2ContextError = 0;
pub const COGL_GLES2_CONTEXT_ERROR_DRIVER: CoglGLES2ContextError = 1;

pub type CoglIndicesType = c_int;
pub const COGL_INDICES_TYPE_UNSIGNED_BYTE: CoglIndicesType = 0;
pub const COGL_INDICES_TYPE_UNSIGNED_SHORT: CoglIndicesType = 1;
pub const COGL_INDICES_TYPE_UNSIGNED_INT: CoglIndicesType = 2;

pub type CoglMaterialAlphaFunc = c_int;
pub const COGL_MATERIAL_ALPHA_FUNC_NEVER: CoglMaterialAlphaFunc = 512;
pub const COGL_MATERIAL_ALPHA_FUNC_LESS: CoglMaterialAlphaFunc = 513;
pub const COGL_MATERIAL_ALPHA_FUNC_EQUAL: CoglMaterialAlphaFunc = 514;
pub const COGL_MATERIAL_ALPHA_FUNC_LEQUAL: CoglMaterialAlphaFunc = 515;
pub const COGL_MATERIAL_ALPHA_FUNC_GREATER: CoglMaterialAlphaFunc = 516;
pub const COGL_MATERIAL_ALPHA_FUNC_NOTEQUAL: CoglMaterialAlphaFunc = 517;
pub const COGL_MATERIAL_ALPHA_FUNC_GEQUAL: CoglMaterialAlphaFunc = 518;
pub const COGL_MATERIAL_ALPHA_FUNC_ALWAYS: CoglMaterialAlphaFunc = 519;

pub type CoglMaterialFilter = c_int;
pub const COGL_MATERIAL_FILTER_NEAREST: CoglMaterialFilter = 9728;
pub const COGL_MATERIAL_FILTER_LINEAR: CoglMaterialFilter = 9729;
pub const COGL_MATERIAL_FILTER_NEAREST_MIPMAP_NEAREST: CoglMaterialFilter = 9984;
pub const COGL_MATERIAL_FILTER_LINEAR_MIPMAP_NEAREST: CoglMaterialFilter = 9985;
pub const COGL_MATERIAL_FILTER_NEAREST_MIPMAP_LINEAR: CoglMaterialFilter = 9986;
pub const COGL_MATERIAL_FILTER_LINEAR_MIPMAP_LINEAR: CoglMaterialFilter = 9987;

pub type CoglMaterialLayerType = c_int;
pub const COGL_MATERIAL_LAYER_TYPE_TEXTURE: CoglMaterialLayerType = 0;

pub type CoglMaterialWrapMode = c_int;
pub const COGL_MATERIAL_WRAP_MODE_REPEAT: CoglMaterialWrapMode = 10497;
pub const COGL_MATERIAL_WRAP_MODE_CLAMP_TO_EDGE: CoglMaterialWrapMode = 33071;
pub const COGL_MATERIAL_WRAP_MODE_AUTOMATIC: CoglMaterialWrapMode = 519;

pub type CoglPipelineAlphaFunc = c_int;
pub const COGL_PIPELINE_ALPHA_FUNC_NEVER: CoglPipelineAlphaFunc = 512;
pub const COGL_PIPELINE_ALPHA_FUNC_LESS: CoglPipelineAlphaFunc = 513;
pub const COGL_PIPELINE_ALPHA_FUNC_EQUAL: CoglPipelineAlphaFunc = 514;
pub const COGL_PIPELINE_ALPHA_FUNC_LEQUAL: CoglPipelineAlphaFunc = 515;
pub const COGL_PIPELINE_ALPHA_FUNC_GREATER: CoglPipelineAlphaFunc = 516;
pub const COGL_PIPELINE_ALPHA_FUNC_NOTEQUAL: CoglPipelineAlphaFunc = 517;
pub const COGL_PIPELINE_ALPHA_FUNC_GEQUAL: CoglPipelineAlphaFunc = 518;
pub const COGL_PIPELINE_ALPHA_FUNC_ALWAYS: CoglPipelineAlphaFunc = 519;

pub type CoglPipelineCullFaceMode = c_int;
pub const COGL_PIPELINE_CULL_FACE_MODE_NONE: CoglPipelineCullFaceMode = 0;
pub const COGL_PIPELINE_CULL_FACE_MODE_FRONT: CoglPipelineCullFaceMode = 1;
pub const COGL_PIPELINE_CULL_FACE_MODE_BACK: CoglPipelineCullFaceMode = 2;
pub const COGL_PIPELINE_CULL_FACE_MODE_BOTH: CoglPipelineCullFaceMode = 3;

pub type CoglPipelineFilter = c_int;
pub const COGL_PIPELINE_FILTER_NEAREST: CoglPipelineFilter = 9728;
pub const COGL_PIPELINE_FILTER_LINEAR: CoglPipelineFilter = 9729;
pub const COGL_PIPELINE_FILTER_NEAREST_MIPMAP_NEAREST: CoglPipelineFilter = 9984;
pub const COGL_PIPELINE_FILTER_LINEAR_MIPMAP_NEAREST: CoglPipelineFilter = 9985;
pub const COGL_PIPELINE_FILTER_NEAREST_MIPMAP_LINEAR: CoglPipelineFilter = 9986;
pub const COGL_PIPELINE_FILTER_LINEAR_MIPMAP_LINEAR: CoglPipelineFilter = 9987;

pub type CoglPipelineWrapMode = c_int;
pub const COGL_PIPELINE_WRAP_MODE_REPEAT: CoglPipelineWrapMode = 10497;
pub const COGL_PIPELINE_WRAP_MODE_MIRRORED_REPEAT: CoglPipelineWrapMode = 33648;
pub const COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE: CoglPipelineWrapMode = 33071;
pub const COGL_PIPELINE_WRAP_MODE_AUTOMATIC: CoglPipelineWrapMode = 519;

pub type CoglPixelFormat = c_int;
pub const COGL_PIXEL_FORMAT_ANY: CoglPixelFormat = 0;
pub const COGL_PIXEL_FORMAT_A_8: CoglPixelFormat = 17;
pub const COGL_PIXEL_FORMAT_RGB_565: CoglPixelFormat = 4;
pub const COGL_PIXEL_FORMAT_RGBA_4444: CoglPixelFormat = 21;
pub const COGL_PIXEL_FORMAT_RGBA_5551: CoglPixelFormat = 22;
pub const COGL_PIXEL_FORMAT_YUV: CoglPixelFormat = 7;
pub const COGL_PIXEL_FORMAT_G_8: CoglPixelFormat = 8;
pub const COGL_PIXEL_FORMAT_RG_88: CoglPixelFormat = 9;
pub const COGL_PIXEL_FORMAT_RGB_888: CoglPixelFormat = 2;
pub const COGL_PIXEL_FORMAT_BGR_888: CoglPixelFormat = 34;
pub const COGL_PIXEL_FORMAT_RGBA_8888: CoglPixelFormat = 19;
pub const COGL_PIXEL_FORMAT_BGRA_8888: CoglPixelFormat = 51;
pub const COGL_PIXEL_FORMAT_ARGB_8888: CoglPixelFormat = 83;
pub const COGL_PIXEL_FORMAT_ABGR_8888: CoglPixelFormat = 115;
pub const COGL_PIXEL_FORMAT_RGBA_1010102: CoglPixelFormat = 29;
pub const COGL_PIXEL_FORMAT_BGRA_1010102: CoglPixelFormat = 61;
pub const COGL_PIXEL_FORMAT_ARGB_2101010: CoglPixelFormat = 93;
pub const COGL_PIXEL_FORMAT_ABGR_2101010: CoglPixelFormat = 125;
pub const COGL_PIXEL_FORMAT_RGBA_8888_PRE: CoglPixelFormat = 147;
pub const COGL_PIXEL_FORMAT_BGRA_8888_PRE: CoglPixelFormat = 179;
pub const COGL_PIXEL_FORMAT_ARGB_8888_PRE: CoglPixelFormat = 211;
pub const COGL_PIXEL_FORMAT_ABGR_8888_PRE: CoglPixelFormat = 243;
pub const COGL_PIXEL_FORMAT_RGBA_4444_PRE: CoglPixelFormat = 149;
pub const COGL_PIXEL_FORMAT_RGBA_5551_PRE: CoglPixelFormat = 150;
pub const COGL_PIXEL_FORMAT_RGBA_1010102_PRE: CoglPixelFormat = 157;
pub const COGL_PIXEL_FORMAT_BGRA_1010102_PRE: CoglPixelFormat = 189;
pub const COGL_PIXEL_FORMAT_ARGB_2101010_PRE: CoglPixelFormat = 221;
pub const COGL_PIXEL_FORMAT_ABGR_2101010_PRE: CoglPixelFormat = 253;
pub const COGL_PIXEL_FORMAT_DEPTH_16: CoglPixelFormat = 265;
pub const COGL_PIXEL_FORMAT_DEPTH_32: CoglPixelFormat = 259;
pub const COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8: CoglPixelFormat = 771;

pub type CoglPollFDEvent = c_int;
pub const COGL_POLL_FD_EVENT_IN: CoglPollFDEvent = 1;
pub const COGL_POLL_FD_EVENT_PRI: CoglPollFDEvent = 2;
pub const COGL_POLL_FD_EVENT_OUT: CoglPollFDEvent = 4;
pub const COGL_POLL_FD_EVENT_ERR: CoglPollFDEvent = 8;
pub const COGL_POLL_FD_EVENT_HUP: CoglPollFDEvent = 16;
pub const COGL_POLL_FD_EVENT_NVAL: CoglPollFDEvent = 32;

pub type CoglRendererError = c_int;
pub const COGL_RENDERER_ERROR_XLIB_DISPLAY_OPEN: CoglRendererError = 0;
pub const COGL_RENDERER_ERROR_BAD_CONSTRAINT: CoglRendererError = 1;

pub type CoglShaderType = c_int;
pub const COGL_SHADER_TYPE_VERTEX: CoglShaderType = 0;
pub const COGL_SHADER_TYPE_FRAGMENT: CoglShaderType = 1;

pub type CoglSnippetHook = c_int;
pub const COGL_SNIPPET_HOOK_VERTEX: CoglSnippetHook = 0;
pub const COGL_SNIPPET_HOOK_VERTEX_TRANSFORM: CoglSnippetHook = 1;
pub const COGL_SNIPPET_HOOK_VERTEX_GLOBALS: CoglSnippetHook = 2;
pub const COGL_SNIPPET_HOOK_POINT_SIZE: CoglSnippetHook = 3;
pub const COGL_SNIPPET_HOOK_FRAGMENT: CoglSnippetHook = 2048;
pub const COGL_SNIPPET_HOOK_FRAGMENT_GLOBALS: CoglSnippetHook = 2049;
pub const COGL_SNIPPET_HOOK_TEXTURE_COORD_TRANSFORM: CoglSnippetHook = 4096;
pub const COGL_SNIPPET_HOOK_LAYER_FRAGMENT: CoglSnippetHook = 6144;
pub const COGL_SNIPPET_HOOK_TEXTURE_LOOKUP: CoglSnippetHook = 6145;

pub type CoglStereoMode = c_int;
pub const COGL_STEREO_BOTH: CoglStereoMode = 0;
pub const COGL_STEREO_LEFT: CoglStereoMode = 1;
pub const COGL_STEREO_RIGHT: CoglStereoMode = 2;

pub type CoglSubpixelOrder = c_int;
pub const COGL_SUBPIXEL_ORDER_UNKNOWN: CoglSubpixelOrder = 0;
pub const COGL_SUBPIXEL_ORDER_NONE: CoglSubpixelOrder = 1;
pub const COGL_SUBPIXEL_ORDER_HORIZONTAL_RGB: CoglSubpixelOrder = 2;
pub const COGL_SUBPIXEL_ORDER_HORIZONTAL_BGR: CoglSubpixelOrder = 3;
pub const COGL_SUBPIXEL_ORDER_VERTICAL_RGB: CoglSubpixelOrder = 4;
pub const COGL_SUBPIXEL_ORDER_VERTICAL_BGR: CoglSubpixelOrder = 5;

pub type CoglSystemError = c_int;
pub const COGL_SYSTEM_ERROR_UNSUPPORTED: CoglSystemError = 0;
pub const COGL_SYSTEM_ERROR_NO_MEMORY: CoglSystemError = 1;

pub type CoglTextureComponents = c_int;
pub const COGL_TEXTURE_COMPONENTS_A: CoglTextureComponents = 1;
pub const COGL_TEXTURE_COMPONENTS_RG: CoglTextureComponents = 2;
pub const COGL_TEXTURE_COMPONENTS_RGB: CoglTextureComponents = 3;
pub const COGL_TEXTURE_COMPONENTS_RGBA: CoglTextureComponents = 4;
pub const COGL_TEXTURE_COMPONENTS_DEPTH: CoglTextureComponents = 5;

pub type CoglTextureError = c_int;
pub const COGL_TEXTURE_ERROR_SIZE: CoglTextureError = 0;
pub const COGL_TEXTURE_ERROR_FORMAT: CoglTextureError = 1;
pub const COGL_TEXTURE_ERROR_BAD_PARAMETER: CoglTextureError = 2;
pub const COGL_TEXTURE_ERROR_TYPE: CoglTextureError = 3;

pub type CoglTexturePixmapX11Error = c_int;
pub const COGL_TEXTURE_PIXMAP_X11_ERROR_X11: CoglTexturePixmapX11Error = 0;

pub type CoglTexturePixmapX11ReportLevel = c_int;
pub const COGL_TEXTURE_PIXMAP_X11_DAMAGE_RAW_RECTANGLES: CoglTexturePixmapX11ReportLevel = 0;
pub const COGL_TEXTURE_PIXMAP_X11_DAMAGE_DELTA_RECTANGLES: CoglTexturePixmapX11ReportLevel = 1;
pub const COGL_TEXTURE_PIXMAP_X11_DAMAGE_BOUNDING_BOX: CoglTexturePixmapX11ReportLevel = 2;
pub const COGL_TEXTURE_PIXMAP_X11_DAMAGE_NON_EMPTY: CoglTexturePixmapX11ReportLevel = 3;

pub type CoglTextureType = c_int;
pub const COGL_TEXTURE_TYPE_2D: CoglTextureType = 0;
pub const COGL_TEXTURE_TYPE_3D: CoglTextureType = 1;
pub const COGL_TEXTURE_TYPE_RECTANGLE: CoglTextureType = 2;

pub type CoglVerticesMode = c_int;
pub const COGL_VERTICES_MODE_POINTS: CoglVerticesMode = 0;
pub const COGL_VERTICES_MODE_LINES: CoglVerticesMode = 1;
pub const COGL_VERTICES_MODE_LINE_LOOP: CoglVerticesMode = 2;
pub const COGL_VERTICES_MODE_LINE_STRIP: CoglVerticesMode = 3;
pub const COGL_VERTICES_MODE_TRIANGLES: CoglVerticesMode = 4;
pub const COGL_VERTICES_MODE_TRIANGLE_STRIP: CoglVerticesMode = 5;
pub const COGL_VERTICES_MODE_TRIANGLE_FAN: CoglVerticesMode = 6;

pub type CoglWinding = c_int;
pub const COGL_WINDING_CLOCKWISE: CoglWinding = 0;
pub const COGL_WINDING_COUNTER_CLOCKWISE: CoglWinding = 1;

pub type CoglWinsysFeature = c_int;
pub const COGL_WINSYS_FEATURE_MULTIPLE_ONSCREEN: CoglWinsysFeature = 0;
pub const COGL_WINSYS_FEATURE_SWAP_THROTTLE: CoglWinsysFeature = 1;
pub const COGL_WINSYS_FEATURE_VBLANK_COUNTER: CoglWinsysFeature = 2;
pub const COGL_WINSYS_FEATURE_VBLANK_WAIT: CoglWinsysFeature = 3;
pub const COGL_WINSYS_FEATURE_TEXTURE_FROM_PIXMAP: CoglWinsysFeature = 4;
pub const COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT: CoglWinsysFeature = 5;
pub const COGL_WINSYS_FEATURE_SWAP_REGION: CoglWinsysFeature = 6;
pub const COGL_WINSYS_FEATURE_SWAP_REGION_THROTTLE: CoglWinsysFeature = 7;
pub const COGL_WINSYS_FEATURE_SWAP_REGION_SYNCHRONIZED: CoglWinsysFeature = 8;
pub const COGL_WINSYS_FEATURE_BUFFER_AGE: CoglWinsysFeature = 9;
pub const COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT: CoglWinsysFeature = 10;
pub const COGL_WINSYS_FEATURE_N_FEATURES: CoglWinsysFeature = 11;

pub type CoglWinsysID = c_int;
pub const COGL_WINSYS_ID_ANY: CoglWinsysID = 0;
pub const COGL_WINSYS_ID_STUB: CoglWinsysID = 1;
pub const COGL_WINSYS_ID_GLX: CoglWinsysID = 2;
pub const COGL_WINSYS_ID_EGL_XLIB: CoglWinsysID = 3;
pub const COGL_WINSYS_ID_EGL_NULL: CoglWinsysID = 4;
pub const COGL_WINSYS_ID_EGL_GDL: CoglWinsysID = 5;
pub const COGL_WINSYS_ID_EGL_WAYLAND: CoglWinsysID = 6;
pub const COGL_WINSYS_ID_EGL_KMS: CoglWinsysID = 7;
pub const COGL_WINSYS_ID_EGL_ANDROID: CoglWinsysID = 8;
pub const COGL_WINSYS_ID_EGL_MIR: CoglWinsysID = 9;
pub const COGL_WINSYS_ID_WGL: CoglWinsysID = 10;
pub const COGL_WINSYS_ID_SDL: CoglWinsysID = 11;

// Constants
pub const COGL_AFIRST_BIT: c_int = 64;
pub const COGL_A_BIT: c_int = 16;
pub const COGL_BGR_BIT: c_int = 32;
pub const COGL_DEPTH_BIT: c_int = 256;
pub const COGL_PREMULT_BIT: c_int = 128;
pub const COGL_STENCIL_BIT: c_int = 512;
pub const COGL_TEXTURE_MAX_WASTE: c_int = 127;
pub const COGL_VERSION_COMPONENT_BITS: c_int = 10;
pub const COGL_VERSION_MAX_COMPONENT_VALUE: c_int = 0;

// Flags
pub type CoglBufferAccess = c_uint;
pub const COGL_BUFFER_ACCESS_READ: CoglBufferAccess = 1;
pub const COGL_BUFFER_ACCESS_WRITE: CoglBufferAccess = 2;
pub const COGL_BUFFER_ACCESS_READ_WRITE: CoglBufferAccess = 3;

pub type CoglBufferBit = c_uint;
pub const COGL_BUFFER_BIT_COLOR: CoglBufferBit = 1;
pub const COGL_BUFFER_BIT_DEPTH: CoglBufferBit = 2;
pub const COGL_BUFFER_BIT_STENCIL: CoglBufferBit = 4;

pub type CoglBufferMapHint = c_uint;
pub const COGL_BUFFER_MAP_HINT_DISCARD: CoglBufferMapHint = 1;
pub const COGL_BUFFER_MAP_HINT_DISCARD_RANGE: CoglBufferMapHint = 2;

pub type CoglBufferTarget = c_uint;
pub const COGL_WINDOW_BUFFER: CoglBufferTarget = 2;
pub const COGL_OFFSCREEN_BUFFER: CoglBufferTarget = 4;

pub type CoglColorMask = c_uint;
pub const COGL_COLOR_MASK_NONE: CoglColorMask = 0;
pub const COGL_COLOR_MASK_RED: CoglColorMask = 1;
pub const COGL_COLOR_MASK_GREEN: CoglColorMask = 2;
pub const COGL_COLOR_MASK_BLUE: CoglColorMask = 4;
pub const COGL_COLOR_MASK_ALPHA: CoglColorMask = 8;
pub const COGL_COLOR_MASK_ALL: CoglColorMask = 15;

pub type CoglFeatureFlags = c_uint;
pub const COGL_FEATURE_TEXTURE_RECTANGLE: CoglFeatureFlags = 2;
pub const COGL_FEATURE_TEXTURE_NPOT: CoglFeatureFlags = 4;
pub const COGL_FEATURE_TEXTURE_YUV: CoglFeatureFlags = 8;
pub const COGL_FEATURE_TEXTURE_READ_PIXELS: CoglFeatureFlags = 16;
pub const COGL_FEATURE_SHADERS_GLSL: CoglFeatureFlags = 32;
pub const COGL_FEATURE_OFFSCREEN: CoglFeatureFlags = 64;
pub const COGL_FEATURE_OFFSCREEN_MULTISAMPLE: CoglFeatureFlags = 128;
pub const COGL_FEATURE_OFFSCREEN_BLIT: CoglFeatureFlags = 256;
pub const COGL_FEATURE_FOUR_CLIP_PLANES: CoglFeatureFlags = 512;
pub const COGL_FEATURE_STENCIL_BUFFER: CoglFeatureFlags = 1024;
pub const COGL_FEATURE_VBOS: CoglFeatureFlags = 2048;
pub const COGL_FEATURE_PBOS: CoglFeatureFlags = 4096;
pub const COGL_FEATURE_UNSIGNED_INT_INDICES: CoglFeatureFlags = 8192;
pub const COGL_FEATURE_DEPTH_RANGE: CoglFeatureFlags = 16384;
pub const COGL_FEATURE_TEXTURE_NPOT_BASIC: CoglFeatureFlags = 32768;
pub const COGL_FEATURE_TEXTURE_NPOT_MIPMAP: CoglFeatureFlags = 65536;
pub const COGL_FEATURE_TEXTURE_NPOT_REPEAT: CoglFeatureFlags = 131072;
pub const COGL_FEATURE_POINT_SPRITE: CoglFeatureFlags = 262144;
pub const COGL_FEATURE_TEXTURE_3D: CoglFeatureFlags = 524288;
pub const COGL_FEATURE_SHADERS_ARBFP: CoglFeatureFlags = 1048576;
pub const COGL_FEATURE_MAP_BUFFER_FOR_READ: CoglFeatureFlags = 2097152;
pub const COGL_FEATURE_MAP_BUFFER_FOR_WRITE: CoglFeatureFlags = 4194304;
pub const COGL_FEATURE_ONSCREEN_MULTIPLE: CoglFeatureFlags = 8388608;
pub const COGL_FEATURE_DEPTH_TEXTURE: CoglFeatureFlags = 16777216;

pub type CoglReadPixelsFlags = c_uint;
pub const COGL_READ_PIXELS_COLOR_BUFFER: CoglReadPixelsFlags = 1;

pub type CoglRendererConstraint = c_uint;
pub const COGL_RENDERER_CONSTRAINT_USES_X11: CoglRendererConstraint = 1;
pub const COGL_RENDERER_CONSTRAINT_USES_XLIB: CoglRendererConstraint = 2;
pub const COGL_RENDERER_CONSTRAINT_USES_EGL: CoglRendererConstraint = 4;
pub const COGL_RENDERER_CONSTRAINT_SUPPORTS_COGL_GLES2: CoglRendererConstraint = 8;

pub type CoglTextureFlags = c_uint;
pub const COGL_TEXTURE_NONE: CoglTextureFlags = 0;
pub const COGL_TEXTURE_NO_AUTO_MIPMAP: CoglTextureFlags = 1;
pub const COGL_TEXTURE_NO_SLICING: CoglTextureFlags = 2;
pub const COGL_TEXTURE_NO_ATLAS: CoglTextureFlags = 4;

// Callbacks
pub type CoglDebugObjectForeachTypeCallback = Option<unsafe extern "C" fn(*const CoglDebugObjectTypeInfo, *mut c_void)>;
pub type CoglFeatureCallback = Option<unsafe extern "C" fn(CoglFeatureID, *mut c_void)>;
pub type CoglFenceCallback = Option<unsafe extern "C" fn(*mut CoglFence, *mut c_void)>;
pub type CoglFrameCallback = Option<unsafe extern "C" fn(*mut CoglOnscreen, CoglFrameEvent, *mut CoglFrameInfo, *mut c_void)>;
pub type CoglFuncPtr = Option<unsafe extern "C" fn()>;
pub type CoglMetaTextureCallback = Option<unsafe extern "C" fn(*mut CoglTexture, *const c_float, *const c_float, *mut c_void)>;
pub type CoglOnscreenDirtyCallback = Option<unsafe extern "C" fn(*mut CoglOnscreen, *const CoglOnscreenDirtyInfo, *mut c_void)>;
pub type CoglOnscreenResizeCallback = Option<unsafe extern "C" fn(*mut CoglOnscreen, c_int, c_int, *mut c_void)>;
pub type CoglOnscreenX11MaskCallback = Option<unsafe extern "C" fn(*mut CoglOnscreen, u32, *mut c_void)>;
pub type CoglOutputCallback = Option<unsafe extern "C" fn(*mut CoglOutput, *mut c_void)>;
pub type CoglPipelineLayerCallback = Option<unsafe extern "C" fn(*mut CoglPipeline, c_int, *mut c_void) -> CoglBool>;
pub type CoglPrimitiveAttributeCallback = Option<unsafe extern "C" fn(*mut CoglPrimitive, *mut CoglAttribute, *mut c_void) -> CoglBool>;
pub type CoglSwapBuffersNotify = Option<unsafe extern "C" fn(*mut CoglFramebuffer, *mut c_void)>;

// Records
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglColor {
    pub private_member_red: u8,
    pub private_member_green: u8,
    pub private_member_blue: u8,
    pub private_member_alpha: u8,
    pub private_member_padding0: u32,
    pub private_member_padding1: u32,
    pub private_member_padding2: u32,
}

impl ::std::fmt::Debug for CoglColor {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglColor @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglDebugObjectTypeInfo {
    pub name: *const c_char,
    pub instance_count: c_ulong,
}

impl ::std::fmt::Debug for CoglDebugObjectTypeInfo {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglDebugObjectTypeInfo @ {:?}", self as *const _))
         .field("name", &self.name)
         .field("instance_count", &self.instance_count)
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglDepthState {
    pub private_member_magic: u32,
    pub private_member_test_enabled: CoglBool,
    pub private_member_test_function: CoglDepthTestFunction,
    pub private_member_write_enabled: CoglBool,
    pub private_member_range_near: c_float,
    pub private_member_range_far: c_float,
    pub private_member_padding0: u32,
    pub private_member_padding1: u32,
    pub private_member_padding2: u32,
    pub private_member_padding3: u32,
    pub private_member_padding4: u32,
    pub private_member_padding5: u32,
    pub private_member_padding6: u32,
    pub private_member_padding7: u32,
    pub private_member_padding8: u32,
    pub private_member_padding9: u32,
}

impl ::std::fmt::Debug for CoglDepthState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglDepthState @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglEuler {
    pub heading: c_float,
    pub pitch: c_float,
    pub roll: c_float,
    pub padding0: c_float,
    pub padding1: c_float,
    pub padding2: c_float,
    pub padding3: c_float,
    pub padding4: c_float,
}

impl ::std::fmt::Debug for CoglEuler {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglEuler @ {:?}", self as *const _))
         .field("heading", &self.heading)
         .field("pitch", &self.pitch)
         .field("roll", &self.roll)
         .finish()
    }
}

#[repr(C)]
pub struct _CoglFence(c_void);

pub type CoglFence = *mut _CoglFence;

#[repr(C)]
pub struct _CoglFenceClosure(c_void);

pub type CoglFenceClosure = *mut _CoglFenceClosure;

#[repr(C)]
pub struct CoglFrameClosure(c_void);

impl ::std::fmt::Debug for CoglFrameClosure {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglFrameClosure @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglGtypeClass {
    pub base_class: gobject::GTypeClass,
    pub dummy: c_uint,
}

impl ::std::fmt::Debug for CoglGtypeClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglGtypeClass @ {:?}", self as *const _))
         .field("base_class", &self.base_class)
         .field("dummy", &self.dummy)
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglGtypeObject {
    pub parent_instance: gobject::GTypeInstance,
    pub dummy: c_uint,
}

impl ::std::fmt::Debug for CoglGtypeObject {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglGtypeObject @ {:?}", self as *const _))
         .field("parent_instance", &self.parent_instance)
         .field("dummy", &self.dummy)
         .finish()
    }
}

#[repr(C)]
pub struct CoglKmsCrtc {
    pub id: u32,
    pub x: u32,
    pub y: u32,
    _truncated_record_marker: c_void,
    // /*Ignored*/field mode has incomplete type
}

impl ::std::fmt::Debug for CoglKmsCrtc {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglKmsCrtc @ {:?}", self as *const _))
         .field("id", &self.id)
         .field("x", &self.x)
         .field("y", &self.y)
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglMatrix {
    pub xx: c_float,
    pub yx: c_float,
    pub zx: c_float,
    pub wx: c_float,
    pub xy: c_float,
    pub yy: c_float,
    pub zy: c_float,
    pub wy: c_float,
    pub xz: c_float,
    pub yz: c_float,
    pub zz: c_float,
    pub wz: c_float,
    pub xw: c_float,
    pub yw: c_float,
    pub zw: c_float,
    pub ww: c_float,
    pub private_member_inv: [c_float; 16],
    pub private_member_type: c_ulong,
    pub private_member_flags: c_ulong,
    pub private_member__padding3: c_ulong,
}

impl ::std::fmt::Debug for CoglMatrix {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglMatrix @ {:?}", self as *const _))
         .field("xx", &self.xx)
         .field("yx", &self.yx)
         .field("zx", &self.zx)
         .field("wx", &self.wx)
         .field("xy", &self.xy)
         .field("yy", &self.yy)
         .field("zy", &self.zy)
         .field("wy", &self.wy)
         .field("xz", &self.xz)
         .field("yz", &self.yz)
         .field("zz", &self.zz)
         .field("wz", &self.wz)
         .field("xw", &self.xw)
         .field("yw", &self.yw)
         .field("zw", &self.zw)
         .field("ww", &self.ww)
         .finish()
    }
}

#[repr(C)]
pub struct CoglMatrixEntry(c_void);

impl ::std::fmt::Debug for CoglMatrixEntry {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglMatrixEntry @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglOnscreenDirtyClosure(c_void);

impl ::std::fmt::Debug for CoglOnscreenDirtyClosure {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglOnscreenDirtyClosure @ {:?}", self as *const _))
         .finish()
    }
}

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

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

#[repr(C)]
pub struct CoglOnscreenResizeClosure(c_void);

impl ::std::fmt::Debug for CoglOnscreenResizeClosure {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglOnscreenResizeClosure @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglPollFD {
    pub fd: c_int,
    _truncated_record_marker: c_void,
    // /*Ignored*/field events has incomplete type
}

impl ::std::fmt::Debug for CoglPollFD {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglPollFD @ {:?}", self as *const _))
         .field("fd", &self.fd)
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglQuaternion {
    pub w: c_float,
    pub x: c_float,
    pub y: c_float,
    pub z: c_float,
    pub padding0: c_float,
    pub padding1: c_float,
    pub padding2: c_float,
    pub padding3: c_float,
}

impl ::std::fmt::Debug for CoglQuaternion {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglQuaternion @ {:?}", self as *const _))
         .field("w", &self.w)
         .field("x", &self.x)
         .field("y", &self.y)
         .field("z", &self.z)
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglTextureVertex {
    pub x: c_float,
    pub y: c_float,
    pub z: c_float,
    pub tx: c_float,
    pub ty: c_float,
    pub color: CoglColor,
}

impl ::std::fmt::Debug for CoglTextureVertex {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglTextureVertex @ {:?}", self as *const _))
         .field("x", &self.x)
         .field("y", &self.y)
         .field("z", &self.z)
         .field("tx", &self.tx)
         .field("ty", &self.ty)
         .field("color", &self.color)
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglUserDataKey {
    pub unused: c_int,
}

impl ::std::fmt::Debug for CoglUserDataKey {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglUserDataKey @ {:?}", self as *const _))
         .field("unused", &self.unused)
         .finish()
    }
}

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

impl ::std::fmt::Debug for CoglVertexP2 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglVertexP2 @ {:?}", self as *const _))
         .field("x", &self.x)
         .field("y", &self.y)
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglVertexP2C4 {
    pub x: c_float,
    pub y: c_float,
    pub r: u8,
    pub g: u8,
    pub b: u8,
    pub a: u8,
}

impl ::std::fmt::Debug for CoglVertexP2C4 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglVertexP2C4 @ {:?}", self as *const _))
         .field("x", &self.x)
         .field("y", &self.y)
         .field("r", &self.r)
         .field("g", &self.g)
         .field("b", &self.b)
         .field("a", &self.a)
         .finish()
    }
}

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

impl ::std::fmt::Debug for CoglVertexP2T2 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglVertexP2T2 @ {:?}", self as *const _))
         .field("x", &self.x)
         .field("y", &self.y)
         .field("s", &self.s)
         .field("t", &self.t)
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglVertexP2T2C4 {
    pub x: c_float,
    pub y: c_float,
    pub s: c_float,
    pub t: c_float,
    pub r: u8,
    pub g: u8,
    pub b: u8,
    pub a: u8,
}

impl ::std::fmt::Debug for CoglVertexP2T2C4 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglVertexP2T2C4 @ {:?}", self as *const _))
         .field("x", &self.x)
         .field("y", &self.y)
         .field("s", &self.s)
         .field("t", &self.t)
         .field("r", &self.r)
         .field("g", &self.g)
         .field("b", &self.b)
         .field("a", &self.a)
         .finish()
    }
}

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

impl ::std::fmt::Debug for CoglVertexP3 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglVertexP3 @ {:?}", self as *const _))
         .field("x", &self.x)
         .field("y", &self.y)
         .field("z", &self.z)
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglVertexP3C4 {
    pub x: c_float,
    pub y: c_float,
    pub z: c_float,
    pub r: u8,
    pub g: u8,
    pub b: u8,
    pub a: u8,
}

impl ::std::fmt::Debug for CoglVertexP3C4 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglVertexP3C4 @ {:?}", self as *const _))
         .field("x", &self.x)
         .field("y", &self.y)
         .field("z", &self.z)
         .field("r", &self.r)
         .field("g", &self.g)
         .field("b", &self.b)
         .field("a", &self.a)
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglVertexP3T2 {
    pub x: c_float,
    pub y: c_float,
    pub z: c_float,
    pub s: c_float,
    pub t: c_float,
}

impl ::std::fmt::Debug for CoglVertexP3T2 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglVertexP3T2 @ {:?}", self as *const _))
         .field("x", &self.x)
         .field("y", &self.y)
         .field("z", &self.z)
         .field("s", &self.s)
         .field("t", &self.t)
         .finish()
    }
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct CoglVertexP3T2C4 {
    pub x: c_float,
    pub y: c_float,
    pub z: c_float,
    pub s: c_float,
    pub t: c_float,
    pub r: u8,
    pub g: u8,
    pub b: u8,
    pub a: u8,
}

impl ::std::fmt::Debug for CoglVertexP3T2C4 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglVertexP3T2C4 @ {:?}", self as *const _))
         .field("x", &self.x)
         .field("y", &self.y)
         .field("z", &self.z)
         .field("s", &self.s)
         .field("t", &self.t)
         .field("r", &self.r)
         .field("g", &self.g)
         .field("b", &self.b)
         .field("a", &self.a)
         .finish()
    }
}

#[repr(C)]
pub struct _CoglColorSizeCheck {
    _truncated_record_marker: c_void,
    // /*Ignored*/field compile_time_assert_CoglColor_size has empty c:type
}

impl ::std::fmt::Debug for _CoglColorSizeCheck {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("_CoglColorSizeCheck @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct _CoglEulerSizeCheck {
    _truncated_record_marker: c_void,
    // /*Ignored*/field compile_time_assert_CoglEuler_size has empty c:type
}

impl ::std::fmt::Debug for _CoglEulerSizeCheck {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("_CoglEulerSizeCheck @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct _CoglMatrixSizeCheck {
    _truncated_record_marker: c_void,
    // /*Ignored*/field compile_time_assert_CoglMatrix_size has empty c:type
}

impl ::std::fmt::Debug for _CoglMatrixSizeCheck {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("_CoglMatrixSizeCheck @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct _CoglQuaternionSizeCheck {
    _truncated_record_marker: c_void,
    // /*Ignored*/field compile_time_assert_CoglQuaternion_size has empty c:type
}

impl ::std::fmt::Debug for _CoglQuaternionSizeCheck {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("_CoglQuaternionSizeCheck @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct _CoglTextureVertexSizeCheck {
    _truncated_record_marker: c_void,
    // /*Ignored*/field compile_time_assert_CoglTextureVertex_size has empty c:type
}

impl ::std::fmt::Debug for _CoglTextureVertexSizeCheck {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("_CoglTextureVertexSizeCheck @ {:?}", self as *const _))
         .finish()
    }
}

// Classes
#[repr(C)]
pub struct CoglAtlasTexture(c_void);

impl ::std::fmt::Debug for CoglAtlasTexture {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglAtlasTexture @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglAttribute(c_void);

impl ::std::fmt::Debug for CoglAttribute {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglAttribute @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglAttributeBuffer(c_void);

impl ::std::fmt::Debug for CoglAttributeBuffer {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglAttributeBuffer @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglBitmap(c_void);

impl ::std::fmt::Debug for CoglBitmap {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglBitmap @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglContext(c_void);

impl ::std::fmt::Debug for CoglContext {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglContext @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglDisplay(c_void);

impl ::std::fmt::Debug for CoglDisplay {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglDisplay @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglFixed(c_void);

impl ::std::fmt::Debug for CoglFixed {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglFixed @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglFrameInfo(c_void);

impl ::std::fmt::Debug for CoglFrameInfo {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglFrameInfo @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglGLES2Context(c_void);

impl ::std::fmt::Debug for CoglGLES2Context {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglGLES2Context @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglIndexBuffer(c_void);

impl ::std::fmt::Debug for CoglIndexBuffer {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglIndexBuffer @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglIndices(c_void);

impl ::std::fmt::Debug for CoglIndices {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglIndices @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglMatrixStack(c_void);

impl ::std::fmt::Debug for CoglMatrixStack {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglMatrixStack @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglObject(c_void);

impl ::std::fmt::Debug for CoglObject {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglObject @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglOnscreen(c_void);

impl ::std::fmt::Debug for CoglOnscreen {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglOnscreen @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglOnscreenTemplate(c_void);

impl ::std::fmt::Debug for CoglOnscreenTemplate {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglOnscreenTemplate @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglOutput(c_void);

impl ::std::fmt::Debug for CoglOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglOutput @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglPipeline(c_void);

impl ::std::fmt::Debug for CoglPipeline {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglPipeline @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglPixelBuffer(c_void);

impl ::std::fmt::Debug for CoglPixelBuffer {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglPixelBuffer @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglPrimitive(c_void);

impl ::std::fmt::Debug for CoglPrimitive {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglPrimitive @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglRenderer(c_void);

impl ::std::fmt::Debug for CoglRenderer {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglRenderer @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglSnippet(c_void);

impl ::std::fmt::Debug for CoglSnippet {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglSnippet @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglSubTexture(c_void);

impl ::std::fmt::Debug for CoglSubTexture {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglSubTexture @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglSwapChain(c_void);

impl ::std::fmt::Debug for CoglSwapChain {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglSwapChain @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglTexture2D(c_void);

impl ::std::fmt::Debug for CoglTexture2D {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglTexture2D @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglTexture2DSliced(c_void);

impl ::std::fmt::Debug for CoglTexture2DSliced {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglTexture2DSliced @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglTexture3D(c_void);

impl ::std::fmt::Debug for CoglTexture3D {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglTexture3D @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglTexturePixmapX11(c_void);

impl ::std::fmt::Debug for CoglTexturePixmapX11 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglTexturePixmapX11 @ {:?}", self as *const _))
         .finish()
    }
}

#[repr(C)]
pub struct CoglTextureRectangle(c_void);

impl ::std::fmt::Debug for CoglTextureRectangle {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("CoglTextureRectangle @ {:?}", self as *const _))
         .finish()
    }
}

// Interfaces
#[repr(C)]
pub struct CoglFramebuffer(c_void);

impl ::std::fmt::Debug for CoglFramebuffer {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "CoglFramebuffer @ {:?}", self as *const _)
    }
}

#[repr(C)]
pub struct CoglTexture(c_void);

impl ::std::fmt::Debug for CoglTexture {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "CoglTexture @ {:?}", self as *const _)
    }
}


extern "C" {

    //=========================================================================
    // CoglAttributeType
    //=========================================================================
    pub fn cogl_attribute_type_get_type() -> GType;

    //=========================================================================
    // CoglBitmapError
    //=========================================================================
    pub fn cogl_bitmap_error_get_type() -> GType;
    pub fn cogl_bitmap_error_quark() -> u32;

    //=========================================================================
    // CoglBlendStringError
    //=========================================================================
    pub fn cogl_blend_string_error_get_type() -> GType;
    pub fn cogl_blend_string_error_quark() -> u32;

    //=========================================================================
    // CoglDepthTestFunction
    //=========================================================================
    pub fn cogl_depth_test_function_get_type() -> GType;

    //=========================================================================
    // CoglFilterReturn
    //=========================================================================
    pub fn cogl_filter_return_get_type() -> GType;

    //=========================================================================
    // CoglFogMode
    //=========================================================================
    pub fn cogl_fog_mode_get_type() -> GType;

    //=========================================================================
    // CoglIndicesType
    //=========================================================================
    pub fn cogl_indices_type_get_type() -> GType;

    //=========================================================================
    // CoglMaterialAlphaFunc
    //=========================================================================
    pub fn cogl_material_alpha_func_get_type() -> GType;

    //=========================================================================
    // CoglMaterialFilter
    //=========================================================================
    pub fn cogl_material_filter_get_type() -> GType;

    //=========================================================================
    // CoglMaterialLayerType
    //=========================================================================
    pub fn cogl_material_layer_type_get_type() -> GType;

    //=========================================================================
    // CoglMaterialWrapMode
    //=========================================================================
    pub fn cogl_material_wrap_mode_get_type() -> GType;

    //=========================================================================
    // CoglPixelFormat
    //=========================================================================
    pub fn cogl_pixel_format_get_type() -> GType;

    //=========================================================================
    // CoglRendererError
    //=========================================================================
    pub fn cogl_renderer_error_get_type() -> GType;
    pub fn cogl_renderer_error_quark() -> u32;

    //=========================================================================
    // CoglShaderType
    //=========================================================================
    pub fn cogl_shader_type_get_type() -> GType;

    //=========================================================================
    // CoglStereoMode
    //=========================================================================
    pub fn cogl_stereo_mode_get_type() -> GType;

    //=========================================================================
    // CoglSystemError
    //=========================================================================
    pub fn cogl_system_error_get_type() -> GType;

    //=========================================================================
    // CoglTextureComponents
    //=========================================================================
    pub fn cogl_texture_components_get_type() -> GType;

    //=========================================================================
    // CoglTextureError
    //=========================================================================
    pub fn cogl_texture_error_get_type() -> GType;
    pub fn cogl_texture_error_quark() -> u32;

    //=========================================================================
    // CoglTextureType
    //=========================================================================
    pub fn cogl_texture_type_get_type() -> GType;

    //=========================================================================
    // CoglVerticesMode
    //=========================================================================
    pub fn cogl_vertices_mode_get_type() -> GType;

    //=========================================================================
    // CoglWinding
    //=========================================================================
    pub fn cogl_winding_get_type() -> GType;

    //=========================================================================
    // CoglWinsysFeature
    //=========================================================================
    pub fn cogl_winsys_feature_get_type() -> GType;

    //=========================================================================
    // CoglBufferBit
    //=========================================================================
    pub fn cogl_buffer_bit_get_type() -> GType;

    //=========================================================================
    // CoglBufferTarget
    //=========================================================================
    pub fn cogl_buffer_target_get_type() -> GType;

    //=========================================================================
    // CoglColorMask
    //=========================================================================
    pub fn cogl_color_mask_get_type() -> GType;

    //=========================================================================
    // CoglFeatureFlags
    //=========================================================================
    pub fn cogl_feature_flags_get_type() -> GType;

    //=========================================================================
    // CoglReadPixelsFlags
    //=========================================================================
    pub fn cogl_read_pixels_flags_get_type() -> GType;

    //=========================================================================
    // CoglTextureFlags
    //=========================================================================
    pub fn cogl_texture_flags_get_type() -> GType;

    //=========================================================================
    // CoglColor
    //=========================================================================
    pub fn cogl_color_get_gtype() -> GType;
    pub fn cogl_color_new() -> *mut CoglColor;
    pub fn cogl_color_copy(color: *const CoglColor) -> *mut CoglColor;
    pub fn cogl_color_free(color: *mut CoglColor);
    pub fn cogl_color_get_alpha(color: *const CoglColor) -> c_float;
    pub fn cogl_color_get_alpha_byte(color: *const CoglColor) -> u8;
    pub fn cogl_color_get_alpha_float(color: *const CoglColor) -> c_float;
    pub fn cogl_color_get_blue(color: *const CoglColor) -> c_float;
    pub fn cogl_color_get_blue_byte(color: *const CoglColor) -> u8;
    pub fn cogl_color_get_blue_float(color: *const CoglColor) -> c_float;
    pub fn cogl_color_get_green(color: *const CoglColor) -> c_float;
    pub fn cogl_color_get_green_byte(color: *const CoglColor) -> u8;
    pub fn cogl_color_get_green_float(color: *const CoglColor) -> c_float;
    pub fn cogl_color_get_red(color: *const CoglColor) -> c_float;
    pub fn cogl_color_get_red_byte(color: *const CoglColor) -> u8;
    pub fn cogl_color_get_red_float(color: *const CoglColor) -> c_float;
    pub fn cogl_color_init_from_4f(color: *mut CoglColor, red: c_float, green: c_float, blue: c_float, alpha: c_float);
    pub fn cogl_color_init_from_4fv(color: *mut CoglColor, color_array: *const c_float);
    pub fn cogl_color_init_from_4ub(color: *mut CoglColor, red: u8, green: u8, blue: u8, alpha: u8);
    pub fn cogl_color_premultiply(color: *mut CoglColor);
    pub fn cogl_color_set_alpha(color: *mut CoglColor, alpha: c_float);
    pub fn cogl_color_set_alpha_byte(color: *mut CoglColor, alpha: u8);
    pub fn cogl_color_set_alpha_float(color: *mut CoglColor, alpha: c_float);
    pub fn cogl_color_set_blue(color: *mut CoglColor, blue: c_float);
    pub fn cogl_color_set_blue_byte(color: *mut CoglColor, blue: u8);
    pub fn cogl_color_set_blue_float(color: *mut CoglColor, blue: c_float);
    pub fn cogl_color_set_from_4f(color: *mut CoglColor, red: c_float, green: c_float, blue: c_float, alpha: c_float);
    pub fn cogl_color_set_from_4ub(color: *mut CoglColor, red: u8, green: u8, blue: u8, alpha: u8);
    pub fn cogl_color_set_green(color: *mut CoglColor, green: c_float);
    pub fn cogl_color_set_green_byte(color: *mut CoglColor, green: u8);
    pub fn cogl_color_set_green_float(color: *mut CoglColor, green: c_float);
    pub fn cogl_color_set_red(color: *mut CoglColor, red: c_float);
    pub fn cogl_color_set_red_byte(color: *mut CoglColor, red: u8);
    pub fn cogl_color_set_red_float(color: *mut CoglColor, red: c_float);
    pub fn cogl_color_to_hsl(color: *const CoglColor, hue: *mut c_float, saturation: *mut c_float, luminance: *mut c_float);
    pub fn cogl_color_unpremultiply(color: *mut CoglColor);
    pub fn cogl_color_equal(v1: *mut c_void, v2: *mut c_void) -> CoglBool;
    pub fn cogl_color_init_from_hsl(color: *mut CoglColor, hue: c_float, saturation: c_float, luminance: c_float);

    //=========================================================================
    // CoglDepthState
    //=========================================================================
    pub fn cogl_depth_state_get_range(state: *mut CoglDepthState, near_val: *mut c_float, far_val: *mut c_float);
    pub fn cogl_depth_state_get_test_enabled(state: *mut CoglDepthState) -> CoglBool;
    pub fn cogl_depth_state_get_test_function(state: *mut CoglDepthState) -> CoglDepthTestFunction;
    pub fn cogl_depth_state_get_write_enabled(state: *mut CoglDepthState) -> CoglBool;
    pub fn cogl_depth_state_init(state: *mut CoglDepthState);
    pub fn cogl_depth_state_set_range(state: *mut CoglDepthState, near_val: c_float, far_val: c_float);
    pub fn cogl_depth_state_set_test_enabled(state: *mut CoglDepthState, enable: CoglBool);
    pub fn cogl_depth_state_set_test_function(state: *mut CoglDepthState, function: CoglDepthTestFunction);
    pub fn cogl_depth_state_set_write_enabled(state: *mut CoglDepthState, enable: CoglBool);

    //=========================================================================
    // CoglEuler
    //=========================================================================
    pub fn cogl_euler_get_gtype() -> GType;
    pub fn cogl_euler_copy(src: *const CoglEuler) -> *mut CoglEuler;
    pub fn cogl_euler_free(euler: *mut CoglEuler);
    pub fn cogl_euler_init(euler: *mut CoglEuler, heading: c_float, pitch: c_float, roll: c_float);
    pub fn cogl_euler_init_from_matrix(euler: *mut CoglEuler, matrix: *const CoglMatrix);
    pub fn cogl_euler_init_from_quaternion(euler: *mut CoglEuler, quaternion: *const CoglQuaternion);
    pub fn cogl_euler_equal(v1: *mut c_void, v2: *mut c_void) -> CoglBool;

    //=========================================================================
    // CoglFenceClosure
    //=========================================================================
    pub fn cogl_fence_closure_get_user_data(closure: *mut CoglFenceClosure) -> *mut c_void;

    //=========================================================================
    // CoglFrameClosure
    //=========================================================================
    pub fn cogl_frame_closure_get_gtype() -> GType;

    //=========================================================================
    // CoglMatrix
    //=========================================================================
    pub fn cogl_matrix_get_gtype() -> GType;
    pub fn cogl_matrix_copy(matrix: *const CoglMatrix) -> *mut CoglMatrix;
    pub fn cogl_matrix_free(matrix: *mut CoglMatrix);
    pub fn cogl_matrix_frustum(matrix: *mut CoglMatrix, left: c_float, right: c_float, bottom: c_float, top: c_float, z_near: c_float, z_far: c_float);
    pub fn cogl_matrix_get_array(matrix: *const CoglMatrix) -> *const c_float;
    pub fn cogl_matrix_get_inverse(matrix: *const CoglMatrix, inverse: *mut CoglMatrix) -> CoglBool;
    pub fn cogl_matrix_init_from_array(matrix: *mut CoglMatrix, array: *const c_float);
    pub fn cogl_matrix_init_from_euler(matrix: *mut CoglMatrix, euler: *const CoglEuler);
    pub fn cogl_matrix_init_from_quaternion(matrix: *mut CoglMatrix, quaternion: *const CoglQuaternion);
    pub fn cogl_matrix_init_identity(matrix: *mut CoglMatrix);
    pub fn cogl_matrix_init_translation(matrix: *mut CoglMatrix, tx: c_float, ty: c_float, tz: c_float);
    pub fn cogl_matrix_is_identity(matrix: *const CoglMatrix) -> CoglBool;
    pub fn cogl_matrix_look_at(matrix: *mut CoglMatrix, eye_position_x: c_float, eye_position_y: c_float, eye_position_z: c_float, object_x: c_float, object_y: c_float, object_z: c_float, world_up_x: c_float, world_up_y: c_float, world_up_z: c_float);
    pub fn cogl_matrix_multiply(result: *mut CoglMatrix, a: *const CoglMatrix, b: *const CoglMatrix);
    pub fn cogl_matrix_ortho(matrix: *mut CoglMatrix, left: c_float, right: c_float, bottom: c_float, top: c_float, near: c_float, far: c_float);
    pub fn cogl_matrix_orthographic(matrix: *mut CoglMatrix, x_1: c_float, y_1: c_float, x_2: c_float, y_2: c_float, near: c_float, far: c_float);
    pub fn cogl_matrix_perspective(matrix: *mut CoglMatrix, fov_y: c_float, aspect: c_float, z_near: c_float, z_far: c_float);
    pub fn cogl_matrix_project_points(matrix: *const CoglMatrix, n_components: c_int, stride_in: size_t, points_in: *mut c_void, stride_out: size_t, points_out: *mut c_void, n_points: c_int);
    pub fn cogl_matrix_rotate(matrix: *mut CoglMatrix, angle: c_float, x: c_float, y: c_float, z: c_float);
    pub fn cogl_matrix_rotate_euler(matrix: *mut CoglMatrix, euler: *const CoglEuler);
    pub fn cogl_matrix_rotate_quaternion(matrix: *mut CoglMatrix, quaternion: *const CoglQuaternion);
    pub fn cogl_matrix_scale(matrix: *mut CoglMatrix, sx: c_float, sy: c_float, sz: c_float);
    pub fn cogl_matrix_transform_point(matrix: *const CoglMatrix, x: *mut c_float, y: *mut c_float, z: *mut c_float, w: *mut c_float);
    pub fn cogl_matrix_transform_points(matrix: *const CoglMatrix, n_components: c_int, stride_in: size_t, points_in: *mut c_void, stride_out: size_t, points_out: *mut c_void, n_points: c_int);
    pub fn cogl_matrix_translate(matrix: *mut CoglMatrix, x: c_float, y: c_float, z: c_float);
    pub fn cogl_matrix_transpose(matrix: *mut CoglMatrix);
    pub fn cogl_matrix_view_2d_in_frustum(matrix: *mut CoglMatrix, left: c_float, right: c_float, bottom: c_float, top: c_float, z_near: c_float, z_2d: c_float, width_2d: c_float, height_2d: c_float);
    pub fn cogl_matrix_view_2d_in_perspective(matrix: *mut CoglMatrix, fov_y: c_float, aspect: c_float, z_near: c_float, z_2d: c_float, width_2d: c_float, height_2d: c_float);
    pub fn cogl_matrix_equal(v1: *mut c_void, v2: *mut c_void) -> CoglBool;

    //=========================================================================
    // CoglMatrixEntry
    //=========================================================================
    pub fn cogl_matrix_entry_get_gtype() -> GType;
    pub fn cogl_matrix_entry_calculate_translation(entry0: *mut CoglMatrixEntry, entry1: *mut CoglMatrixEntry, x: *mut c_float, y: *mut c_float, z: *mut c_float) -> CoglBool;
    pub fn cogl_matrix_entry_equal(entry0: *mut CoglMatrixEntry, entry1: *mut CoglMatrixEntry) -> CoglBool;
    pub fn cogl_matrix_entry_get(entry: *mut CoglMatrixEntry, matrix: *mut CoglMatrix) -> *mut CoglMatrix;
    pub fn cogl_matrix_entry_is_identity(entry: *mut CoglMatrixEntry) -> CoglBool;
    pub fn cogl_matrix_entry_ref(entry: *mut CoglMatrixEntry) -> *mut CoglMatrixEntry;
    pub fn cogl_matrix_entry_unref(entry: *mut CoglMatrixEntry);

    //=========================================================================
    // CoglOnscreenDirtyClosure
    //=========================================================================
    pub fn cogl_onscreen_dirty_closure_get_gtype() -> GType;

    //=========================================================================
    // CoglOnscreenResizeClosure
    //=========================================================================
    pub fn cogl_onscreen_resize_closure_get_gtype() -> GType;

    //=========================================================================
    // CoglQuaternion
    //=========================================================================
    pub fn cogl_quaternion_get_gtype() -> GType;
    pub fn cogl_quaternion_copy(src: *const CoglQuaternion) -> *mut CoglQuaternion;
    pub fn cogl_quaternion_dot_product(a: *const CoglQuaternion, b: *const CoglQuaternion) -> c_float;
    pub fn cogl_quaternion_free(quaternion: *mut CoglQuaternion);
    pub fn cogl_quaternion_get_rotation_angle(quaternion: *const CoglQuaternion) -> c_float;
    pub fn cogl_quaternion_get_rotation_axis(quaternion: *const CoglQuaternion, vector3: *mut c_float);
    pub fn cogl_quaternion_init(quaternion: *mut CoglQuaternion, angle: c_float, x: c_float, y: c_float, z: c_float);
    pub fn cogl_quaternion_init_from_angle_vector(quaternion: *mut CoglQuaternion, angle: c_float, axis3f: *const c_float);
    pub fn cogl_quaternion_init_from_array(quaternion: *mut CoglQuaternion, array: *const c_float);
    pub fn cogl_quaternion_init_from_euler(quaternion: *mut CoglQuaternion, euler: *const CoglEuler);
    pub fn cogl_quaternion_init_from_matrix(quaternion: *mut CoglQuaternion, matrix: *const CoglMatrix);
    pub fn cogl_quaternion_init_from_quaternion(quaternion: *mut CoglQuaternion, src: *mut CoglQuaternion);
    pub fn cogl_quaternion_init_from_x_rotation(quaternion: *mut CoglQuaternion, angle: c_float);
    pub fn cogl_quaternion_init_from_y_rotation(quaternion: *mut CoglQuaternion, angle: c_float);
    pub fn cogl_quaternion_init_from_z_rotation(quaternion: *mut CoglQuaternion, angle: c_float);
    pub fn cogl_quaternion_init_identity(quaternion: *mut CoglQuaternion);
    pub fn cogl_quaternion_invert(quaternion: *mut CoglQuaternion);
    pub fn cogl_quaternion_multiply(result: *mut CoglQuaternion, left: *const CoglQuaternion, right: *const CoglQuaternion);
    pub fn cogl_quaternion_nlerp(result: *mut CoglQuaternion, a: *const CoglQuaternion, b: *const CoglQuaternion, t: c_float);
    pub fn cogl_quaternion_normalize(quaternion: *mut CoglQuaternion);
    pub fn cogl_quaternion_pow(quaternion: *mut CoglQuaternion, exponent: c_float);
    pub fn cogl_quaternion_slerp(result: *mut CoglQuaternion, a: *const CoglQuaternion, b: *const CoglQuaternion, t: c_float);
    pub fn cogl_quaternion_squad(result: *mut CoglQuaternion, prev: *const CoglQuaternion, a: *const CoglQuaternion, b: *const CoglQuaternion, next: *const CoglQuaternion, t: c_float);
    pub fn cogl_quaternion_equal(v1: *mut c_void, v2: *mut c_void) -> CoglBool;

    //=========================================================================
    // CoglAtlasTexture
    //=========================================================================
    pub fn cogl_atlas_texture_get_gtype() -> GType;
    pub fn cogl_atlas_texture_new_from_bitmap(bmp: *mut CoglBitmap) -> *mut CoglAtlasTexture;
    pub fn cogl_atlas_texture_new_from_data(ctx: *mut CoglContext, width: c_int, height: c_int, format: CoglPixelFormat, rowstride: c_int, data: *const u8, error: *mut *mut glib::GError) -> *mut CoglAtlasTexture;
    pub fn cogl_atlas_texture_new_from_file(ctx: *mut CoglContext, filename: *const c_char, error: *mut *mut glib::GError) -> *mut CoglAtlasTexture;
    pub fn cogl_atlas_texture_new_with_size(ctx: *mut CoglContext, width: c_int, height: c_int) -> *mut CoglAtlasTexture;

    //=========================================================================
    // CoglAttribute
    //=========================================================================
    pub fn cogl_attribute_get_gtype() -> GType;
    pub fn cogl_attribute_new(attribute_buffer: *mut CoglAttributeBuffer, name: *const c_char, stride: size_t, offset: size_t, components: c_int, type_: CoglAttributeType) -> *mut CoglAttribute;
    pub fn cogl_attribute_new_const_1f(context: *mut CoglContext, name: *const c_char, value: c_float) -> *mut CoglAttribute;
    pub fn cogl_attribute_new_const_2f(context: *mut CoglContext, name: *const c_char, component0: c_float, component1: c_float) -> *mut CoglAttribute;
    pub fn cogl_attribute_new_const_2fv(context: *mut CoglContext, name: *const c_char, value: *const c_float) -> *mut CoglAttribute;
    pub fn cogl_attribute_new_const_2x2fv(context: *mut CoglContext, name: *const c_char, matrix2x2: *const c_float, transpose: CoglBool) -> *mut CoglAttribute;
    pub fn cogl_attribute_new_const_3f(context: *mut CoglContext, name: *const c_char, component0: c_float, component1: c_float, component2: c_float) -> *mut CoglAttribute;
    pub fn cogl_attribute_new_const_3fv(context: *mut CoglContext, name: *const c_char, value: *const c_float) -> *mut CoglAttribute;
    pub fn cogl_attribute_new_const_3x3fv(context: *mut CoglContext, name: *const c_char, matrix3x3: *const c_float, transpose: CoglBool) -> *mut CoglAttribute;
    pub fn cogl_attribute_new_const_4f(context: *mut CoglContext, name: *const c_char, component0: c_float, component1: c_float, component2: c_float, component3: c_float) -> *mut CoglAttribute;
    pub fn cogl_attribute_new_const_4fv(context: *mut CoglContext, name: *const c_char, value: *const c_float) -> *mut CoglAttribute;
    pub fn cogl_attribute_new_const_4x4fv(context: *mut CoglContext, name: *const c_char, matrix4x4: *const c_float, transpose: CoglBool) -> *mut CoglAttribute;
    pub fn cogl_attribute_get_buffer(attribute: *mut CoglAttribute) -> *mut CoglAttributeBuffer;
    pub fn cogl_attribute_get_normalized(attribute: *mut CoglAttribute) -> CoglBool;
    pub fn cogl_attribute_set_buffer(attribute: *mut CoglAttribute, attribute_buffer: *mut CoglAttributeBuffer);
    pub fn cogl_attribute_set_normalized(attribute: *mut CoglAttribute, normalized: CoglBool);

    //=========================================================================
    // CoglAttributeBuffer
    //=========================================================================
    pub fn cogl_attribute_buffer_get_gtype() -> GType;
    pub fn cogl_attribute_buffer_new(context: *mut CoglContext, bytes: size_t, data: *mut c_void) -> *mut CoglAttributeBuffer;
    pub fn cogl_attribute_buffer_new_with_size(context: *mut CoglContext, bytes: size_t) -> *mut CoglAttributeBuffer;

    //=========================================================================
    // CoglBitmap
    //=========================================================================
    pub fn cogl_bitmap_get_gtype() -> GType;
    pub fn cogl_bitmap_new_for_data(context: *mut CoglContext, width: c_int, height: c_int, format: CoglPixelFormat, rowstride: c_int, data: *mut u8) -> *mut CoglBitmap;
    pub fn cogl_bitmap_new_from_buffer(buffer: *mut CoglBuffer, format: CoglPixelFormat, width: c_int, height: c_int, rowstride: c_int, offset: c_int) -> *mut CoglBitmap;
    pub fn cogl_bitmap_new_from_file(filename: *const c_char, error: *mut *mut glib::GError) -> *mut CoglBitmap;
    pub fn cogl_bitmap_new_with_size(context: *mut CoglContext, width: c_uint, height: c_uint, format: CoglPixelFormat) -> *mut CoglBitmap;
    pub fn cogl_bitmap_get_size_from_file(filename: *const c_char, width: *mut c_int, height: *mut c_int) -> CoglBool;
    pub fn cogl_bitmap_get_buffer(bitmap: *mut CoglBitmap) -> *mut CoglPixelBuffer;
    pub fn cogl_bitmap_get_format(bitmap: *mut CoglBitmap) -> CoglPixelFormat;
    pub fn cogl_bitmap_get_height(bitmap: *mut CoglBitmap) -> c_int;
    pub fn cogl_bitmap_get_rowstride(bitmap: *mut CoglBitmap) -> c_int;
    pub fn cogl_bitmap_get_width(bitmap: *mut CoglBitmap) -> c_int;

    //=========================================================================
    // CoglContext
    //=========================================================================
    pub fn cogl_context_get_gtype() -> GType;
    pub fn cogl_context_new(display: *mut CoglDisplay, error: *mut *mut glib::GError) -> *mut CoglContext;
    pub fn cogl_context_get_display(context: *mut CoglContext) -> *mut CoglDisplay;
    pub fn cogl_context_get_renderer(context: *mut CoglContext) -> *mut CoglRenderer;

    //=========================================================================
    // CoglDisplay
    //=========================================================================
    pub fn cogl_display_get_gtype() -> GType;
    pub fn cogl_display_new(renderer: *mut CoglRenderer, onscreen_template: *mut CoglOnscreenTemplate) -> *mut CoglDisplay;
    pub fn cogl_display_get_renderer(display: *mut CoglDisplay) -> *mut CoglRenderer;
    pub fn cogl_display_set_onscreen_template(display: *mut CoglDisplay, onscreen_template: *mut CoglOnscreenTemplate);
    pub fn cogl_display_setup(display: *mut CoglDisplay, error: *mut *mut glib::GError) -> CoglBool;

    //=========================================================================
    // CoglFixed
    //=========================================================================
    pub fn cogl_fixed_get_type() -> GType;

    //=========================================================================
    // CoglFrameInfo
    //=========================================================================
    pub fn cogl_frame_info_get_gtype() -> GType;
    pub fn cogl_frame_info_get_frame_counter(info: *mut CoglFrameInfo) -> i64;
    pub fn cogl_frame_info_get_output(info: *mut CoglFrameInfo) -> *mut CoglOutput;
    pub fn cogl_frame_info_get_presentation_time(info: *mut CoglFrameInfo) -> i64;
    pub fn cogl_frame_info_get_refresh_rate(info: *mut CoglFrameInfo) -> c_float;

    //=========================================================================
    // CoglGLES2Context
    //=========================================================================
    pub fn cogl_gles2_context_get_gtype() -> GType;
    pub fn cogl_gles2_context_new(ctx: *mut CoglContext, error: *mut *mut glib::GError) -> *mut CoglGLES2Context;
    //pub fn cogl_gles2_context_get_vtable(gles2_ctx: *mut CoglGLES2Context) -> /*Ignored*/*const CoglGLES2Vtable;

    //=========================================================================
    // CoglIndexBuffer
    //=========================================================================
    pub fn cogl_index_buffer_get_gtype() -> GType;
    pub fn cogl_index_buffer_new(context: *mut CoglContext, bytes: size_t) -> *mut CoglIndexBuffer;

    //=========================================================================
    // CoglIndices
    //=========================================================================
    pub fn cogl_indices_get_gtype() -> GType;
    pub fn cogl_indices_new(context: *mut CoglContext, type_: CoglIndicesType, indices_data: *mut c_void, n_indices: c_int) -> *mut CoglIndices;
    pub fn cogl_indices_new_for_buffer(type_: CoglIndicesType, buffer: *mut CoglIndexBuffer, offset: size_t) -> *mut CoglIndices;
    pub fn cogl_indices_get_buffer(indices: *mut CoglIndices) -> *mut CoglIndexBuffer;
    pub fn cogl_indices_get_offset(indices: *mut CoglIndices) -> size_t;
    pub fn cogl_indices_get_type(indices: *mut CoglIndices) -> CoglIndicesType;
    pub fn cogl_indices_set_offset(indices: *mut CoglIndices, offset: size_t);

    //=========================================================================
    // CoglMatrixStack
    //=========================================================================
    pub fn cogl_matrix_stack_get_gtype() -> GType;
    pub fn cogl_matrix_stack_new(ctx: *mut CoglContext) -> *mut CoglMatrixStack;
    pub fn cogl_matrix_stack_frustum(stack: *mut CoglMatrixStack, left: c_float, right: c_float, bottom: c_float, top: c_float, z_near: c_float, z_far: c_float);
    pub fn cogl_matrix_stack_get(stack: *mut CoglMatrixStack, matrix: *mut CoglMatrix) -> *mut CoglMatrix;
    pub fn cogl_matrix_stack_get_entry(stack: *mut CoglMatrixStack) -> *mut CoglMatrixEntry;
    pub fn cogl_matrix_stack_get_inverse(stack: *mut CoglMatrixStack, inverse: *mut CoglMatrix) -> CoglBool;
    pub fn cogl_matrix_stack_load_identity(stack: *mut CoglMatrixStack);
    pub fn cogl_matrix_stack_multiply(stack: *mut CoglMatrixStack, matrix: *const CoglMatrix);
    pub fn cogl_matrix_stack_orthographic(stack: *mut CoglMatrixStack, x_1: c_float, y_1: c_float, x_2: c_float, y_2: c_float, near: c_float, far: c_float);
    pub fn cogl_matrix_stack_perspective(stack: *mut CoglMatrixStack, fov_y: c_float, aspect: c_float, z_near: c_float, z_far: c_float);
    pub fn cogl_matrix_stack_pop(stack: *mut CoglMatrixStack);
    pub fn cogl_matrix_stack_push(stack: *mut CoglMatrixStack);
    pub fn cogl_matrix_stack_rotate(stack: *mut CoglMatrixStack, angle: c_float, x: c_float, y: c_float, z: c_float);
    pub fn cogl_matrix_stack_rotate_euler(stack: *mut CoglMatrixStack, euler: *const CoglEuler);
    pub fn cogl_matrix_stack_rotate_quaternion(stack: *mut CoglMatrixStack, quaternion: *const CoglQuaternion);
    pub fn cogl_matrix_stack_scale(stack: *mut CoglMatrixStack, x: c_float, y: c_float, z: c_float);
    pub fn cogl_matrix_stack_set(stack: *mut CoglMatrixStack, matrix: *const CoglMatrix);
    pub fn cogl_matrix_stack_translate(stack: *mut CoglMatrixStack, x: c_float, y: c_float, z: c_float);

    //=========================================================================
    // CoglObject
    //=========================================================================
    pub fn cogl_object_get_gtype() -> GType;
    pub fn cogl_object_ref(object: *mut c_void) -> *mut c_void;
    pub fn cogl_object_unref(object: *mut c_void);
    pub fn cogl_object_value_get_object(value: *const gobject::GValue) -> gpointer;
    pub fn cogl_object_value_set_object(value: *mut gobject::GValue, object: gpointer);
    pub fn cogl_object_get_user_data(object: *mut CoglObject, key: *mut CoglUserDataKey) -> *mut c_void;
    pub fn cogl_object_set_user_data(object: *mut CoglObject, key: *mut CoglUserDataKey, user_data: *mut c_void, destroy: CoglUserDataDestroyCallback);

    //=========================================================================
    // CoglOnscreen
    //=========================================================================
    pub fn cogl_onscreen_get_gtype() -> GType;
    pub fn cogl_onscreen_new(context: *mut CoglContext, width: c_int, height: c_int) -> *mut CoglOnscreen;
    pub fn cogl_onscreen_add_dirty_callback(onscreen: *mut CoglOnscreen, callback: CoglOnscreenDirtyCallback, user_data: *mut c_void, destroy: CoglUserDataDestroyCallback) -> *mut CoglOnscreenDirtyClosure;
    pub fn cogl_onscreen_add_frame_callback(onscreen: *mut CoglOnscreen, callback: CoglFrameCallback, user_data: *mut c_void, destroy: CoglUserDataDestroyCallback) -> *mut CoglFrameClosure;
    pub fn cogl_onscreen_add_resize_callback(onscreen: *mut CoglOnscreen, callback: CoglOnscreenResizeCallback, user_data: *mut c_void, destroy: CoglUserDataDestroyCallback) -> *mut CoglOnscreenResizeClosure;
    pub fn cogl_onscreen_add_swap_buffers_callback(onscreen: *mut CoglOnscreen, callback: CoglSwapBuffersNotify, user_data: *mut c_void) -> c_uint;
    pub fn cogl_onscreen_get_buffer_age(onscreen: *mut CoglOnscreen) -> c_int;
    pub fn cogl_onscreen_get_frame_counter(onscreen: *mut CoglOnscreen) -> i64;
    pub fn cogl_onscreen_get_resizable(onscreen: *mut CoglOnscreen) -> CoglBool;
    pub fn cogl_onscreen_hide(onscreen: *mut CoglOnscreen);
    pub fn cogl_onscreen_remove_dirty_callback(onscreen: *mut CoglOnscreen, closure: *mut CoglOnscreenDirtyClosure);
    pub fn cogl_onscreen_remove_frame_callback(onscreen: *mut CoglOnscreen, closure: *mut CoglFrameClosure);
    pub fn cogl_onscreen_remove_resize_callback(onscreen: *mut CoglOnscreen, closure: *mut CoglOnscreenResizeClosure);
    pub fn cogl_onscreen_remove_swap_buffers_callback(onscreen: *mut CoglOnscreen, id: c_uint);
    pub fn cogl_onscreen_set_resizable(onscreen: *mut CoglOnscreen, resizable: CoglBool);
    pub fn cogl_onscreen_set_swap_throttled(onscreen: *mut CoglOnscreen, throttled: CoglBool);
    pub fn cogl_onscreen_show(onscreen: *mut CoglOnscreen);
    pub fn cogl_onscreen_swap_buffers(onscreen: *mut CoglOnscreen);
    pub fn cogl_onscreen_swap_buffers_with_damage(onscreen: *mut CoglOnscreen, rectangles: *const c_int, n_rectangles: c_int);
    pub fn cogl_onscreen_swap_region(onscreen: *mut CoglOnscreen, rectangles: *const c_int, n_rectangles: c_int);

    //=========================================================================
    // CoglOnscreenTemplate
    //=========================================================================
    pub fn cogl_onscreen_template_get_gtype() -> GType;
    pub fn cogl_onscreen_template_new(swap_chain: *mut CoglSwapChain) -> *mut CoglOnscreenTemplate;
    pub fn cogl_onscreen_template_set_samples_per_pixel(onscreen_template: *mut CoglOnscreenTemplate, n: c_int);
    pub fn cogl_onscreen_template_set_stereo_enabled(onscreen_template: *mut CoglOnscreenTemplate, enabled: CoglBool);
    pub fn cogl_onscreen_template_set_swap_throttled(onscreen_template: *mut CoglOnscreenTemplate, throttled: CoglBool);

    //=========================================================================
    // CoglOutput
    //=========================================================================
    pub fn cogl_output_get_gtype() -> GType;
    pub fn cogl_output_get_height(output: *mut CoglOutput) -> c_int;
    pub fn cogl_output_get_mm_height(output: *mut CoglOutput) -> c_int;
    pub fn cogl_output_get_mm_width(output: *mut CoglOutput) -> c_int;
    pub fn cogl_output_get_refresh_rate(output: *mut CoglOutput) -> c_float;
    pub fn cogl_output_get_subpixel_order(output: *mut CoglOutput) -> CoglSubpixelOrder;
    pub fn cogl_output_get_width(output: *mut CoglOutput) -> c_int;
    pub fn cogl_output_get_x(output: *mut CoglOutput) -> c_int;
    pub fn cogl_output_get_y(output: *mut CoglOutput) -> c_int;

    //=========================================================================
    // CoglPipeline
    //=========================================================================
    pub fn cogl_pipeline_get_gtype() -> GType;
    pub fn cogl_pipeline_new(context: *mut CoglContext) -> *mut CoglPipeline;
    pub fn cogl_pipeline_add_layer_snippet(pipeline: *mut CoglPipeline, layer: c_int, snippet: *mut CoglSnippet);
    pub fn cogl_pipeline_add_snippet(pipeline: *mut CoglPipeline, snippet: *mut CoglSnippet);
    pub fn cogl_pipeline_copy(source: *mut CoglPipeline) -> *mut CoglPipeline;
    pub fn cogl_pipeline_foreach_layer(pipeline: *mut CoglPipeline, callback: CoglPipelineLayerCallback, user_data: *mut c_void);
    pub fn cogl_pipeline_get_alpha_test_function(pipeline: *mut CoglPipeline) -> CoglPipelineAlphaFunc;
    pub fn cogl_pipeline_get_alpha_test_reference(pipeline: *mut CoglPipeline) -> c_float;
    pub fn cogl_pipeline_get_ambient(pipeline: *mut CoglPipeline, ambient: *mut CoglColor);
    pub fn cogl_pipeline_get_color(pipeline: *mut CoglPipeline, color: *mut CoglColor);
    pub fn cogl_pipeline_get_color_mask(pipeline: *mut CoglPipeline) -> CoglColorMask;
    pub fn cogl_pipeline_get_cull_face_mode(pipeline: *mut CoglPipeline) -> CoglPipelineCullFaceMode;
    pub fn cogl_pipeline_get_depth_state(pipeline: *mut CoglPipeline, state_out: *mut CoglDepthState);
    pub fn cogl_pipeline_get_diffuse(pipeline: *mut CoglPipeline, diffuse: *mut CoglColor);
    pub fn cogl_pipeline_get_emission(pipeline: *mut CoglPipeline, emission: *mut CoglColor);
    pub fn cogl_pipeline_get_front_face_winding(pipeline: *mut CoglPipeline) -> CoglWinding;
    pub fn cogl_pipeline_get_layer_mag_filter(pipeline: *mut CoglPipeline, layer_index: c_int) -> CoglPipelineFilter;
    pub fn cogl_pipeline_get_layer_min_filter(pipeline: *mut CoglPipeline, layer_index: c_int) -> CoglPipelineFilter;
    pub fn cogl_pipeline_get_layer_point_sprite_coords_enabled(pipeline: *mut CoglPipeline, layer_index: c_int) -> CoglBool;
    pub fn cogl_pipeline_get_layer_texture(pipeline: *mut CoglPipeline, layer_index: c_int) -> *mut CoglTexture;
    pub fn cogl_pipeline_get_layer_wrap_mode_p(pipeline: *mut CoglPipeline, layer_index: c_int) -> CoglPipelineWrapMode;
    pub fn cogl_pipeline_get_layer_wrap_mode_s(pipeline: *mut CoglPipeline, layer_index: c_int) -> CoglPipelineWrapMode;
    pub fn cogl_pipeline_get_layer_wrap_mode_t(pipeline: *mut CoglPipeline, layer_index: c_int) -> CoglPipelineWrapMode;
    pub fn cogl_pipeline_get_n_layers(pipeline: *mut CoglPipeline) -> c_int;
    pub fn cogl_pipeline_get_per_vertex_point_size(pipeline: *mut CoglPipeline) -> CoglBool;
    pub fn cogl_pipeline_get_point_size(pipeline: *mut CoglPipeline) -> c_float;
    pub fn cogl_pipeline_get_shininess(pipeline: *mut CoglPipeline) -> c_float;
    pub fn cogl_pipeline_get_specular(pipeline: *mut CoglPipeline, specular: *mut CoglColor);
    pub fn cogl_pipeline_get_uniform_location(pipeline: *mut CoglPipeline, uniform_name: *const c_char) -> c_int;
    pub fn cogl_pipeline_get_user_program(pipeline: *mut CoglPipeline) -> CoglHandle;
    pub fn cogl_pipeline_remove_layer(pipeline: *mut CoglPipeline, layer_index: c_int);
    pub fn cogl_pipeline_set_alpha_test_function(pipeline: *mut CoglPipeline, alpha_func: CoglPipelineAlphaFunc, alpha_reference: c_float);
    pub fn cogl_pipeline_set_ambient(pipeline: *mut CoglPipeline, ambient: *const CoglColor);
    pub fn cogl_pipeline_set_ambient_and_diffuse(pipeline: *mut CoglPipeline, color: *const CoglColor);
    pub fn cogl_pipeline_set_blend(pipeline: *mut CoglPipeline, blend_string: *const c_char, error: *mut *mut glib::GError) -> CoglBool;
    pub fn cogl_pipeline_set_blend_constant(pipeline: *mut CoglPipeline, constant_color: *const CoglColor);
    pub fn cogl_pipeline_set_color(pipeline: *mut CoglPipeline, color: *const CoglColor);
    pub fn cogl_pipeline_set_color4f(pipeline: *mut CoglPipeline, red: c_float, green: c_float, blue: c_float, alpha: c_float);
    pub fn cogl_pipeline_set_color4ub(pipeline: *mut CoglPipeline, red: u8, green: u8, blue: u8, alpha: u8);
    pub fn cogl_pipeline_set_color_mask(pipeline: *mut CoglPipeline, color_mask: CoglColorMask);
    pub fn cogl_pipeline_set_cull_face_mode(pipeline: *mut CoglPipeline, cull_face_mode: CoglPipelineCullFaceMode);
    pub fn cogl_pipeline_set_depth_state(pipeline: *mut CoglPipeline, state: *const CoglDepthState, error: *mut *mut glib::GError) -> CoglBool;
    pub fn cogl_pipeline_set_diffuse(pipeline: *mut CoglPipeline, diffuse: *const CoglColor);
    pub fn cogl_pipeline_set_emission(pipeline: *mut CoglPipeline, emission: *const CoglColor);
    pub fn cogl_pipeline_set_front_face_winding(pipeline: *mut CoglPipeline, front_winding: CoglWinding);
    pub fn cogl_pipeline_set_layer_combine(pipeline: *mut CoglPipeline, layer_index: c_int, blend_string: *const c_char, error: *mut *mut glib::GError) -> CoglBool;
    pub fn cogl_pipeline_set_layer_combine_constant(pipeline: *mut CoglPipeline, layer_index: c_int, constant: *const CoglColor);
    pub fn cogl_pipeline_set_layer_filters(pipeline: *mut CoglPipeline, layer_index: c_int, min_filter: CoglPipelineFilter, mag_filter: CoglPipelineFilter);
    pub fn cogl_pipeline_set_layer_matrix(pipeline: *mut CoglPipeline, layer_index: c_int, matrix: *const CoglMatrix);
    pub fn cogl_pipeline_set_layer_null_texture(pipeline: *mut CoglPipeline, layer_index: c_int, texture_type: CoglTextureType);
    pub fn cogl_pipeline_set_layer_point_sprite_coords_enabled(pipeline: *mut CoglPipeline, layer_index: c_int, enable: CoglBool, error: *mut *mut glib::GError) -> CoglBool;
    pub fn cogl_pipeline_set_layer_texture(pipeline: *mut CoglPipeline, layer_index: c_int, texture: *mut CoglTexture);
    pub fn cogl_pipeline_set_layer_wrap_mode(pipeline: *mut CoglPipeline, layer_index: c_int, mode: CoglPipelineWrapMode);
    pub fn cogl_pipeline_set_layer_wrap_mode_p(pipeline: *mut CoglPipeline, layer_index: c_int, mode: CoglPipelineWrapMode);
    pub fn cogl_pipeline_set_layer_wrap_mode_s(pipeline: *mut CoglPipeline, layer_index: c_int, mode: CoglPipelineWrapMode);
    pub fn cogl_pipeline_set_layer_wrap_mode_t(pipeline: *mut CoglPipeline, layer_index: c_int, mode: CoglPipelineWrapMode);
    pub fn cogl_pipeline_set_per_vertex_point_size(pipeline: *mut CoglPipeline, enable: CoglBool, error: *mut *mut glib::GError) -> CoglBool;
    pub fn cogl_pipeline_set_point_size(pipeline: *mut CoglPipeline, point_size: c_float);
    pub fn cogl_pipeline_set_shininess(pipeline: *mut CoglPipeline, shininess: c_float);
    pub fn cogl_pipeline_set_specular(pipeline: *mut CoglPipeline, specular: *const CoglColor);
    pub fn cogl_pipeline_set_uniform_1f(pipeline: *mut CoglPipeline, uniform_location: c_int, value: c_float);
    pub fn cogl_pipeline_set_uniform_1i(pipeline: *mut CoglPipeline, uniform_location: c_int, value: c_int);
    pub fn cogl_pipeline_set_uniform_float(pipeline: *mut CoglPipeline, uniform_location: c_int, n_components: c_int, count: c_int, value: *const c_float);
    pub fn cogl_pipeline_set_uniform_int(pipeline: *mut CoglPipeline, uniform_location: c_int, n_components: c_int, count: c_int, value: *const c_int);
    pub fn cogl_pipeline_set_uniform_matrix(pipeline: *mut CoglPipeline, uniform_location: c_int, dimensions: c_int, count: c_int, transpose: CoglBool, value: *const c_float);
    pub fn cogl_pipeline_set_user_program(pipeline: *mut CoglPipeline, program: CoglHandle);

    //=========================================================================
    // CoglPixelBuffer
    //=========================================================================
    pub fn cogl_pixel_buffer_get_gtype() -> GType;
    pub fn cogl_pixel_buffer_new(context: *mut CoglContext, size: size_t, data: *mut c_void) -> *mut CoglPixelBuffer;

    //=========================================================================
    // CoglPrimitive
    //=========================================================================
    pub fn cogl_primitive_get_gtype() -> GType;
    pub fn cogl_primitive_new(mode: CoglVerticesMode, n_vertices: c_int, ...) -> *mut CoglPrimitive;
    pub fn cogl_primitive_new_p2(context: *mut CoglContext, mode: CoglVerticesMode, n_vertices: c_int, data: *const CoglVertexP2) -> *mut CoglPrimitive;
    pub fn cogl_primitive_new_p2c4(context: *mut CoglContext, mode: CoglVerticesMode, n_vertices: c_int, data: *const CoglVertexP2C4) -> *mut CoglPrimitive;
    pub fn cogl_primitive_new_p2t2(context: *mut CoglContext, mode: CoglVerticesMode, n_vertices: c_int, data: *const CoglVertexP2T2) -> *mut CoglPrimitive;
    pub fn cogl_primitive_new_p2t2c4(context: *mut CoglContext, mode: CoglVerticesMode, n_vertices: c_int, data: *const CoglVertexP2T2C4) -> *mut CoglPrimitive;
    pub fn cogl_primitive_new_p3(context: *mut CoglContext, mode: CoglVerticesMode, n_vertices: c_int, data: *const CoglVertexP3) -> *mut CoglPrimitive;
    pub fn cogl_primitive_new_p3c4(context: *mut CoglContext, mode: CoglVerticesMode, n_vertices: c_int, data: *const CoglVertexP3C4) -> *mut CoglPrimitive;
    pub fn cogl_primitive_new_p3t2(context: *mut CoglContext, mode: CoglVerticesMode, n_vertices: c_int, data: *const CoglVertexP3T2) -> *mut CoglPrimitive;
    pub fn cogl_primitive_new_p3t2c4(context: *mut CoglContext, mode: CoglVerticesMode, n_vertices: c_int, data: *const CoglVertexP3T2C4) -> *mut CoglPrimitive;
    pub fn cogl_primitive_new_with_attributes(mode: CoglVerticesMode, n_vertices: c_int, attributes: *mut *mut CoglAttribute, n_attributes: c_int) -> *mut CoglPrimitive;
    pub fn cogl_primitive_texture_set_auto_mipmap(primitive_texture: *mut CoglPrimitiveTexture, value: CoglBool);
    pub fn cogl_primitive_copy(primitive: *mut CoglPrimitive) -> *mut CoglPrimitive;
    pub fn cogl_primitive_draw(primitive: *mut CoglPrimitive, framebuffer: *mut CoglFramebuffer, pipeline: *mut CoglPipeline);
    pub fn cogl_primitive_foreach_attribute(primitive: *mut CoglPrimitive, callback: CoglPrimitiveAttributeCallback, user_data: *mut c_void);
    pub fn cogl_primitive_get_first_vertex(primitive: *mut CoglPrimitive) -> c_int;
    pub fn cogl_primitive_get_indices(primitive: *mut CoglPrimitive) -> *mut CoglIndices;
    pub fn cogl_primitive_get_mode(primitive: *mut CoglPrimitive) -> CoglVerticesMode;
    pub fn cogl_primitive_get_n_vertices(primitive: *mut CoglPrimitive) -> c_int;
    pub fn cogl_primitive_set_attributes(primitive: *mut CoglPrimitive, attributes: *mut *mut CoglAttribute, n_attributes: c_int);
    pub fn cogl_primitive_set_first_vertex(primitive: *mut CoglPrimitive, first_vertex: c_int);
    pub fn cogl_primitive_set_indices(primitive: *mut CoglPrimitive, indices: *mut CoglIndices, n_indices: c_int);
    pub fn cogl_primitive_set_mode(primitive: *mut CoglPrimitive, mode: CoglVerticesMode);
    pub fn cogl_primitive_set_n_vertices(primitive: *mut CoglPrimitive, n_vertices: c_int);

    //=========================================================================
    // CoglRenderer
    //=========================================================================
    pub fn cogl_renderer_get_gtype() -> GType;
    pub fn cogl_renderer_new() -> *mut CoglRenderer;
    pub fn cogl_renderer_add_constraint(renderer: *mut CoglRenderer, constraint: CoglRendererConstraint);
    pub fn cogl_renderer_check_onscreen_template(renderer: *mut CoglRenderer, onscreen_template: *mut CoglOnscreenTemplate, error: *mut *mut glib::GError) -> CoglBool;
    pub fn cogl_renderer_connect(renderer: *mut CoglRenderer, error: *mut *mut glib::GError) -> CoglBool;
    pub fn cogl_renderer_foreach_output(renderer: *mut CoglRenderer, callback: CoglOutputCallback, user_data: *mut c_void);
    pub fn cogl_renderer_get_driver(renderer: *mut CoglRenderer) -> CoglDriver;
    pub fn cogl_renderer_get_n_fragment_texture_units(renderer: *mut CoglRenderer) -> c_int;
    pub fn cogl_renderer_get_winsys_id(renderer: *mut CoglRenderer) -> CoglWinsysID;
    pub fn cogl_renderer_remove_constraint(renderer: *mut CoglRenderer, constraint: CoglRendererConstraint);
    pub fn cogl_renderer_set_driver(renderer: *mut CoglRenderer, driver: CoglDriver);
    pub fn cogl_renderer_set_winsys_id(renderer: *mut CoglRenderer, winsys_id: CoglWinsysID);

    //=========================================================================
    // CoglSnippet
    //=========================================================================
    pub fn cogl_snippet_get_gtype() -> GType;
    pub fn cogl_snippet_new(hook: CoglSnippetHook, declarations: *const c_char, post: *const c_char) -> *mut CoglSnippet;
    pub fn cogl_snippet_get_declarations(snippet: *mut CoglSnippet) -> *const c_char;
    pub fn cogl_snippet_get_hook(snippet: *mut CoglSnippet) -> CoglSnippetHook;
    pub fn cogl_snippet_get_post(snippet: *mut CoglSnippet) -> *const c_char;
    pub fn cogl_snippet_get_pre(snippet: *mut CoglSnippet) -> *const c_char;
    pub fn cogl_snippet_get_replace(snippet: *mut CoglSnippet) -> *const c_char;
    pub fn cogl_snippet_set_declarations(snippet: *mut CoglSnippet, declarations: *const c_char);
    pub fn cogl_snippet_set_post(snippet: *mut CoglSnippet, post: *const c_char);
    pub fn cogl_snippet_set_pre(snippet: *mut CoglSnippet, pre: *const c_char);
    pub fn cogl_snippet_set_replace(snippet: *mut CoglSnippet, replace: *const c_char);

    //=========================================================================
    // CoglSubTexture
    //=========================================================================
    pub fn cogl_sub_texture_get_gtype() -> GType;
    pub fn cogl_sub_texture_new(ctx: *mut CoglContext, parent_texture: *mut CoglTexture, sub_x: c_int, sub_y: c_int, sub_width: c_int, sub_height: c_int) -> *mut CoglSubTexture;
    pub fn cogl_sub_texture_get_parent(sub_texture: *mut CoglSubTexture) -> *mut CoglTexture;

    //=========================================================================
    // CoglSwapChain
    //=========================================================================
    pub fn cogl_swap_chain_get_gtype() -> GType;
    pub fn cogl_swap_chain_new() -> *mut CoglSwapChain;
    pub fn cogl_swap_chain_set_has_alpha(swap_chain: *mut CoglSwapChain, has_alpha: CoglBool);
    pub fn cogl_swap_chain_set_length(swap_chain: *mut CoglSwapChain, length: c_int);

    //=========================================================================
    // CoglTexture2D
    //=========================================================================
    pub fn cogl_texture_2d_get_gtype() -> GType;
    pub fn cogl_texture_2d_gl_new_from_foreign(ctx: *mut CoglContext, gl_handle: c_uint, width: c_int, height: c_int, format: CoglPixelFormat) -> *mut CoglTexture2D;
    pub fn cogl_texture_2d_new_from_bitmap(bitmap: *mut CoglBitmap) -> *mut CoglTexture2D;
    pub fn cogl_texture_2d_new_from_data(ctx: *mut CoglContext, width: c_int, height: c_int, format: CoglPixelFormat, rowstride: c_int, data: *const u8, error: *mut *mut glib::GError) -> *mut CoglTexture2D;
    pub fn cogl_texture_2d_new_from_file(ctx: *mut CoglContext, filename: *const c_char, error: *mut *mut glib::GError) -> *mut CoglTexture2D;
    pub fn cogl_texture_2d_new_with_size(ctx: *mut CoglContext, width: c_int, height: c_int) -> *mut CoglTexture2D;

    //=========================================================================
    // CoglTexture2DSliced
    //=========================================================================
    pub fn cogl_texture_2d_sliced_get_gtype() -> GType;
    pub fn cogl_texture_2d_sliced_new_from_bitmap(bmp: *mut CoglBitmap, max_waste: c_int) -> *mut CoglTexture2DSliced;
    pub fn cogl_texture_2d_sliced_new_from_data(ctx: *mut CoglContext, width: c_int, height: c_int, max_waste: c_int, format: CoglPixelFormat, rowstride: c_int, data: *const u8, error: *mut *mut glib::GError) -> *mut CoglTexture2DSliced;
    pub fn cogl_texture_2d_sliced_new_from_file(ctx: *mut CoglContext, filename: *const c_char, max_waste: c_int, error: *mut *mut glib::GError) -> *mut CoglTexture2DSliced;
    pub fn cogl_texture_2d_sliced_new_with_size(ctx: *mut CoglContext, width: c_int, height: c_int, max_waste: c_int) -> *mut CoglTexture2DSliced;

    //=========================================================================
    // CoglTexture3D
    //=========================================================================
    pub fn cogl_texture_3d_get_gtype() -> GType;
    pub fn cogl_texture_3d_new_from_bitmap(bitmap: *mut CoglBitmap, height: c_int, depth: c_int) -> *mut CoglTexture3D;
    pub fn cogl_texture_3d_new_from_data(context: *mut CoglContext, width: c_int, height: c_int, depth: c_int, format: CoglPixelFormat, rowstride: c_int, image_stride: c_int, data: *const u8, error: *mut *mut glib::GError) -> *mut CoglTexture3D;
    pub fn cogl_texture_3d_new_with_size(context: *mut CoglContext, width: c_int, height: c_int, depth: c_int) -> *mut CoglTexture3D;

    //=========================================================================
    // CoglTexturePixmapX11
    //=========================================================================
    pub fn cogl_texture_pixmap_x11_get_gtype() -> GType;
    pub fn cogl_texture_pixmap_x11_new(context: *mut CoglContext, pixmap: u32, automatic_updates: CoglBool, error: *mut *mut glib::GError) -> *mut CoglTexturePixmapX11;
    pub fn cogl_texture_pixmap_x11_new_left(context: *mut CoglContext, pixmap: u32, automatic_updates: CoglBool, error: *mut *mut glib::GError) -> *mut CoglTexturePixmapX11;
    pub fn cogl_texture_pixmap_x11_error_quark() -> u32;
    pub fn cogl_texture_pixmap_x11_is_using_tfp_extension(texture: *mut CoglTexturePixmapX11) -> CoglBool;
    pub fn cogl_texture_pixmap_x11_new_right(left_texture: *mut CoglTexturePixmapX11) -> *mut CoglTexturePixmapX11;
    pub fn cogl_texture_pixmap_x11_set_damage_object(texture: *mut CoglTexturePixmapX11, damage: u32, report_level: CoglTexturePixmapX11ReportLevel);
    pub fn cogl_texture_pixmap_x11_update_area(texture: *mut CoglTexturePixmapX11, x: c_int, y: c_int, width: c_int, height: c_int);

    //=========================================================================
    // CoglTextureRectangle
    //=========================================================================
    pub fn cogl_texture_rectangle_get_gtype() -> GType;
    pub fn cogl_texture_rectangle_new_from_bitmap(bitmap: *mut CoglBitmap) -> *mut CoglTextureRectangle;
    pub fn cogl_texture_rectangle_new_from_foreign(ctx: *mut CoglContext, gl_handle: c_uint, width: c_int, height: c_int, format: CoglPixelFormat) -> *mut CoglTextureRectangle;
    pub fn cogl_texture_rectangle_new_with_size(ctx: *mut CoglContext, width: c_int, height: c_int) -> *mut CoglTextureRectangle;

    //=========================================================================
    // CoglFramebuffer
    //=========================================================================
    pub fn cogl_framebuffer_get_gtype() -> GType;
    pub fn cogl_framebuffer_error_quark() -> u32;
    pub fn cogl_framebuffer_add_fence_callback(framebuffer: *mut CoglFramebuffer, callback: CoglFenceCallback, user_data: *mut c_void) -> *mut CoglFenceClosure;
    pub fn cogl_framebuffer_allocate(framebuffer: *mut CoglFramebuffer, error: *mut *mut glib::GError) -> CoglBool;
    pub fn cogl_framebuffer_cancel_fence_callback(framebuffer: *mut CoglFramebuffer, closure: *mut CoglFenceClosure);
    pub fn cogl_framebuffer_clear(framebuffer: *mut CoglFramebuffer, buffers: c_ulong, color: *const CoglColor);
    pub fn cogl_framebuffer_clear4f(framebuffer: *mut CoglFramebuffer, buffers: c_ulong, red: c_float, green: c_float, blue: c_float, alpha: c_float);
    pub fn cogl_framebuffer_discard_buffers(framebuffer: *mut CoglFramebuffer, buffers: c_ulong);
    pub fn cogl_framebuffer_draw_attributes(framebuffer: *mut CoglFramebuffer, pipeline: *mut CoglPipeline, mode: CoglVerticesMode, first_vertex: c_int, n_vertices: c_int, attributes: *mut *mut CoglAttribute, n_attributes: c_int);
    pub fn cogl_framebuffer_draw_indexed_attributes(framebuffer: *mut CoglFramebuffer, pipeline: *mut CoglPipeline, mode: CoglVerticesMode, first_vertex: c_int, n_vertices: c_int, indices: *mut CoglIndices, attributes: *mut *mut CoglAttribute, n_attributes: c_int);
    pub fn cogl_framebuffer_draw_multitextured_rectangle(framebuffer: *mut CoglFramebuffer, pipeline: *mut CoglPipeline, x_1: c_float, y_1: c_float, x_2: c_float, y_2: c_float, tex_coords: *const c_float, tex_coords_len: c_int);
    pub fn cogl_framebuffer_draw_primitive(framebuffer: *mut CoglFramebuffer, pipeline: *mut CoglPipeline, primitive: *mut CoglPrimitive);
    pub fn cogl_framebuffer_draw_rectangle(framebuffer: *mut CoglFramebuffer, pipeline: *mut CoglPipeline, x_1: c_float, y_1: c_float, x_2: c_float, y_2: c_float);
    pub fn cogl_framebuffer_draw_rectangles(framebuffer: *mut CoglFramebuffer, pipeline: *mut CoglPipeline, coordinates: *const c_float, n_rectangles: c_uint);
    pub fn cogl_framebuffer_draw_textured_rectangle(framebuffer: *mut CoglFramebuffer, pipeline: *mut CoglPipeline, x_1: c_float, y_1: c_float, x_2: c_float, y_2: c_float, s_1: c_float, t_1: c_float, s_2: c_float, t_2: c_float);
    pub fn cogl_framebuffer_draw_textured_rectangles(framebuffer: *mut CoglFramebuffer, pipeline: *mut CoglPipeline, coordinates: *const c_float, n_rectangles: c_uint);
    pub fn cogl_framebuffer_finish(framebuffer: *mut CoglFramebuffer);
    pub fn cogl_framebuffer_frustum(framebuffer: *mut CoglFramebuffer, left: c_float, right: c_float, bottom: c_float, top: c_float, z_near: c_float, z_far: c_float);
    pub fn cogl_framebuffer_get_alpha_bits(framebuffer: *mut CoglFramebuffer) -> c_int;
    pub fn cogl_framebuffer_get_blue_bits(framebuffer: *mut CoglFramebuffer) -> c_int;
    pub fn cogl_framebuffer_get_color_mask(framebuffer: *mut CoglFramebuffer) -> CoglColorMask;
    pub fn cogl_framebuffer_get_context(framebuffer: *mut CoglFramebuffer) -> *mut CoglContext;
    pub fn cogl_framebuffer_get_depth_bits(framebuffer: *mut CoglFramebuffer) -> c_int;
    pub fn cogl_framebuffer_get_depth_texture(framebuffer: *mut CoglFramebuffer) -> *mut CoglTexture;
    pub fn cogl_framebuffer_get_depth_texture_enabled(framebuffer: *mut CoglFramebuffer) -> CoglBool;
    pub fn cogl_framebuffer_get_depth_write_enabled(framebuffer: *mut CoglFramebuffer) -> CoglBool;
    pub fn cogl_framebuffer_get_dither_enabled(framebuffer: *mut CoglFramebuffer) -> CoglBool;
    pub fn cogl_framebuffer_get_green_bits(framebuffer: *mut CoglFramebuffer) -> c_int;
    pub fn cogl_framebuffer_get_height(framebuffer: *mut CoglFramebuffer) -> c_int;
    pub fn cogl_framebuffer_get_is_stereo(framebuffer: *mut CoglFramebuffer) -> CoglBool;
    pub fn cogl_framebuffer_get_modelview_matrix(framebuffer: *mut CoglFramebuffer, matrix: *mut CoglMatrix);
    pub fn cogl_framebuffer_get_projection_matrix(framebuffer: *mut CoglFramebuffer, matrix: *mut CoglMatrix);
    pub fn cogl_framebuffer_get_red_bits(framebuffer: *mut CoglFramebuffer) -> c_int;
    pub fn cogl_framebuffer_get_samples_per_pixel(framebuffer: *mut CoglFramebuffer) -> c_int;
    pub fn cogl_framebuffer_get_stereo_mode(framebuffer: *mut CoglFramebuffer) -> CoglStereoMode;
    pub fn cogl_framebuffer_get_viewport4fv(framebuffer: *mut CoglFramebuffer, viewport: *mut [c_float; 4]);
    pub fn cogl_framebuffer_get_viewport_height(framebuffer: *mut CoglFramebuffer) -> c_float;
    pub fn cogl_framebuffer_get_viewport_width(framebuffer: *mut CoglFramebuffer) -> c_float;
    pub fn cogl_framebuffer_get_viewport_x(framebuffer: *mut CoglFramebuffer) -> c_float;
    pub fn cogl_framebuffer_get_viewport_y(framebuffer: *mut CoglFramebuffer) -> c_float;
    pub fn cogl_framebuffer_get_width(framebuffer: *mut CoglFramebuffer) -> c_int;
    pub fn cogl_framebuffer_identity_matrix(framebuffer: *mut CoglFramebuffer);
    pub fn cogl_framebuffer_orthographic(framebuffer: *mut CoglFramebuffer, x_1: c_float, y_1: c_float, x_2: c_float, y_2: c_float, near: c_float, far: c_float);
    pub fn cogl_framebuffer_perspective(framebuffer: *mut CoglFramebuffer, fov_y: c_float, aspect: c_float, z_near: c_float, z_far: c_float);
    pub fn cogl_framebuffer_pop_clip(framebuffer: *mut CoglFramebuffer);
    pub fn cogl_framebuffer_pop_matrix(framebuffer: *mut CoglFramebuffer);
    pub fn cogl_framebuffer_push_matrix(framebuffer: *mut CoglFramebuffer);
    pub fn cogl_framebuffer_push_primitive_clip(framebuffer: *mut CoglFramebuffer, primitive: *mut CoglPrimitive, bounds_x1: c_float, bounds_y1: c_float, bounds_x2: c_float, bounds_y2: c_float);
    pub fn cogl_framebuffer_push_rectangle_clip(framebuffer: *mut CoglFramebuffer, x_1: c_float, y_1: c_float, x_2: c_float, y_2: c_float);
    pub fn cogl_framebuffer_push_scissor_clip(framebuffer: *mut CoglFramebuffer, x: c_int, y: c_int, width: c_int, height: c_int);
    pub fn cogl_framebuffer_read_pixels(framebuffer: *mut CoglFramebuffer, x: c_int, y: c_int, width: c_int, height: c_int, format: CoglPixelFormat, pixels: *mut u8) -> CoglBool;
    pub fn cogl_framebuffer_read_pixels_into_bitmap(framebuffer: *mut CoglFramebuffer, x: c_int, y: c_int, source: CoglReadPixelsFlags, bitmap: *mut CoglBitmap) -> CoglBool;
    pub fn cogl_framebuffer_resolve_samples(framebuffer: *mut CoglFramebuffer);
    pub fn cogl_framebuffer_resolve_samples_region(framebuffer: *mut CoglFramebuffer, x: c_int, y: c_int, width: c_int, height: c_int);
    pub fn cogl_framebuffer_rotate(framebuffer: *mut CoglFramebuffer, angle: c_float, x: c_float, y: c_float, z: c_float);
    pub fn cogl_framebuffer_rotate_euler(framebuffer: *mut CoglFramebuffer, euler: *const CoglEuler);
    pub fn cogl_framebuffer_rotate_quaternion(framebuffer: *mut CoglFramebuffer, quaternion: *const CoglQuaternion);
    pub fn cogl_framebuffer_scale(framebuffer: *mut CoglFramebuffer, x: c_float, y: c_float, z: c_float);
    pub fn cogl_framebuffer_set_color_mask(framebuffer: *mut CoglFramebuffer, color_mask: CoglColorMask);
    pub fn cogl_framebuffer_set_depth_texture_enabled(framebuffer: *mut CoglFramebuffer, enabled: CoglBool);
    pub fn cogl_framebuffer_set_depth_write_enabled(framebuffer: *mut CoglFramebuffer, depth_write_enabled: CoglBool);
    pub fn cogl_framebuffer_set_dither_enabled(framebuffer: *mut CoglFramebuffer, dither_enabled: CoglBool);
    pub fn cogl_framebuffer_set_modelview_matrix(framebuffer: *mut CoglFramebuffer, matrix: *const CoglMatrix);
    pub fn cogl_framebuffer_set_projection_matrix(framebuffer: *mut CoglFramebuffer, matrix: *const CoglMatrix);
    pub fn cogl_framebuffer_set_samples_per_pixel(framebuffer: *mut CoglFramebuffer, samples_per_pixel: c_int);
    pub fn cogl_framebuffer_set_stereo_mode(framebuffer: *mut CoglFramebuffer, stereo_mode: CoglStereoMode);
    pub fn cogl_framebuffer_set_viewport(framebuffer: *mut CoglFramebuffer, x: c_float, y: c_float, width: c_float, height: c_float);
    pub fn cogl_framebuffer_transform(framebuffer: *mut CoglFramebuffer, matrix: *const CoglMatrix);
    pub fn cogl_framebuffer_translate(framebuffer: *mut CoglFramebuffer, x: c_float, y: c_float, z: c_float);
    pub fn cogl_framebuffer_vdraw_attributes(framebuffer: *mut CoglFramebuffer, pipeline: *mut CoglPipeline, mode: CoglVerticesMode, first_vertex: c_int, n_vertices: c_int, ...);
    pub fn cogl_framebuffer_vdraw_indexed_attributes(framebuffer: *mut CoglFramebuffer, pipeline: *mut CoglPipeline, mode: CoglVerticesMode, first_vertex: c_int, n_vertices: c_int, indices: *mut CoglIndices, ...);

    //=========================================================================
    // CoglTexture
    //=========================================================================
    pub fn cogl_texture_get_gtype() -> GType;
    pub fn cogl_texture_allocate(texture: *mut CoglTexture, error: *mut *mut glib::GError) -> CoglBool;
    pub fn cogl_texture_get_components(texture: *mut CoglTexture) -> CoglTextureComponents;
    pub fn cogl_texture_get_data(texture: *mut CoglTexture, format: CoglPixelFormat, rowstride: c_uint, data: *mut u8) -> c_int;
    pub fn cogl_texture_get_gl_texture(texture: *mut CoglTexture, out_gl_handle: *mut c_uint, out_gl_target: *mut c_uint) -> CoglBool;
    pub fn cogl_texture_get_height(texture: *mut CoglTexture) -> c_uint;
    pub fn cogl_texture_get_max_waste(texture: *mut CoglTexture) -> c_int;
    pub fn cogl_texture_get_premultiplied(texture: *mut CoglTexture) -> CoglBool;
    pub fn cogl_texture_get_width(texture: *mut CoglTexture) -> c_uint;
    pub fn cogl_texture_is_sliced(texture: *mut CoglTexture) -> CoglBool;
    pub fn cogl_texture_set_components(texture: *mut CoglTexture, components: CoglTextureComponents);
    pub fn cogl_texture_set_data(texture: *mut CoglTexture, format: CoglPixelFormat, rowstride: c_int, data: *const u8, level: c_int, error: *mut *mut glib::GError) -> CoglBool;
    pub fn cogl_texture_set_premultiplied(texture: *mut CoglTexture, premultiplied: CoglBool);
    pub fn cogl_texture_set_region(texture: *mut CoglTexture, src_x: c_int, src_y: c_int, dst_x: c_int, dst_y: c_int, dst_width: c_uint, dst_height: c_uint, width: c_int, height: c_int, format: CoglPixelFormat, rowstride: c_uint, data: *const u8) -> CoglBool;
    pub fn cogl_texture_set_region_from_bitmap(texture: *mut CoglTexture, src_x: c_int, src_y: c_int, dst_x: c_int, dst_y: c_int, dst_width: c_uint, dst_height: c_uint, bitmap: *mut CoglBitmap) -> CoglBool;

    //=========================================================================
    // Other functions
    //=========================================================================
    pub fn cogl_buffer_get_size(buffer: *mut CoglBuffer) -> c_uint;
    pub fn cogl_buffer_get_update_hint(buffer: *mut CoglBuffer) -> CoglBufferUpdateHint;
    pub fn cogl_buffer_map(buffer: *mut CoglBuffer, access: CoglBufferAccess, hints: CoglBufferMapHint) -> *mut c_void;
    pub fn cogl_buffer_map_range(buffer: *mut CoglBuffer, offset: size_t, size: size_t, access: CoglBufferAccess, hints: CoglBufferMapHint, error: *mut *mut glib::GError) -> *mut c_void;
    pub fn cogl_buffer_set_data(buffer: *mut CoglBuffer, offset: size_t, data: *mut c_void, size: size_t) -> CoglBool;
    pub fn cogl_buffer_set_update_hint(buffer: *mut CoglBuffer, hint: CoglBufferUpdateHint);
    pub fn cogl_buffer_unmap(buffer: *mut CoglBuffer);
    pub fn cogl_debug_matrix_entry_print(entry: *mut CoglMatrixEntry);
    pub fn cogl_debug_matrix_print(matrix: *const CoglMatrix);
    pub fn cogl_debug_object_foreach_type(func: CoglDebugObjectForeachTypeCallback, user_data: *mut c_void);
    pub fn cogl_debug_object_print_instances();
    pub fn cogl_egl_context_get_egl_context(context: *mut CoglContext);
    pub fn cogl_egl_context_get_egl_display(context: *mut CoglContext);
    pub fn cogl_error_copy(error: *mut glib::GError) -> *mut glib::GError;
    pub fn cogl_error_free(error: *mut glib::GError);
    pub fn cogl_error_matches(error: *mut glib::GError, domain: u32, code: c_int) -> CoglBool;
    pub fn cogl_foreach_feature(context: *mut CoglContext, callback: CoglFeatureCallback, user_data: *mut c_void);
    pub fn cogl_get_clock_time(context: *mut CoglContext) -> i64;
    pub fn cogl_get_draw_framebuffer() -> *mut CoglFramebuffer;
    pub fn cogl_get_rectangle_indices(context: *mut CoglContext, n_rectangles: c_int) -> *mut CoglIndices;
    pub fn cogl_get_static_identity_quaternion() -> *const CoglQuaternion;
    pub fn cogl_get_static_zero_quaternion() -> *const CoglQuaternion;
    //pub fn cogl_gles2_get_current_vtable() -> /*Ignored*/*mut CoglGLES2Vtable;
    pub fn cogl_gles2_texture_2d_new_from_handle(ctx: *mut CoglContext, gles2_ctx: *mut CoglGLES2Context, handle: c_uint, width: c_int, height: c_int, format: CoglPixelFormat) -> *mut CoglTexture2D;
    pub fn cogl_gles2_texture_get_handle(texture: *mut CoglTexture, handle: *mut c_uint, target: *mut c_uint) -> CoglBool;
    pub fn cogl_glib_renderer_source_new(renderer: *mut CoglRenderer, priority: c_int) -> *mut glib::GSource;
    pub fn cogl_glib_source_new(context: *mut CoglContext, priority: c_int) -> *mut glib::GSource;
    pub fn cogl_glx_context_get_glx_context(context: *mut CoglContext);
    pub fn cogl_gtype_matrix_get_type() -> GType;
    pub fn cogl_handle_get_type() -> GType;
    pub fn cogl_handle_ref(handle: CoglHandle) -> CoglHandle;
    pub fn cogl_handle_unref(handle: CoglHandle);
    pub fn cogl_has_feature(context: *mut CoglContext, feature: CoglFeatureID) -> CoglBool;
    pub fn cogl_has_features(context: *mut CoglContext, ...) -> CoglBool;
    pub fn cogl_is_atlas_texture(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_attribute(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_attribute_buffer(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_bitmap(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_buffer(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_context(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_display(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_frame_info(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_framebuffer(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_gles2_context(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_index_buffer(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_indices(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_matrix_stack(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_onscreen(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_onscreen_template(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_output(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_pipeline(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_pixel_buffer(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_primitive(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_primitive_texture(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_renderer(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_snippet(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_sub_texture(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_swap_chain(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_texture(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_texture_2d(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_texture_2d_sliced(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_texture_3d(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_texture_pixmap_x11(object: *mut c_void) -> CoglBool;
    pub fn cogl_is_texture_rectangle(object: *mut c_void) -> CoglBool;
    pub fn cogl_kms_display_queue_modes_reset(display: *mut CoglDisplay);
    pub fn cogl_kms_display_set_ignore_crtc(display: *mut CoglDisplay, id: u32, ignore: CoglBool);
    pub fn cogl_kms_display_set_layout(display: *mut CoglDisplay, width: c_int, height: c_int, crtcs: *mut *mut CoglKmsCrtc, n_crtcs: c_int, error: *mut *mut glib::GError) -> CoglBool;
    
    // FIXME:
    // pub fn cogl_kms_renderer_get_gbm(renderer: *mut CoglRenderer) -> *mut gbm_device;
    
    pub fn cogl_kms_renderer_get_kms_fd(renderer: *mut CoglRenderer) -> c_int;
    pub fn cogl_kms_renderer_set_kms_fd(renderer: *mut CoglRenderer, fd: c_int);
    pub fn cogl_meta_texture_foreach_in_region(meta_texture: *mut CoglMetaTexture, tx_1: c_float, ty_1: c_float, tx_2: c_float, ty_2: c_float, wrap_s: CoglPipelineWrapMode, wrap_t: CoglPipelineWrapMode, callback: CoglMetaTextureCallback, user_data: *mut c_void);
    pub fn cogl_poll_renderer_dispatch(renderer: *mut CoglRenderer, poll_fds: *const CoglPollFD, n_poll_fds: c_int);
    pub fn cogl_poll_renderer_get_info(renderer: *mut CoglRenderer, poll_fds: *mut *mut CoglPollFD, n_poll_fds: *mut c_int, timeout: *mut i64) -> c_int;
    pub fn cogl_pop_gles2_context(ctx: *mut CoglContext);
    pub fn cogl_push_gles2_context(ctx: *mut CoglContext, gles2_ctx: *mut CoglGLES2Context, read_buffer: *mut CoglFramebuffer, write_buffer: *mut CoglFramebuffer, error: *mut *mut glib::GError) -> CoglBool;
    pub fn cogl_vector3_add(result: *mut c_float, a: *const c_float, b: *const c_float);
    pub fn cogl_vector3_copy(vector: *const c_float) -> *mut c_float;
    pub fn cogl_vector3_cross_product(result: *mut c_float, u: *const c_float, v: *const c_float);
    pub fn cogl_vector3_distance(a: *const c_float, b: *const c_float) -> c_float;
    pub fn cogl_vector3_divide_scalar(vector: *mut c_float, scalar: c_float);
    pub fn cogl_vector3_dot_product(a: *const c_float, b: *const c_float) -> c_float;
    pub fn cogl_vector3_equal(v1: *mut c_void, v2: *mut c_void) -> CoglBool;
    pub fn cogl_vector3_equal_with_epsilon(vector0: *const c_float, vector1: *const c_float, epsilon: c_float) -> CoglBool;
    pub fn cogl_vector3_free(vector: *mut c_float);
    pub fn cogl_vector3_init(vector: *mut c_float, x: c_float, y: c_float, z: c_float);
    pub fn cogl_vector3_init_zero(vector: *mut c_float);
    pub fn cogl_vector3_invert(vector: *mut c_float);
    pub fn cogl_vector3_magnitude(vector: *const c_float) -> c_float;
    pub fn cogl_vector3_multiply_scalar(vector: *mut c_float, scalar: c_float);
    pub fn cogl_vector3_normalize(vector: *mut c_float);
    pub fn cogl_vector3_subtract(result: *mut c_float, a: *const c_float, b: *const c_float);

    // FIXME:
    // pub fn cogl_wayland_display_set_compositor_display(display: *mut CoglDisplay, wayland_display: *mut wl_display);
    // pub fn cogl_wayland_onscreen_get_shell_surface(onscreen: *mut CoglOnscreen) -> *mut wl_shell_surface;
    // pub fn cogl_wayland_onscreen_get_surface(onscreen: *mut CoglOnscreen) -> *mut wl_surface;
    // pub fn cogl_wayland_onscreen_resize(onscreen: *mut CoglOnscreen, width: c_int, height: c_int, offset_x: c_int, offset_y: c_int);
    // pub fn cogl_wayland_onscreen_set_foreign_surface(onscreen: *mut CoglOnscreen, surface: *mut wl_surface);
    // pub fn cogl_wayland_renderer_get_display(renderer: *mut CoglRenderer) -> *mut wl_display;
    // pub fn cogl_wayland_renderer_set_event_dispatch_enabled(renderer: *mut CoglRenderer, enable: CoglBool);
    // pub fn cogl_wayland_renderer_set_foreign_display(renderer: *mut CoglRenderer, display: *mut wl_display);
    // pub fn cogl_wayland_texture_2d_new_from_buffer(ctx: *mut CoglContext, buffer: *mut wl_resource, error: *mut *mut glib::GError) -> *mut CoglTexture2D;
    // pub fn cogl_wayland_texture_set_region_from_shm_buffer(texture: *mut CoglTexture, src_x: c_int, src_y: c_int, width: c_int, height: c_int, shm_buffer: *mut wl_shm_buffer, dst_x: c_int, dst_y: c_int, level: c_int, error: *mut *mut glib::GError) -> CoglBool;
    
    pub fn cogl_x11_onscreen_get_visual_xid(onscreen: *mut CoglOnscreen) -> u32;
    pub fn cogl_x11_onscreen_get_window_xid(onscreen: *mut CoglOnscreen) -> u32;
    pub fn cogl_x11_onscreen_set_foreign_window_xid(onscreen: *mut CoglOnscreen, xid: u32, update: CoglOnscreenX11MaskCallback, user_data: *mut c_void);
    pub fn cogl_xlib_get_display();
    pub fn cogl_xlib_handle_event(xevent: *mut c_void) -> CoglFilterReturn;
    pub fn cogl_xlib_set_display(display: *mut c_void);

}