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
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

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

use glib_sys as glib;

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

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

// Enums
pub type graphene_euler_order_t = c_int;
pub const GRAPHENE_EULER_ORDER_DEFAULT: graphene_euler_order_t = -1;
pub const GRAPHENE_EULER_ORDER_XYZ: graphene_euler_order_t = 0;
pub const GRAPHENE_EULER_ORDER_YZX: graphene_euler_order_t = 1;
pub const GRAPHENE_EULER_ORDER_ZXY: graphene_euler_order_t = 2;
pub const GRAPHENE_EULER_ORDER_XZY: graphene_euler_order_t = 3;
pub const GRAPHENE_EULER_ORDER_YXZ: graphene_euler_order_t = 4;
pub const GRAPHENE_EULER_ORDER_ZYX: graphene_euler_order_t = 5;
pub const GRAPHENE_EULER_ORDER_SXYZ: graphene_euler_order_t = 6;
pub const GRAPHENE_EULER_ORDER_SXYX: graphene_euler_order_t = 7;
pub const GRAPHENE_EULER_ORDER_SXZY: graphene_euler_order_t = 8;
pub const GRAPHENE_EULER_ORDER_SXZX: graphene_euler_order_t = 9;
pub const GRAPHENE_EULER_ORDER_SYZX: graphene_euler_order_t = 10;
pub const GRAPHENE_EULER_ORDER_SYZY: graphene_euler_order_t = 11;
pub const GRAPHENE_EULER_ORDER_SYXZ: graphene_euler_order_t = 12;
pub const GRAPHENE_EULER_ORDER_SYXY: graphene_euler_order_t = 13;
pub const GRAPHENE_EULER_ORDER_SZXY: graphene_euler_order_t = 14;
pub const GRAPHENE_EULER_ORDER_SZXZ: graphene_euler_order_t = 15;
pub const GRAPHENE_EULER_ORDER_SZYX: graphene_euler_order_t = 16;
pub const GRAPHENE_EULER_ORDER_SZYZ: graphene_euler_order_t = 17;
pub const GRAPHENE_EULER_ORDER_RZYX: graphene_euler_order_t = 18;
pub const GRAPHENE_EULER_ORDER_RXYX: graphene_euler_order_t = 19;
pub const GRAPHENE_EULER_ORDER_RYZX: graphene_euler_order_t = 20;
pub const GRAPHENE_EULER_ORDER_RXZX: graphene_euler_order_t = 21;
pub const GRAPHENE_EULER_ORDER_RXZY: graphene_euler_order_t = 22;
pub const GRAPHENE_EULER_ORDER_RYZY: graphene_euler_order_t = 23;
pub const GRAPHENE_EULER_ORDER_RZXY: graphene_euler_order_t = 24;
pub const GRAPHENE_EULER_ORDER_RYXY: graphene_euler_order_t = 25;
pub const GRAPHENE_EULER_ORDER_RYXZ: graphene_euler_order_t = 26;
pub const GRAPHENE_EULER_ORDER_RZXZ: graphene_euler_order_t = 27;
pub const GRAPHENE_EULER_ORDER_RXYZ: graphene_euler_order_t = 28;
pub const GRAPHENE_EULER_ORDER_RZYZ: graphene_euler_order_t = 29;

pub type graphene_ray_intersection_kind_t = c_int;
pub const GRAPHENE_RAY_INTERSECTION_KIND_NONE: graphene_ray_intersection_kind_t = 0;
pub const GRAPHENE_RAY_INTERSECTION_KIND_ENTER: graphene_ray_intersection_kind_t = 1;
pub const GRAPHENE_RAY_INTERSECTION_KIND_LEAVE: graphene_ray_intersection_kind_t = 2;

// Constants
pub const GRAPHENE_VEC2_LEN: c_int = 2;
pub const GRAPHENE_VEC3_LEN: c_int = 3;
pub const GRAPHENE_VEC4_LEN: c_int = 4;

// Records
#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct graphene_box_t {
    pub min: graphene_vec3_t,
    pub max: graphene_vec3_t,
}

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

#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct graphene_euler_t {
    pub angles: graphene_vec3_t,
    pub order: graphene_euler_order_t,
}

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

#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct graphene_frustum_t {
    pub planes: [graphene_plane_t; 6],
}

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

#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct graphene_matrix_t {
    pub value: graphene_simd4x4f_t,
}

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

#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct graphene_plane_t {
    pub normal: graphene_vec3_t,
    pub constant: c_float,
}

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

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

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

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

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

#[repr(C)]
#[derive(Copy, Clone)]
pub struct graphene_quad_t {
    pub points: [graphene_point_t; 4],
}

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

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

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

#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct graphene_ray_t {
    pub origin: graphene_vec3_t,
    pub direction: graphene_vec3_t,
}

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

#[repr(C)]
#[derive(Copy, Clone)]
pub struct graphene_rect_t {
    pub origin: graphene_point_t,
    pub size: graphene_size_t,
}

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

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

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

#[repr(C)]
#[derive(Copy, Clone)]
pub struct graphene_simd4x4f_t {
    pub x: graphene_simd4f_t,
    pub y: graphene_simd4f_t,
    pub z: graphene_simd4f_t,
    pub w: graphene_simd4f_t,
}

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

#[repr(C)]
#[derive(Copy, Clone)]
pub struct graphene_size_t {
    pub width: c_float,
    pub height: c_float,
}

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

#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct graphene_sphere_t {
    pub center: graphene_vec3_t,
    pub radius: c_float,
}

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

#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct graphene_triangle_t {
    pub a: graphene_vec3_t,
    pub b: graphene_vec3_t,
    pub c: graphene_vec3_t,
}

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

#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct graphene_vec2_t {
    pub value: graphene_simd4f_t,
}

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

#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct graphene_vec3_t {
    pub value: graphene_simd4f_t,
}

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

#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct graphene_vec4_t {
    pub value: graphene_simd4f_t,
}

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

#[link(name = "graphene-1.0")]
extern "C" {

    //=========================================================================
    // graphene_box_t
    //=========================================================================
    pub fn graphene_box_get_type() -> GType;
    pub fn graphene_box_alloc() -> *mut graphene_box_t;
    pub fn graphene_box_contains_box(
        a: *const graphene_box_t,
        b: *const graphene_box_t,
    ) -> gboolean;
    pub fn graphene_box_contains_point(
        box_: *const graphene_box_t,
        point: *const graphene_point3d_t,
    ) -> gboolean;
    pub fn graphene_box_equal(a: *const graphene_box_t, b: *const graphene_box_t) -> gboolean;
    pub fn graphene_box_expand(
        box_: *const graphene_box_t,
        point: *const graphene_point3d_t,
        res: *mut graphene_box_t,
    );
    pub fn graphene_box_expand_scalar(
        box_: *const graphene_box_t,
        scalar: c_float,
        res: *mut graphene_box_t,
    );
    pub fn graphene_box_expand_vec3(
        box_: *const graphene_box_t,
        vec: *const graphene_vec3_t,
        res: *mut graphene_box_t,
    );
    pub fn graphene_box_free(box_: *mut graphene_box_t);
    pub fn graphene_box_get_bounding_sphere(
        box_: *const graphene_box_t,
        sphere: *mut graphene_sphere_t,
    );
    pub fn graphene_box_get_center(box_: *const graphene_box_t, center: *mut graphene_point3d_t);
    pub fn graphene_box_get_depth(box_: *const graphene_box_t) -> c_float;
    pub fn graphene_box_get_height(box_: *const graphene_box_t) -> c_float;
    pub fn graphene_box_get_max(box_: *const graphene_box_t, max: *mut graphene_point3d_t);
    pub fn graphene_box_get_min(box_: *const graphene_box_t, min: *mut graphene_point3d_t);
    pub fn graphene_box_get_size(box_: *const graphene_box_t, size: *mut graphene_vec3_t);
    pub fn graphene_box_get_vertices(
        box_: *const graphene_box_t,
        vertices: *mut [graphene_vec3_t; 8],
    );
    pub fn graphene_box_get_width(box_: *const graphene_box_t) -> c_float;
    pub fn graphene_box_init(
        box_: *mut graphene_box_t,
        min: *const graphene_point3d_t,
        max: *const graphene_point3d_t,
    ) -> *mut graphene_box_t;
    pub fn graphene_box_init_from_box(
        box_: *mut graphene_box_t,
        src: *const graphene_box_t,
    ) -> *mut graphene_box_t;
    pub fn graphene_box_init_from_points(
        box_: *mut graphene_box_t,
        n_points: c_uint,
        points: *const graphene_point3d_t,
    ) -> *mut graphene_box_t;
    pub fn graphene_box_init_from_vec3(
        box_: *mut graphene_box_t,
        min: *const graphene_vec3_t,
        max: *const graphene_vec3_t,
    ) -> *mut graphene_box_t;
    pub fn graphene_box_init_from_vectors(
        box_: *mut graphene_box_t,
        n_vectors: c_uint,
        vectors: *const graphene_vec3_t,
    ) -> *mut graphene_box_t;
    pub fn graphene_box_intersection(
        a: *const graphene_box_t,
        b: *const graphene_box_t,
        res: *mut graphene_box_t,
    ) -> gboolean;
    pub fn graphene_box_union(
        a: *const graphene_box_t,
        b: *const graphene_box_t,
        res: *mut graphene_box_t,
    );
    pub fn graphene_box_empty() -> *const graphene_box_t;
    pub fn graphene_box_infinite() -> *const graphene_box_t;
    pub fn graphene_box_minus_one() -> *const graphene_box_t;
    pub fn graphene_box_one() -> *const graphene_box_t;
    pub fn graphene_box_one_minus_one() -> *const graphene_box_t;
    pub fn graphene_box_zero() -> *const graphene_box_t;

    //=========================================================================
    // graphene_euler_t
    //=========================================================================
    pub fn graphene_euler_get_type() -> GType;
    pub fn graphene_euler_alloc() -> *mut graphene_euler_t;
    pub fn graphene_euler_equal(a: *const graphene_euler_t, b: *const graphene_euler_t)
        -> gboolean;
    pub fn graphene_euler_free(e: *mut graphene_euler_t);
    pub fn graphene_euler_get_alpha(e: *const graphene_euler_t) -> c_float;
    pub fn graphene_euler_get_beta(e: *const graphene_euler_t) -> c_float;
    pub fn graphene_euler_get_gamma(e: *const graphene_euler_t) -> c_float;
    pub fn graphene_euler_get_order(e: *const graphene_euler_t) -> graphene_euler_order_t;
    pub fn graphene_euler_get_x(e: *const graphene_euler_t) -> c_float;
    pub fn graphene_euler_get_y(e: *const graphene_euler_t) -> c_float;
    pub fn graphene_euler_get_z(e: *const graphene_euler_t) -> c_float;
    pub fn graphene_euler_init(
        e: *mut graphene_euler_t,
        x: c_float,
        y: c_float,
        z: c_float,
    ) -> *mut graphene_euler_t;
    pub fn graphene_euler_init_from_euler(
        e: *mut graphene_euler_t,
        src: *const graphene_euler_t,
    ) -> *mut graphene_euler_t;
    pub fn graphene_euler_init_from_matrix(
        e: *mut graphene_euler_t,
        m: *const graphene_matrix_t,
        order: graphene_euler_order_t,
    ) -> *mut graphene_euler_t;
    pub fn graphene_euler_init_from_quaternion(
        e: *mut graphene_euler_t,
        q: *const graphene_quaternion_t,
        order: graphene_euler_order_t,
    ) -> *mut graphene_euler_t;
    pub fn graphene_euler_init_from_radians(
        e: *mut graphene_euler_t,
        x: c_float,
        y: c_float,
        z: c_float,
        order: graphene_euler_order_t,
    ) -> *mut graphene_euler_t;
    pub fn graphene_euler_init_from_vec3(
        e: *mut graphene_euler_t,
        v: *const graphene_vec3_t,
        order: graphene_euler_order_t,
    ) -> *mut graphene_euler_t;
    pub fn graphene_euler_init_with_order(
        e: *mut graphene_euler_t,
        x: c_float,
        y: c_float,
        z: c_float,
        order: graphene_euler_order_t,
    ) -> *mut graphene_euler_t;
    pub fn graphene_euler_reorder(
        e: *const graphene_euler_t,
        order: graphene_euler_order_t,
        res: *mut graphene_euler_t,
    );
    pub fn graphene_euler_to_matrix(e: *const graphene_euler_t, res: *mut graphene_matrix_t);
    pub fn graphene_euler_to_quaternion(
        e: *const graphene_euler_t,
        res: *mut graphene_quaternion_t,
    );
    pub fn graphene_euler_to_vec3(e: *const graphene_euler_t, res: *mut graphene_vec3_t);

    //=========================================================================
    // graphene_frustum_t
    //=========================================================================
    pub fn graphene_frustum_get_type() -> GType;
    pub fn graphene_frustum_alloc() -> *mut graphene_frustum_t;
    pub fn graphene_frustum_contains_point(
        f: *const graphene_frustum_t,
        point: *const graphene_point3d_t,
    ) -> gboolean;
    pub fn graphene_frustum_equal(
        a: *const graphene_frustum_t,
        b: *const graphene_frustum_t,
    ) -> gboolean;
    pub fn graphene_frustum_free(f: *mut graphene_frustum_t);
    pub fn graphene_frustum_get_planes(
        f: *const graphene_frustum_t,
        planes: *mut [graphene_plane_t; 6],
    );
    pub fn graphene_frustum_init(
        f: *mut graphene_frustum_t,
        p0: *const graphene_plane_t,
        p1: *const graphene_plane_t,
        p2: *const graphene_plane_t,
        p3: *const graphene_plane_t,
        p4: *const graphene_plane_t,
        p5: *const graphene_plane_t,
    ) -> *mut graphene_frustum_t;
    pub fn graphene_frustum_init_from_frustum(
        f: *mut graphene_frustum_t,
        src: *const graphene_frustum_t,
    ) -> *mut graphene_frustum_t;
    pub fn graphene_frustum_init_from_matrix(
        f: *mut graphene_frustum_t,
        matrix: *const graphene_matrix_t,
    ) -> *mut graphene_frustum_t;
    pub fn graphene_frustum_intersects_box(
        f: *const graphene_frustum_t,
        box_: *const graphene_box_t,
    ) -> gboolean;
    pub fn graphene_frustum_intersects_sphere(
        f: *const graphene_frustum_t,
        sphere: *const graphene_sphere_t,
    ) -> gboolean;

    //=========================================================================
    // graphene_matrix_t
    //=========================================================================
    pub fn graphene_matrix_get_type() -> GType;
    pub fn graphene_matrix_alloc() -> *mut graphene_matrix_t;
    pub fn graphene_matrix_decompose(
        m: *const graphene_matrix_t,
        translate: *mut graphene_vec3_t,
        scale: *mut graphene_vec3_t,
        rotate: *mut graphene_quaternion_t,
        shear: *mut graphene_vec3_t,
        perspective: *mut graphene_vec4_t,
    ) -> gboolean;
    pub fn graphene_matrix_determinant(m: *const graphene_matrix_t) -> c_float;
    pub fn graphene_matrix_equal(
        a: *const graphene_matrix_t,
        b: *const graphene_matrix_t,
    ) -> gboolean;
    pub fn graphene_matrix_equal_fast(
        a: *const graphene_matrix_t,
        b: *const graphene_matrix_t,
    ) -> gboolean;
    pub fn graphene_matrix_free(m: *mut graphene_matrix_t);
    pub fn graphene_matrix_get_row(
        m: *const graphene_matrix_t,
        index_: c_uint,
        res: *mut graphene_vec4_t,
    );
    pub fn graphene_matrix_get_value(
        m: *const graphene_matrix_t,
        row: c_uint,
        col: c_uint,
    ) -> c_float;
    pub fn graphene_matrix_get_x_scale(m: *const graphene_matrix_t) -> c_float;
    pub fn graphene_matrix_get_x_translation(m: *const graphene_matrix_t) -> c_float;
    pub fn graphene_matrix_get_y_scale(m: *const graphene_matrix_t) -> c_float;
    pub fn graphene_matrix_get_y_translation(m: *const graphene_matrix_t) -> c_float;
    pub fn graphene_matrix_get_z_scale(m: *const graphene_matrix_t) -> c_float;
    pub fn graphene_matrix_get_z_translation(m: *const graphene_matrix_t) -> c_float;
    pub fn graphene_matrix_init_from_2d(
        m: *mut graphene_matrix_t,
        xx: c_double,
        yx: c_double,
        xy: c_double,
        yy: c_double,
        x_0: c_double,
        y_0: c_double,
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_from_float(
        m: *mut graphene_matrix_t,
        v: *const [c_float; 16],
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_from_matrix(
        m: *mut graphene_matrix_t,
        src: *const graphene_matrix_t,
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_from_vec4(
        m: *mut graphene_matrix_t,
        v0: *const graphene_vec4_t,
        v1: *const graphene_vec4_t,
        v2: *const graphene_vec4_t,
        v3: *const graphene_vec4_t,
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_frustum(
        m: *mut graphene_matrix_t,
        left: c_float,
        right: c_float,
        bottom: c_float,
        top: c_float,
        z_near: c_float,
        z_far: c_float,
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_identity(m: *mut graphene_matrix_t) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_look_at(
        m: *mut graphene_matrix_t,
        eye: *const graphene_vec3_t,
        center: *const graphene_vec3_t,
        up: *const graphene_vec3_t,
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_ortho(
        m: *mut graphene_matrix_t,
        left: c_float,
        right: c_float,
        top: c_float,
        bottom: c_float,
        z_near: c_float,
        z_far: c_float,
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_perspective(
        m: *mut graphene_matrix_t,
        fovy: c_float,
        aspect: c_float,
        z_near: c_float,
        z_far: c_float,
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_rotate(
        m: *mut graphene_matrix_t,
        angle: c_float,
        axis: *const graphene_vec3_t,
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_scale(
        m: *mut graphene_matrix_t,
        x: c_float,
        y: c_float,
        z: c_float,
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_skew(
        m: *mut graphene_matrix_t,
        x_skew: c_float,
        y_skew: c_float,
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_init_translate(
        m: *mut graphene_matrix_t,
        p: *const graphene_point3d_t,
    ) -> *mut graphene_matrix_t;
    pub fn graphene_matrix_interpolate(
        a: *const graphene_matrix_t,
        b: *const graphene_matrix_t,
        factor: c_double,
        res: *mut graphene_matrix_t,
    );
    pub fn graphene_matrix_inverse(
        m: *const graphene_matrix_t,
        res: *mut graphene_matrix_t,
    ) -> gboolean;
    pub fn graphene_matrix_is_2d(m: *const graphene_matrix_t) -> gboolean;
    pub fn graphene_matrix_is_backface_visible(m: *const graphene_matrix_t) -> gboolean;
    pub fn graphene_matrix_is_identity(m: *const graphene_matrix_t) -> gboolean;
    pub fn graphene_matrix_is_singular(m: *const graphene_matrix_t) -> gboolean;
    pub fn graphene_matrix_multiply(
        a: *const graphene_matrix_t,
        b: *const graphene_matrix_t,
        res: *mut graphene_matrix_t,
    );
    pub fn graphene_matrix_near(
        a: *const graphene_matrix_t,
        b: *const graphene_matrix_t,
        epsilon: c_float,
    ) -> gboolean;
    pub fn graphene_matrix_normalize(m: *const graphene_matrix_t, res: *mut graphene_matrix_t);
    pub fn graphene_matrix_perspective(
        m: *const graphene_matrix_t,
        depth: c_float,
        res: *mut graphene_matrix_t,
    );
    pub fn graphene_matrix_print(m: *const graphene_matrix_t);
    pub fn graphene_matrix_project_point(
        m: *const graphene_matrix_t,
        p: *const graphene_point_t,
        res: *mut graphene_point_t,
    );
    pub fn graphene_matrix_project_rect(
        m: *const graphene_matrix_t,
        r: *const graphene_rect_t,
        res: *mut graphene_quad_t,
    );
    pub fn graphene_matrix_project_rect_bounds(
        m: *const graphene_matrix_t,
        r: *const graphene_rect_t,
        res: *mut graphene_rect_t,
    );
    pub fn graphene_matrix_rotate(
        m: *mut graphene_matrix_t,
        angle: c_float,
        axis: *const graphene_vec3_t,
    );
    pub fn graphene_matrix_rotate_euler(m: *mut graphene_matrix_t, e: *const graphene_euler_t);
    pub fn graphene_matrix_rotate_quaternion(
        m: *mut graphene_matrix_t,
        q: *const graphene_quaternion_t,
    );
    pub fn graphene_matrix_rotate_x(m: *mut graphene_matrix_t, angle: c_float);
    pub fn graphene_matrix_rotate_y(m: *mut graphene_matrix_t, angle: c_float);
    pub fn graphene_matrix_rotate_z(m: *mut graphene_matrix_t, angle: c_float);
    pub fn graphene_matrix_scale(
        m: *mut graphene_matrix_t,
        factor_x: c_float,
        factor_y: c_float,
        factor_z: c_float,
    );
    pub fn graphene_matrix_skew_xy(m: *mut graphene_matrix_t, factor: c_float);
    pub fn graphene_matrix_skew_xz(m: *mut graphene_matrix_t, factor: c_float);
    pub fn graphene_matrix_skew_yz(m: *mut graphene_matrix_t, factor: c_float);
    pub fn graphene_matrix_to_2d(
        m: *const graphene_matrix_t,
        xx: *mut c_double,
        yx: *mut c_double,
        xy: *mut c_double,
        yy: *mut c_double,
        x_0: *mut c_double,
        y_0: *mut c_double,
    ) -> gboolean;
    pub fn graphene_matrix_to_float(m: *const graphene_matrix_t, v: *mut [c_float; 16]);
    pub fn graphene_matrix_transform_bounds(
        m: *const graphene_matrix_t,
        r: *const graphene_rect_t,
        res: *mut graphene_rect_t,
    );
    pub fn graphene_matrix_transform_box(
        m: *const graphene_matrix_t,
        b: *const graphene_box_t,
        res: *mut graphene_box_t,
    );
    pub fn graphene_matrix_transform_point(
        m: *const graphene_matrix_t,
        p: *const graphene_point_t,
        res: *mut graphene_point_t,
    );
    pub fn graphene_matrix_transform_point3d(
        m: *const graphene_matrix_t,
        p: *const graphene_point3d_t,
        res: *mut graphene_point3d_t,
    );
    pub fn graphene_matrix_transform_ray(
        m: *const graphene_matrix_t,
        r: *const graphene_ray_t,
        res: *mut graphene_ray_t,
    );
    pub fn graphene_matrix_transform_rect(
        m: *const graphene_matrix_t,
        r: *const graphene_rect_t,
        res: *mut graphene_quad_t,
    );
    pub fn graphene_matrix_transform_sphere(
        m: *const graphene_matrix_t,
        s: *const graphene_sphere_t,
        res: *mut graphene_sphere_t,
    );
    pub fn graphene_matrix_transform_vec3(
        m: *const graphene_matrix_t,
        v: *const graphene_vec3_t,
        res: *mut graphene_vec3_t,
    );
    pub fn graphene_matrix_transform_vec4(
        m: *const graphene_matrix_t,
        v: *const graphene_vec4_t,
        res: *mut graphene_vec4_t,
    );
    pub fn graphene_matrix_translate(m: *mut graphene_matrix_t, pos: *const graphene_point3d_t);
    pub fn graphene_matrix_transpose(m: *const graphene_matrix_t, res: *mut graphene_matrix_t);
    pub fn graphene_matrix_unproject_point3d(
        projection: *const graphene_matrix_t,
        modelview: *const graphene_matrix_t,
        point: *const graphene_point3d_t,
        res: *mut graphene_point3d_t,
    );
    pub fn graphene_matrix_untransform_bounds(
        m: *const graphene_matrix_t,
        r: *const graphene_rect_t,
        bounds: *const graphene_rect_t,
        res: *mut graphene_rect_t,
    );
    pub fn graphene_matrix_untransform_point(
        m: *const graphene_matrix_t,
        p: *const graphene_point_t,
        bounds: *const graphene_rect_t,
        res: *mut graphene_point_t,
    ) -> gboolean;

    //=========================================================================
    // graphene_plane_t
    //=========================================================================
    pub fn graphene_plane_get_type() -> GType;
    pub fn graphene_plane_alloc() -> *mut graphene_plane_t;
    pub fn graphene_plane_distance(
        p: *const graphene_plane_t,
        point: *const graphene_point3d_t,
    ) -> c_float;
    pub fn graphene_plane_equal(a: *const graphene_plane_t, b: *const graphene_plane_t)
        -> gboolean;
    pub fn graphene_plane_free(p: *mut graphene_plane_t);
    pub fn graphene_plane_get_constant(p: *const graphene_plane_t) -> c_float;
    pub fn graphene_plane_get_normal(p: *const graphene_plane_t, normal: *mut graphene_vec3_t);
    pub fn graphene_plane_init(
        p: *mut graphene_plane_t,
        normal: *const graphene_vec3_t,
        constant: c_float,
    ) -> *mut graphene_plane_t;
    pub fn graphene_plane_init_from_plane(
        p: *mut graphene_plane_t,
        src: *const graphene_plane_t,
    ) -> *mut graphene_plane_t;
    pub fn graphene_plane_init_from_point(
        p: *mut graphene_plane_t,
        normal: *const graphene_vec3_t,
        point: *const graphene_point3d_t,
    ) -> *mut graphene_plane_t;
    pub fn graphene_plane_init_from_points(
        p: *mut graphene_plane_t,
        a: *const graphene_point3d_t,
        b: *const graphene_point3d_t,
        c: *const graphene_point3d_t,
    ) -> *mut graphene_plane_t;
    pub fn graphene_plane_init_from_vec4(
        p: *mut graphene_plane_t,
        src: *const graphene_vec4_t,
    ) -> *mut graphene_plane_t;
    pub fn graphene_plane_negate(p: *const graphene_plane_t, res: *mut graphene_plane_t);
    pub fn graphene_plane_normalize(p: *const graphene_plane_t, res: *mut graphene_plane_t);
    pub fn graphene_plane_transform(
        p: *const graphene_plane_t,
        matrix: *const graphene_matrix_t,
        normal_matrix: *const graphene_matrix_t,
        res: *mut graphene_plane_t,
    );

    //=========================================================================
    // graphene_point3d_t
    //=========================================================================
    pub fn graphene_point3d_get_type() -> GType;
    pub fn graphene_point3d_alloc() -> *mut graphene_point3d_t;
    pub fn graphene_point3d_cross(
        a: *const graphene_point3d_t,
        b: *const graphene_point3d_t,
        res: *mut graphene_point3d_t,
    );
    pub fn graphene_point3d_distance(
        a: *const graphene_point3d_t,
        b: *const graphene_point3d_t,
        delta: *mut graphene_vec3_t,
    ) -> c_float;
    pub fn graphene_point3d_dot(
        a: *const graphene_point3d_t,
        b: *const graphene_point3d_t,
    ) -> c_float;
    pub fn graphene_point3d_equal(
        a: *const graphene_point3d_t,
        b: *const graphene_point3d_t,
    ) -> gboolean;
    pub fn graphene_point3d_free(p: *mut graphene_point3d_t);
    pub fn graphene_point3d_init(
        p: *mut graphene_point3d_t,
        x: c_float,
        y: c_float,
        z: c_float,
    ) -> *mut graphene_point3d_t;
    pub fn graphene_point3d_init_from_point(
        p: *mut graphene_point3d_t,
        src: *const graphene_point3d_t,
    ) -> *mut graphene_point3d_t;
    pub fn graphene_point3d_init_from_vec3(
        p: *mut graphene_point3d_t,
        v: *const graphene_vec3_t,
    ) -> *mut graphene_point3d_t;
    pub fn graphene_point3d_interpolate(
        a: *const graphene_point3d_t,
        b: *const graphene_point3d_t,
        factor: c_double,
        res: *mut graphene_point3d_t,
    );
    pub fn graphene_point3d_length(p: *const graphene_point3d_t) -> c_float;
    pub fn graphene_point3d_near(
        a: *const graphene_point3d_t,
        b: *const graphene_point3d_t,
        epsilon: c_float,
    ) -> gboolean;
    pub fn graphene_point3d_normalize(p: *const graphene_point3d_t, res: *mut graphene_point3d_t);
    pub fn graphene_point3d_normalize_viewport(
        p: *const graphene_point3d_t,
        viewport: *const graphene_rect_t,
        z_near: c_float,
        z_far: c_float,
        res: *mut graphene_point3d_t,
    );
    pub fn graphene_point3d_scale(
        p: *const graphene_point3d_t,
        factor: c_float,
        res: *mut graphene_point3d_t,
    );
    pub fn graphene_point3d_to_vec3(p: *const graphene_point3d_t, v: *mut graphene_vec3_t);
    pub fn graphene_point3d_zero() -> *const graphene_point3d_t;

    //=========================================================================
    // graphene_point_t
    //=========================================================================
    pub fn graphene_point_get_type() -> GType;
    pub fn graphene_point_alloc() -> *mut graphene_point_t;
    pub fn graphene_point_distance(
        a: *const graphene_point_t,
        b: *const graphene_point_t,
        d_x: *mut c_float,
        d_y: *mut c_float,
    ) -> c_float;
    pub fn graphene_point_equal(a: *const graphene_point_t, b: *const graphene_point_t)
        -> gboolean;
    pub fn graphene_point_free(p: *mut graphene_point_t);
    pub fn graphene_point_init(
        p: *mut graphene_point_t,
        x: c_float,
        y: c_float,
    ) -> *mut graphene_point_t;
    pub fn graphene_point_init_from_point(
        p: *mut graphene_point_t,
        src: *const graphene_point_t,
    ) -> *mut graphene_point_t;
    pub fn graphene_point_init_from_vec2(
        p: *mut graphene_point_t,
        src: *const graphene_vec2_t,
    ) -> *mut graphene_point_t;
    pub fn graphene_point_interpolate(
        a: *const graphene_point_t,
        b: *const graphene_point_t,
        factor: c_double,
        res: *mut graphene_point_t,
    );
    pub fn graphene_point_near(
        a: *const graphene_point_t,
        b: *const graphene_point_t,
        epsilon: c_float,
    ) -> gboolean;
    pub fn graphene_point_to_vec2(p: *const graphene_point_t, v: *mut graphene_vec2_t);
    pub fn graphene_point_zero() -> *const graphene_point_t;

    //=========================================================================
    // graphene_quad_t
    //=========================================================================
    pub fn graphene_quad_get_type() -> GType;
    pub fn graphene_quad_alloc() -> *mut graphene_quad_t;
    pub fn graphene_quad_bounds(q: *const graphene_quad_t, r: *mut graphene_rect_t);
    pub fn graphene_quad_contains(
        q: *const graphene_quad_t,
        p: *const graphene_point_t,
    ) -> gboolean;
    pub fn graphene_quad_free(q: *mut graphene_quad_t);
    pub fn graphene_quad_get_point(
        q: *const graphene_quad_t,
        index_: c_uint,
    ) -> *const graphene_point_t;
    pub fn graphene_quad_init(
        q: *mut graphene_quad_t,
        p1: *const graphene_point_t,
        p2: *const graphene_point_t,
        p3: *const graphene_point_t,
        p4: *const graphene_point_t,
    ) -> *mut graphene_quad_t;
    pub fn graphene_quad_init_from_points(
        q: *mut graphene_quad_t,
        points: *const [graphene_point_t; 4],
    ) -> *mut graphene_quad_t;
    pub fn graphene_quad_init_from_rect(
        q: *mut graphene_quad_t,
        r: *const graphene_rect_t,
    ) -> *mut graphene_quad_t;

    //=========================================================================
    // graphene_quaternion_t
    //=========================================================================
    pub fn graphene_quaternion_get_type() -> GType;
    pub fn graphene_quaternion_alloc() -> *mut graphene_quaternion_t;
    pub fn graphene_quaternion_add(
        a: *const graphene_quaternion_t,
        b: *const graphene_quaternion_t,
        res: *mut graphene_quaternion_t,
    );
    pub fn graphene_quaternion_dot(
        a: *const graphene_quaternion_t,
        b: *const graphene_quaternion_t,
    ) -> c_float;
    pub fn graphene_quaternion_equal(
        a: *const graphene_quaternion_t,
        b: *const graphene_quaternion_t,
    ) -> gboolean;
    pub fn graphene_quaternion_free(q: *mut graphene_quaternion_t);
    pub fn graphene_quaternion_init(
        q: *mut graphene_quaternion_t,
        x: c_float,
        y: c_float,
        z: c_float,
        w: c_float,
    ) -> *mut graphene_quaternion_t;
    pub fn graphene_quaternion_init_from_angle_vec3(
        q: *mut graphene_quaternion_t,
        angle: c_float,
        axis: *const graphene_vec3_t,
    ) -> *mut graphene_quaternion_t;
    pub fn graphene_quaternion_init_from_angles(
        q: *mut graphene_quaternion_t,
        deg_x: c_float,
        deg_y: c_float,
        deg_z: c_float,
    ) -> *mut graphene_quaternion_t;
    pub fn graphene_quaternion_init_from_euler(
        q: *mut graphene_quaternion_t,
        e: *const graphene_euler_t,
    ) -> *mut graphene_quaternion_t;
    pub fn graphene_quaternion_init_from_matrix(
        q: *mut graphene_quaternion_t,
        m: *const graphene_matrix_t,
    ) -> *mut graphene_quaternion_t;
    pub fn graphene_quaternion_init_from_quaternion(
        q: *mut graphene_quaternion_t,
        src: *const graphene_quaternion_t,
    ) -> *mut graphene_quaternion_t;
    pub fn graphene_quaternion_init_from_radians(
        q: *mut graphene_quaternion_t,
        rad_x: c_float,
        rad_y: c_float,
        rad_z: c_float,
    ) -> *mut graphene_quaternion_t;
    pub fn graphene_quaternion_init_from_vec4(
        q: *mut graphene_quaternion_t,
        src: *const graphene_vec4_t,
    ) -> *mut graphene_quaternion_t;
    pub fn graphene_quaternion_init_identity(
        q: *mut graphene_quaternion_t,
    ) -> *mut graphene_quaternion_t;
    pub fn graphene_quaternion_invert(
        q: *const graphene_quaternion_t,
        res: *mut graphene_quaternion_t,
    );
    pub fn graphene_quaternion_multiply(
        a: *const graphene_quaternion_t,
        b: *const graphene_quaternion_t,
        res: *mut graphene_quaternion_t,
    );
    pub fn graphene_quaternion_normalize(
        q: *const graphene_quaternion_t,
        res: *mut graphene_quaternion_t,
    );
    pub fn graphene_quaternion_scale(
        q: *const graphene_quaternion_t,
        factor: c_float,
        res: *mut graphene_quaternion_t,
    );
    pub fn graphene_quaternion_slerp(
        a: *const graphene_quaternion_t,
        b: *const graphene_quaternion_t,
        factor: c_float,
        res: *mut graphene_quaternion_t,
    );
    pub fn graphene_quaternion_to_angle_vec3(
        q: *const graphene_quaternion_t,
        angle: *mut c_float,
        axis: *mut graphene_vec3_t,
    );
    pub fn graphene_quaternion_to_angles(
        q: *const graphene_quaternion_t,
        deg_x: *mut c_float,
        deg_y: *mut c_float,
        deg_z: *mut c_float,
    );
    pub fn graphene_quaternion_to_matrix(
        q: *const graphene_quaternion_t,
        m: *mut graphene_matrix_t,
    );
    pub fn graphene_quaternion_to_radians(
        q: *const graphene_quaternion_t,
        rad_x: *mut c_float,
        rad_y: *mut c_float,
        rad_z: *mut c_float,
    );
    pub fn graphene_quaternion_to_vec4(q: *const graphene_quaternion_t, res: *mut graphene_vec4_t);

    //=========================================================================
    // graphene_ray_t
    //=========================================================================
    pub fn graphene_ray_get_type() -> GType;
    pub fn graphene_ray_alloc() -> *mut graphene_ray_t;
    pub fn graphene_ray_equal(a: *const graphene_ray_t, b: *const graphene_ray_t) -> gboolean;
    pub fn graphene_ray_free(r: *mut graphene_ray_t);
    pub fn graphene_ray_get_closest_point_to_point(
        r: *const graphene_ray_t,
        p: *const graphene_point3d_t,
        res: *mut graphene_point3d_t,
    );
    pub fn graphene_ray_get_direction(r: *const graphene_ray_t, direction: *mut graphene_vec3_t);
    pub fn graphene_ray_get_distance_to_plane(
        r: *const graphene_ray_t,
        p: *const graphene_plane_t,
    ) -> c_float;
    pub fn graphene_ray_get_distance_to_point(
        r: *const graphene_ray_t,
        p: *const graphene_point3d_t,
    ) -> c_float;
    pub fn graphene_ray_get_origin(r: *const graphene_ray_t, origin: *mut graphene_point3d_t);
    pub fn graphene_ray_get_position_at(
        r: *const graphene_ray_t,
        t: c_float,
        position: *mut graphene_point3d_t,
    );
    pub fn graphene_ray_init(
        r: *mut graphene_ray_t,
        origin: *const graphene_point3d_t,
        direction: *const graphene_vec3_t,
    ) -> *mut graphene_ray_t;
    pub fn graphene_ray_init_from_ray(
        r: *mut graphene_ray_t,
        src: *const graphene_ray_t,
    ) -> *mut graphene_ray_t;
    pub fn graphene_ray_init_from_vec3(
        r: *mut graphene_ray_t,
        origin: *const graphene_vec3_t,
        direction: *const graphene_vec3_t,
    ) -> *mut graphene_ray_t;
    pub fn graphene_ray_intersect_box(
        r: *const graphene_ray_t,
        b: *const graphene_box_t,
        t_out: *mut c_float,
    ) -> graphene_ray_intersection_kind_t;
    pub fn graphene_ray_intersect_sphere(
        r: *const graphene_ray_t,
        s: *const graphene_sphere_t,
        t_out: *mut c_float,
    ) -> graphene_ray_intersection_kind_t;
    pub fn graphene_ray_intersect_triangle(
        r: *const graphene_ray_t,
        t: *const graphene_triangle_t,
        t_out: *mut c_float,
    ) -> graphene_ray_intersection_kind_t;
    pub fn graphene_ray_intersects_box(
        r: *const graphene_ray_t,
        b: *const graphene_box_t,
    ) -> gboolean;
    pub fn graphene_ray_intersects_sphere(
        r: *const graphene_ray_t,
        s: *const graphene_sphere_t,
    ) -> gboolean;
    pub fn graphene_ray_intersects_triangle(
        r: *const graphene_ray_t,
        t: *const graphene_triangle_t,
    ) -> gboolean;

    //=========================================================================
    // graphene_rect_t
    //=========================================================================
    pub fn graphene_rect_get_type() -> GType;
    pub fn graphene_rect_contains_point(
        r: *const graphene_rect_t,
        p: *const graphene_point_t,
    ) -> gboolean;
    pub fn graphene_rect_contains_rect(
        a: *const graphene_rect_t,
        b: *const graphene_rect_t,
    ) -> gboolean;
    pub fn graphene_rect_equal(a: *const graphene_rect_t, b: *const graphene_rect_t) -> gboolean;
    pub fn graphene_rect_expand(
        r: *const graphene_rect_t,
        p: *const graphene_point_t,
        res: *mut graphene_rect_t,
    );
    pub fn graphene_rect_free(r: *mut graphene_rect_t);
    pub fn graphene_rect_get_area(r: *const graphene_rect_t) -> c_float;
    pub fn graphene_rect_get_bottom_left(r: *const graphene_rect_t, p: *mut graphene_point_t);
    pub fn graphene_rect_get_bottom_right(r: *const graphene_rect_t, p: *mut graphene_point_t);
    pub fn graphene_rect_get_center(r: *const graphene_rect_t, p: *mut graphene_point_t);
    pub fn graphene_rect_get_height(r: *const graphene_rect_t) -> c_float;
    pub fn graphene_rect_get_top_left(r: *const graphene_rect_t, p: *mut graphene_point_t);
    pub fn graphene_rect_get_top_right(r: *const graphene_rect_t, p: *mut graphene_point_t);
    pub fn graphene_rect_get_vertices(
        r: *const graphene_rect_t,
        vertices: *mut [graphene_vec2_t; 4],
    );
    pub fn graphene_rect_get_width(r: *const graphene_rect_t) -> c_float;
    pub fn graphene_rect_get_x(r: *const graphene_rect_t) -> c_float;
    pub fn graphene_rect_get_y(r: *const graphene_rect_t) -> c_float;
    pub fn graphene_rect_init(
        r: *mut graphene_rect_t,
        x: c_float,
        y: c_float,
        width: c_float,
        height: c_float,
    ) -> *mut graphene_rect_t;
    pub fn graphene_rect_init_from_rect(
        r: *mut graphene_rect_t,
        src: *const graphene_rect_t,
    ) -> *mut graphene_rect_t;
    pub fn graphene_rect_inset(
        r: *mut graphene_rect_t,
        d_x: c_float,
        d_y: c_float,
    ) -> *mut graphene_rect_t;
    pub fn graphene_rect_inset_r(
        r: *const graphene_rect_t,
        d_x: c_float,
        d_y: c_float,
        res: *mut graphene_rect_t,
    );
    pub fn graphene_rect_interpolate(
        a: *const graphene_rect_t,
        b: *const graphene_rect_t,
        factor: c_double,
        res: *mut graphene_rect_t,
    );
    pub fn graphene_rect_intersection(
        a: *const graphene_rect_t,
        b: *const graphene_rect_t,
        res: *mut graphene_rect_t,
    ) -> gboolean;
    pub fn graphene_rect_normalize(r: *mut graphene_rect_t) -> *mut graphene_rect_t;
    pub fn graphene_rect_normalize_r(r: *const graphene_rect_t, res: *mut graphene_rect_t);
    pub fn graphene_rect_offset(
        r: *mut graphene_rect_t,
        d_x: c_float,
        d_y: c_float,
    ) -> *mut graphene_rect_t;
    pub fn graphene_rect_offset_r(
        r: *const graphene_rect_t,
        d_x: c_float,
        d_y: c_float,
        res: *mut graphene_rect_t,
    );
    pub fn graphene_rect_round(r: *const graphene_rect_t, res: *mut graphene_rect_t);
    pub fn graphene_rect_round_extents(r: *const graphene_rect_t, res: *mut graphene_rect_t);
    pub fn graphene_rect_round_to_pixel(r: *mut graphene_rect_t) -> *mut graphene_rect_t;
    pub fn graphene_rect_scale(
        r: *const graphene_rect_t,
        s_h: c_float,
        s_v: c_float,
        res: *mut graphene_rect_t,
    );
    pub fn graphene_rect_union(
        a: *const graphene_rect_t,
        b: *const graphene_rect_t,
        res: *mut graphene_rect_t,
    );
    pub fn graphene_rect_alloc() -> *mut graphene_rect_t;
    pub fn graphene_rect_zero() -> *const graphene_rect_t;

    //=========================================================================
    // graphene_size_t
    //=========================================================================
    pub fn graphene_size_get_type() -> GType;
    pub fn graphene_size_alloc() -> *mut graphene_size_t;
    pub fn graphene_size_equal(a: *const graphene_size_t, b: *const graphene_size_t) -> gboolean;
    pub fn graphene_size_free(s: *mut graphene_size_t);
    pub fn graphene_size_init(
        s: *mut graphene_size_t,
        width: c_float,
        height: c_float,
    ) -> *mut graphene_size_t;
    pub fn graphene_size_init_from_size(
        s: *mut graphene_size_t,
        src: *const graphene_size_t,
    ) -> *mut graphene_size_t;
    pub fn graphene_size_interpolate(
        a: *const graphene_size_t,
        b: *const graphene_size_t,
        factor: c_double,
        res: *mut graphene_size_t,
    );
    pub fn graphene_size_scale(
        s: *const graphene_size_t,
        factor: c_float,
        res: *mut graphene_size_t,
    );
    pub fn graphene_size_zero() -> *const graphene_size_t;

    //=========================================================================
    // graphene_sphere_t
    //=========================================================================
    pub fn graphene_sphere_get_type() -> GType;
    pub fn graphene_sphere_alloc() -> *mut graphene_sphere_t;
    pub fn graphene_sphere_contains_point(
        s: *const graphene_sphere_t,
        point: *const graphene_point3d_t,
    ) -> gboolean;
    pub fn graphene_sphere_distance(
        s: *const graphene_sphere_t,
        point: *const graphene_point3d_t,
    ) -> c_float;
    pub fn graphene_sphere_equal(
        a: *const graphene_sphere_t,
        b: *const graphene_sphere_t,
    ) -> gboolean;
    pub fn graphene_sphere_free(s: *mut graphene_sphere_t);
    pub fn graphene_sphere_get_bounding_box(s: *const graphene_sphere_t, box_: *mut graphene_box_t);
    pub fn graphene_sphere_get_center(s: *const graphene_sphere_t, center: *mut graphene_point3d_t);
    pub fn graphene_sphere_get_radius(s: *const graphene_sphere_t) -> c_float;
    pub fn graphene_sphere_init(
        s: *mut graphene_sphere_t,
        center: *const graphene_point3d_t,
        radius: c_float,
    ) -> *mut graphene_sphere_t;
    pub fn graphene_sphere_init_from_points(
        s: *mut graphene_sphere_t,
        n_points: c_uint,
        points: *const graphene_point3d_t,
        center: *const graphene_point3d_t,
    ) -> *mut graphene_sphere_t;
    pub fn graphene_sphere_init_from_vectors(
        s: *mut graphene_sphere_t,
        n_vectors: c_uint,
        vectors: *const graphene_vec3_t,
        center: *const graphene_point3d_t,
    ) -> *mut graphene_sphere_t;
    pub fn graphene_sphere_is_empty(s: *const graphene_sphere_t) -> gboolean;
    pub fn graphene_sphere_translate(
        s: *const graphene_sphere_t,
        point: *const graphene_point3d_t,
        res: *mut graphene_sphere_t,
    );

    //=========================================================================
    // graphene_triangle_t
    //=========================================================================
    pub fn graphene_triangle_get_type() -> GType;
    pub fn graphene_triangle_alloc() -> *mut graphene_triangle_t;
    pub fn graphene_triangle_contains_point(
        t: *const graphene_triangle_t,
        p: *const graphene_point3d_t,
    ) -> gboolean;
    pub fn graphene_triangle_equal(
        a: *const graphene_triangle_t,
        b: *const graphene_triangle_t,
    ) -> gboolean;
    pub fn graphene_triangle_free(t: *mut graphene_triangle_t);
    pub fn graphene_triangle_get_area(t: *const graphene_triangle_t) -> c_float;
    pub fn graphene_triangle_get_barycoords(
        t: *const graphene_triangle_t,
        p: *const graphene_point3d_t,
        res: *mut graphene_vec2_t,
    ) -> gboolean;
    pub fn graphene_triangle_get_bounding_box(
        t: *const graphene_triangle_t,
        res: *mut graphene_box_t,
    );
    pub fn graphene_triangle_get_midpoint(
        t: *const graphene_triangle_t,
        res: *mut graphene_point3d_t,
    );
    pub fn graphene_triangle_get_normal(t: *const graphene_triangle_t, res: *mut graphene_vec3_t);
    pub fn graphene_triangle_get_plane(t: *const graphene_triangle_t, res: *mut graphene_plane_t);
    pub fn graphene_triangle_get_points(
        t: *const graphene_triangle_t,
        a: *mut graphene_point3d_t,
        b: *mut graphene_point3d_t,
        c: *mut graphene_point3d_t,
    );
    pub fn graphene_triangle_get_uv(
        t: *const graphene_triangle_t,
        p: *const graphene_point3d_t,
        uv_a: *const graphene_vec2_t,
        uv_b: *const graphene_vec2_t,
        uv_c: *const graphene_vec2_t,
        res: *mut graphene_vec2_t,
    ) -> gboolean;
    pub fn graphene_triangle_get_vertices(
        t: *const graphene_triangle_t,
        a: *mut graphene_vec3_t,
        b: *mut graphene_vec3_t,
        c: *mut graphene_vec3_t,
    );
    pub fn graphene_triangle_init_from_float(
        t: *mut graphene_triangle_t,
        a: *const [c_float; 3],
        b: *const [c_float; 3],
        c: *const [c_float; 3],
    ) -> *mut graphene_triangle_t;
    pub fn graphene_triangle_init_from_point3d(
        t: *mut graphene_triangle_t,
        a: *const graphene_point3d_t,
        b: *const graphene_point3d_t,
        c: *const graphene_point3d_t,
    ) -> *mut graphene_triangle_t;
    pub fn graphene_triangle_init_from_vec3(
        t: *mut graphene_triangle_t,
        a: *const graphene_vec3_t,
        b: *const graphene_vec3_t,
        c: *const graphene_vec3_t,
    ) -> *mut graphene_triangle_t;

    //=========================================================================
    // graphene_vec2_t
    //=========================================================================
    pub fn graphene_vec2_get_type() -> GType;
    pub fn graphene_vec2_alloc() -> *mut graphene_vec2_t;
    pub fn graphene_vec2_add(
        a: *const graphene_vec2_t,
        b: *const graphene_vec2_t,
        res: *mut graphene_vec2_t,
    );
    pub fn graphene_vec2_divide(
        a: *const graphene_vec2_t,
        b: *const graphene_vec2_t,
        res: *mut graphene_vec2_t,
    );
    pub fn graphene_vec2_dot(a: *const graphene_vec2_t, b: *const graphene_vec2_t) -> c_float;
    pub fn graphene_vec2_equal(v1: *const graphene_vec2_t, v2: *const graphene_vec2_t) -> gboolean;
    pub fn graphene_vec2_free(v: *mut graphene_vec2_t);
    pub fn graphene_vec2_get_x(v: *const graphene_vec2_t) -> c_float;
    pub fn graphene_vec2_get_y(v: *const graphene_vec2_t) -> c_float;
    pub fn graphene_vec2_init(
        v: *mut graphene_vec2_t,
        x: c_float,
        y: c_float,
    ) -> *mut graphene_vec2_t;
    pub fn graphene_vec2_init_from_float(
        v: *mut graphene_vec2_t,
        src: *const [c_float; 2],
    ) -> *mut graphene_vec2_t;
    pub fn graphene_vec2_init_from_vec2(
        v: *mut graphene_vec2_t,
        src: *const graphene_vec2_t,
    ) -> *mut graphene_vec2_t;
    pub fn graphene_vec2_interpolate(
        v1: *const graphene_vec2_t,
        v2: *const graphene_vec2_t,
        factor: c_double,
        res: *mut graphene_vec2_t,
    );
    pub fn graphene_vec2_length(v: *const graphene_vec2_t) -> c_float;
    pub fn graphene_vec2_max(
        a: *const graphene_vec2_t,
        b: *const graphene_vec2_t,
        res: *mut graphene_vec2_t,
    );
    pub fn graphene_vec2_min(
        a: *const graphene_vec2_t,
        b: *const graphene_vec2_t,
        res: *mut graphene_vec2_t,
    );
    pub fn graphene_vec2_multiply(
        a: *const graphene_vec2_t,
        b: *const graphene_vec2_t,
        res: *mut graphene_vec2_t,
    );
    pub fn graphene_vec2_near(
        v1: *const graphene_vec2_t,
        v2: *const graphene_vec2_t,
        epsilon: c_float,
    ) -> gboolean;
    pub fn graphene_vec2_negate(v: *const graphene_vec2_t, res: *mut graphene_vec2_t);
    pub fn graphene_vec2_normalize(v: *const graphene_vec2_t, res: *mut graphene_vec2_t);
    pub fn graphene_vec2_scale(
        v: *const graphene_vec2_t,
        factor: c_float,
        res: *mut graphene_vec2_t,
    );
    pub fn graphene_vec2_subtract(
        a: *const graphene_vec2_t,
        b: *const graphene_vec2_t,
        res: *mut graphene_vec2_t,
    );
    pub fn graphene_vec2_to_float(v: *const graphene_vec2_t, dest: *mut [c_float; 2]);
    pub fn graphene_vec2_one() -> *const graphene_vec2_t;
    pub fn graphene_vec2_x_axis() -> *const graphene_vec2_t;
    pub fn graphene_vec2_y_axis() -> *const graphene_vec2_t;
    pub fn graphene_vec2_zero() -> *const graphene_vec2_t;

    //=========================================================================
    // graphene_vec3_t
    //=========================================================================
    pub fn graphene_vec3_get_type() -> GType;
    pub fn graphene_vec3_alloc() -> *mut graphene_vec3_t;
    pub fn graphene_vec3_add(
        a: *const graphene_vec3_t,
        b: *const graphene_vec3_t,
        res: *mut graphene_vec3_t,
    );
    pub fn graphene_vec3_cross(
        a: *const graphene_vec3_t,
        b: *const graphene_vec3_t,
        res: *mut graphene_vec3_t,
    );
    pub fn graphene_vec3_divide(
        a: *const graphene_vec3_t,
        b: *const graphene_vec3_t,
        res: *mut graphene_vec3_t,
    );
    pub fn graphene_vec3_dot(a: *const graphene_vec3_t, b: *const graphene_vec3_t) -> c_float;
    pub fn graphene_vec3_equal(v1: *const graphene_vec3_t, v2: *const graphene_vec3_t) -> gboolean;
    pub fn graphene_vec3_free(v: *mut graphene_vec3_t);
    pub fn graphene_vec3_get_x(v: *const graphene_vec3_t) -> c_float;
    pub fn graphene_vec3_get_xy(v: *const graphene_vec3_t, res: *mut graphene_vec2_t);
    pub fn graphene_vec3_get_xy0(v: *const graphene_vec3_t, res: *mut graphene_vec3_t);
    pub fn graphene_vec3_get_xyz0(v: *const graphene_vec3_t, res: *mut graphene_vec4_t);
    pub fn graphene_vec3_get_xyz1(v: *const graphene_vec3_t, res: *mut graphene_vec4_t);
    pub fn graphene_vec3_get_xyzw(v: *const graphene_vec3_t, w: c_float, res: *mut graphene_vec4_t);
    pub fn graphene_vec3_get_y(v: *const graphene_vec3_t) -> c_float;
    pub fn graphene_vec3_get_z(v: *const graphene_vec3_t) -> c_float;
    pub fn graphene_vec3_init(
        v: *mut graphene_vec3_t,
        x: c_float,
        y: c_float,
        z: c_float,
    ) -> *mut graphene_vec3_t;
    pub fn graphene_vec3_init_from_float(
        v: *mut graphene_vec3_t,
        src: *const [c_float; 3],
    ) -> *mut graphene_vec3_t;
    pub fn graphene_vec3_init_from_vec3(
        v: *mut graphene_vec3_t,
        src: *const graphene_vec3_t,
    ) -> *mut graphene_vec3_t;
    pub fn graphene_vec3_interpolate(
        v1: *const graphene_vec3_t,
        v2: *const graphene_vec3_t,
        factor: c_double,
        res: *mut graphene_vec3_t,
    );
    pub fn graphene_vec3_length(v: *const graphene_vec3_t) -> c_float;
    pub fn graphene_vec3_max(
        a: *const graphene_vec3_t,
        b: *const graphene_vec3_t,
        res: *mut graphene_vec3_t,
    );
    pub fn graphene_vec3_min(
        a: *const graphene_vec3_t,
        b: *const graphene_vec3_t,
        res: *mut graphene_vec3_t,
    );
    pub fn graphene_vec3_multiply(
        a: *const graphene_vec3_t,
        b: *const graphene_vec3_t,
        res: *mut graphene_vec3_t,
    );
    pub fn graphene_vec3_near(
        v1: *const graphene_vec3_t,
        v2: *const graphene_vec3_t,
        epsilon: c_float,
    ) -> gboolean;
    pub fn graphene_vec3_negate(v: *const graphene_vec3_t, res: *mut graphene_vec3_t);
    pub fn graphene_vec3_normalize(v: *const graphene_vec3_t, res: *mut graphene_vec3_t);
    pub fn graphene_vec3_scale(
        v: *const graphene_vec3_t,
        factor: c_float,
        res: *mut graphene_vec3_t,
    );
    pub fn graphene_vec3_subtract(
        a: *const graphene_vec3_t,
        b: *const graphene_vec3_t,
        res: *mut graphene_vec3_t,
    );
    pub fn graphene_vec3_to_float(v: *const graphene_vec3_t, dest: *mut [c_float; 3]);
    pub fn graphene_vec3_one() -> *const graphene_vec3_t;
    pub fn graphene_vec3_x_axis() -> *const graphene_vec3_t;
    pub fn graphene_vec3_y_axis() -> *const graphene_vec3_t;
    pub fn graphene_vec3_z_axis() -> *const graphene_vec3_t;
    pub fn graphene_vec3_zero() -> *const graphene_vec3_t;

    //=========================================================================
    // graphene_vec4_t
    //=========================================================================
    pub fn graphene_vec4_get_type() -> GType;
    pub fn graphene_vec4_alloc() -> *mut graphene_vec4_t;
    pub fn graphene_vec4_add(
        a: *const graphene_vec4_t,
        b: *const graphene_vec4_t,
        res: *mut graphene_vec4_t,
    );
    pub fn graphene_vec4_divide(
        a: *const graphene_vec4_t,
        b: *const graphene_vec4_t,
        res: *mut graphene_vec4_t,
    );
    pub fn graphene_vec4_dot(a: *const graphene_vec4_t, b: *const graphene_vec4_t) -> c_float;
    pub fn graphene_vec4_equal(v1: *const graphene_vec4_t, v2: *const graphene_vec4_t) -> gboolean;
    pub fn graphene_vec4_free(v: *mut graphene_vec4_t);
    pub fn graphene_vec4_get_w(v: *const graphene_vec4_t) -> c_float;
    pub fn graphene_vec4_get_x(v: *const graphene_vec4_t) -> c_float;
    pub fn graphene_vec4_get_xy(v: *const graphene_vec4_t, res: *mut graphene_vec2_t);
    pub fn graphene_vec4_get_xyz(v: *const graphene_vec4_t, res: *mut graphene_vec3_t);
    pub fn graphene_vec4_get_y(v: *const graphene_vec4_t) -> c_float;
    pub fn graphene_vec4_get_z(v: *const graphene_vec4_t) -> c_float;
    pub fn graphene_vec4_init(
        v: *mut graphene_vec4_t,
        x: c_float,
        y: c_float,
        z: c_float,
        w: c_float,
    ) -> *mut graphene_vec4_t;
    pub fn graphene_vec4_init_from_float(
        v: *mut graphene_vec4_t,
        src: *const [c_float; 4],
    ) -> *mut graphene_vec4_t;
    pub fn graphene_vec4_init_from_vec2(
        v: *mut graphene_vec4_t,
        src: *const graphene_vec2_t,
        z: c_float,
        w: c_float,
    ) -> *mut graphene_vec4_t;
    pub fn graphene_vec4_init_from_vec3(
        v: *mut graphene_vec4_t,
        src: *const graphene_vec3_t,
        w: c_float,
    ) -> *mut graphene_vec4_t;
    pub fn graphene_vec4_init_from_vec4(
        v: *mut graphene_vec4_t,
        src: *const graphene_vec4_t,
    ) -> *mut graphene_vec4_t;
    pub fn graphene_vec4_interpolate(
        v1: *const graphene_vec4_t,
        v2: *const graphene_vec4_t,
        factor: c_double,
        res: *mut graphene_vec4_t,
    );
    pub fn graphene_vec4_length(v: *const graphene_vec4_t) -> c_float;
    pub fn graphene_vec4_max(
        a: *const graphene_vec4_t,
        b: *const graphene_vec4_t,
        res: *mut graphene_vec4_t,
    );
    pub fn graphene_vec4_min(
        a: *const graphene_vec4_t,
        b: *const graphene_vec4_t,
        res: *mut graphene_vec4_t,
    );
    pub fn graphene_vec4_multiply(
        a: *const graphene_vec4_t,
        b: *const graphene_vec4_t,
        res: *mut graphene_vec4_t,
    );
    pub fn graphene_vec4_near(
        v1: *const graphene_vec4_t,
        v2: *const graphene_vec4_t,
        epsilon: c_float,
    ) -> gboolean;
    pub fn graphene_vec4_negate(v: *const graphene_vec4_t, res: *mut graphene_vec4_t);
    pub fn graphene_vec4_normalize(v: *const graphene_vec4_t, res: *mut graphene_vec4_t);
    pub fn graphene_vec4_scale(
        v: *const graphene_vec4_t,
        factor: c_float,
        res: *mut graphene_vec4_t,
    );
    pub fn graphene_vec4_subtract(
        a: *const graphene_vec4_t,
        b: *const graphene_vec4_t,
        res: *mut graphene_vec4_t,
    );
    pub fn graphene_vec4_to_float(v: *const graphene_vec4_t, dest: *mut [c_float; 4]);
    pub fn graphene_vec4_one() -> *const graphene_vec4_t;
    pub fn graphene_vec4_w_axis() -> *const graphene_vec4_t;
    pub fn graphene_vec4_x_axis() -> *const graphene_vec4_t;
    pub fn graphene_vec4_y_axis() -> *const graphene_vec4_t;
    pub fn graphene_vec4_z_axis() -> *const graphene_vec4_t;
    pub fn graphene_vec4_zero() -> *const graphene_vec4_t;

}