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
use bitflags::bitflags;
use libc::size_t;
use std::os::raw::{c_char, c_double, c_float, c_int, c_short, c_uchar, c_uint, c_ushort, c_void};
use std::slice;

#[repr(C)]
pub struct ImVector<T> {
    size: c_int,
    capacity: c_int,
    data: *mut T,
}

impl<T> ImVector<T> {
    pub unsafe fn as_slice(&self) -> &[T] {
        slice::from_raw_parts(self.data, self.size as usize)
    }
}

#[repr(C)]
pub struct Pair {
    pub key: ImGuiID,
    pub value: PairValue,
}

#[repr(C)]
pub union PairValue {
    pub val_i: c_int,
    pub val_f: c_float,
    pub val_p: *mut c_void,
}

// opaque types
pub enum ImDrawListSharedData {}
pub enum ImGuiContext {}

pub type ImFontPtr = *mut ImFont;
pub type ImDrawCallback = Option<extern "C" fn(parent_list: *const ImDrawList, cmd: *const ImDrawCmd)>;
pub type ImGuiInputTextCallback = Option<extern "C" fn(data: *mut ImGuiInputTextCallbackData) -> c_int>;
pub type ImGuiSizeCallback = Option<extern "C" fn(data: *mut ImGuiSizeCallbackData)>;

pub type ImDrawIdx = c_ushort;
pub type ImGuiColumnsFlags = c_int;
pub type ImGuiID = c_uint;
pub type ImS32 = c_int;
pub type ImS64 = i64;
pub type ImTextureID = *mut c_void;
pub type ImU32 = c_uint;
pub type ImU64 = u64;
pub type ImWchar = c_ushort;

bitflags! {
  #[repr(C)]
  pub struct ImDrawCornerFlags: c_int {
      const TopLeft = 1 << 0;
      const TopRight = 1 << 1;
      const BotLeft = 1 << 2;
      const BotRight = 1 << 3;
      const Top = Self::TopLeft.bits | Self::TopRight.bits;
      const Bot = Self::BotLeft.bits | Self::BotRight.bits;
      const Left = Self::TopLeft.bits | Self::BotLeft.bits;
      const Right = Self::TopRight.bits | Self::BotRight.bits;
      const All = 0xF;
  }
}

bitflags! {
  #[repr(C)]
  pub struct ImDrawListFlags: c_int {
      const None = 0;
      const AntiAliasedLines = 1 << 0;
      const AntiAliasedFill = 1 << 1;
  }
}

bitflags! {
  #[repr(C)]
  pub struct ImFontAtlasFlags: c_int {
      const None = 0;
      const NoPowerOfTwoHeight = 1 << 0;
      const NoMouseCursors = 1 << 1;
  }
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiBackendFlags: c_int {
      const None = 0;
      const HasGamepad = 1 << 0;
      const HasMouseCursors = 1 << 1;
      const HasSetMousePos = 1 << 2;
  }
}

#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum ImGuiCol {
    Text = 0,
    TextDisabled = 1,
    WindowBg = 2,
    ChildBg = 3,
    PopupBg = 4,
    Border = 5,
    BorderShadow = 6,
    FrameBg = 7,
    FrameBgHovered = 8,
    FrameBgActive = 9,
    TitleBg = 10,
    TitleBgActive = 11,
    TitleBgCollapsed = 12,
    MenuBarBg = 13,
    ScrollbarBg = 14,
    ScrollbarGrab = 15,
    ScrollbarGrabHovered = 16,
    ScrollbarGrabActive = 17,
    CheckMark = 18,
    SliderGrab = 19,
    SliderGrabActive = 20,
    Button = 21,
    ButtonHovered = 22,
    ButtonActive = 23,
    Header = 24,
    HeaderHovered = 25,
    HeaderActive = 26,
    Separator = 27,
    SeparatorHovered = 28,
    SeparatorActive = 29,
    ResizeGrip = 30,
    ResizeGripHovered = 31,
    ResizeGripActive = 32,
    PlotLines = 33,
    PlotLinesHovered = 34,
    PlotHistogram = 35,
    PlotHistogramHovered = 36,
    TextSelectedBg = 37,
    DragDropTarget = 38,
    NavHighlight = 39,
    NavWindowingHighlight = 40,
    NavWindowingDimBg = 41,
    ModalWindowDimBg = 42,
    COUNT = 43,
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiColorEditFlags: c_int {
      const None = 0;
      const NoAlpha = 1 << 1;
      const NoPicker = 1 << 2;
      const NoOptions = 1 << 3;
      const NoSmallPreview = 1 << 4;
      const NoInputs = 1 << 5;
      const NoTooltip = 1 << 6;
      const NoLabel = 1 << 7;
      const NoSidePreview = 1 << 8;
      const NoDragDrop = 1 << 9;
      const AlphaBar = 1 << 16;
      const AlphaPreview = 1 << 17;
      const AlphaPreviewHalf = 1 << 18;
      const HDR = 1 << 19;
      const RGB = 1 << 20;
      const HSV = 1 << 21;
      const HEX = 1 << 22;
      const Uint8 = 1 << 23;
      const Float = 1 << 24;
      const PickerHueBar = 1 << 25;
      const PickerHueWheel = 1 << 26;
      const _InputsMask = Self::RGB.bits|Self::HSV.bits|Self::HEX.bits;
      const _DataTypeMask = Self::Uint8.bits|Self::Float.bits;
      const _PickerMask = Self::PickerHueWheel.bits|Self::PickerHueBar.bits;
      const _OptionsDefault = Self::Uint8.bits|Self::RGB.bits|Self::PickerHueBar.bits;
  }
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiComboFlags: c_int {
      const None = 0;
      const PopupAlignLeft = 1 << 0;
      const HeightSmall = 1 << 1;
      const HeightRegular = 1 << 2;
      const HeightLarge = 1 << 3;
      const HeightLargest = 1 << 4;
      const NoArrowButton = 1 << 5;
      const NoPreview = 1 << 6;
      const HeightMask_ = Self::HeightSmall.bits | Self::HeightRegular.bits | Self::HeightLarge.bits | Self::HeightLargest.bits;
  }
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiCond: c_int {
      const Always = 1 << 0;
      const Once = 1 << 1;
      const FirstUseEver = 1 << 2;
      const Appearing = 1 << 3;
  }
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiConfigFlags: c_int {
      const None = 0;
      const NavEnableKeyboard = 1 << 0;
      const NavEnableGamepad = 1 << 1;
      const NavEnableSetMousePos = 1 << 2;
      const NavNoCaptureKeyboard = 1 << 3;
      const NoMouse = 1 << 4;
      const NoMouseCursorChange = 1 << 5;
      const IsSRGB = 1 << 20;
      const IsTouchScreen = 1 << 21;
  }
}

#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum ImGuiDataType {
    S32 = 0,
    U32 = 1,
    S64 = 2,
    U64 = 3,
    Float = 4,
    Double = 5,
    COUNT = 6,
}

#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum ImGuiDir {
    None = -1,
    Left = 0,
    Right = 1,
    Up = 2,
    Down = 3,
    COUNT = 4,
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiDragDropFlags: c_int {
      const None = 0;
      const SourceNoPreviewTooltip = 1 << 0;
      const SourceNoDisableHover = 1 << 1;
      const SourceNoHoldToOpenOthers = 1 << 2;
      const SourceAllowNullID = 1 << 3;
      const SourceExtern = 1 << 4;
      const SourceAutoExpirePayload = 1 << 5;
      const AcceptBeforeDelivery = 1 << 10;
      const AcceptNoDrawDefaultRect = 1 << 11;
      const AcceptNoPreviewTooltip = 1 << 12;
      const AcceptPeekOnly = Self::AcceptBeforeDelivery.bits | Self::AcceptNoDrawDefaultRect.bits;
  }
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiFocusedFlags: c_int {
      const None = 0;
      const ChildWindows = 1 << 0;
      const RootWindow = 1 << 1;
      const AnyWindow = 1 << 2;
      const RootAndChildWindows = Self::RootWindow.bits | Self::ChildWindows.bits;
  }
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiHoveredFlags: c_int {
      const None = 0;
      const ChildWindows = 1 << 0;
      const RootWindow = 1 << 1;
      const AnyWindow = 1 << 2;
      const AllowWhenBlockedByPopup = 1 << 3;
      const AllowWhenBlockedByActiveItem = 1 << 5;
      const AllowWhenOverlapped = 1 << 6;
      const AllowWhenDisabled = 1 << 7;
      const RectOnly = Self::AllowWhenBlockedByPopup.bits | Self::AllowWhenBlockedByActiveItem.bits | Self::AllowWhenOverlapped.bits;
      const RootAndChildWindows = Self::RootWindow.bits | Self::ChildWindows.bits;
  }
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiInputTextFlags: c_int {
      const None = 0;
      const CharsDecimal = 1 << 0;
      const CharsHexadecimal = 1 << 1;
      const CharsUppercase = 1 << 2;
      const CharsNoBlank = 1 << 3;
      const AutoSelectAll = 1 << 4;
      const EnterReturnsTrue = 1 << 5;
      const CallbackCompletion = 1 << 6;
      const CallbackHistory = 1 << 7;
      const CallbackAlways = 1 << 8;
      const CallbackCharFilter = 1 << 9;
      const AllowTabInput = 1 << 10;
      const CtrlEnterForNewLine = 1 << 11;
      const NoHorizontalScroll = 1 << 12;
      const AlwaysInsertMode = 1 << 13;
      const ReadOnly = 1 << 14;
      const Password = 1 << 15;
      const NoUndoRedo = 1 << 16;
      const CharsScientific = 1 << 17;
      const CallbackResize = 1 << 18;
      const Multiline = 1 << 20;
  }
}

#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum ImGuiKey {
    Tab = 0,
    LeftArrow = 1,
    RightArrow = 2,
    UpArrow = 3,
    DownArrow = 4,
    PageUp = 5,
    PageDown = 6,
    Home = 7,
    End = 8,
    Insert = 9,
    Delete = 10,
    Backspace = 11,
    Space = 12,
    Enter = 13,
    Escape = 14,
    A = 15,
    C = 16,
    V = 17,
    X = 18,
    Y = 19,
    Z = 20,
    COUNT = 21,
}

#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum ImGuiMouseCursor {
    None = -1,
    Arrow = 0,
    TextInput = 1,
    ResizeAll = 2,
    ResizeNS = 3,
    ResizeEW = 4,
    ResizeNESW = 5,
    ResizeNWSE = 6,
    Hand = 7,
    COUNT = 8,
}

#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum ImGuiNavInput {
    Activate = 0,
    Cancel = 1,
    Input = 2,
    Menu = 3,
    DpadLeft = 4,
    DpadRight = 5,
    DpadUp = 6,
    DpadDown = 7,
    LStickLeft = 8,
    LStickRight = 9,
    LStickUp = 10,
    LStickDown = 11,
    FocusPrev = 12,
    FocusNext = 13,
    TweakSlow = 14,
    TweakFast = 15,
    KeyMenu_ = 16,
    KeyLeft_ = 17,
    KeyRight_ = 18,
    KeyUp_ = 19,
    KeyDown_ = 20,
    COUNT = 21,
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiSelectableFlags: c_int {
      const None = 0;
      const DontClosePopups = 1 << 0;
      const SpanAllColumns = 1 << 1;
      const AllowDoubleClick = 1 << 2;
      const Disabled = 1 << 3;
  }
}

#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum ImGuiStyleVar {
    Alpha = 0,
    WindowPadding = 1,
    WindowRounding = 2,
    WindowBorderSize = 3,
    WindowMinSize = 4,
    WindowTitleAlign = 5,
    ChildRounding = 6,
    ChildBorderSize = 7,
    PopupRounding = 8,
    PopupBorderSize = 9,
    FramePadding = 10,
    FrameRounding = 11,
    FrameBorderSize = 12,
    ItemSpacing = 13,
    ItemInnerSpacing = 14,
    IndentSpacing = 15,
    ScrollbarSize = 16,
    ScrollbarRounding = 17,
    GrabMinSize = 18,
    GrabRounding = 19,
    ButtonTextAlign = 20,
    COUNT = 21,
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiTreeNodeFlags: c_int {
      const None = 0;
      const Selected = 1 << 0;
      const Framed = 1 << 1;
      const AllowItemOverlap = 1 << 2;
      const NoTreePushOnOpen = 1 << 3;
      const NoAutoOpenOnLog = 1 << 4;
      const DefaultOpen = 1 << 5;
      const OpenOnDoubleClick = 1 << 6;
      const OpenOnArrow = 1 << 7;
      const Leaf = 1 << 8;
      const Bullet = 1 << 9;
      const FramePadding = 1 << 10;
      const NavLeftJumpsBackHere = 1 << 13;
      const CollapsingHeader = Self::Framed.bits | Self::NoTreePushOnOpen.bits | Self::NoAutoOpenOnLog.bits;
  }
}

bitflags! {
  #[repr(C)]
  pub struct ImGuiWindowFlags: c_int {
      const None = 0;
      const NoTitleBar = 1 << 0;
      const NoResize = 1 << 1;
      const NoMove = 1 << 2;
      const NoScrollbar = 1 << 3;
      const NoScrollWithMouse = 1 << 4;
      const NoCollapse = 1 << 5;
      const AlwaysAutoResize = 1 << 6;
      const NoBackground = 1 << 7;
      const NoSavedSettings = 1 << 8;
      const NoMouseInputs = 1 << 9;
      const MenuBar = 1 << 10;
      const HorizontalScrollbar = 1 << 11;
      const NoFocusOnAppearing = 1 << 12;
      const NoBringToFrontOnFocus = 1 << 13;
      const AlwaysVerticalScrollbar = 1 << 14;
      const AlwaysHorizontalScrollbar = 1<< 15;
      const AlwaysUseWindowPadding = 1 << 16;
      const NoNavInputs = 1 << 18;
      const NoNavFocus = 1 << 19;
      const NoNav = Self::NoNavInputs.bits | Self::NoNavFocus.bits;
      const NoDecoration = Self::NoTitleBar.bits | Self::NoResize.bits | Self::NoScrollbar.bits | Self::NoCollapse.bits;
      const NoInputs = Self::NoMouseInputs.bits | Self::NoNavInputs.bits | Self::NoNavFocus.bits;
      const NavFlattened = 1 << 23;
      const ChildWindow = 1 << 24;
      const Tooltip = 1 << 25;
      const Popup = 1 << 26;
      const Modal = 1 << 27;
      const ChildMenu = 1 << 28;
  }
}

#[repr(C)]
pub struct CustomRect {
    pub id: c_uint,
    pub width: c_ushort,
    pub height: c_ushort,
    pub x: c_ushort,
    pub y: c_ushort,
    pub glyph_advance_x: c_float,
    pub glyph_offset: ImVec2,
    pub font: *mut ImFont,
}

#[repr(C)]
pub struct GlyphRangesBuilder {
    pub used_chars: ImVector<c_uchar>,
}

#[repr(C)]
pub struct ImColor {
    pub value: ImVec4,
}

#[repr(C)]
pub struct ImDrawChannel {
    pub cmd_buffer: ImVector<ImDrawCmd>,
    pub idx_buffer: ImVector<ImDrawIdx>,
}

#[repr(C)]
pub struct ImDrawCmd {
    pub elem_count: c_uint,
    pub clip_rect: ImVec4,
    pub texture_id: ImTextureID,
    pub user_callback: ImDrawCallback,
    pub user_callback_data: *mut c_void,
}

#[repr(C)]
pub struct ImDrawData {
    pub valid: bool,
    pub cmd_lists: *mut *mut ImDrawList,
    pub cmd_lists_count: c_int,
    pub total_idx_count: c_int,
    pub total_vtx_count: c_int,
    pub display_pos: ImVec2,
    pub display_size: ImVec2,
}

#[repr(C)]
pub struct ImDrawList {
    pub cmd_buffer: ImVector<ImDrawCmd>,
    pub idx_buffer: ImVector<ImDrawIdx>,
    pub vtx_buffer: ImVector<ImDrawVert>,
    pub flags: ImDrawListFlags,
    pub data: *const ImDrawListSharedData,
    pub owner_name: *const c_char,
    pub vtx_current_idx: c_uint,
    pub vtx_write_ptr: *mut ImDrawVert,
    pub idx_write_ptr: *mut ImDrawIdx,
    pub clip_rect_stack: ImVector<ImVec4>,
    pub texture_id_stack: ImVector<ImTextureID>,
    pub path: ImVector<ImVec2>,
    pub channels_current: c_int,
    pub channels_count: c_int,
    pub channels: ImVector<ImDrawChannel>,
}

#[repr(C)]
pub struct ImDrawVert {
    pub pos: ImVec2,
    pub uv: ImVec2,
    pub col: ImU32,
}

#[repr(C)]
pub struct ImFont {
    pub font_size: c_float,
    pub scale: c_float,
    pub display_offset: ImVec2,
    pub glyphs: ImVector<ImFontGlyph>,
    pub index_advance_x: ImVector<c_float>,
    pub index_lookup: ImVector<ImWchar>,
    pub fallback_glyph: *const ImFontGlyph,
    pub fallback_advance_x: c_float,
    pub fallback_char: ImWchar,
    pub config_data_count: c_short,
    pub config_data: *mut ImFontConfig,
    pub container_atlas: *mut ImFontAtlas,
    pub ascent: c_float,
    pub descent: c_float,
    pub dirty_lookup_tables: bool,
    pub metrics_total_surface: c_int,
}

#[repr(C)]
pub struct ImFontAtlas {
    pub locked: bool,
    pub flags: ImFontAtlasFlags,
    pub tex_id: ImTextureID,
    pub tex_desired_width: c_int,
    pub tex_glyph_padding: c_int,
    pub tex_pixels_alpha8: *mut c_uchar,
    pub tex_pixels_rgba32: *mut c_uint,
    pub tex_width: c_int,
    pub tex_height: c_int,
    pub tex_uv_scale: ImVec2,
    pub tex_uv_white_pixel: ImVec2,
    pub fonts: ImVector<ImFontPtr>,
    pub custom_rects: ImVector<CustomRect>,
    pub config_data: ImVector<ImFontConfig>,
    pub custom_rect_ids: [c_int; 1],
}

#[repr(C)]
pub struct ImFontConfig {
    pub font_data: *mut c_void,
    pub font_data_size: c_int,
    pub font_data_owned_by_atlas: bool,
    pub font_no: c_int,
    pub size_pixels: c_float,
    pub oversample_h: c_int,
    pub oversample_v: c_int,
    pub pixel_snap_h: bool,
    pub glyph_extra_spacing: ImVec2,
    pub glyph_offset: ImVec2,
    pub glyph_ranges: *const ImWchar,
    pub glyph_min_advance_x: c_float,
    pub glyph_max_advance_x: c_float,
    pub merge_mode: bool,
    pub rasterizer_flags: c_uint,
    pub rasterizer_multiply: c_float,
    pub name: [c_char; 40],
    pub dst_font: *mut ImFont,
}

#[repr(C)]
pub struct ImFontGlyph {
    pub codepoint: ImWchar,
    pub advance_x: c_float,
    pub x0: c_float,
    pub y0: c_float,
    pub x1: c_float,
    pub y1: c_float,
    pub u0: c_float,
    pub v0: c_float,
    pub u1: c_float,
    pub v1: c_float,
}

#[repr(C)]
pub struct ImGuiIO {
    pub config_flags: ImGuiConfigFlags,
    pub backend_flags: ImGuiBackendFlags,
    pub display_size: ImVec2,
    pub delta_time: c_float,
    pub ini_saving_rate: c_float,
    pub ini_filename: *const c_char,
    pub log_filename: *const c_char,
    pub mouse_double_click_time: c_float,
    pub mouse_double_click_max_dist: c_float,
    pub mouse_drag_threshold: c_float,
    pub key_map: [c_int; ImGuiKey::COUNT as usize],
    pub key_repeat_delay: c_float,
    pub key_repeat_rate: c_float,
    pub user_data: *mut c_void,
    pub fonts: *mut ImFontAtlas,
    pub font_global_scale: c_float,
    pub font_allow_user_scaling: bool,
    pub font_default: *mut ImFont,
    pub display_framebuffer_scale: ImVec2,
    pub display_visible_min: ImVec2,
    pub display_visible_max: ImVec2,
    pub mouse_draw_cursor: bool,
    pub config_mac_osx_behaviors: bool,
    pub config_input_text_cursor_blink: bool,
    pub config_resize_windows_from_edges: bool,
    pub backend_platform_name: *const c_char,
    pub backend_renderer_name: *const c_char,
    pub get_clipboard_text_fn: Option<extern "C" fn(user_data: *mut c_void) -> *const c_char>,
    pub set_clipboard_text_fn: Option<extern "C" fn(user_data: *mut c_void, text: *const c_char)>,
    pub clipboard_user_data: *mut c_void,
    pub ime_set_input_screen_pos_fn: Option<extern "C" fn(x: c_int, y: c_int)>,
    pub ime_window_handle: *mut c_void,
    pub render_draw_lists_fn_unused: *mut c_void,
    pub mouse_pos: ImVec2,
    pub mouse_down: [bool; 5],
    pub mouse_wheel: c_float,
    pub mouse_wheel_h: c_float,
    pub key_ctrl: bool,
    pub key_shift: bool,
    pub key_alt: bool,
    pub key_super: bool,
    pub keys_down: [bool; 512],
    pub input_characters: [ImWchar; 16 + 1],
    pub nav_inputs: [c_float; ImGuiNavInput::COUNT as usize],
    pub want_capture_mouse: bool,
    pub want_capture_keyboard: bool,
    pub want_text_input: bool,
    pub want_set_mouse_pos: bool,
    pub want_save_ini_settings: bool,
    pub nav_active: bool,
    pub nav_visible: bool,
    pub framerate: c_float,
    pub metrics_render_vertices: c_int,
    pub metrics_render_indices: c_int,
    pub metrics_render_windows: c_int,
    pub metrics_active_windows: c_int,
    pub metrics_active_allocations: c_int,
    pub mouse_delta: ImVec2,
    pub mouse_pos_prev: ImVec2,
    pub mouse_clicked_pos: [ImVec2; 5],
    pub mouse_clicked_time: [c_double; 5],
    pub mouse_clicked: [bool; 5],
    pub mouse_double_clicked: [bool; 5],
    pub mouse_released: [bool; 5],
    pub mouse_down_owned: [bool; 5],
    pub mouse_down_duration: [c_float; 5],
    pub mouse_down_duration_prev: [c_float; 5],
    pub mouse_drag_max_distance_abs: [ImVec2; 5],
    pub mouse_drag_max_distance_sqr: [c_float; 5],
    pub keys_down_duration: [c_float; 512],
    pub keys_down_duration_prev: [c_float; 512],
    pub nav_inputs_down_duration: [c_float; ImGuiNavInput::COUNT as usize],
    pub nav_inputs_down_duration_prev: [c_float; ImGuiNavInput::COUNT as usize],
}

#[repr(C)]
pub struct ImGuiInputTextCallbackData {
    pub event_flag: ImGuiInputTextFlags,
    pub flags: ImGuiInputTextFlags,
    pub user_data: *mut c_void,
    pub event_char: ImWchar,
    pub event_key: ImGuiKey,
    pub buf: *mut c_char,
    pub buf_text_len: c_int,
    pub buf_size: c_int,
    pub buf_dirty: bool,
    pub cursor_pos: c_int,
    pub selection_start: c_int,
    pub selection_end: c_int,
}

#[repr(C)]
pub struct ImGuiListClipper {
    pub start_pos_y: c_float,
    pub items_height: c_float,
    pub items_count: c_int,
    pub step_no: c_int,
    pub display_start: c_int,
    pub display_end: c_int,
}

#[repr(C)]
pub struct ImGuiOnceUponAFrame {
    pub ref_frame: c_int,
}

#[repr(C)]
pub struct ImGuiPayload {
    pub data: *mut c_void,
    pub data_size: c_int,
    pub source_id: ImGuiID,
    pub source_parent_id: ImGuiID,
    pub data_frame_count: c_int,
    pub data_type: [c_char; 32 + 1],
    pub preview: bool,
    pub delivery: bool,
}

#[repr(C)]
pub struct ImGuiSizeCallbackData {
    pub user_data: *mut c_void,
    pub pos: ImVec2,
    pub current_size: ImVec2,
    pub desired_size: ImVec2,
}

#[repr(C)]
pub struct ImGuiStorage {
    pub data: ImVector<Pair>,
}

#[repr(C)]
pub struct ImGuiStyle {
    pub alpha: c_float,
    pub window_padding: ImVec2,
    pub window_rounding: c_float,
    pub window_border_size: c_float,
    pub window_min_size: ImVec2,
    pub window_title_align: ImVec2,
    pub child_rounding: c_float,
    pub child_border_size: c_float,
    pub popup_rounding: c_float,
    pub popup_border_size: c_float,
    pub frame_padding: ImVec2,
    pub frame_rounding: c_float,
    pub frame_border_size: c_float,
    pub item_spacing: ImVec2,
    pub item_inner_spacing: ImVec2,
    pub touch_extra_padding: ImVec2,
    pub indent_spacing: c_float,
    pub columns_min_spacing: c_float,
    pub scrollbar_size: c_float,
    pub scrollbar_rounding: c_float,
    pub grab_min_size: c_float,
    pub grab_rounding: c_float,
    pub button_text_align: ImVec2,
    pub display_window_padding: ImVec2,
    pub display_safe_area_padding: ImVec2,
    pub mouse_cursor_scale: c_float,
    pub anti_aliased_lines: bool,
    pub anti_aliased_fill: bool,
    pub curve_tessellation_tol: c_float,
    pub colors: [ImVec4; ImGuiCol::COUNT as usize],
}

#[repr(C)]
pub struct ImGuiTextBuffer {
    pub buf: ImVector<c_char>,
}

#[repr(C)]
pub struct ImGuiTextFilter {
    pub input_buf: [c_char; 256],
    pub filters: ImVector<TextRange>,
    pub count_grep: c_int,
}

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

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

#[repr(C)]
pub struct TextRange {
    pub b: *const c_char,
    pub e: *const c_char,
}

extern "C" {
    pub fn CustomRect_CustomRect();
    pub fn CustomRect_IsPacked(_self: *mut CustomRect) -> bool;
    pub fn CustomRect_destroy(_self: *mut CustomRect);
    pub fn GlyphRangesBuilder_AddChar(_self: *mut GlyphRangesBuilder, c: ImWchar);
    pub fn GlyphRangesBuilder_AddRanges(_self: *mut GlyphRangesBuilder, ranges: *const ImWchar);
    pub fn GlyphRangesBuilder_AddText(_self: *mut GlyphRangesBuilder, text: *const c_char, text_end: *const c_char);
    pub fn GlyphRangesBuilder_BuildRanges(_self: *mut GlyphRangesBuilder, out_ranges: *mut ImVector<ImWchar>);
    pub fn GlyphRangesBuilder_GetBit(_self: *mut GlyphRangesBuilder, n: c_int) -> bool;
    pub fn GlyphRangesBuilder_GlyphRangesBuilder();
    pub fn GlyphRangesBuilder_SetBit(_self: *mut GlyphRangesBuilder, n: c_int);
    pub fn GlyphRangesBuilder_destroy(_self: *mut GlyphRangesBuilder);
    pub fn ImColor_HSV(_self: *mut ImColor, h: c_float, s: c_float, v: c_float, a: c_float) -> ImColor;
    pub fn ImColor_ImColor();
    pub fn ImColor_ImColorInt(r: c_int, g: c_int, b: c_int, a: c_int);
    pub fn ImColor_ImColorU32(rgba: ImU32);
    pub fn ImColor_ImColorFloat(r: c_float, g: c_float, b: c_float, a: c_float);
    pub fn ImColor_ImColorVec4(col: ImVec4);
    pub fn ImColor_SetHSV(_self: *mut ImColor, h: c_float, s: c_float, v: c_float, a: c_float);
    pub fn ImColor_destroy(_self: *mut ImColor);
    pub fn ImDrawCmd_ImDrawCmd();
    pub fn ImDrawCmd_destroy(_self: *mut ImDrawCmd);
    pub fn ImDrawData_Clear(_self: *mut ImDrawData);
    pub fn ImDrawData_DeIndexAllBuffers(_self: *mut ImDrawData);
    pub fn ImDrawData_ImDrawData();
    pub fn ImDrawData_ScaleClipRects(_self: *mut ImDrawData, sc: ImVec2);
    pub fn ImDrawData_destroy(_self: *mut ImDrawData);
    pub fn ImDrawList_AddBezierCurve(
        _self: *mut ImDrawList,
        pos0: ImVec2,
        cp0: ImVec2,
        cp1: ImVec2,
        pos1: ImVec2,
        col: ImU32,
        thickness: c_float,
        num_segments: c_int,
    );
    pub fn ImDrawList_AddCallback(_self: *mut ImDrawList, callback: ImDrawCallback, callback_data: *mut c_void);
    pub fn ImDrawList_AddCircle(
        _self: *mut ImDrawList,
        centre: ImVec2,
        radius: c_float,
        col: ImU32,
        num_segments: c_int,
        thickness: c_float,
    );
    pub fn ImDrawList_AddCircleFilled(
        _self: *mut ImDrawList,
        centre: ImVec2,
        radius: c_float,
        col: ImU32,
        num_segments: c_int,
    );
    pub fn ImDrawList_AddConvexPolyFilled(_self: *mut ImDrawList, points: *const ImVec2, num_points: c_int, col: ImU32);
    pub fn ImDrawList_AddDrawCmd(_self: *mut ImDrawList);
    pub fn ImDrawList_AddImage(
        _self: *mut ImDrawList,
        user_texture_id: ImTextureID,
        a: ImVec2,
        b: ImVec2,
        uv_a: ImVec2,
        uv_b: ImVec2,
        col: ImU32,
    );
    pub fn ImDrawList_AddImageQuad(
        _self: *mut ImDrawList,
        user_texture_id: ImTextureID,
        a: ImVec2,
        b: ImVec2,
        c: ImVec2,
        d: ImVec2,
        uv_a: ImVec2,
        uv_b: ImVec2,
        uv_c: ImVec2,
        uv_d: ImVec2,
        col: ImU32,
    );
    pub fn ImDrawList_AddImageRounded(
        _self: *mut ImDrawList,
        user_texture_id: ImTextureID,
        a: ImVec2,
        b: ImVec2,
        uv_a: ImVec2,
        uv_b: ImVec2,
        col: ImU32,
        rounding: c_float,
        rounding_corners: c_int,
    );
    pub fn ImDrawList_AddLine(_self: *mut ImDrawList, a: ImVec2, b: ImVec2, col: ImU32, thickness: c_float);
    pub fn ImDrawList_AddPolyline(
        _self: *mut ImDrawList,
        points: *const ImVec2,
        num_points: c_int,
        col: ImU32,
        closed: bool,
        thickness: c_float,
    );
    pub fn ImDrawList_AddQuad(
        _self: *mut ImDrawList,
        a: ImVec2,
        b: ImVec2,
        c: ImVec2,
        d: ImVec2,
        col: ImU32,
        thickness: c_float,
    );
    pub fn ImDrawList_AddQuadFilled(_self: *mut ImDrawList, a: ImVec2, b: ImVec2, c: ImVec2, d: ImVec2, col: ImU32);
    pub fn ImDrawList_AddRect(
        _self: *mut ImDrawList,
        a: ImVec2,
        b: ImVec2,
        col: ImU32,
        rounding: c_float,
        rounding_corners_flags: c_int,
        thickness: c_float,
    );
    pub fn ImDrawList_AddRectFilled(
        _self: *mut ImDrawList,
        a: ImVec2,
        b: ImVec2,
        col: ImU32,
        rounding: c_float,
        rounding_corners_flags: c_int,
    );
    pub fn ImDrawList_AddRectFilledMultiColor(
        _self: *mut ImDrawList,
        a: ImVec2,
        b: ImVec2,
        col_upr_left: ImU32,
        col_upr_right: ImU32,
        col_bot_right: ImU32,
        col_bot_left: ImU32,
    );
    pub fn ImDrawList_AddText(
        _self: *mut ImDrawList,
        pos: ImVec2,
        col: ImU32,
        text_begin: *const c_char,
        text_end: *const c_char,
    );
    pub fn ImDrawList_AddTextFontPtr(
        _self: *mut ImDrawList,
        font: *const ImFont,
        font_size: c_float,
        pos: ImVec2,
        col: ImU32,
        text_begin: *const c_char,
        text_end: *const c_char,
        wrap_width: c_float,
        cpu_fine_clip_rect: *const ImVec4,
    );
    pub fn ImDrawList_AddTriangle(
        _self: *mut ImDrawList,
        a: ImVec2,
        b: ImVec2,
        c: ImVec2,
        col: ImU32,
        thickness: c_float,
    );
    pub fn ImDrawList_AddTriangleFilled(_self: *mut ImDrawList, a: ImVec2, b: ImVec2, c: ImVec2, col: ImU32);
    pub fn ImDrawList_ChannelsMerge(_self: *mut ImDrawList);
    pub fn ImDrawList_ChannelsSetCurrent(_self: *mut ImDrawList, channel_index: c_int);
    pub fn ImDrawList_ChannelsSplit(_self: *mut ImDrawList, channels_count: c_int);
    pub fn ImDrawList_Clear(_self: *mut ImDrawList);
    pub fn ImDrawList_ClearFreeMemory(_self: *mut ImDrawList);
    pub fn ImDrawList_CloneOutput(_self: *mut ImDrawList) -> *mut ImDrawList;
    pub fn ImDrawList_GetClipRectMax(_self: *mut ImDrawList) -> ImVec2;
    pub fn ImDrawList_GetClipRectMin(_self: *mut ImDrawList) -> ImVec2;
    pub fn ImDrawList_ImDrawList(shared_data: *const ImDrawListSharedData);
    pub fn ImDrawList_PathArcTo(
        _self: *mut ImDrawList,
        centre: ImVec2,
        radius: c_float,
        a_min: c_float,
        a_max: c_float,
        num_segments: c_int,
    );
    pub fn ImDrawList_PathArcToFast(
        _self: *mut ImDrawList,
        centre: ImVec2,
        radius: c_float,
        a_min_of_12: c_int,
        a_max_of_12: c_int,
    );
    pub fn ImDrawList_PathBezierCurveTo(
        _self: *mut ImDrawList,
        p1: ImVec2,
        p2: ImVec2,
        p3: ImVec2,
        num_segments: c_int,
    );
    pub fn ImDrawList_PathClear(_self: *mut ImDrawList);
    pub fn ImDrawList_PathFillConvex(_self: *mut ImDrawList, col: ImU32);
    pub fn ImDrawList_PathLineTo(_self: *mut ImDrawList, pos: ImVec2);
    pub fn ImDrawList_PathLineToMergeDuplicate(_self: *mut ImDrawList, pos: ImVec2);
    pub fn ImDrawList_PathRect(
        _self: *mut ImDrawList,
        rect_min: ImVec2,
        rect_max: ImVec2,
        rounding: c_float,
        rounding_corners_flags: c_int,
    );
    pub fn ImDrawList_PathStroke(_self: *mut ImDrawList, col: ImU32, closed: bool, thickness: c_float);
    pub fn ImDrawList_PopClipRect(_self: *mut ImDrawList);
    pub fn ImDrawList_PopTextureID(_self: *mut ImDrawList);
    pub fn ImDrawList_PrimQuadUV(
        _self: *mut ImDrawList,
        a: ImVec2,
        b: ImVec2,
        c: ImVec2,
        d: ImVec2,
        uv_a: ImVec2,
        uv_b: ImVec2,
        uv_c: ImVec2,
        uv_d: ImVec2,
        col: ImU32,
    );
    pub fn ImDrawList_PrimRect(_self: *mut ImDrawList, a: ImVec2, b: ImVec2, col: ImU32);
    pub fn ImDrawList_PrimRectUV(_self: *mut ImDrawList, a: ImVec2, b: ImVec2, uv_a: ImVec2, uv_b: ImVec2, col: ImU32);
    pub fn ImDrawList_PrimReserve(_self: *mut ImDrawList, idx_count: c_int, vtx_count: c_int);
    pub fn ImDrawList_PrimVtx(_self: *mut ImDrawList, pos: ImVec2, uv: ImVec2, col: ImU32);
    pub fn ImDrawList_PrimWriteIdx(_self: *mut ImDrawList, idx: ImDrawIdx);
    pub fn ImDrawList_PrimWriteVtx(_self: *mut ImDrawList, pos: ImVec2, uv: ImVec2, col: ImU32);
    pub fn ImDrawList_PushClipRect(
        _self: *mut ImDrawList,
        clip_rect_min: ImVec2,
        clip_rect_max: ImVec2,
        intersect_with_current_clip_rect: bool,
    );
    pub fn ImDrawList_PushClipRectFullScreen(_self: *mut ImDrawList);
    pub fn ImDrawList_PushTextureID(_self: *mut ImDrawList, texture_id: ImTextureID);
    pub fn ImDrawList_UpdateClipRect(_self: *mut ImDrawList);
    pub fn ImDrawList_UpdateTextureID(_self: *mut ImDrawList);
    pub fn ImDrawList_destroy(_self: *mut ImDrawList);
    pub fn ImFontAtlas_AddCustomRectFontGlyph(
        _self: *mut ImFontAtlas,
        font: *mut ImFont,
        id: ImWchar,
        width: c_int,
        height: c_int,
        advance_x: c_float,
        offset: ImVec2,
    ) -> c_int;
    pub fn ImFontAtlas_AddCustomRectRegular(_self: *mut ImFontAtlas, id: c_uint, width: c_int, height: c_int) -> c_int;
    pub fn ImFontAtlas_AddFont(_self: *mut ImFontAtlas, font_cfg: *const ImFontConfig) -> *mut ImFont;
    pub fn ImFontAtlas_AddFontDefault(_self: *mut ImFontAtlas, font_cfg: *const ImFontConfig) -> *mut ImFont;
    pub fn ImFontAtlas_AddFontFromFileTTF(
        _self: *mut ImFontAtlas,
        filename: *const c_char,
        size_pixels: c_float,
        font_cfg: *const ImFontConfig,
        glyph_ranges: *const ImWchar,
    ) -> *mut ImFont;
    pub fn ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(
        _self: *mut ImFontAtlas,
        compressed_font_data_base85: *const c_char,
        size_pixels: c_float,
        font_cfg: *const ImFontConfig,
        glyph_ranges: *const ImWchar,
    ) -> *mut ImFont;
    pub fn ImFontAtlas_AddFontFromMemoryCompressedTTF(
        _self: *mut ImFontAtlas,
        compressed_font_data: *const c_void,
        compressed_font_size: c_int,
        size_pixels: c_float,
        font_cfg: *const ImFontConfig,
        glyph_ranges: *const ImWchar,
    ) -> *mut ImFont;
    pub fn ImFontAtlas_AddFontFromMemoryTTF(
        _self: *mut ImFontAtlas,
        font_data: *mut c_void,
        font_size: c_int,
        size_pixels: c_float,
        font_cfg: *const ImFontConfig,
        glyph_ranges: *const ImWchar,
    ) -> *mut ImFont;
    pub fn ImFontAtlas_Build(_self: *mut ImFontAtlas) -> bool;
    pub fn ImFontAtlas_CalcCustomRectUV(
        _self: *mut ImFontAtlas,
        rect: *const CustomRect,
        out_uv_min: *mut ImVec2,
        out_uv_max: *mut ImVec2,
    );
    pub fn ImFontAtlas_Clear(_self: *mut ImFontAtlas);
    pub fn ImFontAtlas_ClearFonts(_self: *mut ImFontAtlas);
    pub fn ImFontAtlas_ClearInputData(_self: *mut ImFontAtlas);
    pub fn ImFontAtlas_ClearTexData(_self: *mut ImFontAtlas);
    pub fn ImFontAtlas_GetCustomRectByIndex(_self: *mut ImFontAtlas, index: c_int) -> *const CustomRect;
    pub fn ImFontAtlas_GetGlyphRangesChineseFull(_self: *mut ImFontAtlas) -> *const ImWchar;
    pub fn ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(_self: *mut ImFontAtlas) -> *const ImWchar;
    pub fn ImFontAtlas_GetGlyphRangesCyrillic(_self: *mut ImFontAtlas) -> *const ImWchar;
    pub fn ImFontAtlas_GetGlyphRangesDefault(_self: *mut ImFontAtlas) -> *const ImWchar;
    pub fn ImFontAtlas_GetGlyphRangesJapanese(_self: *mut ImFontAtlas) -> *const ImWchar;
    pub fn ImFontAtlas_GetGlyphRangesKorean(_self: *mut ImFontAtlas) -> *const ImWchar;
    pub fn ImFontAtlas_GetGlyphRangesThai(_self: *mut ImFontAtlas) -> *const ImWchar;
    pub fn ImFontAtlas_GetMouseCursorTexData(
        _self: *mut ImFontAtlas,
        cursor: ImGuiMouseCursor,
        out_offset: *mut ImVec2,
        out_size: *mut ImVec2,
        out_uv_border: *mut [ImVec2; 2],
        out_uv_fill: *mut [ImVec2; 2],
    ) -> bool;
    pub fn ImFontAtlas_GetTexDataAsAlpha8(
        _self: *mut ImFontAtlas,
        out_pixels: *mut *mut c_uchar,
        out_width: *mut c_int,
        out_height: *mut c_int,
        out_bytes_per_pixel: *mut c_int,
    );
    pub fn ImFontAtlas_GetTexDataAsRGBA32(
        _self: *mut ImFontAtlas,
        out_pixels: *mut *mut c_uchar,
        out_width: *mut c_int,
        out_height: *mut c_int,
        out_bytes_per_pixel: *mut c_int,
    );
    pub fn ImFontAtlas_ImFontAtlas();
    pub fn ImFontAtlas_IsBuilt(_self: *mut ImFontAtlas) -> bool;
    pub fn ImFontAtlas_SetTexID(_self: *mut ImFontAtlas, id: ImTextureID);
    pub fn ImFontAtlas_destroy(_self: *mut ImFontAtlas);
    pub fn ImFontConfig_ImFontConfig();
    pub fn ImFontConfig_destroy(_self: *mut ImFontConfig);
    pub fn ImFont_AddGlyph(
        _self: *mut ImFont,
        c: ImWchar,
        x0: c_float,
        y0: c_float,
        x1: c_float,
        y1: c_float,
        u0: c_float,
        v0: c_float,
        u1: c_float,
        v1: c_float,
        advance_x: c_float,
    );
    pub fn ImFont_AddRemapChar(_self: *mut ImFont, dst: ImWchar, src: ImWchar, overwrite_dst: bool);
    pub fn ImFont_BuildLookupTable(_self: *mut ImFont);
    pub fn ImFont_CalcTextSizeA(
        _self: *mut ImFont,
        size: c_float,
        max_width: c_float,
        wrap_width: c_float,
        text_begin: *const c_char,
        text_end: *const c_char,
        remaining: *mut *const c_char,
    ) -> ImVec2;
    pub fn ImFont_CalcWordWrapPositionA(
        _self: *mut ImFont,
        scale: c_float,
        text: *const c_char,
        text_end: *const c_char,
        wrap_width: c_float,
    ) -> *const c_char;
    pub fn ImFont_ClearOutputData(_self: *mut ImFont);
    pub fn ImFont_FindGlyph(_self: *mut ImFont, c: ImWchar) -> *const ImFontGlyph;
    pub fn ImFont_FindGlyphNoFallback(_self: *mut ImFont, c: ImWchar) -> *const ImFontGlyph;
    pub fn ImFont_GetCharAdvance(_self: *mut ImFont, c: ImWchar) -> c_float;
    pub fn ImFont_GetDebugName(_self: *mut ImFont) -> *const c_char;
    pub fn ImFont_GrowIndex(_self: *mut ImFont, new_size: c_int);
    pub fn ImFont_ImFont();
    pub fn ImFont_IsLoaded(_self: *mut ImFont) -> bool;
    pub fn ImFont_RenderChar(
        _self: *mut ImFont,
        draw_list: *mut ImDrawList,
        size: c_float,
        pos: ImVec2,
        col: ImU32,
        c: ImWchar,
    );
    pub fn ImFont_RenderText(
        _self: *mut ImFont,
        draw_list: *mut ImDrawList,
        size: c_float,
        pos: ImVec2,
        col: ImU32,
        clip_rect: ImVec4,
        text_begin: *const c_char,
        text_end: *const c_char,
        wrap_width: c_float,
        cpu_fine_clip: bool,
    );
    pub fn ImFont_SetFallbackChar(_self: *mut ImFont, c: ImWchar);
    pub fn ImFont_destroy(_self: *mut ImFont);
    pub fn ImGuiIO_AddInputCharacter(_self: *mut ImGuiIO, c: ImWchar);
    pub fn ImGuiIO_AddInputCharactersUTF8(_self: *mut ImGuiIO, utf8_chars: *const c_char);
    pub fn ImGuiIO_ClearInputCharacters(_self: *mut ImGuiIO);
    pub fn ImGuiIO_ImGuiIO();
    pub fn ImGuiIO_destroy(_self: *mut ImGuiIO);
    pub fn ImGuiInputTextCallbackData_DeleteChars(
        _self: *mut ImGuiInputTextCallbackData,
        pos: c_int,
        bytes_count: c_int,
    );
    pub fn ImGuiInputTextCallbackData_HasSelection(_self: *mut ImGuiInputTextCallbackData) -> bool;
    pub fn ImGuiInputTextCallbackData_ImGuiInputTextCallbackData();
    pub fn ImGuiInputTextCallbackData_InsertChars(
        _self: *mut ImGuiInputTextCallbackData,
        pos: c_int,
        text: *const c_char,
        text_end: *const c_char,
    );
    pub fn ImGuiInputTextCallbackData_destroy(_self: *mut ImGuiInputTextCallbackData);
    pub fn ImGuiListClipper_Begin(_self: *mut ImGuiListClipper, items_count: c_int, items_height: c_float);
    pub fn ImGuiListClipper_End(_self: *mut ImGuiListClipper);
    pub fn ImGuiListClipper_ImGuiListClipper(items_count: c_int, items_height: c_float);
    pub fn ImGuiListClipper_Step(_self: *mut ImGuiListClipper) -> bool;
    pub fn ImGuiListClipper_destroy(_self: *mut ImGuiListClipper);
    pub fn ImGuiOnceUponAFrame_ImGuiOnceUponAFrame();
    pub fn ImGuiOnceUponAFrame_destroy(_self: *mut ImGuiOnceUponAFrame);
    pub fn ImGuiPayload_Clear(_self: *mut ImGuiPayload);
    pub fn ImGuiPayload_ImGuiPayload();
    pub fn ImGuiPayload_IsDataType(_self: *mut ImGuiPayload, _type: *const c_char) -> bool;
    pub fn ImGuiPayload_IsDelivery(_self: *mut ImGuiPayload) -> bool;
    pub fn ImGuiPayload_IsPreview(_self: *mut ImGuiPayload) -> bool;
    pub fn ImGuiPayload_destroy(_self: *mut ImGuiPayload);
    pub fn ImGuiStorage_BuildSortByKey(_self: *mut ImGuiStorage);
    pub fn ImGuiStorage_Clear(_self: *mut ImGuiStorage);
    pub fn ImGuiStorage_GetBool(_self: *mut ImGuiStorage, key: ImGuiID, default_val: bool) -> bool;
    pub fn ImGuiStorage_GetBoolRef(_self: *mut ImGuiStorage, key: ImGuiID, default_val: bool) -> *mut bool;
    pub fn ImGuiStorage_GetFloat(_self: *mut ImGuiStorage, key: ImGuiID, default_val: c_float) -> c_float;
    pub fn ImGuiStorage_GetFloatRef(_self: *mut ImGuiStorage, key: ImGuiID, default_val: c_float) -> *mut c_float;
    pub fn ImGuiStorage_GetInt(_self: *mut ImGuiStorage, key: ImGuiID, default_val: c_int) -> c_int;
    pub fn ImGuiStorage_GetIntRef(_self: *mut ImGuiStorage, key: ImGuiID, default_val: c_int) -> *mut c_int;
    pub fn ImGuiStorage_GetVoidPtr(_self: *mut ImGuiStorage, key: ImGuiID) -> *mut c_void;
    pub fn ImGuiStorage_GetVoidPtrRef(
        _self: *mut ImGuiStorage,
        key: ImGuiID,
        default_val: *mut c_void,
    ) -> *mut *mut c_void;
    pub fn ImGuiStorage_SetAllInt(_self: *mut ImGuiStorage, val: c_int);
    pub fn ImGuiStorage_SetBool(_self: *mut ImGuiStorage, key: ImGuiID, val: bool);
    pub fn ImGuiStorage_SetFloat(_self: *mut ImGuiStorage, key: ImGuiID, val: c_float);
    pub fn ImGuiStorage_SetInt(_self: *mut ImGuiStorage, key: ImGuiID, val: c_int);
    pub fn ImGuiStorage_SetVoidPtr(_self: *mut ImGuiStorage, key: ImGuiID, val: *mut c_void);
    pub fn ImGuiStyle_ImGuiStyle();
    pub fn ImGuiStyle_ScaleAllSizes(_self: *mut ImGuiStyle, scale_factor: c_float);
    pub fn ImGuiStyle_destroy(_self: *mut ImGuiStyle);
    pub fn ImGuiTextBuffer_ImGuiTextBuffer();
    pub fn ImGuiTextBuffer_appendf(_self: *mut ImGuiTextBuffer, fmt: *const c_char, ...);
    pub fn ImGuiTextBuffer_begin(_self: *mut ImGuiTextBuffer) -> *const c_char;
    pub fn ImGuiTextBuffer_c_str(_self: *mut ImGuiTextBuffer) -> *const c_char;
    pub fn ImGuiTextBuffer_clear(_self: *mut ImGuiTextBuffer);
    pub fn ImGuiTextBuffer_destroy(_self: *mut ImGuiTextBuffer);
    pub fn ImGuiTextBuffer_empty(_self: *mut ImGuiTextBuffer) -> bool;
    pub fn ImGuiTextBuffer_end(_self: *mut ImGuiTextBuffer) -> *const c_char;
    pub fn ImGuiTextBuffer_reserve(_self: *mut ImGuiTextBuffer, capacity: c_int);
    pub fn ImGuiTextBuffer_size(_self: *mut ImGuiTextBuffer) -> c_int;
    pub fn ImGuiTextFilter_Build(_self: *mut ImGuiTextFilter);
    pub fn ImGuiTextFilter_Clear(_self: *mut ImGuiTextFilter);
    pub fn ImGuiTextFilter_Draw(_self: *mut ImGuiTextFilter, label: *const c_char, width: c_float) -> bool;
    pub fn ImGuiTextFilter_ImGuiTextFilter(default_filter: *const c_char);
    pub fn ImGuiTextFilter_IsActive(_self: *mut ImGuiTextFilter) -> bool;
    pub fn ImGuiTextFilter_PassFilter(
        _self: *mut ImGuiTextFilter,
        text: *const c_char,
        text_end: *const c_char,
    ) -> bool;
    pub fn ImGuiTextFilter_destroy(_self: *mut ImGuiTextFilter);
    pub fn ImVec2_ImVec2();
    pub fn ImVec2_ImVec2Float(_x: c_float, _y: c_float);
    pub fn ImVec2_destroy(_self: *mut ImVec2);
    pub fn ImVec4_ImVec4();
    pub fn ImVec4_ImVec4Float(_x: c_float, _y: c_float, _z: c_float, _w: c_float);
    pub fn ImVec4_destroy(_self: *mut ImVec4);
    pub fn Pair_PairInt(_key: ImGuiID, _val_i: c_int);
    pub fn Pair_PairFloat(_key: ImGuiID, _val_f: c_float);
    pub fn Pair_PairPtr(_key: ImGuiID, _val_p: *mut c_void);
    pub fn Pair_destroy(_self: *mut Pair);
    pub fn TextRange_TextRange();
    pub fn TextRange_TextRangeStr(_b: *const c_char, _e: *const c_char);
    pub fn TextRange_begin(_self: *mut TextRange) -> *const c_char;
    pub fn TextRange_destroy(_self: *mut TextRange);
    pub fn TextRange_empty(_self: *mut TextRange) -> bool;
    pub fn TextRange_end(_self: *mut TextRange) -> *const c_char;
    pub fn TextRange_split(_self: *mut TextRange, separator: c_char, out: *mut ImVector<TextRange>);
    pub fn igAcceptDragDropPayload(_type: *const c_char, flags: ImGuiDragDropFlags) -> *const ImGuiPayload;
    pub fn igAlignTextToFramePadding();
    pub fn igArrowButton(str_id: *const c_char, dir: ImGuiDir) -> bool;
    pub fn igBegin(name: *const c_char, p_open: *mut bool, flags: ImGuiWindowFlags) -> bool;
    pub fn igBeginChild(str_id: *const c_char, size: ImVec2, border: bool, flags: ImGuiWindowFlags) -> bool;
    pub fn igBeginChildID(id: ImGuiID, size: ImVec2, border: bool, flags: ImGuiWindowFlags) -> bool;
    pub fn igBeginChildFrame(id: ImGuiID, size: ImVec2, flags: ImGuiWindowFlags) -> bool;
    pub fn igBeginCombo(label: *const c_char, preview_value: *const c_char, flags: ImGuiComboFlags) -> bool;
    pub fn igBeginDragDropSource(flags: ImGuiDragDropFlags) -> bool;
    pub fn igBeginDragDropTarget() -> bool;
    pub fn igBeginGroup();
    pub fn igBeginMainMenuBar() -> bool;
    pub fn igBeginMenu(label: *const c_char, enabled: bool) -> bool;
    pub fn igBeginMenuBar() -> bool;
    pub fn igBeginPopup(str_id: *const c_char, flags: ImGuiWindowFlags) -> bool;
    pub fn igBeginPopupContextItem(str_id: *const c_char, mouse_button: c_int) -> bool;
    pub fn igBeginPopupContextVoid(str_id: *const c_char, mouse_button: c_int) -> bool;
    pub fn igBeginPopupContextWindow(str_id: *const c_char, mouse_button: c_int, also_over_items: bool) -> bool;
    pub fn igBeginPopupModal(name: *const c_char, p_open: *mut bool, flags: ImGuiWindowFlags) -> bool;
    pub fn igBeginTooltip();
    pub fn igBullet();
    pub fn igBulletText(fmt: *const c_char, ...);
    pub fn igButton(label: *const c_char, size: ImVec2) -> bool;
    pub fn igCalcItemWidth() -> c_float;
    pub fn igCalcListClipping(
        items_count: c_int,
        items_height: c_float,
        out_items_display_start: *mut c_int,
        out_items_display_end: *mut c_int,
    );
    pub fn igCalcTextSize(
        text: *const c_char,
        text_end: *const c_char,
        hide_text_after_double_hash: bool,
        wrap_width: c_float,
    ) -> ImVec2;
    pub fn igCaptureKeyboardFromApp(capture: bool);
    pub fn igCaptureMouseFromApp(capture: bool);
    pub fn igCheckbox(label: *const c_char, v: *mut bool) -> bool;
    pub fn igCheckboxFlags(label: *const c_char, flags: *mut c_uint, flags_value: c_uint) -> bool;
    pub fn igCloseCurrentPopup();
    pub fn igCollapsingHeader(label: *const c_char, flags: ImGuiTreeNodeFlags) -> bool;
    pub fn igCollapsingHeaderBoolPtr(label: *const c_char, p_open: *mut bool, flags: ImGuiTreeNodeFlags) -> bool;
    pub fn igColorButton(desc_id: *const c_char, col: ImVec4, flags: ImGuiColorEditFlags, size: ImVec2) -> bool;
    pub fn igColorConvertFloat4ToU32(_in: ImVec4) -> ImU32;
    pub fn igColorConvertHSVtoRGB(
        h: c_float,
        s: c_float,
        v: c_float,
        out_r: *mut c_float,
        out_g: *mut c_float,
        out_b: *mut c_float,
    );
    pub fn igColorConvertRGBtoHSV(
        r: c_float,
        g: c_float,
        b: c_float,
        out_h: *mut c_float,
        out_s: *mut c_float,
        out_v: *mut c_float,
    );
    pub fn igColorConvertU32ToFloat4(_in: ImU32) -> ImVec4;
    pub fn igColorEdit3(label: *const c_char, col: *mut [c_float; 3], flags: ImGuiColorEditFlags) -> bool;
    pub fn igColorEdit4(label: *const c_char, col: *mut [c_float; 4], flags: ImGuiColorEditFlags) -> bool;
    pub fn igColorPicker3(label: *const c_char, col: *mut [c_float; 3], flags: ImGuiColorEditFlags) -> bool;
    pub fn igColorPicker4(
        label: *const c_char,
        col: *mut [c_float; 4],
        flags: ImGuiColorEditFlags,
        ref_col: *const c_float,
    ) -> bool;
    pub fn igColumns(count: c_int, id: *const c_char, border: bool);
    pub fn igCombo(
        label: *const c_char,
        current_item: *mut c_int,
        items: *const *const c_char,
        items_count: c_int,
        popup_max_height_in_items: c_int,
    ) -> bool;
    pub fn igComboStr(
        label: *const c_char,
        current_item: *mut c_int,
        items_separated_by_zeros: *const c_char,
        popup_max_height_in_items: c_int,
    ) -> bool;
    pub fn igComboFnPtr(
        label: *const c_char,
        current_item: *mut c_int,
        items_getter: extern "C" fn(data: *mut c_void, idx: c_int, out_text: *mut *const c_char) -> bool,
        data: *mut c_void,
        items_count: c_int,
        popup_max_height_in_items: c_int,
    ) -> bool;
    pub fn igCreateContext(shared_font_atlas: *mut ImFontAtlas) -> *mut ImGuiContext;
    pub fn igDebugCheckVersionAndDataLayout(
        version_str: *const c_char,
        sz_io: size_t,
        sz_style: size_t,
        sz_vec2: size_t,
        sz_vec4: size_t,
        sz_drawvert: size_t,
    ) -> bool;
    pub fn igDestroyContext(ctx: *mut ImGuiContext);
    pub fn igDragFloat(
        label: *const c_char,
        v: *mut c_float,
        v_speed: c_float,
        v_min: c_float,
        v_max: c_float,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igDragFloat2(
        label: *const c_char,
        v: *mut [c_float; 2],
        v_speed: c_float,
        v_min: c_float,
        v_max: c_float,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igDragFloat3(
        label: *const c_char,
        v: *mut [c_float; 3],
        v_speed: c_float,
        v_min: c_float,
        v_max: c_float,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igDragFloat4(
        label: *const c_char,
        v: *mut [c_float; 4],
        v_speed: c_float,
        v_min: c_float,
        v_max: c_float,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igDragFloatRange2(
        label: *const c_char,
        v_current_min: *mut c_float,
        v_current_max: *mut c_float,
        v_speed: c_float,
        v_min: c_float,
        v_max: c_float,
        format: *const c_char,
        format_max: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igDragInt(
        label: *const c_char,
        v: *mut c_int,
        v_speed: c_float,
        v_min: c_int,
        v_max: c_int,
        format: *const c_char,
    ) -> bool;
    pub fn igDragInt2(
        label: *const c_char,
        v: *mut [c_int; 2],
        v_speed: c_float,
        v_min: c_int,
        v_max: c_int,
        format: *const c_char,
    ) -> bool;
    pub fn igDragInt3(
        label: *const c_char,
        v: *mut [c_int; 3],
        v_speed: c_float,
        v_min: c_int,
        v_max: c_int,
        format: *const c_char,
    ) -> bool;
    pub fn igDragInt4(
        label: *const c_char,
        v: *mut [c_int; 4],
        v_speed: c_float,
        v_min: c_int,
        v_max: c_int,
        format: *const c_char,
    ) -> bool;
    pub fn igDragIntRange2(
        label: *const c_char,
        v_current_min: *mut c_int,
        v_current_max: *mut c_int,
        v_speed: c_float,
        v_min: c_int,
        v_max: c_int,
        format: *const c_char,
        format_max: *const c_char,
    ) -> bool;
    pub fn igDragScalar(
        label: *const c_char,
        data_type: ImGuiDataType,
        v: *mut c_void,
        v_speed: c_float,
        v_min: *const c_void,
        v_max: *const c_void,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igDragScalarN(
        label: *const c_char,
        data_type: ImGuiDataType,
        v: *mut c_void,
        components: c_int,
        v_speed: c_float,
        v_min: *const c_void,
        v_max: *const c_void,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igDummy(size: ImVec2);
    pub fn igEnd();
    pub fn igEndChild();
    pub fn igEndChildFrame();
    pub fn igEndCombo();
    pub fn igEndDragDropSource();
    pub fn igEndDragDropTarget();
    pub fn igEndFrame();
    pub fn igEndGroup();
    pub fn igEndMainMenuBar();
    pub fn igEndMenu();
    pub fn igEndMenuBar();
    pub fn igEndPopup();
    pub fn igEndTooltip();
    pub fn igGetClipboardText() -> *const c_char;
    pub fn igGetColorU32(idx: ImGuiCol, alpha_mul: c_float) -> ImU32;
    pub fn igGetColorU32Vec4(col: ImVec4) -> ImU32;
    pub fn igGetColorU32U32(col: ImU32) -> ImU32;
    pub fn igGetColumnIndex() -> c_int;
    pub fn igGetColumnOffset(column_index: c_int) -> c_float;
    pub fn igGetColumnWidth(column_index: c_int) -> c_float;
    pub fn igGetColumnsCount() -> c_int;
    pub fn igGetContentRegionAvail() -> ImVec2;
    pub fn igGetContentRegionAvailWidth() -> c_float;
    pub fn igGetContentRegionMax() -> ImVec2;
    pub fn igGetCurrentContext() -> *mut ImGuiContext;
    pub fn igGetCursorPos() -> ImVec2;
    pub fn igGetCursorPosX() -> c_float;
    pub fn igGetCursorPosY() -> c_float;
    pub fn igGetCursorScreenPos() -> ImVec2;
    pub fn igGetCursorStartPos() -> ImVec2;
    pub fn igGetDragDropPayload() -> *const ImGuiPayload;
    pub fn igGetDrawData() -> *mut ImDrawData;
    pub fn igGetDrawListSharedData() -> *mut ImDrawListSharedData;
    pub fn igGetFont() -> *mut ImFont;
    pub fn igGetFontSize() -> c_float;
    pub fn igGetFontTexUvWhitePixel() -> ImVec2;
    pub fn igGetFrameCount() -> c_int;
    pub fn igGetFrameHeight() -> c_float;
    pub fn igGetFrameHeightWithSpacing() -> c_float;
    pub fn igGetIDStr(str_id: *const c_char) -> ImGuiID;
    pub fn igGetIDRange(str_id_begin: *const c_char, str_id_end: *const c_char) -> ImGuiID;
    pub fn igGetIDPtr(ptr_id: *const c_void) -> ImGuiID;
    pub fn igGetIO() -> *mut ImGuiIO;
    pub fn igGetItemRectMax() -> ImVec2;
    pub fn igGetItemRectMin() -> ImVec2;
    pub fn igGetItemRectSize() -> ImVec2;
    pub fn igGetKeyIndex(imgui_key: ImGuiKey) -> c_int;
    pub fn igGetKeyPressedAmount(key_index: c_int, repeat_delay: c_float, rate: c_float) -> c_int;
    pub fn igGetMouseCursor() -> ImGuiMouseCursor;
    pub fn igGetMouseDragDelta(button: c_int, lock_threshold: c_float) -> ImVec2;
    pub fn igGetMousePos() -> ImVec2;
    pub fn igGetMousePosOnOpeningCurrentPopup() -> ImVec2;
    pub fn igGetOverlayDrawList() -> *mut ImDrawList;
    pub fn igGetScrollMaxX() -> c_float;
    pub fn igGetScrollMaxY() -> c_float;
    pub fn igGetScrollX() -> c_float;
    pub fn igGetScrollY() -> c_float;
    pub fn igGetStateStorage() -> *mut ImGuiStorage;
    pub fn igGetStyle() -> *mut ImGuiStyle;
    pub fn igGetStyleColorName(idx: ImGuiCol) -> *const c_char;
    pub fn igGetStyleColorVec4(idx: ImGuiCol) -> *const ImVec4;
    pub fn igGetTextLineHeight() -> c_float;
    pub fn igGetTextLineHeightWithSpacing() -> c_float;
    pub fn igGetTime() -> c_double;
    pub fn igGetTreeNodeToLabelSpacing() -> c_float;
    pub fn igGetVersion() -> *const c_char;
    pub fn igGetWindowContentRegionMax() -> ImVec2;
    pub fn igGetWindowContentRegionMin() -> ImVec2;
    pub fn igGetWindowContentRegionWidth() -> c_float;
    pub fn igGetWindowDrawList() -> *mut ImDrawList;
    pub fn igGetWindowHeight() -> c_float;
    pub fn igGetWindowPos() -> ImVec2;
    pub fn igGetWindowSize() -> ImVec2;
    pub fn igGetWindowWidth() -> c_float;
    pub fn igImage(
        user_texture_id: ImTextureID,
        size: ImVec2,
        uv0: ImVec2,
        uv1: ImVec2,
        tint_col: ImVec4,
        border_col: ImVec4,
    );
    pub fn igImageButton(
        user_texture_id: ImTextureID,
        size: ImVec2,
        uv0: ImVec2,
        uv1: ImVec2,
        frame_padding: c_int,
        bg_col: ImVec4,
        tint_col: ImVec4,
    ) -> bool;
    pub fn igIndent(indent_w: c_float);
    pub fn igInputDouble(
        label: *const c_char,
        v: *mut c_double,
        step: c_double,
        step_fast: c_double,
        format: *const c_char,
        extra_flags: ImGuiInputTextFlags,
    ) -> bool;
    pub fn igInputFloat(
        label: *const c_char,
        v: *mut c_float,
        step: c_float,
        step_fast: c_float,
        format: *const c_char,
        extra_flags: ImGuiInputTextFlags,
    ) -> bool;
    pub fn igInputFloat2(
        label: *const c_char,
        v: *mut [c_float; 2],
        format: *const c_char,
        extra_flags: ImGuiInputTextFlags,
    ) -> bool;
    pub fn igInputFloat3(
        label: *const c_char,
        v: *mut [c_float; 3],
        format: *const c_char,
        extra_flags: ImGuiInputTextFlags,
    ) -> bool;
    pub fn igInputFloat4(
        label: *const c_char,
        v: *mut [c_float; 4],
        format: *const c_char,
        extra_flags: ImGuiInputTextFlags,
    ) -> bool;
    pub fn igInputInt(
        label: *const c_char,
        v: *mut c_int,
        step: c_int,
        step_fast: c_int,
        extra_flags: ImGuiInputTextFlags,
    ) -> bool;
    pub fn igInputInt2(label: *const c_char, v: *mut [c_int; 2], extra_flags: ImGuiInputTextFlags) -> bool;
    pub fn igInputInt3(label: *const c_char, v: *mut [c_int; 3], extra_flags: ImGuiInputTextFlags) -> bool;
    pub fn igInputInt4(label: *const c_char, v: *mut [c_int; 4], extra_flags: ImGuiInputTextFlags) -> bool;
    pub fn igInputScalar(
        label: *const c_char,
        data_type: ImGuiDataType,
        v: *mut c_void,
        step: *const c_void,
        step_fast: *const c_void,
        format: *const c_char,
        extra_flags: ImGuiInputTextFlags,
    ) -> bool;
    pub fn igInputScalarN(
        label: *const c_char,
        data_type: ImGuiDataType,
        v: *mut c_void,
        components: c_int,
        step: *const c_void,
        step_fast: *const c_void,
        format: *const c_char,
        extra_flags: ImGuiInputTextFlags,
    ) -> bool;
    pub fn igInputText(
        label: *const c_char,
        buf: *mut c_char,
        buf_size: size_t,
        flags: ImGuiInputTextFlags,
        callback: ImGuiInputTextCallback,
        user_data: *mut c_void,
    ) -> bool;
    pub fn igInputTextMultiline(
        label: *const c_char,
        buf: *mut c_char,
        buf_size: size_t,
        size: ImVec2,
        flags: ImGuiInputTextFlags,
        callback: ImGuiInputTextCallback,
        user_data: *mut c_void,
    ) -> bool;
    pub fn igInvisibleButton(str_id: *const c_char, size: ImVec2) -> bool;
    pub fn igIsAnyItemActive() -> bool;
    pub fn igIsAnyItemFocused() -> bool;
    pub fn igIsAnyItemHovered() -> bool;
    pub fn igIsAnyMouseDown() -> bool;
    pub fn igIsItemActive() -> bool;
    pub fn igIsItemClicked(mouse_button: c_int) -> bool;
    pub fn igIsItemDeactivated() -> bool;
    pub fn igIsItemDeactivatedAfterEdit() -> bool;
    pub fn igIsItemEdited() -> bool;
    pub fn igIsItemFocused() -> bool;
    pub fn igIsItemHovered(flags: ImGuiHoveredFlags) -> bool;
    pub fn igIsItemVisible() -> bool;
    pub fn igIsKeyDown(user_key_index: c_int) -> bool;
    pub fn igIsKeyPressed(user_key_index: c_int, repeat: bool) -> bool;
    pub fn igIsKeyReleased(user_key_index: c_int) -> bool;
    pub fn igIsMouseClicked(button: c_int, repeat: bool) -> bool;
    pub fn igIsMouseDoubleClicked(button: c_int) -> bool;
    pub fn igIsMouseDown(button: c_int) -> bool;
    pub fn igIsMouseDragging(button: c_int, lock_threshold: c_float) -> bool;
    pub fn igIsMouseHoveringRect(r_min: ImVec2, r_max: ImVec2, clip: bool) -> bool;
    pub fn igIsMousePosValid(mouse_pos: *const ImVec2) -> bool;
    pub fn igIsMouseReleased(button: c_int) -> bool;
    pub fn igIsPopupOpen(str_id: *const c_char) -> bool;
    pub fn igIsRectVisible(size: ImVec2) -> bool;
    pub fn igIsRectVisibleVec2(rect_min: ImVec2, rect_max: ImVec2) -> bool;
    pub fn igIsWindowAppearing() -> bool;
    pub fn igIsWindowCollapsed() -> bool;
    pub fn igIsWindowFocused(flags: ImGuiFocusedFlags) -> bool;
    pub fn igIsWindowHovered(flags: ImGuiHoveredFlags) -> bool;
    pub fn igLabelText(label: *const c_char, fmt: *const c_char, ...);
    pub fn igListBoxStr_arr(
        label: *const c_char,
        current_item: *mut c_int,
        items: *const *const c_char,
        items_count: c_int,
        height_in_items: c_int,
    ) -> bool;
    pub fn igListBoxFnPtr(
        label: *const c_char,
        current_item: *mut c_int,
        items_getter: extern "C" fn(data: *mut c_void, idx: c_int, out_text: *mut *const c_char) -> bool,
        data: *mut c_void,
        items_count: c_int,
        height_in_items: c_int,
    ) -> bool;
    pub fn igListBoxFooter();
    pub fn igListBoxHeaderVec2(label: *const c_char, size: ImVec2) -> bool;
    pub fn igListBoxHeaderInt(label: *const c_char, items_count: c_int, height_in_items: c_int) -> bool;
    pub fn igLoadIniSettingsFromDisk(ini_filename: *const c_char);
    pub fn igLoadIniSettingsFromMemory(ini_data: *const c_char, ini_size: size_t);
    pub fn igLogButtons();
    pub fn igLogFinish();
    pub fn igLogText(fmt: *const c_char, ...);
    pub fn igLogToClipboard(max_depth: c_int);
    pub fn igLogToFile(max_depth: c_int, filename: *const c_char);
    pub fn igLogToTTY(max_depth: c_int);
    pub fn igMemAlloc(size: size_t) -> *mut c_void;
    pub fn igMemFree(ptr: *mut c_void);
    pub fn igMenuItemBool(label: *const c_char, shortcut: *const c_char, selected: bool, enabled: bool) -> bool;
    pub fn igMenuItemBoolPtr(
        label: *const c_char,
        shortcut: *const c_char,
        p_selected: *mut bool,
        enabled: bool,
    ) -> bool;
    pub fn igNewFrame();
    pub fn igNewLine();
    pub fn igNextColumn();
    pub fn igOpenPopup(str_id: *const c_char);
    pub fn igOpenPopupOnItemClick(str_id: *const c_char, mouse_button: c_int) -> bool;
    pub fn igPlotHistogramFloatPtr(
        label: *const c_char,
        values: *const c_float,
        values_count: c_int,
        values_offset: c_int,
        overlay_text: *const c_char,
        scale_min: c_float,
        scale_max: c_float,
        graph_size: ImVec2,
        stride: c_int,
    );
    pub fn igPlotHistogramFnPtr(
        label: *const c_char,
        values_getter: extern "C" fn(data: *mut c_void, idx: c_int) -> c_float,
        data: *mut c_void,
        values_count: c_int,
        values_offset: c_int,
        overlay_text: *const c_char,
        scale_min: c_float,
        scale_max: c_float,
        graph_size: ImVec2,
    );
    pub fn igPlotLines(
        label: *const c_char,
        values: *const c_float,
        values_count: c_int,
        values_offset: c_int,
        overlay_text: *const c_char,
        scale_min: c_float,
        scale_max: c_float,
        graph_size: ImVec2,
        stride: c_int,
    );
    pub fn igPlotLinesFnPtr(
        label: *const c_char,
        values_getter: extern "C" fn(data: *mut c_void, idx: c_int) -> c_float,
        data: *mut c_void,
        values_count: c_int,
        values_offset: c_int,
        overlay_text: *const c_char,
        scale_min: c_float,
        scale_max: c_float,
        graph_size: ImVec2,
    );
    pub fn igPopAllowKeyboardFocus();
    pub fn igPopButtonRepeat();
    pub fn igPopClipRect();
    pub fn igPopFont();
    pub fn igPopID();
    pub fn igPopItemWidth();
    pub fn igPopStyleColor(count: c_int);
    pub fn igPopStyleVar(count: c_int);
    pub fn igPopTextWrapPos();
    pub fn igProgressBar(fraction: c_float, size_arg: ImVec2, overlay: *const c_char);
    pub fn igPushAllowKeyboardFocus(allow_keyboard_focus: bool);
    pub fn igPushButtonRepeat(repeat: bool);
    pub fn igPushClipRect(clip_rect_min: ImVec2, clip_rect_max: ImVec2, intersect_with_current_clip_rect: bool);
    pub fn igPushFont(font: *mut ImFont);
    pub fn igPushIDStr(str_id: *const c_char);
    pub fn igPushIDRange(str_id_begin: *const c_char, str_id_end: *const c_char);
    pub fn igPushIDPtr(ptr_id: *const c_void);
    pub fn igPushIDInt(int_id: c_int);
    pub fn igPushItemWidth(item_width: c_float);
    pub fn igPushStyleColorU32(idx: ImGuiCol, col: ImU32);
    pub fn igPushStyleColor(idx: ImGuiCol, col: ImVec4);
    pub fn igPushStyleVarFloat(idx: ImGuiStyleVar, val: c_float);
    pub fn igPushStyleVarVec2(idx: ImGuiStyleVar, val: ImVec2);
    pub fn igPushTextWrapPos(wrap_pos_x: c_float);
    pub fn igRadioButtonBool(label: *const c_char, active: bool) -> bool;
    pub fn igRadioButtonIntPtr(label: *const c_char, v: *mut c_int, v_button: c_int) -> bool;
    pub fn igRender();
    pub fn igResetMouseDragDelta(button: c_int);
    pub fn igSameLine(pos_x: c_float, spacing_w: c_float);
    pub fn igSaveIniSettingsToDisk(ini_filename: *const c_char);
    pub fn igSaveIniSettingsToMemory(out_ini_size: *mut size_t) -> *const c_char;
    pub fn igSelectable(label: *const c_char, selected: bool, flags: ImGuiSelectableFlags, size: ImVec2) -> bool;
    pub fn igSelectableBoolPtr(
        label: *const c_char,
        p_selected: *mut bool,
        flags: ImGuiSelectableFlags,
        size: ImVec2,
    ) -> bool;
    pub fn igSeparator();
    pub fn igSetAllocatorFunctions(
        alloc_func: Option<extern "C" fn(sz: usize, user_data: *mut c_void) -> *mut c_void>,
        free_func: Option<extern "C" fn(ptr: *mut c_void, user_data: *mut c_void)>,
        user_data: *mut c_void,
    );
    pub fn igSetClipboardText(text: *const c_char);
    pub fn igSetColorEditOptions(flags: ImGuiColorEditFlags);
    pub fn igSetColumnOffset(column_index: c_int, offset_x: c_float);
    pub fn igSetColumnWidth(column_index: c_int, width: c_float);
    pub fn igSetCurrentContext(ctx: *mut ImGuiContext);
    pub fn igSetCursorPos(local_pos: ImVec2);
    pub fn igSetCursorPosX(x: c_float);
    pub fn igSetCursorPosY(y: c_float);
    pub fn igSetCursorScreenPos(screen_pos: ImVec2);
    pub fn igSetDragDropPayload(_type: *const c_char, data: *const c_void, size: size_t, cond: ImGuiCond) -> bool;
    pub fn igSetItemAllowOverlap();
    pub fn igSetItemDefaultFocus();
    pub fn igSetKeyboardFocusHere(offset: c_int);
    pub fn igSetMouseCursor(_type: ImGuiMouseCursor);
    pub fn igSetNextTreeNodeOpen(is_open: bool, cond: ImGuiCond);
    pub fn igSetNextWindowBgAlpha(alpha: c_float);
    pub fn igSetNextWindowCollapsed(collapsed: bool, cond: ImGuiCond);
    pub fn igSetNextWindowContentSize(size: ImVec2);
    pub fn igSetNextWindowFocus();
    pub fn igSetNextWindowPos(pos: ImVec2, cond: ImGuiCond, pivot: ImVec2);
    pub fn igSetNextWindowSize(size: ImVec2, cond: ImGuiCond);
    pub fn igSetNextWindowSizeConstraints(
        size_min: ImVec2,
        size_max: ImVec2,
        custom_callback: ImGuiSizeCallback,
        custom_callback_data: *mut c_void,
    );
    pub fn igSetScrollFromPosY(pos_y: c_float, center_y_ratio: c_float);
    pub fn igSetScrollHereY(center_y_ratio: c_float);
    pub fn igSetScrollX(scroll_x: c_float);
    pub fn igSetScrollY(scroll_y: c_float);
    pub fn igSetStateStorage(storage: *mut ImGuiStorage);
    pub fn igSetTooltip(fmt: *const c_char, ...);
    pub fn igSetWindowCollapsedBool(collapsed: bool, cond: ImGuiCond);
    pub fn igSetWindowCollapsedStr(name: *const c_char, collapsed: bool, cond: ImGuiCond);
    pub fn igSetWindowFocus();
    pub fn igSetWindowFocusStr(name: *const c_char);
    pub fn igSetWindowFontScale(scale: c_float);
    pub fn igSetWindowPosVec2(pos: ImVec2, cond: ImGuiCond);
    pub fn igSetWindowPosStr(name: *const c_char, pos: ImVec2, cond: ImGuiCond);
    pub fn igSetWindowSizeVec2(size: ImVec2, cond: ImGuiCond);
    pub fn igSetWindowSizeStr(name: *const c_char, size: ImVec2, cond: ImGuiCond);
    pub fn igShowAboutWindow(p_open: *mut bool);
    pub fn igShowDemoWindow(p_open: *mut bool);
    pub fn igShowFontSelector(label: *const c_char);
    pub fn igShowMetricsWindow(p_open: *mut bool);
    pub fn igShowStyleEditor(_ref: *mut ImGuiStyle);
    pub fn igShowStyleSelector(label: *const c_char) -> bool;
    pub fn igShowUserGuide();
    pub fn igSliderAngle(
        label: *const c_char,
        v_rad: *mut c_float,
        v_degrees_min: c_float,
        v_degrees_max: c_float,
        format: *const c_char,
    ) -> bool;
    pub fn igSliderFloat(
        label: *const c_char,
        v: *mut c_float,
        v_min: c_float,
        v_max: c_float,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igSliderFloat2(
        label: *const c_char,
        v: *mut [c_float; 2],
        v_min: c_float,
        v_max: c_float,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igSliderFloat3(
        label: *const c_char,
        v: *mut [c_float; 3],
        v_min: c_float,
        v_max: c_float,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igSliderFloat4(
        label: *const c_char,
        v: *mut [c_float; 4],
        v_min: c_float,
        v_max: c_float,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igSliderInt(label: *const c_char, v: *mut c_int, v_min: c_int, v_max: c_int, format: *const c_char) -> bool;
    pub fn igSliderInt2(
        label: *const c_char,
        v: *mut [c_int; 2],
        v_min: c_int,
        v_max: c_int,
        format: *const c_char,
    ) -> bool;
    pub fn igSliderInt3(
        label: *const c_char,
        v: *mut [c_int; 3],
        v_min: c_int,
        v_max: c_int,
        format: *const c_char,
    ) -> bool;
    pub fn igSliderInt4(
        label: *const c_char,
        v: *mut [c_int; 4],
        v_min: c_int,
        v_max: c_int,
        format: *const c_char,
    ) -> bool;
    pub fn igSliderScalar(
        label: *const c_char,
        data_type: ImGuiDataType,
        v: *mut c_void,
        v_min: *const c_void,
        v_max: *const c_void,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igSliderScalarN(
        label: *const c_char,
        data_type: ImGuiDataType,
        v: *mut c_void,
        components: c_int,
        v_min: *const c_void,
        v_max: *const c_void,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igSmallButton(label: *const c_char) -> bool;
    pub fn igSpacing();
    pub fn igStyleColorsClassic(dst: *mut ImGuiStyle);
    pub fn igStyleColorsDark(dst: *mut ImGuiStyle);
    pub fn igStyleColorsLight(dst: *mut ImGuiStyle);
    pub fn igText(fmt: *const c_char, ...);
    pub fn igTextColored(col: ImVec4, fmt: *const c_char, ...);
    pub fn igTextDisabled(fmt: *const c_char, ...);
    pub fn igTextUnformatted(text: *const c_char, text_end: *const c_char);
    pub fn igTextWrapped(fmt: *const c_char, ...);
    pub fn igTreeAdvanceToLabelPos();
    pub fn igTreeNodeStr(label: *const c_char) -> bool;
    pub fn igTreeNodeStrStr(str_id: *const c_char, fmt: *const c_char, ...) -> bool;
    pub fn igTreeNodePtr(ptr_id: *const c_void, fmt: *const c_char, ...) -> bool;
    pub fn igTreeNodeExStr(label: *const c_char, flags: ImGuiTreeNodeFlags) -> bool;
    pub fn igTreeNodeExStrStr(str_id: *const c_char, flags: ImGuiTreeNodeFlags, fmt: *const c_char, ...) -> bool;
    pub fn igTreeNodeExPtr(ptr_id: *const c_void, flags: ImGuiTreeNodeFlags, fmt: *const c_char, ...) -> bool;
    pub fn igTreePop();
    pub fn igTreePushStr(str_id: *const c_char);
    pub fn igTreePushPtr(ptr_id: *const c_void);
    pub fn igUnindent(indent_w: c_float);
    pub fn igVSliderFloat(
        label: *const c_char,
        size: ImVec2,
        v: *mut c_float,
        v_min: c_float,
        v_max: c_float,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igVSliderInt(
        label: *const c_char,
        size: ImVec2,
        v: *mut c_int,
        v_min: c_int,
        v_max: c_int,
        format: *const c_char,
    ) -> bool;
    pub fn igVSliderScalar(
        label: *const c_char,
        size: ImVec2,
        data_type: ImGuiDataType,
        v: *mut c_void,
        v_min: *const c_void,
        v_max: *const c_void,
        format: *const c_char,
        power: c_float,
    ) -> bool;
    pub fn igValueBool(prefix: *const c_char, b: bool);
    pub fn igValueInt(prefix: *const c_char, v: c_int);
    pub fn igValueUint(prefix: *const c_char, v: c_uint);
    pub fn igValueFloat(prefix: *const c_char, v: c_float, float_format: *const c_char);
} // extern "C"