1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
/* automatically generated by rust-bindgen 0.69.2 */

pub const JSC_OBJC_API_ENABLED: u32 = 0;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSContextGroup {
    _unused: [u8; 0],
}
#[doc = " @typedef JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects."]
pub type JSContextGroupRef = *const OpaqueJSContextGroup;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSContext {
    _unused: [u8; 0],
}
#[doc = " @typedef JSContextRef A JavaScript execution context. Holds the global object and other execution state."]
pub type JSContextRef = *const OpaqueJSContext;
#[doc = " @typedef JSGlobalContextRef A global JavaScript execution context. A JSGlobalContext is a JSContext."]
pub type JSGlobalContextRef = *mut OpaqueJSContext;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSString {
    _unused: [u8; 0],
}
#[doc = " @typedef JSStringRef A UTF16 character buffer. The fundamental string representation in JavaScript."]
pub type JSStringRef = *mut OpaqueJSString;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSClass {
    _unused: [u8; 0],
}
#[doc = " @typedef JSClassRef A JavaScript class. Used with JSObjectMake to construct objects with custom behavior."]
pub type JSClassRef = *mut OpaqueJSClass;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSPropertyNameArray {
    _unused: [u8; 0],
}
#[doc = " @typedef JSPropertyNameArrayRef An array of JavaScript property names."]
pub type JSPropertyNameArrayRef = *mut OpaqueJSPropertyNameArray;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSPropertyNameAccumulator {
    _unused: [u8; 0],
}
#[doc = " @typedef JSPropertyNameAccumulatorRef An ordered set used to collect the names of a JavaScript object's properties."]
pub type JSPropertyNameAccumulatorRef = *mut OpaqueJSPropertyNameAccumulator;
#[doc = " @typedef JSTypedArrayBytesDeallocator A function used to deallocate bytes passed to a Typed Array constructor. The function should take two arguments. The first is a pointer to the bytes that were originally passed to the Typed Array constructor. The second is a pointer to additional information desired at the time the bytes are to be freed."]
pub type JSTypedArrayBytesDeallocator = ::std::option::Option<
    unsafe extern "C" fn(
        bytes: *mut ::std::os::raw::c_void,
        deallocatorContext: *mut ::std::os::raw::c_void,
    ),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSValue {
    _unused: [u8; 0],
}
#[doc = " @typedef JSValueRef A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them."]
pub type JSValueRef = *const OpaqueJSValue;
#[doc = " @typedef JSObjectRef A JavaScript object. A JSObject is a JSValue."]
pub type JSObjectRef = *mut OpaqueJSValue;
extern "C" {
    #[doc = "@function JSEvaluateScript\n@abstract Evaluates a string of JavaScript.\n@param ctx The execution context to use.\n@param script A JSString containing the script to evaluate.\n@param thisObject The object to use as \"this,\" or NULL to use the global object as \"this.\"\n@param sourceURL A JSString containing a URL for the script's source file. This is used by debuggers and when reporting exceptions. Pass NULL if you do not care to include source file information.\n@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. The value is one-based, so the first line is line 1 and invalid values are clamped to 1.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result The JSValue that results from evaluating script, or NULL if an exception is thrown."]
    pub fn JSEvaluateScript(
        ctx: JSContextRef,
        script: JSStringRef,
        thisObject: JSObjectRef,
        sourceURL: JSStringRef,
        startingLineNumber: ::std::os::raw::c_int,
        exception: *mut JSValueRef,
    ) -> JSValueRef;
}
extern "C" {
    #[doc = "@function JSCheckScriptSyntax\n@abstract Checks for syntax errors in a string of JavaScript.\n@param ctx The execution context to use.\n@param script A JSString containing the script to check for syntax errors.\n@param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions.\n@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. The value is one-based, so the first line is line 1 and invalid values are clamped to 1.\n@param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception.\n@result true if the script is syntactically correct, otherwise false."]
    pub fn JSCheckScriptSyntax(
        ctx: JSContextRef,
        script: JSStringRef,
        sourceURL: JSStringRef,
        startingLineNumber: ::std::os::raw::c_int,
        exception: *mut JSValueRef,
    ) -> bool;
}
extern "C" {
    #[doc = "@function JSGarbageCollect\n@abstract Performs a JavaScript garbage collection.\n@param ctx The execution context to use.\n@discussion JavaScript values that are on the machine stack, in a register,\nprotected by JSValueProtect, set as the global object of an execution context,\nor reachable from any such value will not be collected.\n\nDuring JavaScript execution, you are not required to call this function; the\nJavaScript engine will garbage collect as needed. JavaScript values created\nwithin a context group are automatically destroyed when the last reference\nto the context group is released."]
    pub fn JSGarbageCollect(ctx: JSContextRef);
}
pub const JSType_kJSTypeUndefined: JSType = 0;
pub const JSType_kJSTypeNull: JSType = 1;
pub const JSType_kJSTypeBoolean: JSType = 2;
pub const JSType_kJSTypeNumber: JSType = 3;
pub const JSType_kJSTypeString: JSType = 4;
pub const JSType_kJSTypeObject: JSType = 5;
pub const JSType_kJSTypeSymbol: JSType = 6;
#[doc = "@enum JSType\n@abstract     A constant identifying the type of a JSValue.\n@constant     kJSTypeUndefined  The unique undefined value.\n@constant     kJSTypeNull       The unique null value.\n@constant     kJSTypeBoolean    A primitive boolean value, one of true or false.\n@constant     kJSTypeNumber     A primitive number value.\n@constant     kJSTypeString     A primitive string value.\n@constant     kJSTypeObject     An object value (meaning that this JSValueRef is a JSObjectRef).\n@constant     kJSTypeSymbol     A primitive symbol value."]
pub type JSType = ::std::os::raw::c_uint;
pub const JSTypedArrayType_kJSTypedArrayTypeInt8Array: JSTypedArrayType = 0;
pub const JSTypedArrayType_kJSTypedArrayTypeInt16Array: JSTypedArrayType = 1;
pub const JSTypedArrayType_kJSTypedArrayTypeInt32Array: JSTypedArrayType = 2;
pub const JSTypedArrayType_kJSTypedArrayTypeUint8Array: JSTypedArrayType = 3;
pub const JSTypedArrayType_kJSTypedArrayTypeUint8ClampedArray: JSTypedArrayType = 4;
pub const JSTypedArrayType_kJSTypedArrayTypeUint16Array: JSTypedArrayType = 5;
pub const JSTypedArrayType_kJSTypedArrayTypeUint32Array: JSTypedArrayType = 6;
pub const JSTypedArrayType_kJSTypedArrayTypeFloat32Array: JSTypedArrayType = 7;
pub const JSTypedArrayType_kJSTypedArrayTypeFloat64Array: JSTypedArrayType = 8;
pub const JSTypedArrayType_kJSTypedArrayTypeArrayBuffer: JSTypedArrayType = 9;
pub const JSTypedArrayType_kJSTypedArrayTypeNone: JSTypedArrayType = 10;
#[doc = "@enum JSTypedArrayType\n@abstract     A constant identifying the Typed Array type of a JSObjectRef.\n@constant     kJSTypedArrayTypeInt8Array            Int8Array\n@constant     kJSTypedArrayTypeInt16Array           Int16Array\n@constant     kJSTypedArrayTypeInt32Array           Int32Array\n@constant     kJSTypedArrayTypeUint8Array           Uint8Array\n@constant     kJSTypedArrayTypeUint8ClampedArray    Uint8ClampedArray\n@constant     kJSTypedArrayTypeUint16Array          Uint16Array\n@constant     kJSTypedArrayTypeUint32Array          Uint32Array\n@constant     kJSTypedArrayTypeFloat32Array         Float32Array\n@constant     kJSTypedArrayTypeFloat64Array         Float64Array\n@constant     kJSTypedArrayTypeArrayBuffer          ArrayBuffer\n@constant     kJSTypedArrayTypeNone                 Not a Typed Array\n"]
pub type JSTypedArrayType = ::std::os::raw::c_uint;
extern "C" {
    #[doc = "@function\n@abstract       Returns a JavaScript value's type.\n@param ctx  The execution context to use.\n@param value    The JSValue whose type you want to obtain.\n@result         A value of type JSType that identifies value's type."]
    pub fn JSValueGetType(ctx: JSContextRef, value: JSValueRef) -> JSType;
}
extern "C" {
    #[doc = "@function\n@abstract       Tests whether a JavaScript value's type is the undefined type.\n@param ctx  The execution context to use.\n@param value    The JSValue to test.\n@result         true if value's type is the undefined type, otherwise false."]
    pub fn JSValueIsUndefined(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract       Tests whether a JavaScript value's type is the null type.\n@param ctx  The execution context to use.\n@param value    The JSValue to test.\n@result         true if value's type is the null type, otherwise false."]
    pub fn JSValueIsNull(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract       Tests whether a JavaScript value's type is the boolean type.\n@param ctx  The execution context to use.\n@param value    The JSValue to test.\n@result         true if value's type is the boolean type, otherwise false."]
    pub fn JSValueIsBoolean(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract       Tests whether a JavaScript value's type is the number type.\n@param ctx  The execution context to use.\n@param value    The JSValue to test.\n@result         true if value's type is the number type, otherwise false."]
    pub fn JSValueIsNumber(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract       Tests whether a JavaScript value's type is the string type.\n@param ctx  The execution context to use.\n@param value    The JSValue to test.\n@result         true if value's type is the string type, otherwise false."]
    pub fn JSValueIsString(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract       Tests whether a JavaScript value's type is the symbol type.\n@param ctx      The execution context to use.\n@param value    The JSValue to test.\n@result         true if value's type is the symbol type, otherwise false."]
    pub fn JSValueIsSymbol(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract       Tests whether a JavaScript value's type is the object type.\n@param ctx  The execution context to use.\n@param value    The JSValue to test.\n@result         true if value's type is the object type, otherwise false."]
    pub fn JSValueIsObject(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract Tests whether a JavaScript value is an object with a given class in its class chain.\n@param ctx The execution context to use.\n@param value The JSValue to test.\n@param jsClass The JSClass to test against.\n@result true if value is an object and has jsClass in its class chain, otherwise false."]
    pub fn JSValueIsObjectOfClass(
        ctx: JSContextRef,
        value: JSValueRef,
        jsClass: JSClassRef,
    ) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract       Tests whether a JavaScript value is an array.\n@param ctx      The execution context to use.\n@param value    The JSValue to test.\n@result         true if value is an array, otherwise false."]
    pub fn JSValueIsArray(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract       Tests whether a JavaScript value is a date.\n@param ctx      The execution context to use.\n@param value    The JSValue to test.\n@result         true if value is a date, otherwise false."]
    pub fn JSValueIsDate(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract           Returns a JavaScript value's Typed Array type.\n@param ctx          The execution context to use.\n@param value        The JSValue whose Typed Array type to return.\n@param exception    A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result             A value of type JSTypedArrayType that identifies value's Typed Array type, or kJSTypedArrayTypeNone if the value is not a Typed Array object."]
    pub fn JSValueGetTypedArrayType(
        ctx: JSContextRef,
        value: JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSTypedArrayType;
}
extern "C" {
    #[doc = "@function\n@abstract Tests whether two JavaScript values are equal, as compared by the JS == operator.\n@param ctx The execution context to use.\n@param a The first value to test.\n@param b The second value to test.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result true if the two values are equal, false if they are not equal or an exception is thrown."]
    pub fn JSValueIsEqual(
        ctx: JSContextRef,
        a: JSValueRef,
        b: JSValueRef,
        exception: *mut JSValueRef,
    ) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract       Tests whether two JavaScript values are strict equal, as compared by the JS === operator.\n@param ctx  The execution context to use.\n@param a        The first value to test.\n@param b        The second value to test.\n@result         true if the two values are strict equal, otherwise false."]
    pub fn JSValueIsStrictEqual(ctx: JSContextRef, a: JSValueRef, b: JSValueRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the JS instanceof operator.\n@param ctx The execution context to use.\n@param value The JSValue to test.\n@param constructor The constructor to test against.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result true if value is an object constructed by constructor, as compared by the JS instanceof operator, otherwise false."]
    pub fn JSValueIsInstanceOfConstructor(
        ctx: JSContextRef,
        value: JSValueRef,
        constructor: JSObjectRef,
        exception: *mut JSValueRef,
    ) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract       Creates a JavaScript value of the undefined type.\n@param ctx  The execution context to use.\n@result         The unique undefined value."]
    pub fn JSValueMakeUndefined(ctx: JSContextRef) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract       Creates a JavaScript value of the null type.\n@param ctx  The execution context to use.\n@result         The unique null value."]
    pub fn JSValueMakeNull(ctx: JSContextRef) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract       Creates a JavaScript value of the boolean type.\n@param ctx  The execution context to use.\n@param boolean  The bool to assign to the newly created JSValue.\n@result         A JSValue of the boolean type, representing the value of boolean."]
    pub fn JSValueMakeBoolean(ctx: JSContextRef, boolean: bool) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract       Creates a JavaScript value of the number type.\n@param ctx  The execution context to use.\n@param number   The double to assign to the newly created JSValue.\n@result         A JSValue of the number type, representing the value of number."]
    pub fn JSValueMakeNumber(ctx: JSContextRef, number: f64) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract       Creates a JavaScript value of the string type.\n@param ctx  The execution context to use.\n@param string   The JSString to assign to the newly created JSValue. The\nnewly created JSValue retains string, and releases it upon garbage collection.\n@result         A JSValue of the string type, representing the value of string."]
    pub fn JSValueMakeString(ctx: JSContextRef, string: JSStringRef) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract            Creates a JavaScript value of the symbol type.\n@param ctx           The execution context to use.\n@param description   A description of the newly created symbol value.\n@result              A unique JSValue of the symbol type, whose description matches the one provided."]
    pub fn JSValueMakeSymbol(ctx: JSContextRef, description: JSStringRef) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract       Creates a JavaScript value from a JSON formatted string.\n@param ctx      The execution context to use.\n@param string   The JSString containing the JSON string to be parsed.\n@result         A JSValue containing the parsed value, or NULL if the input is invalid."]
    pub fn JSValueMakeFromJSONString(ctx: JSContextRef, string: JSStringRef) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract       Creates a JavaScript string containing the JSON serialized representation of a JS value.\n@param ctx      The execution context to use.\n@param value    The value to serialize.\n@param indent   The number of spaces to indent when nesting.  If 0, the resulting JSON will not contains newlines.  The size of the indent is clamped to 10 spaces.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result         A JSString with the result of serialization, or NULL if an exception is thrown."]
    pub fn JSValueCreateJSONString(
        ctx: JSContextRef,
        value: JSValueRef,
        indent: ::std::os::raw::c_uint,
        exception: *mut JSValueRef,
    ) -> JSStringRef;
}
extern "C" {
    #[doc = "@function\n@abstract       Converts a JavaScript value to boolean and returns the resulting boolean.\n@param ctx  The execution context to use.\n@param value    The JSValue to convert.\n@result         The boolean result of conversion."]
    pub fn JSValueToBoolean(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract       Converts a JavaScript value to number and returns the resulting number.\n@param ctx  The execution context to use.\n@param value    The JSValue to convert.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result         The numeric result of conversion, or NaN if an exception is thrown."]
    pub fn JSValueToNumber(ctx: JSContextRef, value: JSValueRef, exception: *mut JSValueRef)
        -> f64;
}
extern "C" {
    #[doc = "@function\n@abstract       Converts a JavaScript value to string and copies the result into a JavaScript string.\n@param ctx  The execution context to use.\n@param value    The JSValue to convert.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result         A JSString with the result of conversion, or NULL if an exception is thrown. Ownership follows the Create Rule."]
    pub fn JSValueToStringCopy(
        ctx: JSContextRef,
        value: JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSStringRef;
}
extern "C" {
    #[doc = "@function\n@abstract Converts a JavaScript value to object and returns the resulting object.\n@param ctx  The execution context to use.\n@param value    The JSValue to convert.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result         The JSObject result of conversion, or NULL if an exception is thrown."]
    pub fn JSValueToObject(
        ctx: JSContextRef,
        value: JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Protects a JavaScript value from garbage collection.\n@param ctx The execution context to use.\n@param value The JSValue to protect.\n@discussion Use this method when you want to store a JSValue in a global or on the heap, where the garbage collector will not be able to discover your reference to it.\n\nA value may be protected multiple times and must be unprotected an equal number of times before becoming eligible for garbage collection."]
    pub fn JSValueProtect(ctx: JSContextRef, value: JSValueRef);
}
extern "C" {
    #[doc = "@function\n@abstract       Unprotects a JavaScript value from garbage collection.\n@param ctx      The execution context to use.\n@param value    The JSValue to unprotect.\n@discussion     A value may be protected multiple times and must be unprotected an\nequal number of times before becoming eligible for garbage collection."]
    pub fn JSValueUnprotect(ctx: JSContextRef, value: JSValueRef);
}
#[doc = "@typedef JSPropertyAttributes\n@abstract A set of JSPropertyAttributes. Combine multiple attributes by logically ORing them together."]
pub type JSPropertyAttributes = ::std::os::raw::c_uint;
#[doc = "@typedef JSClassAttributes\n@abstract A set of JSClassAttributes. Combine multiple attributes by logically ORing them together."]
pub type JSClassAttributes = ::std::os::raw::c_uint;
#[doc = "@typedef JSObjectInitializeCallback\n@abstract The callback invoked when an object is first created.\n@param ctx The execution context to use.\n@param object The JSObject being created.\n@discussion If you named your function Initialize, you would declare it like this:\n\nvoid Initialize(JSContextRef ctx, JSObjectRef object);\n\nUnlike the other object callbacks, the initialize callback is called on the least\nderived class (the parent class) first, and the most derived class last."]
pub type JSObjectInitializeCallback =
    ::std::option::Option<unsafe extern "C" fn(ctx: JSContextRef, object: JSObjectRef)>;
pub type JSObjectInitializeCallbackEx = ::std::option::Option<
    unsafe extern "C" fn(ctx: JSContextRef, jsClass: JSClassRef, object: JSObjectRef),
>;
#[doc = "@typedef JSObjectFinalizeCallback\n@abstract The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread.\n@param object The JSObject being finalized.\n@discussion If you named your function Finalize, you would declare it like this:\n\nvoid Finalize(JSObjectRef object);\n\nThe finalize callback is called on the most derived class first, and the least\nderived class (the parent class) last.\n\nYou must not call any function that may cause a garbage collection or an allocation\nof a garbage collected object from within a JSObjectFinalizeCallback. This includes\nall functions that have a JSContextRef parameter."]
pub type JSObjectFinalizeCallback =
    ::std::option::Option<unsafe extern "C" fn(object: JSObjectRef)>;
pub type JSObjectFinalizeCallbackEx =
    ::std::option::Option<unsafe extern "C" fn(jsClass: JSClassRef, object: JSObjectRef)>;
#[doc = "@typedef JSObjectHasPropertyCallback\n@abstract The callback invoked when determining whether an object has a property.\n@param ctx The execution context to use.\n@param object The JSObject to search for the property.\n@param propertyName A JSString containing the name of the property look up.\n@result true if object has the property, otherwise false.\n@discussion If you named your function HasProperty, you would declare it like this:\n\nbool HasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName);\n\nIf this function returns false, the hasProperty request forwards to object's statically declared properties, then its parent class chain (which includes the default object class), then its prototype chain.\n\nThis callback enables optimization in cases where only a property's existence needs to be known, not its value, and computing its value would be expensive.\n\nIf this callback is NULL, the getProperty callback will be used to service hasProperty requests."]
pub type JSObjectHasPropertyCallback = ::std::option::Option<
    unsafe extern "C" fn(ctx: JSContextRef, object: JSObjectRef, propertyName: JSStringRef) -> bool,
>;
pub type JSObjectHasPropertyCallbackEx = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        jsClass: JSClassRef,
        object: JSObjectRef,
        propertyName: JSStringRef,
    ) -> bool,
>;
#[doc = "@typedef JSObjectGetPropertyCallback\n@abstract The callback invoked when getting a property's value.\n@param ctx The execution context to use.\n@param object The JSObject to search for the property.\n@param propertyName A JSString containing the name of the property to get.\n@param exception A pointer to a JSValueRef in which to return an exception, if any.\n@result The property's value if object has the property, otherwise NULL.\n@discussion If you named your function GetProperty, you would declare it like this:\n\nJSValueRef GetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);\n\nIf this function returns NULL, the get request forwards to object's statically declared properties, then its parent class chain (which includes the default object class), then its prototype chain."]
pub type JSObjectGetPropertyCallback = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyName: JSStringRef,
        exception: *mut JSValueRef,
    ) -> JSValueRef,
>;
pub type JSObjectGetPropertyCallbackEx = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        jsClass: JSClassRef,
        object: JSObjectRef,
        propertyName: JSStringRef,
        exception: *mut JSValueRef,
    ) -> JSValueRef,
>;
#[doc = "@typedef JSObjectSetPropertyCallback\n@abstract The callback invoked when setting a property's value.\n@param ctx The execution context to use.\n@param object The JSObject on which to set the property's value.\n@param propertyName A JSString containing the name of the property to set.\n@param value A JSValue to use as the property's value.\n@param exception A pointer to a JSValueRef in which to return an exception, if any.\n@result true if the property was set, otherwise false.\n@discussion If you named your function SetProperty, you would declare it like this:\n\nbool SetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception);\n\nIf this function returns false, the set request forwards to object's statically declared properties, then its parent class chain (which includes the default object class)."]
pub type JSObjectSetPropertyCallback = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyName: JSStringRef,
        value: JSValueRef,
        exception: *mut JSValueRef,
    ) -> bool,
>;
pub type JSObjectSetPropertyCallbackEx = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        jsClass: JSClassRef,
        object: JSObjectRef,
        propertyName: JSStringRef,
        value: JSValueRef,
        exception: *mut JSValueRef,
    ) -> bool,
>;
#[doc = "@typedef JSObjectDeletePropertyCallback\n@abstract The callback invoked when deleting a property.\n@param ctx The execution context to use.\n@param object The JSObject in which to delete the property.\n@param propertyName A JSString containing the name of the property to delete.\n@param exception A pointer to a JSValueRef in which to return an exception, if any.\n@result true if propertyName was successfully deleted, otherwise false.\n@discussion If you named your function DeleteProperty, you would declare it like this:\n\nbool DeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);\n\nIf this function returns false, the delete request forwards to object's statically declared properties, then its parent class chain (which includes the default object class)."]
pub type JSObjectDeletePropertyCallback = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyName: JSStringRef,
        exception: *mut JSValueRef,
    ) -> bool,
>;
pub type JSObjectDeletePropertyCallbackEx = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        jsClass: JSClassRef,
        object: JSObjectRef,
        propertyName: JSStringRef,
        exception: *mut JSValueRef,
    ) -> bool,
>;
#[doc = "@typedef JSObjectGetPropertyNamesCallback\n@abstract The callback invoked when collecting the names of an object's properties.\n@param ctx The execution context to use.\n@param object The JSObject whose property names are being collected.\n@param propertyNames A JavaScript property name accumulator in which to accumulate the names of object's properties.\n@discussion If you named your function GetPropertyNames, you would declare it like this:\n\nvoid GetPropertyNames(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames);\n\nProperty name accumulators are used by JSObjectCopyPropertyNames and JavaScript for...in loops.\n\nUse JSPropertyNameAccumulatorAddName to add property names to accumulator. A class's getPropertyNames callback only needs to provide the names of properties that the class vends through a custom getProperty or setProperty callback. Other properties, including statically declared properties, properties vended by other classes, and properties belonging to object's prototype, are added independently."]
pub type JSObjectGetPropertyNamesCallback = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyNames: JSPropertyNameAccumulatorRef,
    ),
>;
pub type JSObjectGetPropertyNamesCallbackEx = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        jsClass: JSClassRef,
        object: JSObjectRef,
        propertyNames: JSPropertyNameAccumulatorRef,
    ),
>;
#[doc = "@typedef JSObjectCallAsFunctionCallback\n@abstract The callback invoked when an object is called as a function.\n@param ctx The execution context to use.\n@param function A JSObject that is the function being called.\n@param thisObject A JSObject that is the 'this' variable in the function's scope.\n@param argumentCount An integer count of the number of arguments in arguments.\n@param arguments A JSValue array of the  arguments passed to the function.\n@param exception A pointer to a JSValueRef in which to return an exception, if any.\n@result A JSValue that is the function's return value.\n@discussion If you named your function CallAsFunction, you would declare it like this:\n\nJSValueRef CallAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);\n\nIf your callback were invoked by the JavaScript expression 'myObject.myFunction()', function would be set to myFunction, and thisObject would be set to myObject.\n\nIf this callback is NULL, calling your object as a function will throw an exception."]
pub type JSObjectCallAsFunctionCallback = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        function: JSObjectRef,
        thisObject: JSObjectRef,
        argumentCount: usize,
        arguments: *const JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSValueRef,
>;
pub type JSObjectCallAsFunctionCallbackEx = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        jsClass: JSClassRef,
        className: JSStringRef,
        function: JSObjectRef,
        thisObject: JSObjectRef,
        argumentCount: usize,
        arguments: *const JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSValueRef,
>;
#[doc = "@typedef JSObjectCallAsConstructorCallback\n@abstract The callback invoked when an object is used as a constructor in a 'new' expression.\n@param ctx The execution context to use.\n@param constructor A JSObject that is the constructor being called.\n@param argumentCount An integer count of the number of arguments in arguments.\n@param arguments A JSValue array of the  arguments passed to the function.\n@param exception A pointer to a JSValueRef in which to return an exception, if any.\n@result A JSObject that is the constructor's return value.\n@discussion If you named your function CallAsConstructor, you would declare it like this:\n\nJSObjectRef CallAsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);\n\nIf your callback were invoked by the JavaScript expression 'new myConstructor()', constructor would be set to myConstructor.\n\nIf this callback is NULL, using your object as a constructor in a 'new' expression will throw an exception."]
pub type JSObjectCallAsConstructorCallback = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        constructor: JSObjectRef,
        argumentCount: usize,
        arguments: *const JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSObjectRef,
>;
pub type JSObjectCallAsConstructorCallbackEx = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        jsClass: JSClassRef,
        constructor: JSObjectRef,
        argumentCount: usize,
        arguments: *const JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSObjectRef,
>;
#[doc = "@typedef JSObjectHasInstanceCallback\n@abstract hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression.\n@param ctx The execution context to use.\n@param constructor The JSObject that is the target of the 'instanceof' expression.\n@param possibleInstance The JSValue being tested to determine if it is an instance of constructor.\n@param exception A pointer to a JSValueRef in which to return an exception, if any.\n@result true if possibleInstance is an instance of constructor, otherwise false.\n@discussion If you named your function HasInstance, you would declare it like this:\n\nbool HasInstance(JSContextRef ctx, JSObjectRef constructor, JSValueRef possibleInstance, JSValueRef* exception);\n\nIf your callback were invoked by the JavaScript expression 'someValue instanceof myObject', constructor would be set to myObject and possibleInstance would be set to someValue.\n\nIf this callback is NULL, 'instanceof' expressions that target your object will return false.\n\nStandard JavaScript practice calls for objects that implement the callAsConstructor callback to implement the hasInstance callback as well."]
pub type JSObjectHasInstanceCallback = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        constructor: JSObjectRef,
        possibleInstance: JSValueRef,
        exception: *mut JSValueRef,
    ) -> bool,
>;
pub type JSObjectHasInstanceCallbackEx = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        jsClass: JSClassRef,
        constructor: JSObjectRef,
        possibleInstance: JSValueRef,
        exception: *mut JSValueRef,
    ) -> bool,
>;
#[doc = "@typedef JSObjectConvertToTypeCallback\n@abstract The callback invoked when converting an object to a particular JavaScript type.\n@param ctx The execution context to use.\n@param object The JSObject to convert.\n@param type A JSType specifying the JavaScript type to convert to.\n@param exception A pointer to a JSValueRef in which to return an exception, if any.\n@result The objects's converted value, or NULL if the object was not converted.\n@discussion If you named your function ConvertToType, you would declare it like this:\n\nJSValueRef ConvertToType(JSContextRef ctx, JSObjectRef object, JSType type, JSValueRef* exception);\n\nIf this function returns false, the conversion request forwards to object's parent class chain (which includes the default object class).\n\nThis function is only invoked when converting an object to number or string. An object converted to boolean is 'true.' An object converted to object is itself."]
pub type JSObjectConvertToTypeCallback = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        object: JSObjectRef,
        type_: JSType,
        exception: *mut JSValueRef,
    ) -> JSValueRef,
>;
pub type JSObjectConvertToTypeCallbackEx = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: JSContextRef,
        jsClass: JSClassRef,
        object: JSObjectRef,
        type_: JSType,
        exception: *mut JSValueRef,
    ) -> JSValueRef,
>;
#[doc = "@struct JSStaticValue\n@abstract This structure describes a statically declared value property.\n@field name A null-terminated UTF8 string containing the property's name.\n@field getProperty A JSObjectGetPropertyCallback to invoke when getting the property's value.\n@field setProperty A JSObjectSetPropertyCallback to invoke when setting the property's value. May be NULL if the ReadOnly attribute is set.\n@field attributes A logically ORed set of JSPropertyAttributes to give to the property."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSStaticValue {
    pub name: *const ::std::os::raw::c_char,
    pub getProperty: JSObjectGetPropertyCallback,
    pub setProperty: JSObjectSetPropertyCallback,
    pub attributes: JSPropertyAttributes,
}
#[test]
fn bindgen_test_layout_JSStaticValue() {
    const UNINIT: ::std::mem::MaybeUninit<JSStaticValue> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<JSStaticValue>(),
        32usize,
        concat!("Size of: ", stringify!(JSStaticValue))
    );
    assert_eq!(
        ::std::mem::align_of::<JSStaticValue>(),
        8usize,
        concat!("Alignment of ", stringify!(JSStaticValue))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticValue),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).getProperty) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticValue),
            "::",
            stringify!(getProperty)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).setProperty) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticValue),
            "::",
            stringify!(setProperty)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticValue),
            "::",
            stringify!(attributes)
        )
    );
}
impl Default for JSStaticValue {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSStaticValueEx {
    pub name: *const ::std::os::raw::c_char,
    pub getPropertyEx: JSObjectGetPropertyCallbackEx,
    pub setPropertyEx: JSObjectSetPropertyCallbackEx,
    pub attributes: JSPropertyAttributes,
}
#[test]
fn bindgen_test_layout_JSStaticValueEx() {
    const UNINIT: ::std::mem::MaybeUninit<JSStaticValueEx> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<JSStaticValueEx>(),
        32usize,
        concat!("Size of: ", stringify!(JSStaticValueEx))
    );
    assert_eq!(
        ::std::mem::align_of::<JSStaticValueEx>(),
        8usize,
        concat!("Alignment of ", stringify!(JSStaticValueEx))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticValueEx),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).getPropertyEx) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticValueEx),
            "::",
            stringify!(getPropertyEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).setPropertyEx) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticValueEx),
            "::",
            stringify!(setPropertyEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticValueEx),
            "::",
            stringify!(attributes)
        )
    );
}
impl Default for JSStaticValueEx {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = "@struct JSStaticFunction\n@abstract This structure describes a statically declared function property.\n@field name A null-terminated UTF8 string containing the property's name.\n@field callAsFunction A JSObjectCallAsFunctionCallback to invoke when the property is called as a function.\n@field attributes A logically ORed set of JSPropertyAttributes to give to the property."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSStaticFunction {
    pub name: *const ::std::os::raw::c_char,
    pub callAsFunction: JSObjectCallAsFunctionCallback,
    pub attributes: JSPropertyAttributes,
}
#[test]
fn bindgen_test_layout_JSStaticFunction() {
    const UNINIT: ::std::mem::MaybeUninit<JSStaticFunction> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<JSStaticFunction>(),
        24usize,
        concat!("Size of: ", stringify!(JSStaticFunction))
    );
    assert_eq!(
        ::std::mem::align_of::<JSStaticFunction>(),
        8usize,
        concat!("Alignment of ", stringify!(JSStaticFunction))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticFunction),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).callAsFunction) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticFunction),
            "::",
            stringify!(callAsFunction)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticFunction),
            "::",
            stringify!(attributes)
        )
    );
}
impl Default for JSStaticFunction {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSStaticFunctionEx {
    pub name: *const ::std::os::raw::c_char,
    pub callAsFunctionEx: JSObjectCallAsFunctionCallbackEx,
    pub attributes: JSPropertyAttributes,
}
#[test]
fn bindgen_test_layout_JSStaticFunctionEx() {
    const UNINIT: ::std::mem::MaybeUninit<JSStaticFunctionEx> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<JSStaticFunctionEx>(),
        24usize,
        concat!("Size of: ", stringify!(JSStaticFunctionEx))
    );
    assert_eq!(
        ::std::mem::align_of::<JSStaticFunctionEx>(),
        8usize,
        concat!("Alignment of ", stringify!(JSStaticFunctionEx))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticFunctionEx),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).callAsFunctionEx) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticFunctionEx),
            "::",
            stringify!(callAsFunctionEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(JSStaticFunctionEx),
            "::",
            stringify!(attributes)
        )
    );
}
impl Default for JSStaticFunctionEx {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = "@struct JSClassDefinition\n@abstract This structure contains properties and callbacks that define a type of object. All fields other than the version field are optional. Any pointer may be NULL.\n@field version The version number of this structure. The current version is 0.\n@field attributes A logically ORed set of JSClassAttributes to give to the class.\n@field className A null-terminated UTF8 string containing the class's name.\n@field parentClass A JSClass to set as the class's parent class. Pass NULL use the default object class.\n@field staticValues A JSStaticValue array containing the class's statically declared value properties. Pass NULL to specify no statically declared value properties. The array must be terminated by a JSStaticValue whose name field is NULL.\n@field staticFunctions A JSStaticFunction array containing the class's statically declared function properties. Pass NULL to specify no statically declared function properties. The array must be terminated by a JSStaticFunction whose name field is NULL.\n@field initialize The callback invoked when an object is first created. Use this callback to initialize the object.\n@field finalize The callback invoked when an object is finalized (prepared for garbage collection). Use this callback to release resources allocated for the object, and perform other cleanup.\n@field hasProperty The callback invoked when determining whether an object has a property. If this field is NULL, getProperty is called instead. The hasProperty callback enables optimization in cases where only a property's existence needs to be known, not its value, and computing its value is expensive.\n@field getProperty The callback invoked when getting a property's value.\n@field setProperty The callback invoked when setting a property's value.\n@field deleteProperty The callback invoked when deleting a property.\n@field getPropertyNames The callback invoked when collecting the names of an object's properties.\n@field callAsFunction The callback invoked when an object is called as a function.\n@field hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression.\n@field callAsConstructor The callback invoked when an object is used as a constructor in a 'new' expression.\n@field convertToType The callback invoked when converting an object to a particular JavaScript type.\n@discussion The staticValues and staticFunctions arrays are the simplest and most efficient means for vending custom properties. Statically declared properties autmatically service requests like getProperty, setProperty, and getPropertyNames. Property access callbacks are required only to implement unusual properties, like array indexes, whose names are not known at compile-time.\n\nIf you named your getter function \"GetX\" and your setter function \"SetX\", you would declare a JSStaticValue array containing \"X\" like this:\n\nJSStaticValue StaticValueArray[] = {\n{ \"X\", GetX, SetX, kJSPropertyAttributeNone },\n{ 0, 0, 0, 0 }\n};\n\nStandard JavaScript practice calls for storing function objects in prototypes, so they can be shared. The default JSClass created by JSClassCreate follows this idiom, instantiating objects with a shared, automatically generating prototype containing the class's function objects. The kJSClassAttributeNoAutomaticPrototype attribute specifies that a JSClass should not automatically generate such a prototype. The resulting JSClass instantiates objects with the default object prototype, and gives each instance object its own copy of the class's function objects.\n\nA NULL callback specifies that the default object callback should substitute, except in the case of hasProperty, where it specifies that getProperty should substitute."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct JSClassDefinition {
    pub version: ::std::os::raw::c_int,
    pub attributes: JSClassAttributes,
    pub className: *const ::std::os::raw::c_char,
    pub parentClass: JSClassRef,
    pub __bindgen_anon_1: JSClassDefinition__bindgen_ty_1,
    pub privateData: *mut ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union JSClassDefinition__bindgen_ty_1 {
    pub __bindgen_anon_1: JSClassDefinition__bindgen_ty_1__bindgen_ty_1,
    pub __bindgen_anon_2: JSClassDefinition__bindgen_ty_1__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSClassDefinition__bindgen_ty_1__bindgen_ty_1 {
    pub staticValues: *const JSStaticValue,
    pub staticFunctions: *const JSStaticFunction,
    pub initialize: JSObjectInitializeCallback,
    pub finalize: JSObjectFinalizeCallback,
    pub hasProperty: JSObjectHasPropertyCallback,
    pub getProperty: JSObjectGetPropertyCallback,
    pub setProperty: JSObjectSetPropertyCallback,
    pub deleteProperty: JSObjectDeletePropertyCallback,
    pub getPropertyNames: JSObjectGetPropertyNamesCallback,
    pub callAsFunction: JSObjectCallAsFunctionCallback,
    pub callAsConstructor: JSObjectCallAsConstructorCallback,
    pub hasInstance: JSObjectHasInstanceCallback,
    pub convertToType: JSObjectConvertToTypeCallback,
}
#[test]
fn bindgen_test_layout_JSClassDefinition__bindgen_ty_1__bindgen_ty_1() {
    const UNINIT: ::std::mem::MaybeUninit<JSClassDefinition__bindgen_ty_1__bindgen_ty_1> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<JSClassDefinition__bindgen_ty_1__bindgen_ty_1>(),
        104usize,
        concat!(
            "Size of: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<JSClassDefinition__bindgen_ty_1__bindgen_ty_1>(),
        8usize,
        concat!(
            "Alignment of ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).staticValues) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(staticValues)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).staticFunctions) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(staticFunctions)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).initialize) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(initialize)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).finalize) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(finalize)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).hasProperty) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(hasProperty)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).getProperty) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(getProperty)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).setProperty) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(setProperty)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).deleteProperty) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(deleteProperty)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).getPropertyNames) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(getPropertyNames)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).callAsFunction) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(callAsFunction)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).callAsConstructor) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(callAsConstructor)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).hasInstance) as usize - ptr as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(hasInstance)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).convertToType) as usize - ptr as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(convertToType)
        )
    );
}
impl Default for JSClassDefinition__bindgen_ty_1__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSClassDefinition__bindgen_ty_1__bindgen_ty_2 {
    pub staticValuesEx: *const JSStaticValueEx,
    pub staticFunctionsEx: *const JSStaticFunctionEx,
    pub initializeEx: JSObjectInitializeCallbackEx,
    pub finalizeEx: JSObjectFinalizeCallbackEx,
    pub hasPropertyEx: JSObjectHasPropertyCallbackEx,
    pub getPropertyEx: JSObjectGetPropertyCallbackEx,
    pub setPropertyEx: JSObjectSetPropertyCallbackEx,
    pub deletePropertyEx: JSObjectDeletePropertyCallbackEx,
    pub getPropertyNamesEx: JSObjectGetPropertyNamesCallbackEx,
    pub callAsFunctionEx: JSObjectCallAsFunctionCallbackEx,
    pub callAsConstructorEx: JSObjectCallAsConstructorCallbackEx,
    pub hasInstanceEx: JSObjectHasInstanceCallbackEx,
    pub convertToTypeEx: JSObjectConvertToTypeCallbackEx,
}
#[test]
fn bindgen_test_layout_JSClassDefinition__bindgen_ty_1__bindgen_ty_2() {
    const UNINIT: ::std::mem::MaybeUninit<JSClassDefinition__bindgen_ty_1__bindgen_ty_2> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<JSClassDefinition__bindgen_ty_1__bindgen_ty_2>(),
        104usize,
        concat!(
            "Size of: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<JSClassDefinition__bindgen_ty_1__bindgen_ty_2>(),
        8usize,
        concat!(
            "Alignment of ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).staticValuesEx) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(staticValuesEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).staticFunctionsEx) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(staticFunctionsEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).initializeEx) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(initializeEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).finalizeEx) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(finalizeEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).hasPropertyEx) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(hasPropertyEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).getPropertyEx) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(getPropertyEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).setPropertyEx) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(setPropertyEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).deletePropertyEx) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(deletePropertyEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).getPropertyNamesEx) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(getPropertyNamesEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).callAsFunctionEx) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(callAsFunctionEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).callAsConstructorEx) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(callAsConstructorEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).hasInstanceEx) as usize - ptr as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(hasInstanceEx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).convertToTypeEx) as usize - ptr as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(convertToTypeEx)
        )
    );
}
impl Default for JSClassDefinition__bindgen_ty_1__bindgen_ty_2 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[test]
fn bindgen_test_layout_JSClassDefinition__bindgen_ty_1() {
    assert_eq!(
        ::std::mem::size_of::<JSClassDefinition__bindgen_ty_1>(),
        104usize,
        concat!("Size of: ", stringify!(JSClassDefinition__bindgen_ty_1))
    );
    assert_eq!(
        ::std::mem::align_of::<JSClassDefinition__bindgen_ty_1>(),
        8usize,
        concat!("Alignment of ", stringify!(JSClassDefinition__bindgen_ty_1))
    );
}
impl Default for JSClassDefinition__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl ::std::fmt::Debug for JSClassDefinition__bindgen_ty_1 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        write!(f, "JSClassDefinition__bindgen_ty_1 {{ union }}")
    }
}
#[test]
fn bindgen_test_layout_JSClassDefinition() {
    const UNINIT: ::std::mem::MaybeUninit<JSClassDefinition> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<JSClassDefinition>(),
        136usize,
        concat!("Size of: ", stringify!(JSClassDefinition))
    );
    assert_eq!(
        ::std::mem::align_of::<JSClassDefinition>(),
        8usize,
        concat!("Alignment of ", stringify!(JSClassDefinition))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition),
            "::",
            stringify!(version)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition),
            "::",
            stringify!(attributes)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).className) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition),
            "::",
            stringify!(className)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).parentClass) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition),
            "::",
            stringify!(parentClass)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).privateData) as usize - ptr as usize },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(JSClassDefinition),
            "::",
            stringify!(privateData)
        )
    );
}
impl Default for JSClassDefinition {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl ::std::fmt::Debug for JSClassDefinition {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        write ! (f , "JSClassDefinition {{ version: {:?}, attributes: {:?}, className: {:?}, parentClass: {:?}, __bindgen_anon_1: {:?}, privateData: {:?} }}" , self . version , self . attributes , self . className , self . parentClass , self . __bindgen_anon_1 , self . privateData)
    }
}
extern "C" {
    #[doc = "@function\n@abstract Creates a JavaScript class suitable for use with JSObjectMake.\n@param definition A JSClassDefinition that defines the class.\n@result A JSClass with the given definition. Ownership follows the Create Rule."]
    pub fn JSClassCreate(definition: *const JSClassDefinition) -> JSClassRef;
}
extern "C" {
    #[doc = "@function\n@abstract Retains a JavaScript class.\n@param jsClass The JSClass to retain.\n@result A JSClass that is the same as jsClass."]
    pub fn JSClassRetain(jsClass: JSClassRef) -> JSClassRef;
}
extern "C" {
    #[doc = "@function\n@abstract Releases a JavaScript class.\n@param jsClass The JSClass to release."]
    pub fn JSClassRelease(jsClass: JSClassRef);
}
extern "C" {
    #[doc = "@function\n@abstract Retrieves the private data from a class reference, only possible with classes created with version 1000 (extended callbacks).\n@param jsClass The class to get the data from\n@result The private data on the class, or NULL, if not set\n@discussion Only classes with version 1000 (extended callbacks) can store private data, for other classes always NULL will always be returned."]
    pub fn JSClassGetPrivate(jsClass: JSClassRef) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = "@function\n@abstract Sets the private data on a class, only possible with classes created with version 1000 (extended callbacks).\n@param jsClass The class to set the data on\n@param data A void* to set as the private data for the class\n@result true if the data has been set on the class, false if the class has not been created with version 1000 (extended callbacks)\n@discussion Only classes with version 1000 (extended callbacks) can store private data, for other classes the function always fails. The set pointer is not touched by the engine."]
    pub fn JSClassSetPrivate(jsClass: JSClassRef, data: *mut ::std::os::raw::c_void) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract Creates a JavaScript object.\n@param ctx The execution context to use.\n@param jsClass The JSClass to assign to the object. Pass NULL to use the default object class.\n@param data A void* to set as the object's private data. Pass NULL to specify no private data.\n@result A JSObject with the given class and private data.\n@discussion The default object class does not allocate storage for private data, so you must provide a non-NULL jsClass to JSObjectMake if you want your object to be able to store private data.\n\ndata is set on the created object before the intialize methods in its class chain are called. This enables the initialize methods to retrieve and manipulate data through JSObjectGetPrivate."]
    pub fn JSObjectMake(
        ctx: JSContextRef,
        jsClass: JSClassRef,
        data: *mut ::std::os::raw::c_void,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Convenience method for creating a JavaScript function with a given callback as its implementation.\n@param ctx The execution context to use.\n@param name A JSString containing the function's name. This will be used when converting the function to string. Pass NULL to create an anonymous function.\n@param callAsFunction The JSObjectCallAsFunctionCallback to invoke when the function is called.\n@result A JSObject that is a function. The object's prototype will be the default function prototype."]
    pub fn JSObjectMakeFunctionWithCallback(
        ctx: JSContextRef,
        name: JSStringRef,
        callAsFunction: JSObjectCallAsFunctionCallback,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Convenience method for creating a JavaScript constructor.\n@param ctx The execution context to use.\n@param jsClass A JSClass that is the class your constructor will assign to the objects its constructs. jsClass will be used to set the constructor's .prototype property, and to evaluate 'instanceof' expressions. Pass NULL to use the default object class.\n@param callAsConstructor A JSObjectCallAsConstructorCallback to invoke when your constructor is used in a 'new' expression. Pass NULL to use the default object constructor.\n@result A JSObject that is a constructor. The object's prototype will be the default object prototype.\n@discussion The default object constructor takes no arguments and constructs an object of class jsClass with no private data."]
    pub fn JSObjectMakeConstructor(
        ctx: JSContextRef,
        jsClass: JSClassRef,
        callAsConstructor: JSObjectCallAsConstructorCallback,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Creates a JavaScript Array object.\n@param ctx The execution context to use.\n@param argumentCount An integer count of the number of arguments in arguments.\n@param arguments A JSValue array of data to populate the Array with. Pass NULL if argumentCount is 0.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result A JSObject that is an Array.\n@discussion The behavior of this function does not exactly match the behavior of the built-in Array constructor. Specifically, if one argument\nis supplied, this function returns an array with one element."]
    pub fn JSObjectMakeArray(
        ctx: JSContextRef,
        argumentCount: usize,
        arguments: *const JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Creates a JavaScript Date object, as if by invoking the built-in Date constructor.\n@param ctx The execution context to use.\n@param argumentCount An integer count of the number of arguments in arguments.\n@param arguments A JSValue array of arguments to pass to the Date Constructor. Pass NULL if argumentCount is 0.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result A JSObject that is a Date."]
    pub fn JSObjectMakeDate(
        ctx: JSContextRef,
        argumentCount: usize,
        arguments: *const JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Creates a JavaScript Error object, as if by invoking the built-in Error constructor.\n@param ctx The execution context to use.\n@param argumentCount An integer count of the number of arguments in arguments.\n@param arguments A JSValue array of arguments to pass to the Error Constructor. Pass NULL if argumentCount is 0.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result A JSObject that is a Error."]
    pub fn JSObjectMakeError(
        ctx: JSContextRef,
        argumentCount: usize,
        arguments: *const JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Creates a JavaScript RegExp object, as if by invoking the built-in RegExp constructor.\n@param ctx The execution context to use.\n@param argumentCount An integer count of the number of arguments in arguments.\n@param arguments A JSValue array of arguments to pass to the RegExp Constructor. Pass NULL if argumentCount is 0.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result A JSObject that is a RegExp."]
    pub fn JSObjectMakeRegExp(
        ctx: JSContextRef,
        argumentCount: usize,
        arguments: *const JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Creates a JavaScript promise object by invoking the provided executor.\n@param ctx The execution context to use.\n@param resolve A pointer to a JSObjectRef in which to store the resolve function for the new promise. Pass NULL if you do not care to store the resolve callback.\n@param reject A pointer to a JSObjectRef in which to store the reject function for the new promise. Pass NULL if you do not care to store the reject callback.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result A JSObject that is a promise or NULL if an exception occurred."]
    pub fn JSObjectMakeDeferredPromise(
        ctx: JSContextRef,
        resolve: *mut JSObjectRef,
        reject: *mut JSObjectRef,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Creates a function with a given script as its body.\n@param ctx The execution context to use.\n@param name A JSString containing the function's name. This will be used when converting the function to string. Pass NULL to create an anonymous function.\n@param parameterCount An integer count of the number of parameter names in parameterNames.\n@param parameterNames A JSString array containing the names of the function's parameters. Pass NULL if parameterCount is 0.\n@param body A JSString containing the script to use as the function's body.\n@param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions.\n@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. The value is one-based, so the first line is line 1 and invalid values are clamped to 1.\n@param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception.\n@result A JSObject that is a function, or NULL if either body or parameterNames contains a syntax error. The object's prototype will be the default function prototype.\n@discussion Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution."]
    pub fn JSObjectMakeFunction(
        ctx: JSContextRef,
        name: JSStringRef,
        parameterCount: ::std::os::raw::c_uint,
        parameterNames: *const JSStringRef,
        body: JSStringRef,
        sourceURL: JSStringRef,
        startingLineNumber: ::std::os::raw::c_int,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Gets an object's prototype.\n@param ctx  The execution context to use.\n@param object A JSObject whose prototype you want to get.\n@result A JSValue that is the object's prototype."]
    pub fn JSObjectGetPrototype(ctx: JSContextRef, object: JSObjectRef) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract Sets an object's prototype.\n@param ctx  The execution context to use.\n@param object The JSObject whose prototype you want to set.\n@param value A JSValue to set as the object's prototype."]
    pub fn JSObjectSetPrototype(ctx: JSContextRef, object: JSObjectRef, value: JSValueRef);
}
extern "C" {
    #[doc = "@function\n@abstract Tests whether an object has a given property.\n@param object The JSObject to test.\n@param propertyName A JSString containing the property's name.\n@result true if the object has a property whose name matches propertyName, otherwise false."]
    pub fn JSObjectHasProperty(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyName: JSStringRef,
    ) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract Gets a property from an object.\n@param ctx The execution context to use.\n@param object The JSObject whose property you want to get.\n@param propertyName A JSString containing the property's name.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result The property's value if object has the property, otherwise the undefined value."]
    pub fn JSObjectGetProperty(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyName: JSStringRef,
        exception: *mut JSValueRef,
    ) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract Sets a property on an object.\n@param ctx The execution context to use.\n@param object The JSObject whose property you want to set.\n@param propertyName A JSString containing the property's name.\n@param value A JSValueRef to use as the property's value.\n@param attributes A logically ORed set of JSPropertyAttributes to give to the property.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception."]
    pub fn JSObjectSetProperty(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyName: JSStringRef,
        value: JSValueRef,
        attributes: JSPropertyAttributes,
        exception: *mut JSValueRef,
    );
}
extern "C" {
    #[doc = "@function\n@abstract Deletes a property from an object.\n@param ctx The execution context to use.\n@param object The JSObject whose property you want to delete.\n@param propertyName A JSString containing the property's name.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set)."]
    pub fn JSObjectDeleteProperty(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyName: JSStringRef,
        exception: *mut JSValueRef,
    ) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract Tests whether an object has a given property using a JSValueRef as the property key.\n@param object The JSObject to test.\n@param propertyKey A JSValueRef containing the property key to use when looking up the property.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result true if the object has a property whose name matches propertyKey, otherwise false.\n@discussion This function is the same as performing \"propertyKey in object\" from JavaScript."]
    pub fn JSObjectHasPropertyForKey(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyKey: JSValueRef,
        exception: *mut JSValueRef,
    ) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract Gets a property from an object using a JSValueRef as the property key.\n@param ctx The execution context to use.\n@param object The JSObject whose property you want to get.\n@param propertyKey A JSValueRef containing the property key to use when looking up the property.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result The property's value if object has the property key, otherwise the undefined value.\n@discussion This function is the same as performing \"object[propertyKey]\" from JavaScript."]
    pub fn JSObjectGetPropertyForKey(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyKey: JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract Sets a property on an object using a JSValueRef as the property key.\n@param ctx The execution context to use.\n@param object The JSObject whose property you want to set.\n@param propertyKey A JSValueRef containing the property key to use when looking up the property.\n@param value A JSValueRef to use as the property's value.\n@param attributes A logically ORed set of JSPropertyAttributes to give to the property.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@discussion This function is the same as performing \"object[propertyKey] = value\" from JavaScript."]
    pub fn JSObjectSetPropertyForKey(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyKey: JSValueRef,
        value: JSValueRef,
        attributes: JSPropertyAttributes,
        exception: *mut JSValueRef,
    );
}
extern "C" {
    #[doc = "@function\n@abstract Deletes a property from an object using a JSValueRef as the property key.\n@param ctx The execution context to use.\n@param object The JSObject whose property you want to delete.\n@param propertyKey A JSValueRef containing the property key to use when looking up the property.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set).\n@discussion This function is the same as performing \"delete object[propertyKey]\" from JavaScript."]
    pub fn JSObjectDeletePropertyForKey(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyKey: JSValueRef,
        exception: *mut JSValueRef,
    ) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract Gets a property from an object by numeric index.\n@param ctx The execution context to use.\n@param object The JSObject whose property you want to get.\n@param propertyIndex An integer value that is the property's name.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result The property's value if object has the property, otherwise the undefined value.\n@discussion Calling JSObjectGetPropertyAtIndex is equivalent to calling JSObjectGetProperty with a string containing propertyIndex, but JSObjectGetPropertyAtIndex provides optimized access to numeric properties."]
    pub fn JSObjectGetPropertyAtIndex(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyIndex: ::std::os::raw::c_uint,
        exception: *mut JSValueRef,
    ) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract Sets a property on an object by numeric index.\n@param ctx The execution context to use.\n@param object The JSObject whose property you want to set.\n@param propertyIndex The property's name as a number.\n@param value A JSValue to use as the property's value.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@discussion Calling JSObjectSetPropertyAtIndex is equivalent to calling JSObjectSetProperty with a string containing propertyIndex, but JSObjectSetPropertyAtIndex provides optimized access to numeric properties."]
    pub fn JSObjectSetPropertyAtIndex(
        ctx: JSContextRef,
        object: JSObjectRef,
        propertyIndex: ::std::os::raw::c_uint,
        value: JSValueRef,
        exception: *mut JSValueRef,
    );
}
extern "C" {
    #[doc = "@function\n@abstract Gets an object's private data.\n@param object A JSObject whose private data you want to get.\n@result A void* that is the object's private data, if the object has private data, otherwise NULL."]
    pub fn JSObjectGetPrivate(object: JSObjectRef) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = "@function\n@abstract Sets a pointer to private data on an object.\n@param object The JSObject whose private data you want to set.\n@param data A void* to set as the object's private data.\n@result true if object can store private data, otherwise false.\n@discussion The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private data."]
    pub fn JSObjectSetPrivate(object: JSObjectRef, data: *mut ::std::os::raw::c_void) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract Tests whether an object can be called as a function.\n@param ctx  The execution context to use.\n@param object The JSObject to test.\n@result true if the object can be called as a function, otherwise false."]
    pub fn JSObjectIsFunction(ctx: JSContextRef, object: JSObjectRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract Calls an object as a function.\n@param ctx The execution context to use.\n@param object The JSObject to call as a function.\n@param thisObject The object to use as \"this,\" or NULL to use the global object as \"this.\"\n@param argumentCount An integer count of the number of arguments in arguments.\n@param arguments A JSValue array of arguments to pass to the function. Pass NULL if argumentCount is 0.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result The JSValue that results from calling object as a function, or NULL if an exception is thrown or object is not a function."]
    pub fn JSObjectCallAsFunction(
        ctx: JSContextRef,
        object: JSObjectRef,
        thisObject: JSObjectRef,
        argumentCount: usize,
        arguments: *const JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSValueRef;
}
extern "C" {
    #[doc = "@function\n@abstract Tests whether an object can be called as a constructor.\n@param ctx  The execution context to use.\n@param object The JSObject to test.\n@result true if the object can be called as a constructor, otherwise false."]
    pub fn JSObjectIsConstructor(ctx: JSContextRef, object: JSObjectRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract Calls an object as a constructor.\n@param ctx The execution context to use.\n@param object The JSObject to call as a constructor.\n@param argumentCount An integer count of the number of arguments in arguments.\n@param arguments A JSValue array of arguments to pass to the constructor. Pass NULL if argumentCount is 0.\n@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result The JSObject that results from calling object as a constructor, or NULL if an exception is thrown or object is not a constructor."]
    pub fn JSObjectCallAsConstructor(
        ctx: JSContextRef,
        object: JSObjectRef,
        argumentCount: usize,
        arguments: *const JSValueRef,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Gets the names of an object's enumerable properties.\n@param ctx The execution context to use.\n@param object The object whose property names you want to get.\n@result A JSPropertyNameArray containing the names object's enumerable properties. Ownership follows the Create Rule."]
    pub fn JSObjectCopyPropertyNames(
        ctx: JSContextRef,
        object: JSObjectRef,
    ) -> JSPropertyNameArrayRef;
}
extern "C" {
    #[doc = "@function\n@abstract Retains a JavaScript property name array.\n@param array The JSPropertyNameArray to retain.\n@result A JSPropertyNameArray that is the same as array."]
    pub fn JSPropertyNameArrayRetain(array: JSPropertyNameArrayRef) -> JSPropertyNameArrayRef;
}
extern "C" {
    #[doc = "@function\n@abstract Releases a JavaScript property name array.\n@param array The JSPropetyNameArray to release."]
    pub fn JSPropertyNameArrayRelease(array: JSPropertyNameArrayRef);
}
extern "C" {
    #[doc = "@function\n@abstract Gets a count of the number of items in a JavaScript property name array.\n@param array The array from which to retrieve the count.\n@result An integer count of the number of names in array."]
    pub fn JSPropertyNameArrayGetCount(array: JSPropertyNameArrayRef) -> usize;
}
extern "C" {
    #[doc = "@function\n@abstract Gets a property name at a given index in a JavaScript property name array.\n@param array The array from which to retrieve the property name.\n@param index The index of the property name to retrieve.\n@result A JSStringRef containing the property name."]
    pub fn JSPropertyNameArrayGetNameAtIndex(
        array: JSPropertyNameArrayRef,
        index: usize,
    ) -> JSStringRef;
}
extern "C" {
    #[doc = "@function\n@abstract Adds a property name to a JavaScript property name accumulator.\n@param accumulator The accumulator object to which to add the property name.\n@param propertyName The property name to add."]
    pub fn JSPropertyNameAccumulatorAddName(
        accumulator: JSPropertyNameAccumulatorRef,
        propertyName: JSStringRef,
    );
}
extern "C" {
    #[doc = "@function\n@abstract Creates a JavaScript context group.\n@discussion A JSContextGroup associates JavaScript contexts with one another.\nContexts in the same group may share and exchange JavaScript objects. Sharing and/or exchanging\nJavaScript objects between contexts in different groups will produce undefined behavior.\nWhen objects from the same context group are used in multiple threads, explicit\nsynchronization is required.\n\nA JSContextGroup may need to run deferred tasks on a run loop, such as garbage collection\nor resolving WebAssembly compilations. By default, calling JSContextGroupCreate will use\nthe run loop of the thread it was called on. Currently, there is no API to change a\nJSContextGroup's run loop once it has been created.\n@result The created JSContextGroup."]
    pub fn JSContextGroupCreate() -> JSContextGroupRef;
}
extern "C" {
    #[doc = "@function\n@abstract Retains a JavaScript context group.\n@param group The JSContextGroup to retain.\n@result A JSContextGroup that is the same as group."]
    pub fn JSContextGroupRetain(group: JSContextGroupRef) -> JSContextGroupRef;
}
extern "C" {
    #[doc = "@function\n@abstract Releases a JavaScript context group.\n@param group The JSContextGroup to release."]
    pub fn JSContextGroupRelease(group: JSContextGroupRef);
}
extern "C" {
    #[doc = "@function\n@abstract Creates a global JavaScript execution context.\n@discussion JSGlobalContextCreate allocates a global object and populates it with all the\nbuilt-in JavaScript objects, such as Object, Function, String, and Array.\n\nIn WebKit version 4.0 and later, the context is created in a unique context group.\nTherefore, scripts may execute in it concurrently with scripts executing in other contexts.\nHowever, you may not use values created in the context in other contexts.\n@param globalObjectClass The class to use when creating the global object. Pass\nNULL to use the default object class.\n@result A JSGlobalContext with a global object of class globalObjectClass."]
    pub fn JSGlobalContextCreate(globalObjectClass: JSClassRef) -> JSGlobalContextRef;
}
extern "C" {
    #[doc = "@function\n@abstract Creates a global JavaScript execution context in the context group provided.\n@discussion JSGlobalContextCreateInGroup allocates a global object and populates it with\nall the built-in JavaScript objects, such as Object, Function, String, and Array.\n@param globalObjectClass The class to use when creating the global object. Pass\nNULL to use the default object class.\n@param group The context group to use. The created global context retains the group.\nPass NULL to create a unique group for the context.\n@result A JSGlobalContext with a global object of class globalObjectClass and a context\ngroup equal to group."]
    pub fn JSGlobalContextCreateInGroup(
        group: JSContextGroupRef,
        globalObjectClass: JSClassRef,
    ) -> JSGlobalContextRef;
}
extern "C" {
    #[doc = "@function\n@abstract Retains a global JavaScript execution context.\n@param ctx The JSGlobalContext to retain.\n@result A JSGlobalContext that is the same as ctx."]
    pub fn JSGlobalContextRetain(ctx: JSGlobalContextRef) -> JSGlobalContextRef;
}
extern "C" {
    #[doc = "@function\n@abstract Releases a global JavaScript execution context.\n@param ctx The JSGlobalContext to release."]
    pub fn JSGlobalContextRelease(ctx: JSGlobalContextRef);
}
extern "C" {
    #[doc = "@function\n@abstract Gets the global object of a JavaScript execution context.\n@param ctx The JSContext whose global object you want to get.\n@result ctx's global object."]
    pub fn JSContextGetGlobalObject(ctx: JSContextRef) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract Gets the context group to which a JavaScript execution context belongs.\n@param ctx The JSContext whose group you want to get.\n@result ctx's group."]
    pub fn JSContextGetGroup(ctx: JSContextRef) -> JSContextGroupRef;
}
extern "C" {
    #[doc = "@function\n@abstract Gets the global context of a JavaScript execution context.\n@param ctx The JSContext whose global context you want to get.\n@result ctx's global context."]
    pub fn JSContextGetGlobalContext(ctx: JSContextRef) -> JSGlobalContextRef;
}
extern "C" {
    #[doc = "@function\n@abstract Gets a copy of the name of a context.\n@param ctx The JSGlobalContext whose name you want to get.\n@result The name for ctx.\n@discussion A JSGlobalContext's name is exposed for remote debugging to make it\neasier to identify the context you would like to attach to."]
    pub fn JSGlobalContextCopyName(ctx: JSGlobalContextRef) -> JSStringRef;
}
extern "C" {
    #[doc = "@function\n@abstract Sets the remote debugging name for a context.\n@param ctx The JSGlobalContext that you want to name.\n@param name The remote debugging name to set on ctx."]
    pub fn JSGlobalContextSetName(ctx: JSGlobalContextRef, name: JSStringRef);
}
#[doc = "@typedef JSChar\n@abstract A UTF-16 code unit. One, or a sequence of two, can encode any Unicode\ncharacter. As with all scalar types, endianness depends on the underlying\narchitecture."]
pub type JSChar = ::std::os::raw::c_ushort;
extern "C" {
    #[doc = "@function\n@abstract         Creates a JavaScript string from a buffer of Unicode characters.\n@param chars      The buffer of Unicode characters to copy into the new JSString.\n@param numChars   The number of characters to copy from the buffer pointed to by chars.\n@result           A JSString containing chars. Ownership follows the Create Rule."]
    pub fn JSStringCreateWithCharacters(chars: *const JSChar, numChars: usize) -> JSStringRef;
}
extern "C" {
    #[doc = "@function\n@abstract         Creates a JavaScript string from a null-terminated UTF8 string.\n@param string     The null-terminated UTF8 string to copy into the new JSString.\n@result           A JSString containing string. Ownership follows the Create Rule."]
    pub fn JSStringCreateWithUTF8CString(string: *const ::std::os::raw::c_char) -> JSStringRef;
}
extern "C" {
    #[doc = "@function\n@abstract         Retains a JavaScript string.\n@param string     The JSString to retain.\n@result           A JSString that is the same as string."]
    pub fn JSStringRetain(string: JSStringRef) -> JSStringRef;
}
extern "C" {
    #[doc = "@function\n@abstract         Releases a JavaScript string.\n@param string     The JSString to release."]
    pub fn JSStringRelease(string: JSStringRef);
}
extern "C" {
    #[doc = "@function\n@abstract         Returns the number of Unicode characters in a JavaScript string.\n@param string     The JSString whose length (in Unicode characters) you want to know.\n@result           The number of Unicode characters stored in string."]
    pub fn JSStringGetLength(string: JSStringRef) -> usize;
}
extern "C" {
    #[doc = "@function\n@abstract         Returns a pointer to the Unicode character buffer that\nserves as the backing store for a JavaScript string.\n@param string     The JSString whose backing store you want to access.\n@result           A pointer to the Unicode character buffer that serves as string's\nbacking store, which will be deallocated when string is deallocated."]
    pub fn JSStringGetCharactersPtr(string: JSStringRef) -> *const JSChar;
}
extern "C" {
    #[doc = "@function\n@abstract Returns the maximum number of bytes a JavaScript string will\ntake up if converted into a null-terminated UTF8 string.\n@param string The JSString whose maximum converted size (in bytes) you\nwant to know.\n@result The maximum number of bytes that could be required to convert string into a\nnull-terminated UTF8 string. The number of bytes that the conversion actually ends\nup requiring could be less than this, but never more."]
    pub fn JSStringGetMaximumUTF8CStringSize(string: JSStringRef) -> usize;
}
extern "C" {
    #[doc = "@function\n@abstract Converts a JavaScript string into a null-terminated UTF8 string,\nand copies the result into an external byte buffer.\n@param string The source JSString.\n@param buffer The destination byte buffer into which to copy a null-terminated\nUTF8 representation of string. On return, buffer contains a UTF8 string\nrepresentation of string. If bufferSize is too small, buffer will contain only\npartial results. If buffer is not at least bufferSize bytes in size,\nbehavior is undefined.\n@param bufferSize The size of the external buffer in bytes.\n@result The number of bytes written into buffer (including the null-terminator byte)."]
    pub fn JSStringGetUTF8CString(
        string: JSStringRef,
        buffer: *mut ::std::os::raw::c_char,
        bufferSize: usize,
    ) -> usize;
}
extern "C" {
    #[doc = "@function\n@abstract     Tests whether two JavaScript strings match.\n@param a      The first JSString to test.\n@param b      The second JSString to test.\n@result       true if the two strings match, otherwise false."]
    pub fn JSStringIsEqual(a: JSStringRef, b: JSStringRef) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract     Tests whether a JavaScript string matches a null-terminated UTF8 string.\n@param a      The JSString to test.\n@param b      The null-terminated UTF8 string to test.\n@result       true if the two strings match, otherwise false."]
    pub fn JSStringIsEqualToUTF8CString(a: JSStringRef, b: *const ::std::os::raw::c_char) -> bool;
}
extern "C" {
    #[doc = "@function\n@abstract           Creates a JavaScript Typed Array object with the given number of elements.\n@param ctx          The execution context to use.\n@param arrayType    A value identifying the type of array to create. If arrayType is kJSTypedArrayTypeNone or kJSTypedArrayTypeArrayBuffer then NULL will be returned.\n@param length       The number of elements to be in the new Typed Array.\n@param exception    A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result             A JSObjectRef that is a Typed Array with all elements set to zero or NULL if there was an error."]
    pub fn JSObjectMakeTypedArray(
        ctx: JSContextRef,
        arrayType: JSTypedArrayType,
        length: usize,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract                 Creates a JavaScript Typed Array object from an existing pointer.\n@param ctx                The execution context to use.\n@param arrayType          A value identifying the type of array to create. If arrayType is kJSTypedArrayTypeNone or kJSTypedArrayTypeArrayBuffer then NULL will be returned.\n@param bytes              A pointer to the byte buffer to be used as the backing store of the Typed Array object.\n@param byteLength         The number of bytes pointed to by the parameter bytes.\n@param bytesDeallocator   The allocator to use to deallocate the external buffer when the JSTypedArrayData object is deallocated.\n@param deallocatorContext A pointer to pass back to the deallocator.\n@param exception          A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result                   A JSObjectRef Typed Array whose backing store is the same as the one pointed to by bytes or NULL if there was an error.\n@discussion               If an exception is thrown during this function the bytesDeallocator will always be called."]
    pub fn JSObjectMakeTypedArrayWithBytesNoCopy(
        ctx: JSContextRef,
        arrayType: JSTypedArrayType,
        bytes: *mut ::std::os::raw::c_void,
        byteLength: usize,
        bytesDeallocator: JSTypedArrayBytesDeallocator,
        deallocatorContext: *mut ::std::os::raw::c_void,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract           Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object.\n@param ctx          The execution context to use.\n@param arrayType    A value identifying the type of array to create. If arrayType is kJSTypedArrayTypeNone or kJSTypedArrayTypeArrayBuffer then NULL will be returned.\n@param buffer       An Array Buffer object that should be used as the backing store for the created JavaScript Typed Array object.\n@param exception    A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result             A JSObjectRef that is a Typed Array or NULL if there was an error. The backing store of the Typed Array will be buffer."]
    pub fn JSObjectMakeTypedArrayWithArrayBuffer(
        ctx: JSContextRef,
        arrayType: JSTypedArrayType,
        buffer: JSObjectRef,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract           Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object with the given offset and length.\n@param ctx          The execution context to use.\n@param arrayType    A value identifying the type of array to create. If arrayType is kJSTypedArrayTypeNone or kJSTypedArrayTypeArrayBuffer then NULL will be returned.\n@param buffer       An Array Buffer object that should be used as the backing store for the created JavaScript Typed Array object.\n@param byteOffset   The byte offset for the created Typed Array. byteOffset should aligned with the element size of arrayType.\n@param length       The number of elements to include in the Typed Array.\n@param exception    A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result             A JSObjectRef that is a Typed Array or NULL if there was an error. The backing store of the Typed Array will be buffer."]
    pub fn JSObjectMakeTypedArrayWithArrayBufferAndOffset(
        ctx: JSContextRef,
        arrayType: JSTypedArrayType,
        buffer: JSObjectRef,
        byteOffset: usize,
        length: usize,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract           Returns a temporary pointer to the backing store of a JavaScript Typed Array object.\n@param ctx          The execution context to use.\n@param object       The Typed Array object whose backing store pointer to return.\n@param exception    A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result             A pointer to the raw data buffer that serves as object's backing store or NULL if object is not a Typed Array object.\n@discussion         The pointer returned by this function is temporary and is not guaranteed to remain valid across JavaScriptCore API calls."]
    pub fn JSObjectGetTypedArrayBytesPtr(
        ctx: JSContextRef,
        object: JSObjectRef,
        exception: *mut JSValueRef,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = "@function\n@abstract           Returns the length of a JavaScript Typed Array object.\n@param ctx          The execution context to use.\n@param object       The Typed Array object whose length to return.\n@param exception    A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result             The length of the Typed Array object or 0 if the object is not a Typed Array object."]
    pub fn JSObjectGetTypedArrayLength(
        ctx: JSContextRef,
        object: JSObjectRef,
        exception: *mut JSValueRef,
    ) -> usize;
}
extern "C" {
    #[doc = "@function\n@abstract           Returns the byte length of a JavaScript Typed Array object.\n@param ctx          The execution context to use.\n@param object       The Typed Array object whose byte length to return.\n@param exception    A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result             The byte length of the Typed Array object or 0 if the object is not a Typed Array object."]
    pub fn JSObjectGetTypedArrayByteLength(
        ctx: JSContextRef,
        object: JSObjectRef,
        exception: *mut JSValueRef,
    ) -> usize;
}
extern "C" {
    #[doc = "@function\n@abstract           Returns the byte offset of a JavaScript Typed Array object.\n@param ctx          The execution context to use.\n@param object       The Typed Array object whose byte offset to return.\n@param exception    A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result             The byte offset of the Typed Array object or 0 if the object is not a Typed Array object."]
    pub fn JSObjectGetTypedArrayByteOffset(
        ctx: JSContextRef,
        object: JSObjectRef,
        exception: *mut JSValueRef,
    ) -> usize;
}
extern "C" {
    #[doc = "@function\n@abstract           Returns the JavaScript Array Buffer object that is used as the backing of a JavaScript Typed Array object.\n@param ctx          The execution context to use.\n@param object       The JSObjectRef whose Typed Array type data pointer to obtain.\n@param exception    A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result             A JSObjectRef with a JSTypedArrayType of kJSTypedArrayTypeArrayBuffer or NULL if object is not a Typed Array."]
    pub fn JSObjectGetTypedArrayBuffer(
        ctx: JSContextRef,
        object: JSObjectRef,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract                 Creates a JavaScript Array Buffer object from an existing pointer.\n@param ctx                The execution context to use.\n@param bytes              A pointer to the byte buffer to be used as the backing store of the Typed Array object.\n@param byteLength         The number of bytes pointed to by the parameter bytes.\n@param bytesDeallocator   The allocator to use to deallocate the external buffer when the Typed Array data object is deallocated.\n@param deallocatorContext A pointer to pass back to the deallocator.\n@param exception          A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result                   A JSObjectRef Array Buffer whose backing store is the same as the one pointed to by bytes or NULL if there was an error.\n@discussion               If an exception is thrown during this function the bytesDeallocator will always be called."]
    pub fn JSObjectMakeArrayBufferWithBytesNoCopy(
        ctx: JSContextRef,
        bytes: *mut ::std::os::raw::c_void,
        byteLength: usize,
        bytesDeallocator: JSTypedArrayBytesDeallocator,
        deallocatorContext: *mut ::std::os::raw::c_void,
        exception: *mut JSValueRef,
    ) -> JSObjectRef;
}
extern "C" {
    #[doc = "@function\n@abstract         Returns a pointer to the data buffer that serves as the backing store for a JavaScript Typed Array object.\n@param object     The Array Buffer object whose internal backing store pointer to return.\n@param exception  A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result           A pointer to the raw data buffer that serves as object's backing store or NULL if object is not an Array Buffer object.\n@discussion       The pointer returned by this function is temporary and is not guaranteed to remain valid across JavaScriptCore API calls."]
    pub fn JSObjectGetArrayBufferBytesPtr(
        ctx: JSContextRef,
        object: JSObjectRef,
        exception: *mut JSValueRef,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = "@function\n@abstract         Returns the number of bytes in a JavaScript data object.\n@param ctx        The execution context to use.\n@param object     The JS Arary Buffer object whose length in bytes to return.\n@param exception  A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.\n@result           The number of bytes stored in the data object."]
    pub fn JSObjectGetArrayBufferByteLength(
        ctx: JSContextRef,
        object: JSObjectRef,
        exception: *mut JSValueRef,
    ) -> usize;
}
pub type ULChar16 = ::std::os::raw::c_ushort;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Config {
    _unused: [u8; 0],
}
pub type ULConfig = *mut C_Config;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Renderer {
    _unused: [u8; 0],
}
pub type ULRenderer = *mut C_Renderer;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Session {
    _unused: [u8; 0],
}
pub type ULSession = *mut C_Session;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_ViewConfig {
    _unused: [u8; 0],
}
pub type ULViewConfig = *mut C_ViewConfig;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_View {
    _unused: [u8; 0],
}
pub type ULView = *mut C_View;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Bitmap {
    _unused: [u8; 0],
}
pub type ULBitmap = *mut C_Bitmap;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_String {
    _unused: [u8; 0],
}
pub type ULString = *mut C_String;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Buffer {
    _unused: [u8; 0],
}
pub type ULBuffer = *mut C_Buffer;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_KeyEvent {
    _unused: [u8; 0],
}
pub type ULKeyEvent = *mut C_KeyEvent;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_MouseEvent {
    _unused: [u8; 0],
}
pub type ULMouseEvent = *mut C_MouseEvent;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_ScrollEvent {
    _unused: [u8; 0],
}
pub type ULScrollEvent = *mut C_ScrollEvent;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Surface {
    _unused: [u8; 0],
}
pub type ULSurface = *mut C_Surface;
pub type ULBitmapSurface = *mut C_Surface;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_FontFile {
    _unused: [u8; 0],
}
pub type ULFontFile = *mut C_FontFile;
pub const ULMessageSource_kMessageSource_XML: ULMessageSource = 0;
pub const ULMessageSource_kMessageSource_JS: ULMessageSource = 1;
pub const ULMessageSource_kMessageSource_Network: ULMessageSource = 2;
pub const ULMessageSource_kMessageSource_ConsoleAPI: ULMessageSource = 3;
pub const ULMessageSource_kMessageSource_Storage: ULMessageSource = 4;
pub const ULMessageSource_kMessageSource_AppCache: ULMessageSource = 5;
pub const ULMessageSource_kMessageSource_Rendering: ULMessageSource = 6;
pub const ULMessageSource_kMessageSource_CSS: ULMessageSource = 7;
pub const ULMessageSource_kMessageSource_Security: ULMessageSource = 8;
pub const ULMessageSource_kMessageSource_ContentBlocker: ULMessageSource = 9;
pub const ULMessageSource_kMessageSource_Other: ULMessageSource = 10;
pub type ULMessageSource = ::std::os::raw::c_uint;
pub const ULMessageLevel_kMessageLevel_Log: ULMessageLevel = 1;
pub const ULMessageLevel_kMessageLevel_Warning: ULMessageLevel = 2;
pub const ULMessageLevel_kMessageLevel_Error: ULMessageLevel = 3;
pub const ULMessageLevel_kMessageLevel_Debug: ULMessageLevel = 4;
pub const ULMessageLevel_kMessageLevel_Info: ULMessageLevel = 5;
pub type ULMessageLevel = ::std::os::raw::c_uint;
pub const ULCursor_kCursor_Pointer: ULCursor = 0;
pub const ULCursor_kCursor_Cross: ULCursor = 1;
pub const ULCursor_kCursor_Hand: ULCursor = 2;
pub const ULCursor_kCursor_IBeam: ULCursor = 3;
pub const ULCursor_kCursor_Wait: ULCursor = 4;
pub const ULCursor_kCursor_Help: ULCursor = 5;
pub const ULCursor_kCursor_EastResize: ULCursor = 6;
pub const ULCursor_kCursor_NorthResize: ULCursor = 7;
pub const ULCursor_kCursor_NorthEastResize: ULCursor = 8;
pub const ULCursor_kCursor_NorthWestResize: ULCursor = 9;
pub const ULCursor_kCursor_SouthResize: ULCursor = 10;
pub const ULCursor_kCursor_SouthEastResize: ULCursor = 11;
pub const ULCursor_kCursor_SouthWestResize: ULCursor = 12;
pub const ULCursor_kCursor_WestResize: ULCursor = 13;
pub const ULCursor_kCursor_NorthSouthResize: ULCursor = 14;
pub const ULCursor_kCursor_EastWestResize: ULCursor = 15;
pub const ULCursor_kCursor_NorthEastSouthWestResize: ULCursor = 16;
pub const ULCursor_kCursor_NorthWestSouthEastResize: ULCursor = 17;
pub const ULCursor_kCursor_ColumnResize: ULCursor = 18;
pub const ULCursor_kCursor_RowResize: ULCursor = 19;
pub const ULCursor_kCursor_MiddlePanning: ULCursor = 20;
pub const ULCursor_kCursor_EastPanning: ULCursor = 21;
pub const ULCursor_kCursor_NorthPanning: ULCursor = 22;
pub const ULCursor_kCursor_NorthEastPanning: ULCursor = 23;
pub const ULCursor_kCursor_NorthWestPanning: ULCursor = 24;
pub const ULCursor_kCursor_SouthPanning: ULCursor = 25;
pub const ULCursor_kCursor_SouthEastPanning: ULCursor = 26;
pub const ULCursor_kCursor_SouthWestPanning: ULCursor = 27;
pub const ULCursor_kCursor_WestPanning: ULCursor = 28;
pub const ULCursor_kCursor_Move: ULCursor = 29;
pub const ULCursor_kCursor_VerticalText: ULCursor = 30;
pub const ULCursor_kCursor_Cell: ULCursor = 31;
pub const ULCursor_kCursor_ContextMenu: ULCursor = 32;
pub const ULCursor_kCursor_Alias: ULCursor = 33;
pub const ULCursor_kCursor_Progress: ULCursor = 34;
pub const ULCursor_kCursor_NoDrop: ULCursor = 35;
pub const ULCursor_kCursor_Copy: ULCursor = 36;
pub const ULCursor_kCursor_None: ULCursor = 37;
pub const ULCursor_kCursor_NotAllowed: ULCursor = 38;
pub const ULCursor_kCursor_ZoomIn: ULCursor = 39;
pub const ULCursor_kCursor_ZoomOut: ULCursor = 40;
pub const ULCursor_kCursor_Grab: ULCursor = 41;
pub const ULCursor_kCursor_Grabbing: ULCursor = 42;
pub const ULCursor_kCursor_Custom: ULCursor = 43;
pub type ULCursor = ::std::os::raw::c_uint;
#[doc = "\n Alpha channel only, 8-bits per pixel.\n\n Encoding: 8-bits per channel, unsigned normalized.\n\n Color-space: Linear (no gamma), alpha-coverage only.\n"]
pub const ULBitmapFormat_kBitmapFormat_A8_UNORM: ULBitmapFormat = 0;
#[doc = "\n Blue Green Red Alpha channels, 32-bits per pixel.\n\n Encoding: 8-bits per channel, unsigned normalized.\n\n Color-space: sRGB gamma with premultiplied linear alpha channel.\n"]
pub const ULBitmapFormat_kBitmapFormat_BGRA8_UNORM_SRGB: ULBitmapFormat = 1;
pub type ULBitmapFormat = ::std::os::raw::c_uint;
#[doc = "\n Key-Down event type. (Does not trigger accelerator commands in WebCore)\n\n @NOTE: You should probably use RawKeyDown instead when a physical key\n        is pressed. This member is only here for historic compatibility\n        with WebCore's key event types.\n"]
pub const ULKeyEventType_kKeyEventType_KeyDown: ULKeyEventType = 0;
#[doc = "\n Key-Up event type. Use this when a physical key is released.\n"]
pub const ULKeyEventType_kKeyEventType_KeyUp: ULKeyEventType = 1;
#[doc = "\n Raw Key-Down type. Use this when a physical key is pressed.\n\n @NOTE: You should use RawKeyDown for physical key presses since it\n        allows WebCore to do additional command translation.\n"]
pub const ULKeyEventType_kKeyEventType_RawKeyDown: ULKeyEventType = 2;
#[doc = "\n Character input event type. Use this when the OS generates text from\n a physical key being pressed (eg, WM_CHAR on Windows).\n"]
pub const ULKeyEventType_kKeyEventType_Char: ULKeyEventType = 3;
pub type ULKeyEventType = ::std::os::raw::c_uint;
pub const ULMouseEventType_kMouseEventType_MouseMoved: ULMouseEventType = 0;
pub const ULMouseEventType_kMouseEventType_MouseDown: ULMouseEventType = 1;
pub const ULMouseEventType_kMouseEventType_MouseUp: ULMouseEventType = 2;
pub type ULMouseEventType = ::std::os::raw::c_uint;
pub const ULMouseButton_kMouseButton_None: ULMouseButton = 0;
pub const ULMouseButton_kMouseButton_Left: ULMouseButton = 1;
pub const ULMouseButton_kMouseButton_Middle: ULMouseButton = 2;
pub const ULMouseButton_kMouseButton_Right: ULMouseButton = 3;
pub type ULMouseButton = ::std::os::raw::c_uint;
pub const ULScrollEventType_kScrollEventType_ScrollByPixel: ULScrollEventType = 0;
pub const ULScrollEventType_kScrollEventType_ScrollByPage: ULScrollEventType = 1;
pub type ULScrollEventType = ::std::os::raw::c_uint;
pub const ULFaceWinding_kFaceWinding_Clockwise: ULFaceWinding = 0;
pub const ULFaceWinding_kFaceWinding_CounterClockwise: ULFaceWinding = 1;
pub type ULFaceWinding = ::std::os::raw::c_uint;
#[doc = "\n Lighter hinting algorithm-- glyphs are slightly fuzzier but better\n resemble their original shape. This is achieved by snapping glyphs to the\n pixel grid only vertically which better preserves inter-glyph spacing.\n"]
pub const ULFontHinting_kFontHinting_Smooth: ULFontHinting = 0;
#[doc = "\n Default hinting algorithm-- offers a good balance between sharpness and\n shape at smaller font sizes.\n"]
pub const ULFontHinting_kFontHinting_Normal: ULFontHinting = 1;
#[doc = "\n Strongest hinting algorithm-- outputs only black/white glyphs. The result\n is usually unpleasant if the underlying TTF does not contain hints for\n this type of rendering.\n"]
pub const ULFontHinting_kFontHinting_Monochrome: ULFontHinting = 2;
pub type ULFontHinting = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULRect {
    pub left: f32,
    pub top: f32,
    pub right: f32,
    pub bottom: f32,
}
#[test]
fn bindgen_test_layout_ULRect() {
    const UNINIT: ::std::mem::MaybeUninit<ULRect> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULRect>(),
        16usize,
        concat!("Size of: ", stringify!(ULRect))
    );
    assert_eq!(
        ::std::mem::align_of::<ULRect>(),
        4usize,
        concat!("Alignment of ", stringify!(ULRect))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRect),
            "::",
            stringify!(left)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRect),
            "::",
            stringify!(top)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRect),
            "::",
            stringify!(right)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRect),
            "::",
            stringify!(bottom)
        )
    );
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULIntRect {
    pub left: ::std::os::raw::c_int,
    pub top: ::std::os::raw::c_int,
    pub right: ::std::os::raw::c_int,
    pub bottom: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_ULIntRect() {
    const UNINIT: ::std::mem::MaybeUninit<ULIntRect> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULIntRect>(),
        16usize,
        concat!("Size of: ", stringify!(ULIntRect))
    );
    assert_eq!(
        ::std::mem::align_of::<ULIntRect>(),
        4usize,
        concat!("Alignment of ", stringify!(ULIntRect))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULIntRect),
            "::",
            stringify!(left)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ULIntRect),
            "::",
            stringify!(top)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULIntRect),
            "::",
            stringify!(right)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ULIntRect),
            "::",
            stringify!(bottom)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ULRenderTarget {
    pub is_empty: bool,
    pub width: ::std::os::raw::c_uint,
    pub height: ::std::os::raw::c_uint,
    pub texture_id: ::std::os::raw::c_uint,
    pub texture_width: ::std::os::raw::c_uint,
    pub texture_height: ::std::os::raw::c_uint,
    pub texture_format: ULBitmapFormat,
    pub uv_coords: ULRect,
    pub render_buffer_id: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_ULRenderTarget() {
    const UNINIT: ::std::mem::MaybeUninit<ULRenderTarget> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULRenderTarget>(),
        48usize,
        concat!("Size of: ", stringify!(ULRenderTarget))
    );
    assert_eq!(
        ::std::mem::align_of::<ULRenderTarget>(),
        4usize,
        concat!("Alignment of ", stringify!(ULRenderTarget))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).is_empty) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderTarget),
            "::",
            stringify!(is_empty)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderTarget),
            "::",
            stringify!(width)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderTarget),
            "::",
            stringify!(height)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).texture_id) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderTarget),
            "::",
            stringify!(texture_id)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).texture_width) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderTarget),
            "::",
            stringify!(texture_width)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).texture_height) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderTarget),
            "::",
            stringify!(texture_height)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).texture_format) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderTarget),
            "::",
            stringify!(texture_format)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).uv_coords) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderTarget),
            "::",
            stringify!(uv_coords)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).render_buffer_id) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderTarget),
            "::",
            stringify!(render_buffer_id)
        )
    );
}
impl Default for ULRenderTarget {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
extern "C" {
    #[doc = "\n Get the version string of the library in MAJOR.MINOR.PATCH format.\n"]
    pub fn ulVersionString() -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = "\n Get the numeric major version of the library.\n"]
    pub fn ulVersionMajor() -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get the numeric minor version of the library.\n"]
    pub fn ulVersionMinor() -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get the numeric patch version of the library.\n"]
    pub fn ulVersionPatch() -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Create empty bitmap.\n"]
    pub fn ulCreateEmptyBitmap() -> ULBitmap;
}
extern "C" {
    #[doc = "\n Create bitmap with certain dimensions and pixel format.\n"]
    pub fn ulCreateBitmap(
        width: ::std::os::raw::c_uint,
        height: ::std::os::raw::c_uint,
        format: ULBitmapFormat,
    ) -> ULBitmap;
}
extern "C" {
    #[doc = "\n Create bitmap from existing pixel buffer. @see Bitmap for help using this function.\n"]
    pub fn ulCreateBitmapFromPixels(
        width: ::std::os::raw::c_uint,
        height: ::std::os::raw::c_uint,
        format: ULBitmapFormat,
        row_bytes: ::std::os::raw::c_uint,
        pixels: *const ::std::os::raw::c_void,
        size: usize,
        should_copy: bool,
    ) -> ULBitmap;
}
extern "C" {
    #[doc = "\n Create bitmap from copy.\n"]
    pub fn ulCreateBitmapFromCopy(existing_bitmap: ULBitmap) -> ULBitmap;
}
extern "C" {
    #[doc = "\n Destroy a bitmap (you should only destroy Bitmaps you have explicitly created via one of the\n creation functions above.\n"]
    pub fn ulDestroyBitmap(bitmap: ULBitmap);
}
extern "C" {
    #[doc = "\n Get the width in pixels.\n"]
    pub fn ulBitmapGetWidth(bitmap: ULBitmap) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get the height in pixels.\n"]
    pub fn ulBitmapGetHeight(bitmap: ULBitmap) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get the pixel format.\n"]
    pub fn ulBitmapGetFormat(bitmap: ULBitmap) -> ULBitmapFormat;
}
extern "C" {
    #[doc = "\n Get the bytes per pixel.\n"]
    pub fn ulBitmapGetBpp(bitmap: ULBitmap) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get the number of bytes per row.\n"]
    pub fn ulBitmapGetRowBytes(bitmap: ULBitmap) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get the size in bytes of the underlying pixel buffer.\n"]
    pub fn ulBitmapGetSize(bitmap: ULBitmap) -> usize;
}
extern "C" {
    #[doc = "\n Whether or not this bitmap owns its own pixel buffer.\n"]
    pub fn ulBitmapOwnsPixels(bitmap: ULBitmap) -> bool;
}
extern "C" {
    #[doc = "\n Lock pixels for reading/writing, returns pointer to pixel buffer.\n"]
    pub fn ulBitmapLockPixels(bitmap: ULBitmap) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = "\n Unlock pixels after locking.\n"]
    pub fn ulBitmapUnlockPixels(bitmap: ULBitmap);
}
extern "C" {
    #[doc = "\n Get raw pixel buffer-- you should only call this if Bitmap is already locked.\n"]
    pub fn ulBitmapRawPixels(bitmap: ULBitmap) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = "\n Whether or not this bitmap is empty.\n"]
    pub fn ulBitmapIsEmpty(bitmap: ULBitmap) -> bool;
}
extern "C" {
    #[doc = "\n Reset bitmap pixels to 0.\n"]
    pub fn ulBitmapErase(bitmap: ULBitmap);
}
extern "C" {
    #[doc = "\n Write bitmap to a PNG on disk.\n"]
    pub fn ulBitmapWritePNG(bitmap: ULBitmap, path: *const ::std::os::raw::c_char) -> bool;
}
extern "C" {
    #[doc = "\n This converts a BGRA bitmap to RGBA bitmap and vice-versa by swapping the red and blue channels.\n"]
    pub fn ulBitmapSwapRedBlueChannels(bitmap: ULBitmap);
}
pub type ulDestroyBufferCallback = ::std::option::Option<
    unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, data: *mut ::std::os::raw::c_void),
>;
extern "C" {
    #[doc = "\n Create a Buffer from existing, user-owned data without any copies. An optional, user-supplied\n callback will be called to deallocate data upon destruction.\n\n @param  data                  A pointer to the data.\n\n @param  size                  Size of the data in bytes.\n\n @param  user_data             Optional user data that will be passed to destruction_callback\n                               when the returned Buffer is destroyed.\n\n @param  destruction_callback  Optional callback that will be called upon destruction. Pass a\n                               null pointer if you don't want to be informed of destruction.\n"]
    pub fn ulCreateBuffer(
        data: *mut ::std::os::raw::c_void,
        size: usize,
        user_data: *mut ::std::os::raw::c_void,
        destruction_callback: ulDestroyBufferCallback,
    ) -> ULBuffer;
}
extern "C" {
    #[doc = "\n Create a Buffer from existing data, a deep copy of data will be made.\n"]
    pub fn ulCreateBufferFromCopy(data: *const ::std::os::raw::c_void, size: usize) -> ULBuffer;
}
extern "C" {
    #[doc = "\n Destroy buffer (you should destroy any buffers you explicitly Create).\n"]
    pub fn ulDestroyBuffer(buffer: ULBuffer);
}
extern "C" {
    #[doc = "\n Get a pointer to the raw byte data.\n"]
    pub fn ulBufferGetData(buffer: ULBuffer) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = "\n Get the size in bytes.\n"]
    pub fn ulBufferGetSize(buffer: ULBuffer) -> usize;
}
extern "C" {
    #[doc = "\n Get the user data associated with this Buffer, if any.\n"]
    pub fn ulBufferGetUserData(buffer: ULBuffer) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = "\n Check whether this Buffer owns its own data (Buffer was created via ulCreateBufferFromCopy).\n If this is false, Buffer will call the user-supplied destruction callback to deallocate data\n when this Buffer instance is destroyed.\n"]
    pub fn ulBufferOwnsData(buffer: ULBuffer) -> bool;
}
#[doc = "\n The callback invoked when the library wants to clear the system's clipboard.\n"]
pub type ULClipboardClearCallback = ::std::option::Option<unsafe extern "C" fn()>;
#[doc = "\n The callback invoked when the library wants to read from the system's clipboard.\n\n You should store the result (if any) in 'result'.\n"]
pub type ULClipboardReadPlainTextCallback =
    ::std::option::Option<unsafe extern "C" fn(result: ULString)>;
#[doc = "\n The callback invoked when the library wants to write to the system's clipboard.\n"]
pub type ULClipboardWritePlainTextCallback =
    ::std::option::Option<unsafe extern "C" fn(text: ULString)>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULClipboard {
    pub clear: ULClipboardClearCallback,
    pub read_plain_text: ULClipboardReadPlainTextCallback,
    pub write_plain_text: ULClipboardWritePlainTextCallback,
}
#[test]
fn bindgen_test_layout_ULClipboard() {
    const UNINIT: ::std::mem::MaybeUninit<ULClipboard> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULClipboard>(),
        24usize,
        concat!("Size of: ", stringify!(ULClipboard))
    );
    assert_eq!(
        ::std::mem::align_of::<ULClipboard>(),
        8usize,
        concat!("Alignment of ", stringify!(ULClipboard))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).clear) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULClipboard),
            "::",
            stringify!(clear)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).read_plain_text) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULClipboard),
            "::",
            stringify!(read_plain_text)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).write_plain_text) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ULClipboard),
            "::",
            stringify!(write_plain_text)
        )
    );
}
extern "C" {
    #[doc = "\n Create config with default values (see <Ultralight/platform/Config.h>).\n"]
    pub fn ulCreateConfig() -> ULConfig;
}
extern "C" {
    #[doc = "\n Destroy config.\n"]
    pub fn ulDestroyConfig(config: ULConfig);
}
extern "C" {
    #[doc = "\n Set the file path to a writable directory that will be used to store cookies, cached resources, and other persistent data.\n\n Files are only written to disk when using a persistent Session.\n"]
    pub fn ulConfigSetCachePath(config: ULConfig, cache_path: ULString);
}
extern "C" {
    #[doc = "\n The library loads bundled resources (eg, cacert.pem and other localized resources) from the\n FileSystem API (eg, `file:///resources/cacert.pem`). You can customize the prefix to use when\n loading resource URLs by modifying this setting. (Default = \"resources/\")\n"]
    pub fn ulConfigSetResourcePathPrefix(config: ULConfig, resource_path_prefix: ULString);
}
extern "C" {
    #[doc = "\n The winding order for front-facing triangles. (Default = kFaceWinding_CounterClockwise)\n\n Note: This is only used with custom GPUDrivers\n"]
    pub fn ulConfigSetFaceWinding(config: ULConfig, winding: ULFaceWinding);
}
extern "C" {
    #[doc = "\n The hinting algorithm to use when rendering fonts. (Default = kFontHinting_Normal)\n @see ULFontHinting\n"]
    pub fn ulConfigSetFontHinting(config: ULConfig, font_hinting: ULFontHinting);
}
extern "C" {
    #[doc = "\n The gamma to use when compositing font glyphs, change this value to adjust contrast (Adobe and\n Apple prefer 1.8, others may prefer 2.2). (Default = 1.8)\n"]
    pub fn ulConfigSetFontGamma(config: ULConfig, font_gamma: f64);
}
extern "C" {
    #[doc = "\n Set user stylesheet (CSS) (Default = Empty).\n"]
    pub fn ulConfigSetUserStylesheet(config: ULConfig, css_string: ULString);
}
extern "C" {
    #[doc = "\n Set whether or not we should continuously repaint any Views or compositor layers, regardless if\n they are dirty or not. This is mainly used to diagnose painting/shader issues. (Default = False)\n"]
    pub fn ulConfigSetForceRepaint(config: ULConfig, enabled: bool);
}
extern "C" {
    #[doc = "\n Set the amount of time to wait before triggering another repaint when a CSS animation is active.\n (Default = 1.0 / 60.0)\n"]
    pub fn ulConfigSetAnimationTimerDelay(config: ULConfig, delay: f64);
}
extern "C" {
    #[doc = "\n When a smooth scroll animation is active, the amount of time (in seconds) to wait before\n triggering another repaint. Default is 60 Hz.\n"]
    pub fn ulConfigSetScrollTimerDelay(config: ULConfig, delay: f64);
}
extern "C" {
    #[doc = "\n The amount of time (in seconds) to wait before running the recycler (will attempt to return\n excess memory back to the system). (Default = 4.0)\n"]
    pub fn ulConfigSetRecycleDelay(config: ULConfig, delay: f64);
}
extern "C" {
    #[doc = "\n Set the size of WebCore's memory cache for decoded images, scripts, and other assets in bytes.\n (Default = 64 * 1024 * 1024)\n"]
    pub fn ulConfigSetMemoryCacheSize(config: ULConfig, size: ::std::os::raw::c_uint);
}
extern "C" {
    #[doc = "\n Set the number of pages to keep in the cache. (Default = 0)\n"]
    pub fn ulConfigSetPageCacheSize(config: ULConfig, size: ::std::os::raw::c_uint);
}
extern "C" {
    #[doc = "\n JavaScriptCore tries to detect the system's physical RAM size to set reasonable allocation\n limits. Set this to anything other than 0 to override the detected value. Size is in bytes.\n\n This can be used to force JavaScriptCore to be more conservative with its allocation strategy\n (at the cost of some performance).\n"]
    pub fn ulConfigSetOverrideRAMSize(config: ULConfig, size: ::std::os::raw::c_uint);
}
extern "C" {
    #[doc = "\n The minimum size of large VM heaps in JavaScriptCore. Set this to a lower value to make these\n heaps start with a smaller initial value.\n"]
    pub fn ulConfigSetMinLargeHeapSize(config: ULConfig, size: ::std::os::raw::c_uint);
}
extern "C" {
    #[doc = "\n The minimum size of small VM heaps in JavaScriptCore. Set this to a lower value to make these\n heaps start with a smaller initial value.\n"]
    pub fn ulConfigSetMinSmallHeapSize(config: ULConfig, size: ::std::os::raw::c_uint);
}
extern "C" {
    #[doc = "\n The number of threads to use in the Renderer (for parallel painting on the CPU, etc.).\n\n You can set this to a certain number to limit the number of threads to spawn.\n\n @note  If this value is 0 (the default), the number of threads will be determined at runtime\n        using the following formula:\n\n        max(PhysicalProcessorCount() - 1, 1)\n"]
    pub fn ulConfigSetNumRendererThreads(
        config: ULConfig,
        num_renderer_threads: ::std::os::raw::c_uint,
    );
}
extern "C" {
    #[doc = "\n The max amount of time (in seconds) to allow Renderer::Update to run per call. The library will\n attempt to throttle timers and/or reschedule work if this time budget is exceeded. (Default =\n 0.01)\n"]
    pub fn ulConfigSetMaxUpdateTime(config: ULConfig, max_update_time: f64);
}
extern "C" {
    #[doc = "\n The alignment (in bytes) of the BitmapSurface when using the CPU renderer.\n\n The underlying bitmap associated with each BitmapSurface will have row_bytes padded to reach\n this alignment.\n\n Aligning the bitmap helps improve performance when using the CPU renderer. Determining the\n proper value to use depends on the CPU architecture and max SIMD instruction set used.\n\n We generally target the 128-bit SSE2 instruction set across most PC platforms so '16' is a safe\n value to use.\n\n You can set this to '0' to perform no padding (row_bytes will always be width * 4) at a slight\n cost to performance.\n\n (Default = 16)\n"]
    pub fn ulConfigSetBitmapAlignment(config: ULConfig, bitmap_alignment: f64);
}
#[doc = "\n The callback invoked when the FileSystem wants to check if a file path exists, return true if it\n exists.\n"]
pub type ULFileSystemFileExistsCallback =
    ::std::option::Option<unsafe extern "C" fn(path: ULString) -> bool>;
#[doc = "\n Get the mime-type of the file (eg \"text/html\").\n\n This is usually determined by analyzing the file extension.\n\n If a mime-type cannot be determined, you should return \"application/unknown\" for this value.\n\n The library will consume the result and call ulDestroyString() after this call returns.\n"]
pub type ULFileSystemGetFileMimeTypeCallback =
    ::std::option::Option<unsafe extern "C" fn(path: ULString) -> ULString>;
#[doc = "\n Get the charset / encoding of the file (eg \"utf-8\").\n\n This is only important for text-based files and is usually determined by analyzing the\n contents of the file.\n\n If a charset cannot be determined, it's usually safe to return \"utf-8\" for this value.\n\n The library will consume the result and call ulDestroyString() after this call returns.\n"]
pub type ULFileSystemGetFileCharsetCallback =
    ::std::option::Option<unsafe extern "C" fn(path: ULString) -> ULString>;
#[doc = "\n Open file for reading and map it to a Buffer.\n\n To minimize copies, you should map the requested file into memory and use ulCreateBuffer()\n to wrap the data pointer (unmapping should be performed in the destruction callback).\n\n If the file was unable to be opened, you should return NULL for this value.\n"]
pub type ULFileSystemOpenFileCallback =
    ::std::option::Option<unsafe extern "C" fn(path: ULString) -> ULBuffer>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULFileSystem {
    pub file_exists: ULFileSystemFileExistsCallback,
    pub get_file_mime_type: ULFileSystemGetFileMimeTypeCallback,
    pub get_file_charset: ULFileSystemGetFileCharsetCallback,
    pub open_file: ULFileSystemOpenFileCallback,
}
#[test]
fn bindgen_test_layout_ULFileSystem() {
    const UNINIT: ::std::mem::MaybeUninit<ULFileSystem> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULFileSystem>(),
        32usize,
        concat!("Size of: ", stringify!(ULFileSystem))
    );
    assert_eq!(
        ::std::mem::align_of::<ULFileSystem>(),
        8usize,
        concat!("Alignment of ", stringify!(ULFileSystem))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).file_exists) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULFileSystem),
            "::",
            stringify!(file_exists)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).get_file_mime_type) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULFileSystem),
            "::",
            stringify!(get_file_mime_type)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).get_file_charset) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ULFileSystem),
            "::",
            stringify!(get_file_charset)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).open_file) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ULFileSystem),
            "::",
            stringify!(open_file)
        )
    );
}
extern "C" {
    #[doc = "\n Create string from null-terminated ASCII C-string.\n"]
    pub fn ulCreateString(str_: *const ::std::os::raw::c_char) -> ULString;
}
extern "C" {
    #[doc = "\n Create string from UTF-8 buffer.\n"]
    pub fn ulCreateStringUTF8(str_: *const ::std::os::raw::c_char, len: usize) -> ULString;
}
extern "C" {
    #[doc = "\n Create string from UTF-16 buffer.\n"]
    pub fn ulCreateStringUTF16(str_: *mut ULChar16, len: usize) -> ULString;
}
extern "C" {
    #[doc = "\n Create string from copy of existing string.\n"]
    pub fn ulCreateStringFromCopy(str_: ULString) -> ULString;
}
extern "C" {
    #[doc = "\n Destroy string (you should destroy any strings you explicitly Create).\n"]
    pub fn ulDestroyString(str_: ULString);
}
extern "C" {
    #[doc = "\n Get native UTF-8 buffer data (always null-terminated).\n"]
    pub fn ulStringGetData(str_: ULString) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    #[doc = "\n Get length (in bytes) of the UTF-8 buffer data, not including null terminator.\n"]
    pub fn ulStringGetLength(str_: ULString) -> usize;
}
extern "C" {
    #[doc = "\n Whether this string is empty or not.\n"]
    pub fn ulStringIsEmpty(str_: ULString) -> bool;
}
extern "C" {
    #[doc = "\n Replaces the contents of 'str' with the contents of 'new_str'\n"]
    pub fn ulStringAssignString(str_: ULString, new_str: ULString);
}
extern "C" {
    #[doc = "\n Replaces the contents of 'str' with the contents of a C-string.\n"]
    pub fn ulStringAssignCString(str_: ULString, c_str: *const ::std::os::raw::c_char);
}
extern "C" {
    #[doc = "\n Create a font file from an on-disk file path.\n\n @note  The file path should already exist.\n"]
    pub fn ulFontFileCreateFromFilePath(file_path: ULString) -> ULFontFile;
}
extern "C" {
    #[doc = "\n Create a font file from an in-memory buffer.\n"]
    pub fn ulFontFileCreateFromBuffer(buffer: ULBuffer) -> ULFontFile;
}
extern "C" {
    #[doc = "\n Destroy font file\n"]
    pub fn ulDestroyFontFile(font_file: ULFontFile);
}
#[doc = "\n Fallback font family name. Will be used if all other fonts fail to load.\n\n @note  This font should be guaranteed to exist (eg, ULFontLoader::load should not fail when\n        when passed this font family name).\n\n @note  The returned ULString instance will be consumed (ulDestroyString will be called on it).\n"]
pub type ULFontLoaderGetFallbackFont = ::std::option::Option<unsafe extern "C" fn() -> ULString>;
#[doc = "\n Fallback font family name that can render the specified characters. This is mainly used to\n support CJK (Chinese, Japanese, Korean) text display.\n\n @param  characters  One or more UTF-16 characters. This is almost always a single character.\n\n @param  weight      Font weight.\n\n @param  italic      Whether or not italic is requested.\n\n @return  Should return a font family name that can render the text. The returned ULString\n          instance will be consumed (ulDestroyString will be called on it).\n"]
pub type ULFontLoaderGetFallbackFontForCharacters = ::std::option::Option<
    unsafe extern "C" fn(
        characters: ULString,
        weight: ::std::os::raw::c_int,
        italic: bool,
    ) -> ULString,
>;
#[doc = "\n Get the actual font file data (TTF/OTF) for a given font description.\n\n @param  family  Font family name.\n\n @param  weight  Font weight.\n\n @param  italic  Whether or not italic is requested.\n\n @return  A font file matching the given description (either an on-disk font filepath or an\n          in-memory file buffer). You can return NULL here and the loader will fallback to\n          another font.\n"]
pub type ULFontLoaderLoad = ::std::option::Option<
    unsafe extern "C" fn(
        family: ULString,
        weight: ::std::os::raw::c_int,
        italic: bool,
    ) -> ULFontFile,
>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULFontLoader {
    pub get_fallback_font: ULFontLoaderGetFallbackFont,
    pub get_fallback_font_for_characters: ULFontLoaderGetFallbackFontForCharacters,
    pub load: ULFontLoaderLoad,
}
#[test]
fn bindgen_test_layout_ULFontLoader() {
    const UNINIT: ::std::mem::MaybeUninit<ULFontLoader> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULFontLoader>(),
        24usize,
        concat!("Size of: ", stringify!(ULFontLoader))
    );
    assert_eq!(
        ::std::mem::align_of::<ULFontLoader>(),
        8usize,
        concat!("Alignment of ", stringify!(ULFontLoader))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).get_fallback_font) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULFontLoader),
            "::",
            stringify!(get_fallback_font)
        )
    );
    assert_eq!(
        unsafe {
            ::std::ptr::addr_of!((*ptr).get_fallback_font_for_characters) as usize - ptr as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULFontLoader),
            "::",
            stringify!(get_fallback_font_for_characters)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).load) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ULFontLoader),
            "::",
            stringify!(load)
        )
    );
}
extern "C" {
    #[doc = "\n Whether or not a ULRect is empty (all members equal to 0)\n"]
    pub fn ulRectIsEmpty(rect: ULRect) -> bool;
}
extern "C" {
    #[doc = "\n Create an empty ULRect (all members equal to 0)\n"]
    pub fn ulRectMakeEmpty() -> ULRect;
}
extern "C" {
    #[doc = "\n Whether or not a ULIntRect is empty (all members equal to 0)\n"]
    pub fn ulIntRectIsEmpty(rect: ULIntRect) -> bool;
}
extern "C" {
    #[doc = "\n Create an empty ULIntRect (all members equal to 0)\n"]
    pub fn ulIntRectMakeEmpty() -> ULIntRect;
}
#[doc = "\n Render buffer description.\n"]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULRenderBuffer {
    pub texture_id: ::std::os::raw::c_uint,
    pub width: ::std::os::raw::c_uint,
    pub height: ::std::os::raw::c_uint,
    pub has_stencil_buffer: bool,
    pub has_depth_buffer: bool,
}
#[test]
fn bindgen_test_layout_ULRenderBuffer() {
    const UNINIT: ::std::mem::MaybeUninit<ULRenderBuffer> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULRenderBuffer>(),
        16usize,
        concat!("Size of: ", stringify!(ULRenderBuffer))
    );
    assert_eq!(
        ::std::mem::align_of::<ULRenderBuffer>(),
        4usize,
        concat!("Alignment of ", stringify!(ULRenderBuffer))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).texture_id) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderBuffer),
            "::",
            stringify!(texture_id)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderBuffer),
            "::",
            stringify!(width)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderBuffer),
            "::",
            stringify!(height)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).has_stencil_buffer) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderBuffer),
            "::",
            stringify!(has_stencil_buffer)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).has_depth_buffer) as usize - ptr as usize },
        13usize,
        concat!(
            "Offset of field: ",
            stringify!(ULRenderBuffer),
            "::",
            stringify!(has_depth_buffer)
        )
    );
}
#[doc = "\n Vertex layout for path vertices.\n\n (this struct's members aligned on single-byte boundaries)\n"]
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULVertex_2f_4ub_2f {
    pub pos: [f32; 2usize],
    pub color: [::std::os::raw::c_uchar; 4usize],
    pub obj: [f32; 2usize],
}
#[test]
fn bindgen_test_layout_ULVertex_2f_4ub_2f() {
    const UNINIT: ::std::mem::MaybeUninit<ULVertex_2f_4ub_2f> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULVertex_2f_4ub_2f>(),
        20usize,
        concat!("Size of: ", stringify!(ULVertex_2f_4ub_2f))
    );
    assert_eq!(
        ::std::mem::align_of::<ULVertex_2f_4ub_2f>(),
        1usize,
        concat!("Alignment of ", stringify!(ULVertex_2f_4ub_2f))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f),
            "::",
            stringify!(pos)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).color) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f),
            "::",
            stringify!(color)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).obj) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f),
            "::",
            stringify!(obj)
        )
    );
}
#[doc = "\n Vertex layout for quad vertices.\n\n (this struct's members aligned on single-byte boundaries)\n"]
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULVertex_2f_4ub_2f_2f_28f {
    pub pos: [f32; 2usize],
    pub color: [::std::os::raw::c_uchar; 4usize],
    pub tex: [f32; 2usize],
    pub obj: [f32; 2usize],
    pub data0: [f32; 4usize],
    pub data1: [f32; 4usize],
    pub data2: [f32; 4usize],
    pub data3: [f32; 4usize],
    pub data4: [f32; 4usize],
    pub data5: [f32; 4usize],
    pub data6: [f32; 4usize],
}
#[test]
fn bindgen_test_layout_ULVertex_2f_4ub_2f_2f_28f() {
    const UNINIT: ::std::mem::MaybeUninit<ULVertex_2f_4ub_2f_2f_28f> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULVertex_2f_4ub_2f_2f_28f>(),
        140usize,
        concat!("Size of: ", stringify!(ULVertex_2f_4ub_2f_2f_28f))
    );
    assert_eq!(
        ::std::mem::align_of::<ULVertex_2f_4ub_2f_2f_28f>(),
        1usize,
        concat!("Alignment of ", stringify!(ULVertex_2f_4ub_2f_2f_28f))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f_2f_28f),
            "::",
            stringify!(pos)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).color) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f_2f_28f),
            "::",
            stringify!(color)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).tex) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f_2f_28f),
            "::",
            stringify!(tex)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).obj) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f_2f_28f),
            "::",
            stringify!(obj)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).data0) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f_2f_28f),
            "::",
            stringify!(data0)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).data1) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f_2f_28f),
            "::",
            stringify!(data1)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).data2) as usize - ptr as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f_2f_28f),
            "::",
            stringify!(data2)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).data3) as usize - ptr as usize },
        76usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f_2f_28f),
            "::",
            stringify!(data3)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).data4) as usize - ptr as usize },
        92usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f_2f_28f),
            "::",
            stringify!(data4)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).data5) as usize - ptr as usize },
        108usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f_2f_28f),
            "::",
            stringify!(data5)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).data6) as usize - ptr as usize },
        124usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertex_2f_4ub_2f_2f_28f),
            "::",
            stringify!(data6)
        )
    );
}
pub const ULVertexBufferFormat_kVertexBufferFormat_2f_4ub_2f: ULVertexBufferFormat = 0;
pub const ULVertexBufferFormat_kVertexBufferFormat_2f_4ub_2f_2f_28f: ULVertexBufferFormat = 1;
#[doc = "\n Vertex formats.\n"]
pub type ULVertexBufferFormat = ::std::os::raw::c_uint;
#[doc = "\n Vertex buffer data.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ULVertexBuffer {
    pub format: ULVertexBufferFormat,
    pub size: ::std::os::raw::c_uint,
    pub data: *mut ::std::os::raw::c_uchar,
}
#[test]
fn bindgen_test_layout_ULVertexBuffer() {
    const UNINIT: ::std::mem::MaybeUninit<ULVertexBuffer> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULVertexBuffer>(),
        16usize,
        concat!("Size of: ", stringify!(ULVertexBuffer))
    );
    assert_eq!(
        ::std::mem::align_of::<ULVertexBuffer>(),
        8usize,
        concat!("Alignment of ", stringify!(ULVertexBuffer))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertexBuffer),
            "::",
            stringify!(format)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertexBuffer),
            "::",
            stringify!(size)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULVertexBuffer),
            "::",
            stringify!(data)
        )
    );
}
impl Default for ULVertexBuffer {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = "\n Vertex index type.\n"]
pub type ULIndexType = ::std::os::raw::c_uint;
#[doc = "\n Vertex index buffer data.\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ULIndexBuffer {
    pub size: ::std::os::raw::c_uint,
    pub data: *mut ::std::os::raw::c_uchar,
}
#[test]
fn bindgen_test_layout_ULIndexBuffer() {
    const UNINIT: ::std::mem::MaybeUninit<ULIndexBuffer> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULIndexBuffer>(),
        16usize,
        concat!("Size of: ", stringify!(ULIndexBuffer))
    );
    assert_eq!(
        ::std::mem::align_of::<ULIndexBuffer>(),
        8usize,
        concat!("Alignment of ", stringify!(ULIndexBuffer))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULIndexBuffer),
            "::",
            stringify!(size)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULIndexBuffer),
            "::",
            stringify!(data)
        )
    );
}
impl Default for ULIndexBuffer {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub const ULShaderType_kShaderType_Fill: ULShaderType = 0;
pub const ULShaderType_kShaderType_FillPath: ULShaderType = 1;
#[doc = "\n Shader types, used with ULGPUState::shader_type\n\n Each of these correspond to a vertex/pixel shader pair. You can find stock shader code for these\n in the `shaders` folder of the AppCore repo.\n"]
pub type ULShaderType = ::std::os::raw::c_uint;
#[doc = "\n Raw 4x4 matrix as an array of floats\n"]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULMatrix4x4 {
    pub data: [f32; 16usize],
}
#[test]
fn bindgen_test_layout_ULMatrix4x4() {
    const UNINIT: ::std::mem::MaybeUninit<ULMatrix4x4> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULMatrix4x4>(),
        64usize,
        concat!("Size of: ", stringify!(ULMatrix4x4))
    );
    assert_eq!(
        ::std::mem::align_of::<ULMatrix4x4>(),
        4usize,
        concat!("Alignment of ", stringify!(ULMatrix4x4))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULMatrix4x4),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "\n 4-component float vector\n"]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULvec4 {
    pub value: [f32; 4usize],
}
#[test]
fn bindgen_test_layout_ULvec4() {
    const UNINIT: ::std::mem::MaybeUninit<ULvec4> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULvec4>(),
        16usize,
        concat!("Size of: ", stringify!(ULvec4))
    );
    assert_eq!(
        ::std::mem::align_of::<ULvec4>(),
        4usize,
        concat!("Alignment of ", stringify!(ULvec4))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULvec4),
            "::",
            stringify!(value)
        )
    );
}
#[doc = "\n GPU State description.\n"]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULGPUState {
    #[doc = " Viewport width in pixels"]
    pub viewport_width: ::std::os::raw::c_uint,
    #[doc = " Viewport height in pixels"]
    pub viewport_height: ::std::os::raw::c_uint,
    #[doc = " Transform matrix-- you should multiply this with the screen-space orthographic projection\n matrix then pass to the vertex shader."]
    pub transform: ULMatrix4x4,
    #[doc = " Whether or not we should enable texturing for the current draw command."]
    pub enable_texturing: bool,
    #[doc = " Whether or not we should enable blending for the current draw command. If blending is\n disabled, any drawn pixels should overwrite existing. Mainly used so we can modify alpha\n values of the RenderBuffer during scissored clears."]
    pub enable_blend: bool,
    #[doc = " The vertex/pixel shader program pair to use for the current draw command. You should cast this\n to ShaderType to get the corresponding enum."]
    pub shader_type: ::std::os::raw::c_uchar,
    #[doc = " The render buffer to use for the current draw command."]
    pub render_buffer_id: ::std::os::raw::c_uint,
    #[doc = " The texture id to bind to slot #1. (Will be 0 if none)"]
    pub texture_1_id: ::std::os::raw::c_uint,
    #[doc = " The texture id to bind to slot #2. (Will be 0 if none)"]
    pub texture_2_id: ::std::os::raw::c_uint,
    #[doc = " The texture id to bind to slot #3. (Will be 0 if none)"]
    pub texture_3_id: ::std::os::raw::c_uint,
    #[doc = " The following four members are passed to the pixel shader via uniforms."]
    pub uniform_scalar: [f32; 8usize],
    pub uniform_vector: [ULvec4; 8usize],
    pub clip_size: ::std::os::raw::c_uchar,
    pub clip: [ULMatrix4x4; 8usize],
    #[doc = " Whether or not scissor testing should be used for the current draw\n command."]
    pub enable_scissor: bool,
    #[doc = " The scissor rect to use for scissor testing (units in pixels)"]
    pub scissor_rect: ULIntRect,
}
#[test]
fn bindgen_test_layout_ULGPUState() {
    const UNINIT: ::std::mem::MaybeUninit<ULGPUState> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULGPUState>(),
        788usize,
        concat!("Size of: ", stringify!(ULGPUState))
    );
    assert_eq!(
        ::std::mem::align_of::<ULGPUState>(),
        4usize,
        concat!("Alignment of ", stringify!(ULGPUState))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).viewport_width) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(viewport_width)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).viewport_height) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(viewport_height)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).transform) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(transform)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).enable_texturing) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(enable_texturing)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).enable_blend) as usize - ptr as usize },
        73usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(enable_blend)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).shader_type) as usize - ptr as usize },
        74usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(shader_type)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).render_buffer_id) as usize - ptr as usize },
        76usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(render_buffer_id)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).texture_1_id) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(texture_1_id)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).texture_2_id) as usize - ptr as usize },
        84usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(texture_2_id)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).texture_3_id) as usize - ptr as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(texture_3_id)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).uniform_scalar) as usize - ptr as usize },
        92usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(uniform_scalar)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).uniform_vector) as usize - ptr as usize },
        124usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(uniform_vector)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).clip_size) as usize - ptr as usize },
        252usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(clip_size)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize },
        256usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(clip)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).enable_scissor) as usize - ptr as usize },
        768usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(enable_scissor)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).scissor_rect) as usize - ptr as usize },
        772usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUState),
            "::",
            stringify!(scissor_rect)
        )
    );
}
pub const ULCommandType_kCommandType_ClearRenderBuffer: ULCommandType = 0;
pub const ULCommandType_kCommandType_DrawGeometry: ULCommandType = 1;
#[doc = "\n Command types, used with ULCommand::command_type\n"]
pub type ULCommandType = ::std::os::raw::c_uint;
#[doc = "\n Command description.\n"]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULCommand {
    pub command_type: ::std::os::raw::c_uchar,
    pub gpu_state: ULGPUState,
    #[doc = " The following members are only used with kCommandType_DrawGeometry"]
    pub geometry_id: ::std::os::raw::c_uint,
    pub indices_count: ::std::os::raw::c_uint,
    pub indices_offset: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_ULCommand() {
    const UNINIT: ::std::mem::MaybeUninit<ULCommand> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULCommand>(),
        804usize,
        concat!("Size of: ", stringify!(ULCommand))
    );
    assert_eq!(
        ::std::mem::align_of::<ULCommand>(),
        4usize,
        concat!("Alignment of ", stringify!(ULCommand))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).command_type) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULCommand),
            "::",
            stringify!(command_type)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).gpu_state) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ULCommand),
            "::",
            stringify!(gpu_state)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).geometry_id) as usize - ptr as usize },
        792usize,
        concat!(
            "Offset of field: ",
            stringify!(ULCommand),
            "::",
            stringify!(geometry_id)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).indices_count) as usize - ptr as usize },
        796usize,
        concat!(
            "Offset of field: ",
            stringify!(ULCommand),
            "::",
            stringify!(indices_count)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).indices_offset) as usize - ptr as usize },
        800usize,
        concat!(
            "Offset of field: ",
            stringify!(ULCommand),
            "::",
            stringify!(indices_offset)
        )
    );
}
#[doc = "\n Command list, @see ULGPUDriverUpdateCommandList"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ULCommandList {
    pub size: ::std::os::raw::c_uint,
    pub commands: *mut ULCommand,
}
#[test]
fn bindgen_test_layout_ULCommandList() {
    const UNINIT: ::std::mem::MaybeUninit<ULCommandList> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULCommandList>(),
        16usize,
        concat!("Size of: ", stringify!(ULCommandList))
    );
    assert_eq!(
        ::std::mem::align_of::<ULCommandList>(),
        8usize,
        concat!("Alignment of ", stringify!(ULCommandList))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULCommandList),
            "::",
            stringify!(size)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).commands) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULCommandList),
            "::",
            stringify!(commands)
        )
    );
}
impl Default for ULCommandList {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = "\n The callback invoked when the GPUDriver will begin dispatching commands (such as CreateTexture\n and UpdateCommandList) during the current call to ulRender().\n"]
pub type ULGPUDriverBeginSynchronizeCallback = ::std::option::Option<unsafe extern "C" fn()>;
#[doc = "\n The callback invoked when the GPUDriver has finished dispatching commands during the current\n call to ulRender().\n"]
pub type ULGPUDriverEndSynchronizeCallback = ::std::option::Option<unsafe extern "C" fn()>;
#[doc = "\n The callback invoked when the GPUDriver wants to get the next available texture ID.\n"]
pub type ULGPUDriverNextTextureIdCallback =
    ::std::option::Option<unsafe extern "C" fn() -> ::std::os::raw::c_uint>;
#[doc = "\n The callback invoked when the GPUDriver wants to create a texture with a\n certain ID and optional bitmap.\n\n @note: If the Bitmap is empty (ulBitmapIsEmpty), then a RTT Texture should be created\n        instead. This will be used as a backing texture for a new RenderBuffer.\n"]
pub type ULGPUDriverCreateTextureCallback = ::std::option::Option<
    unsafe extern "C" fn(texture_id: ::std::os::raw::c_uint, bitmap: ULBitmap),
>;
#[doc = "\n The callback invoked when the GPUDriver wants to update an existing non-RTT texture with new\n bitmap data.\n"]
pub type ULGPUDriverUpdateTextureCallback = ::std::option::Option<
    unsafe extern "C" fn(texture_id: ::std::os::raw::c_uint, bitmap: ULBitmap),
>;
#[doc = "\n The callback invoked when the GPUDriver wants to destroy a texture.\n"]
pub type ULGPUDriverDestroyTextureCallback =
    ::std::option::Option<unsafe extern "C" fn(texture_id: ::std::os::raw::c_uint)>;
#[doc = "\n The callback invoked when the GPUDriver wants to generate the next available render buffer ID.\n"]
pub type ULGPUDriverNextRenderBufferIdCallback =
    ::std::option::Option<unsafe extern "C" fn() -> ::std::os::raw::c_uint>;
#[doc = "\n The callback invoked when the GPUDriver wants to create a render buffer with certain ID and\n buffer description.\n"]
pub type ULGPUDriverCreateRenderBufferCallback = ::std::option::Option<
    unsafe extern "C" fn(render_buffer_id: ::std::os::raw::c_uint, buffer: ULRenderBuffer),
>;
#[doc = "\n The callback invoked when the GPUDriver wants to destroy a render buffer\n"]
pub type ULGPUDriverDestroyRenderBufferCallback =
    ::std::option::Option<unsafe extern "C" fn(render_buffer_id: ::std::os::raw::c_uint)>;
#[doc = "\n The callback invoked when the GPUDriver wants to generate the next available geometry ID.\n"]
pub type ULGPUDriverNextGeometryIdCallback =
    ::std::option::Option<unsafe extern "C" fn() -> ::std::os::raw::c_uint>;
#[doc = "\n The callback invoked when the GPUDriver wants to create geometry with certain ID and\n vertex/index data.\n"]
pub type ULGPUDriverCreateGeometryCallback = ::std::option::Option<
    unsafe extern "C" fn(
        geometry_id: ::std::os::raw::c_uint,
        vertices: ULVertexBuffer,
        indices: ULIndexBuffer,
    ),
>;
#[doc = "\n The callback invoked when the GPUDriver wants to update existing geometry with new vertex/index\n data.\n"]
pub type ULGPUDriverUpdateGeometryCallback = ::std::option::Option<
    unsafe extern "C" fn(
        geometry_id: ::std::os::raw::c_uint,
        vertices: ULVertexBuffer,
        indices: ULIndexBuffer,
    ),
>;
#[doc = "\n The callback invoked when the GPUDriver wants to destroy geometry.\n"]
pub type ULGPUDriverDestroyGeometryCallback =
    ::std::option::Option<unsafe extern "C" fn(geometry_id: ::std::os::raw::c_uint)>;
#[doc = "\n The callback invoked when the GPUDriver wants to update the command list (you should copy the\n commands to your own structure).\n"]
pub type ULGPUDriverUpdateCommandListCallback =
    ::std::option::Option<unsafe extern "C" fn(list: ULCommandList)>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULGPUDriver {
    pub begin_synchronize: ULGPUDriverBeginSynchronizeCallback,
    pub end_synchronize: ULGPUDriverEndSynchronizeCallback,
    pub next_texture_id: ULGPUDriverNextTextureIdCallback,
    pub create_texture: ULGPUDriverCreateTextureCallback,
    pub update_texture: ULGPUDriverUpdateTextureCallback,
    pub destroy_texture: ULGPUDriverDestroyTextureCallback,
    pub next_render_buffer_id: ULGPUDriverNextRenderBufferIdCallback,
    pub create_render_buffer: ULGPUDriverCreateRenderBufferCallback,
    pub destroy_render_buffer: ULGPUDriverDestroyRenderBufferCallback,
    pub next_geometry_id: ULGPUDriverNextGeometryIdCallback,
    pub create_geometry: ULGPUDriverCreateGeometryCallback,
    pub update_geometry: ULGPUDriverUpdateGeometryCallback,
    pub destroy_geometry: ULGPUDriverDestroyGeometryCallback,
    pub update_command_list: ULGPUDriverUpdateCommandListCallback,
}
#[test]
fn bindgen_test_layout_ULGPUDriver() {
    const UNINIT: ::std::mem::MaybeUninit<ULGPUDriver> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULGPUDriver>(),
        112usize,
        concat!("Size of: ", stringify!(ULGPUDriver))
    );
    assert_eq!(
        ::std::mem::align_of::<ULGPUDriver>(),
        8usize,
        concat!("Alignment of ", stringify!(ULGPUDriver))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).begin_synchronize) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(begin_synchronize)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).end_synchronize) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(end_synchronize)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).next_texture_id) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(next_texture_id)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).create_texture) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(create_texture)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).update_texture) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(update_texture)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).destroy_texture) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(destroy_texture)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).next_render_buffer_id) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(next_render_buffer_id)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).create_render_buffer) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(create_render_buffer)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).destroy_render_buffer) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(destroy_render_buffer)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).next_geometry_id) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(next_geometry_id)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).create_geometry) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(create_geometry)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).update_geometry) as usize - ptr as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(update_geometry)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).destroy_geometry) as usize - ptr as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(destroy_geometry)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).update_command_list) as usize - ptr as usize },
        104usize,
        concat!(
            "Offset of field: ",
            stringify!(ULGPUDriver),
            "::",
            stringify!(update_command_list)
        )
    );
}
extern "C" {
    #[doc = "\n Sets up an orthographic projection matrix with a certain viewport width and height, multiplies\n it by 'transform', and returns the result.\n\n This should be used to calculate the model-view projection matrix for the vertex shaders using\n the current ULGPUState.\n\n The 'flip_y' can be optionally used to flip the Y coordinate-space. (Usually flip_y == true for\n OpenGL)\n"]
    pub fn ulApplyProjection(
        transform: ULMatrix4x4,
        viewport_width: f32,
        viewport_height: f32,
        flip_y: bool,
    ) -> ULMatrix4x4;
}
extern "C" {
    #[doc = "\n Create a key event, @see KeyEvent for help with the following parameters.\n"]
    pub fn ulCreateKeyEvent(
        type_: ULKeyEventType,
        modifiers: ::std::os::raw::c_uint,
        virtual_key_code: ::std::os::raw::c_int,
        native_key_code: ::std::os::raw::c_int,
        text: ULString,
        unmodified_text: ULString,
        is_keypad: bool,
        is_auto_repeat: bool,
        is_system_key: bool,
    ) -> ULKeyEvent;
}
extern "C" {
    #[doc = "\n Destroy a key event.\n"]
    pub fn ulDestroyKeyEvent(evt: ULKeyEvent);
}
pub const ULLogLevel_kLogLevel_Error: ULLogLevel = 0;
pub const ULLogLevel_kLogLevel_Warning: ULLogLevel = 1;
pub const ULLogLevel_kLogLevel_Info: ULLogLevel = 2;
#[doc = " Logger"]
pub type ULLogLevel = ::std::os::raw::c_uint;
#[doc = "\n The callback invoked when the library wants to print a message to the log.\n"]
pub type ULLoggerLogMessageCallback =
    ::std::option::Option<unsafe extern "C" fn(log_level: ULLogLevel, message: ULString)>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULLogger {
    pub log_message: ULLoggerLogMessageCallback,
}
#[test]
fn bindgen_test_layout_ULLogger() {
    const UNINIT: ::std::mem::MaybeUninit<ULLogger> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULLogger>(),
        8usize,
        concat!("Size of: ", stringify!(ULLogger))
    );
    assert_eq!(
        ::std::mem::align_of::<ULLogger>(),
        8usize,
        concat!("Alignment of ", stringify!(ULLogger))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).log_message) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULLogger),
            "::",
            stringify!(log_message)
        )
    );
}
extern "C" {
    #[doc = "\n Create a mouse event, @see MouseEvent for help using this function.\n"]
    pub fn ulCreateMouseEvent(
        type_: ULMouseEventType,
        x: ::std::os::raw::c_int,
        y: ::std::os::raw::c_int,
        button: ULMouseButton,
    ) -> ULMouseEvent;
}
extern "C" {
    #[doc = "\n Destroy a mouse event.\n"]
    pub fn ulDestroyMouseEvent(evt: ULMouseEvent);
}
extern "C" {
    #[doc = "\n Width (in pixels).\n"]
    pub fn ulSurfaceGetWidth(surface: ULSurface) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Height (in pixels).\n"]
    pub fn ulSurfaceGetHeight(surface: ULSurface) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Number of bytes between rows (usually width * 4)\n"]
    pub fn ulSurfaceGetRowBytes(surface: ULSurface) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Size in bytes.\n"]
    pub fn ulSurfaceGetSize(surface: ULSurface) -> usize;
}
extern "C" {
    #[doc = "\n Lock the pixel buffer and get a pointer to the beginning of the data for reading/writing.\n\n Native pixel format is premultiplied BGRA 32-bit (8 bits per channel).\n"]
    pub fn ulSurfaceLockPixels(surface: ULSurface) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = "\n Unlock the pixel buffer.\n"]
    pub fn ulSurfaceUnlockPixels(surface: ULSurface);
}
extern "C" {
    #[doc = "\n Resize the pixel buffer to a certain width and height (both in pixels).\n\n This should never be called while pixels are locked.\n"]
    pub fn ulSurfaceResize(
        surface: ULSurface,
        width: ::std::os::raw::c_uint,
        height: ::std::os::raw::c_uint,
    );
}
extern "C" {
    #[doc = "\n Set the dirty bounds to a certain value.\n\n This is called after the Renderer paints to an area of the pixel buffer. (The new value will be\n joined with the existing dirty_bounds())\n"]
    pub fn ulSurfaceSetDirtyBounds(surface: ULSurface, bounds: ULIntRect);
}
extern "C" {
    #[doc = "\n Get the dirty bounds.\n\n This value can be used to determine which portion of the pixel buffer has been updated since the\n last call to ulSurfaceClearDirtyBounds().\n\n The general algorithm to determine if a Surface needs display is:\n <pre>\n   if (!ulIntRectIsEmpty(ulSurfaceGetDirtyBounds(surface))) {\n       // Surface pixels are dirty and needs display.\n       // Cast Surface to native Surface and use it here (pseudo code)\n       DisplaySurface(surface);\n\n       // Once you're done, clear the dirty bounds:\n       ulSurfaceClearDirtyBounds(surface);\n  }\n  </pre>\n"]
    pub fn ulSurfaceGetDirtyBounds(surface: ULSurface) -> ULIntRect;
}
extern "C" {
    #[doc = "\n Clear the dirty bounds.\n\n You should call this after you're done displaying the Surface.\n"]
    pub fn ulSurfaceClearDirtyBounds(surface: ULSurface);
}
extern "C" {
    #[doc = "\n Get the underlying user data pointer (this is only valid if you have set a custom surface\n implementation via ulPlatformSetSurfaceDefinition).\n\n This will return nullptr if this surface is the default ULBitmapSurface.\n"]
    pub fn ulSurfaceGetUserData(surface: ULSurface) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = "\n Get the underlying Bitmap from the default Surface.\n\n @note  Do not call ulDestroyBitmap() on the returned value, it is owned by the surface.\n"]
    pub fn ulBitmapSurfaceGetBitmap(surface: ULBitmapSurface) -> ULBitmap;
}
#[doc = "\n The callback invoked when a Surface is created.\n\n @param  width  The width in pixels.\n @param  height  The height in pixels.\n\n @return  This callback should return a pointer to user-defined data for the instance. This user\n          data pointer will be passed to all other callbacks when operating on the instance.\n"]
pub type ULSurfaceDefinitionCreateCallback = ::std::option::Option<
    unsafe extern "C" fn(
        width: ::std::os::raw::c_uint,
        height: ::std::os::raw::c_uint,
    ) -> *mut ::std::os::raw::c_void,
>;
#[doc = "\n The callback invoked when a Surface is destroyed.\n\n @param  user_data  User data pointer uniquely identifying the surface.\n"]
pub type ULSurfaceDefinitionDestroyCallback =
    ::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void)>;
#[doc = "\n The callback invoked when a Surface's width (in pixels) is requested.\n\n @param  user_data  User data pointer uniquely identifying the surface.\n"]
pub type ULSurfaceDefinitionGetWidthCallback = ::std::option::Option<
    unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_uint,
>;
#[doc = "\n The callback invoked when a Surface's height (in pixels) is requested.\n\n @param  user_data  User data pointer uniquely identifying the surface.\n"]
pub type ULSurfaceDefinitionGetHeightCallback = ::std::option::Option<
    unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_uint,
>;
#[doc = "\n The callback invoked when a Surface's row bytes is requested.\n\n @note  This value is also known as \"stride\". Usually width * 4.\n\n @param  user_data  User data pointer uniquely identifying the surface.\n"]
pub type ULSurfaceDefinitionGetRowBytesCallback = ::std::option::Option<
    unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_uint,
>;
#[doc = "\n The callback invoked when a Surface's size (in bytes) is requested.\n\n @param  user_data  User data pointer uniquely identifying the surface.\n"]
pub type ULSurfaceDefinitionGetSizeCallback =
    ::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void) -> usize>;
#[doc = "\n The callback invoked when a Surface's pixel buffer is requested to be locked for reading/writing\n (should return a pointer to locked bytes).\n\n @param  user_data  User data pointer uniquely identifying the surface.\n"]
pub type ULSurfaceDefinitionLockPixelsCallback = ::std::option::Option<
    unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void,
>;
#[doc = "\n The callback invoked when a Surface's pixel buffer is requested to be unlocked after previously\n being locked.\n\n @param  user_data  User data pointer uniquely identifying the surface.\n"]
pub type ULSurfaceDefinitionUnlockPixelsCallback =
    ::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void)>;
#[doc = "\n The callback invoked when a Surface is requested to be resized to a certain width/height.\n\n @param  user_data  User data pointer uniquely identifying the surface.\n\n @param  width      Width in pixels.\n\n @param  height     Height in pixels.\n"]
pub type ULSurfaceDefinitionResizeCallback = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        width: ::std::os::raw::c_uint,
        height: ::std::os::raw::c_uint,
    ),
>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ULSurfaceDefinition {
    pub create: ULSurfaceDefinitionCreateCallback,
    pub destroy: ULSurfaceDefinitionDestroyCallback,
    pub get_width: ULSurfaceDefinitionGetWidthCallback,
    pub get_height: ULSurfaceDefinitionGetHeightCallback,
    pub get_row_bytes: ULSurfaceDefinitionGetRowBytesCallback,
    pub get_size: ULSurfaceDefinitionGetSizeCallback,
    pub lock_pixels: ULSurfaceDefinitionLockPixelsCallback,
    pub unlock_pixels: ULSurfaceDefinitionUnlockPixelsCallback,
    pub resize: ULSurfaceDefinitionResizeCallback,
}
#[test]
fn bindgen_test_layout_ULSurfaceDefinition() {
    const UNINIT: ::std::mem::MaybeUninit<ULSurfaceDefinition> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ULSurfaceDefinition>(),
        72usize,
        concat!("Size of: ", stringify!(ULSurfaceDefinition))
    );
    assert_eq!(
        ::std::mem::align_of::<ULSurfaceDefinition>(),
        8usize,
        concat!("Alignment of ", stringify!(ULSurfaceDefinition))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).create) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ULSurfaceDefinition),
            "::",
            stringify!(create)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).destroy) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ULSurfaceDefinition),
            "::",
            stringify!(destroy)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).get_width) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ULSurfaceDefinition),
            "::",
            stringify!(get_width)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).get_height) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ULSurfaceDefinition),
            "::",
            stringify!(get_height)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).get_row_bytes) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(ULSurfaceDefinition),
            "::",
            stringify!(get_row_bytes)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).get_size) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(ULSurfaceDefinition),
            "::",
            stringify!(get_size)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).lock_pixels) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(ULSurfaceDefinition),
            "::",
            stringify!(lock_pixels)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).unlock_pixels) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(ULSurfaceDefinition),
            "::",
            stringify!(unlock_pixels)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).resize) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(ULSurfaceDefinition),
            "::",
            stringify!(resize)
        )
    );
}
extern "C" {
    #[doc = "\n Set a custom Logger implementation.\n\n This is used to log debug messages to the console or to a log file.\n\n You should call this before ulCreateRenderer() or ulCreateApp().\n\n @note  ulCreateApp() will use the default logger if you never call this.\n\n @note  If you're not using ulCreateApp(), (eg, using ulCreateRenderer()) you can still use the\n        default logger by calling ulEnableDefaultLogger() (@see <AppCore/CAPI.h>)\n"]
    pub fn ulPlatformSetLogger(logger: ULLogger);
}
extern "C" {
    #[doc = "\n Set a custom FileSystem implementation.\n\n This is used for loading File URLs (eg, <file:///page.html>). If you don't call this, and are\n not using ulCreateApp() or ulEnablePlatformFileSystem(), you will not be able to load any File\n URLs.\n\n You should call this before ulCreateRenderer() or ulCreateApp().\n\n @note  ulCreateApp() will use the default platform file system if you never call this.\n\n @note  If you're not using ulCreateApp(), (eg, using ulCreateRenderer()) you can still use the\n        default platform file system by calling ulEnablePlatformFileSystem()'\n        (@see <AppCore/CAPI.h>)\n"]
    pub fn ulPlatformSetFileSystem(file_system: ULFileSystem);
}
extern "C" {
    #[doc = "\n Set a custom Surface implementation.\n\n This can be used to wrap a platform-specific GPU texture, Windows DIB, macOS CGImage, or any\n other pixel buffer target for display on screen.\n\n By default, the library uses a bitmap surface for all surfaces but you can override this by\n providing your own surface definition here.\n\n You should call this before ulCreateRenderer() or ulCreateApp().\n"]
    pub fn ulPlatformSetSurfaceDefinition(surface_definition: ULSurfaceDefinition);
}
extern "C" {
    #[doc = "\n Set a custom GPUDriver implementation.\n\n This should be used if you have enabled the GPU renderer in the Config and are using\n ulCreateRenderer() (which does not provide its own GPUDriver implementation).\n\n The GPUDriver interface is used by the library to dispatch GPU calls to your native GPU context\n (eg, D3D11, Metal, OpenGL, Vulkan, etc.) There are reference implementations for this interface\n in the AppCore repo.\n\n You should call this before ulCreateRenderer().\n"]
    pub fn ulPlatformSetGPUDriver(gpu_driver: ULGPUDriver);
}
extern "C" {
    #[doc = "\n Set a custom Clipboard implementation.\n\n This should be used if you are using ulCreateRenderer() (which does not provide its own\n clipboard implementation).\n\n The Clipboard interface is used by the library to make calls to the system's native clipboard\n (eg, cut, copy, paste).\n\n You should call this before ulCreateRenderer().\n"]
    pub fn ulPlatformSetClipboard(clipboard: ULClipboard);
}
extern "C" {
    #[doc = "\n Create the Ultralight Renderer directly.\n\n Unlike ulCreateApp(), this does not use any native windows for drawing and allows you to manage\n your own runloop and painting. This method is recommended for those wishing to integrate the\n library into a game.\n\n This singleton manages the lifetime of all Views and coordinates all painting, rendering,\n network requests, and event dispatch.\n\n You should only call this once per process lifetime.\n\n You shoud set up your platform handlers (eg, ulPlatformSetLogger, ulPlatformSetFileSystem, etc.)\n before calling this.\n\n You will also need to define a font loader before calling this-- as of this writing (v1.2) the\n only way to do this in C API is by calling ulEnablePlatformFontLoader() (available in\n <AppCore/CAPI.h>).\n\n @NOTE:  You should not call this if you are using ulCreateApp(), it creates its own renderer and\n         provides default implementations for various platform handlers automatically.\n"]
    pub fn ulCreateRenderer(config: ULConfig) -> ULRenderer;
}
extern "C" {
    #[doc = "\n Destroy the renderer.\n"]
    pub fn ulDestroyRenderer(renderer: ULRenderer);
}
extern "C" {
    #[doc = "\n Update timers and dispatch internal callbacks (JavaScript and network).\n"]
    pub fn ulUpdate(renderer: ULRenderer);
}
extern "C" {
    #[doc = "\n Render all active Views.\n"]
    pub fn ulRender(renderer: ULRenderer);
}
extern "C" {
    #[doc = "\n Attempt to release as much memory as possible. Don't call this from any callbacks or driver\n code.\n"]
    pub fn ulPurgeMemory(renderer: ULRenderer);
}
extern "C" {
    #[doc = "\n Print detailed memory usage statistics to the log. (@see ulPlatformSetLogger)\n"]
    pub fn ulLogMemoryUsage(renderer: ULRenderer);
}
extern "C" {
    #[doc = "\n Create a scroll event, @see ScrollEvent for help using this function.\n"]
    pub fn ulCreateScrollEvent(
        type_: ULScrollEventType,
        delta_x: ::std::os::raw::c_int,
        delta_y: ::std::os::raw::c_int,
    ) -> ULScrollEvent;
}
extern "C" {
    #[doc = "\n Destroy a scroll event.\n"]
    pub fn ulDestroyScrollEvent(evt: ULScrollEvent);
}
extern "C" {
    #[doc = "\n Create a Session to store local data in (such as cookies, local storage, application cache,\n indexed db, etc).\n"]
    pub fn ulCreateSession(renderer: ULRenderer, is_persistent: bool, name: ULString) -> ULSession;
}
extern "C" {
    #[doc = "\n Destroy a Session.\n"]
    pub fn ulDestroySession(session: ULSession);
}
extern "C" {
    #[doc = "\n Get the default session (persistent session named \"default\").\n\n @note  This session is owned by the Renderer, you shouldn't destroy it.\n"]
    pub fn ulDefaultSession(renderer: ULRenderer) -> ULSession;
}
extern "C" {
    #[doc = "\n Whether or not is persistent (backed to disk).\n"]
    pub fn ulSessionIsPersistent(session: ULSession) -> bool;
}
extern "C" {
    #[doc = "\n Unique name identifying the session (used for unique disk path).\n"]
    pub fn ulSessionGetName(session: ULSession) -> ULString;
}
extern "C" {
    #[doc = "\n Unique numeric Id for the session.\n"]
    pub fn ulSessionGetId(session: ULSession) -> ::std::os::raw::c_ulonglong;
}
extern "C" {
    #[doc = "\n The disk path to write to (used by persistent sessions only).\n"]
    pub fn ulSessionGetDiskPath(session: ULSession) -> ULString;
}
extern "C" {
    #[doc = "\n Create view configuration with default values (see <Ultralight/platform/View.h>).\n"]
    pub fn ulCreateViewConfig() -> ULViewConfig;
}
extern "C" {
    #[doc = "\n Destroy view configuration.\n"]
    pub fn ulDestroyViewConfig(config: ULViewConfig);
}
extern "C" {
    #[doc = "\n Whether to render using the GPU renderer (accelerated) or the CPU renderer (unaccelerated).\n\n This option is only valid if you're managing the Renderer yourself (eg, you've previously\n called ulCreateRenderer() instead of ulCreateApp()).\n\n When true, the View will be rendered to an offscreen GPU texture using the GPU driver set in\n ulPlatformSetGPUDriver(). You can fetch details for the texture via ulViewGetRenderTarget().\n\n When false (the default), the View will be rendered to an offscreen pixel buffer using the\n multithreaded CPU renderer. This pixel buffer can optionally be provided by the user--\n for more info see ulViewGetSurface().\n"]
    pub fn ulViewConfigSetIsAccelerated(config: ULViewConfig, is_accelerated: bool);
}
extern "C" {
    #[doc = "\n Set whether images should be enabled (Default = True).\n"]
    pub fn ulViewConfigSetIsTransparent(config: ULViewConfig, is_transparent: bool);
}
extern "C" {
    #[doc = "\n The initial device scale, ie. the amount to scale page units to screen pixels. This should be\n set to the scaling factor of the device that the View is displayed on. (Default = 1.0)\n\n @note 1.0 is equal to 100% zoom (no scaling), 2.0 is equal to 200% zoom (2x scaling)\n"]
    pub fn ulViewConfigSetInitialDeviceScale(config: ULViewConfig, initial_device_scale: f64);
}
extern "C" {
    #[doc = "\n Whether or not the View should initially have input focus. (Default = True)\n"]
    pub fn ulViewConfigSetInitialFocus(config: ULViewConfig, is_focused: bool);
}
extern "C" {
    #[doc = "\n Set whether images should be enabled (Default = True).\n"]
    pub fn ulViewConfigSetEnableImages(config: ULViewConfig, enabled: bool);
}
extern "C" {
    #[doc = "\n Set whether JavaScript should be enabled (Default = True).\n"]
    pub fn ulViewConfigSetEnableJavaScript(config: ULViewConfig, enabled: bool);
}
extern "C" {
    #[doc = "\n Set default font-family to use (Default = Times New Roman).\n"]
    pub fn ulViewConfigSetFontFamilyStandard(config: ULViewConfig, font_name: ULString);
}
extern "C" {
    #[doc = "\n Set default font-family to use for fixed fonts, eg <pre> and <code>\n (Default = Courier New).\n"]
    pub fn ulViewConfigSetFontFamilyFixed(config: ULViewConfig, font_name: ULString);
}
extern "C" {
    #[doc = "\n Set default font-family to use for serif fonts (Default = Times New Roman).\n"]
    pub fn ulViewConfigSetFontFamilySerif(config: ULViewConfig, font_name: ULString);
}
extern "C" {
    #[doc = "\n Set default font-family to use for sans-serif fonts (Default = Arial).\n"]
    pub fn ulViewConfigSetFontFamilySansSerif(config: ULViewConfig, font_name: ULString);
}
extern "C" {
    #[doc = "\n Set user agent string (See <Ultralight/platform/Config.h> for the default).\n"]
    pub fn ulViewConfigSetUserAgent(config: ULViewConfig, agent_string: ULString);
}
extern "C" {
    #[doc = "\n Create a View with certain size (in pixels).\n\n @note  You can pass null to 'session' to use the default session.\n"]
    pub fn ulCreateView(
        renderer: ULRenderer,
        width: ::std::os::raw::c_uint,
        height: ::std::os::raw::c_uint,
        view_config: ULViewConfig,
        session: ULSession,
    ) -> ULView;
}
extern "C" {
    #[doc = "\n Destroy a View.\n"]
    pub fn ulDestroyView(view: ULView);
}
extern "C" {
    #[doc = "\n Get current URL.\n\n @note Don't destroy the returned string, it is owned by the View.\n"]
    pub fn ulViewGetURL(view: ULView) -> ULString;
}
extern "C" {
    #[doc = "\n Get current title.\n\n @note Don't destroy the returned string, it is owned by the View.\n"]
    pub fn ulViewGetTitle(view: ULView) -> ULString;
}
extern "C" {
    #[doc = "\n Get the width, in pixels.\n"]
    pub fn ulViewGetWidth(view: ULView) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get the height, in pixels.\n"]
    pub fn ulViewGetHeight(view: ULView) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get the device scale, ie. the amount to scale page units to screen pixels.\n\n For example, a value of 1.0 is equivalent to 100% zoom. A value of 2.0 is 200% zoom.\n"]
    pub fn ulViewGetDeviceScale(view: ULView) -> f64;
}
extern "C" {
    #[doc = "\n Set the device scale.\n"]
    pub fn ulViewSetDeviceScale(view: ULView, scale: f64);
}
extern "C" {
    #[doc = "\n Whether or not the View is GPU-accelerated. If this is false, the page will be rendered\n via the CPU renderer.\n"]
    pub fn ulViewIsAccelerated(view: ULView) -> bool;
}
extern "C" {
    #[doc = "\n Whether or not the View supports transparent backgrounds.\n"]
    pub fn ulViewIsTransparent(view: ULView) -> bool;
}
extern "C" {
    #[doc = "\n Check if the main frame of the page is currrently loading.\n"]
    pub fn ulViewIsLoading(view: ULView) -> bool;
}
extern "C" {
    #[doc = "\n Get the RenderTarget for the View.\n\n @note  Only valid if this View is GPU accelerated.\n\n        You can use this with your GPUDriver implementation to bind and display the\n        corresponding texture in your application.\n"]
    pub fn ulViewGetRenderTarget(view: ULView) -> ULRenderTarget;
}
extern "C" {
    #[doc = "\n Get the Surface for the View (native pixel buffer that the CPU renderer draws into).\n\n @note  This operation is only valid if you're managing the Renderer yourself (eg, you've\n        previously called ulCreateRenderer() instead of ulCreateApp()).\n\n        This function will return NULL if this View is GPU accelerated.\n\n        The default Surface is BitmapSurface but you can provide your own Surface implementation\n        via ulPlatformSetSurfaceDefinition.\n\n        When using the default Surface, you can retrieve the underlying bitmap by casting\n        ULSurface to ULBitmapSurface and calling ulBitmapSurfaceGetBitmap().\n"]
    pub fn ulViewGetSurface(view: ULView) -> ULSurface;
}
extern "C" {
    #[doc = "\n Load a raw string of HTML.\n"]
    pub fn ulViewLoadHTML(view: ULView, html_string: ULString);
}
extern "C" {
    #[doc = "\n Load a URL into main frame.\n"]
    pub fn ulViewLoadURL(view: ULView, url_string: ULString);
}
extern "C" {
    #[doc = "\n Resize view to a certain width and height (in pixels).\n"]
    pub fn ulViewResize(
        view: ULView,
        width: ::std::os::raw::c_uint,
        height: ::std::os::raw::c_uint,
    );
}
extern "C" {
    #[doc = "\n Acquire the page's JSContext for use with JavaScriptCore API.\n\n @note  This call locks the context for the current thread. You should call\n        ulViewUnlockJSContext() after using the context so other worker threads can modify\n        JavaScript state.\n\n @note  The lock is recusive, it's okay to call this multiple times as long as you call\n        ulViewUnlockJSContext() the same number of times.\n"]
    pub fn ulViewLockJSContext(view: ULView) -> JSContextRef;
}
extern "C" {
    #[doc = "\n Unlock the page's JSContext after a previous call to ulViewLockJSContext().\n"]
    pub fn ulViewUnlockJSContext(view: ULView);
}
extern "C" {
    #[doc = "\n Evaluate a string of JavaScript and return result.\n\n @param  js_string  The string of JavaScript to evaluate.\n\n @param  exception  The address of a ULString to store a description of the last exception. Pass\n                    NULL to ignore this. Don't destroy the exception string returned, it's owned\n                    by the View.\n\n @note Don't destroy the returned string, it's owned by the View. This value is reset with every\n       call-- if you want to retain it you should copy the result to a new string via\n       ulCreateStringFromCopy().\n\n @note An example of using this API:\n       <pre>\n         ULString script = ulCreateString(\"1 + 1\");\n         ULString exception;\n         ULString result = ulViewEvaluateScript(view, script, &exception);\n         /* Use the result (\"2\") and exception description (if any) here. */\n         ulDestroyString(script);\n       </pre>\n"]
    pub fn ulViewEvaluateScript(
        view: ULView,
        js_string: ULString,
        exception: *mut ULString,
    ) -> ULString;
}
extern "C" {
    #[doc = "\n Check if can navigate backwards in history.\n"]
    pub fn ulViewCanGoBack(view: ULView) -> bool;
}
extern "C" {
    #[doc = "\n Check if can navigate forwards in history.\n"]
    pub fn ulViewCanGoForward(view: ULView) -> bool;
}
extern "C" {
    #[doc = "\n Navigate backwards in history.\n"]
    pub fn ulViewGoBack(view: ULView);
}
extern "C" {
    #[doc = "\n Navigate forwards in history.\n"]
    pub fn ulViewGoForward(view: ULView);
}
extern "C" {
    #[doc = "\n Navigate to arbitrary offset in history.\n"]
    pub fn ulViewGoToHistoryOffset(view: ULView, offset: ::std::os::raw::c_int);
}
extern "C" {
    #[doc = "\n Reload current page.\n"]
    pub fn ulViewReload(view: ULView);
}
extern "C" {
    #[doc = "\n Stop all page loads.\n"]
    pub fn ulViewStop(view: ULView);
}
extern "C" {
    #[doc = "\n Give focus to the View.\n\n You should call this to give visual indication that the View has input focus (changes active\n text selection colors, for example).\n"]
    pub fn ulViewFocus(view: ULView);
}
extern "C" {
    #[doc = "\n Remove focus from the View and unfocus any focused input elements.\n\n You should call this to give visual indication that the View has lost input focus.\n"]
    pub fn ulViewUnfocus(view: ULView);
}
extern "C" {
    #[doc = "\n Whether or not the View has focus.\n"]
    pub fn ulViewHasFocus(view: ULView) -> bool;
}
extern "C" {
    #[doc = "\n Whether or not the View has an input element with visible keyboard focus (indicated by a\n blinking caret).\n\n You can use this to decide whether or not the View should consume keyboard input events (useful\n in games with mixed UI and key handling).\n"]
    pub fn ulViewHasInputFocus(view: ULView) -> bool;
}
extern "C" {
    #[doc = "\n Fire a keyboard event.\n"]
    pub fn ulViewFireKeyEvent(view: ULView, key_event: ULKeyEvent);
}
extern "C" {
    #[doc = "\n Fire a mouse event.\n"]
    pub fn ulViewFireMouseEvent(view: ULView, mouse_event: ULMouseEvent);
}
extern "C" {
    #[doc = "\n Fire a scroll event.\n"]
    pub fn ulViewFireScrollEvent(view: ULView, scroll_event: ULScrollEvent);
}
pub type ULChangeTitleCallback = ::std::option::Option<
    unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView, title: ULString),
>;
extern "C" {
    #[doc = "\n Set callback for when the page title changes.\n"]
    pub fn ulViewSetChangeTitleCallback(
        view: ULView,
        callback: ULChangeTitleCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULChangeURLCallback = ::std::option::Option<
    unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView, url: ULString),
>;
extern "C" {
    #[doc = "\n Set callback for when the page URL changes.\n"]
    pub fn ulViewSetChangeURLCallback(
        view: ULView,
        callback: ULChangeURLCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULChangeTooltipCallback = ::std::option::Option<
    unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView, tooltip: ULString),
>;
extern "C" {
    #[doc = "\n Set callback for when the tooltip changes (usually result of a mouse hover).\n"]
    pub fn ulViewSetChangeTooltipCallback(
        view: ULView,
        callback: ULChangeTooltipCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULChangeCursorCallback = ::std::option::Option<
    unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView, cursor: ULCursor),
>;
extern "C" {
    #[doc = "\n Set callback for when the mouse cursor changes.\n"]
    pub fn ulViewSetChangeCursorCallback(
        view: ULView,
        callback: ULChangeCursorCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULAddConsoleMessageCallback = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        caller: ULView,
        source: ULMessageSource,
        level: ULMessageLevel,
        message: ULString,
        line_number: ::std::os::raw::c_uint,
        column_number: ::std::os::raw::c_uint,
        source_id: ULString,
    ),
>;
extern "C" {
    #[doc = "\n Set callback for when a message is added to the console (useful for JavaScript / network errors\n and debugging).\n"]
    pub fn ulViewSetAddConsoleMessageCallback(
        view: ULView,
        callback: ULAddConsoleMessageCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULCreateChildViewCallback = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        caller: ULView,
        opener_url: ULString,
        target_url: ULString,
        is_popup: bool,
        popup_rect: ULIntRect,
    ) -> ULView,
>;
extern "C" {
    #[doc = "\n Set callback for when the page wants to create a new View.\n\n This is usually the result of a user clicking a link with target=\"_blank\" or by JavaScript\n calling window.open(url).\n\n To allow creation of these new Views, you should create a new View in this callback, resize it\n to your container, and return it. You are responsible for displaying the returned View.\n\n You should return NULL if you want to block the action.\n"]
    pub fn ulViewSetCreateChildViewCallback(
        view: ULView,
        callback: ULCreateChildViewCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULCreateInspectorViewCallback = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        caller: ULView,
        is_local: bool,
        inspected_url: ULString,
    ) -> ULView,
>;
extern "C" {
    pub fn ulViewSetCreateInspectorViewCallback(
        view: ULView,
        callback: ULCreateInspectorViewCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULBeginLoadingCallback = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        caller: ULView,
        frame_id: ::std::os::raw::c_ulonglong,
        is_main_frame: bool,
        url: ULString,
    ),
>;
extern "C" {
    #[doc = "\n Set callback for when the page begins loading a new URL into a frame.\n"]
    pub fn ulViewSetBeginLoadingCallback(
        view: ULView,
        callback: ULBeginLoadingCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULFinishLoadingCallback = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        caller: ULView,
        frame_id: ::std::os::raw::c_ulonglong,
        is_main_frame: bool,
        url: ULString,
    ),
>;
extern "C" {
    #[doc = "\n Set callback for when the page finishes loading a URL into a frame.\n"]
    pub fn ulViewSetFinishLoadingCallback(
        view: ULView,
        callback: ULFinishLoadingCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULFailLoadingCallback = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        caller: ULView,
        frame_id: ::std::os::raw::c_ulonglong,
        is_main_frame: bool,
        url: ULString,
        description: ULString,
        error_domain: ULString,
        error_code: ::std::os::raw::c_int,
    ),
>;
extern "C" {
    #[doc = "\n Set callback for when an error occurs while loading a URL into a frame.\n"]
    pub fn ulViewSetFailLoadingCallback(
        view: ULView,
        callback: ULFailLoadingCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULWindowObjectReadyCallback = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        caller: ULView,
        frame_id: ::std::os::raw::c_ulonglong,
        is_main_frame: bool,
        url: ULString,
    ),
>;
extern "C" {
    #[doc = "\n Set callback for when the JavaScript window object is reset for a new page load.\n\n This is called before any scripts are executed on the page and is the earliest time to setup any\n initial JavaScript state or bindings.\n\n The document is not guaranteed to be loaded/parsed at this point. If you need to make any\n JavaScript calls that are dependent on DOM elements or scripts on the page, use DOMReady\n instead.\n\n The window object is lazily initialized (this will not be called on pages with no scripts).\n"]
    pub fn ulViewSetWindowObjectReadyCallback(
        view: ULView,
        callback: ULWindowObjectReadyCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULDOMReadyCallback = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        caller: ULView,
        frame_id: ::std::os::raw::c_ulonglong,
        is_main_frame: bool,
        url: ULString,
    ),
>;
extern "C" {
    #[doc = "\n Set callback for when all JavaScript has been parsed and the document is ready.\n\n This is the best time to make any JavaScript calls that are dependent on DOM elements or scripts\n on the page.\n"]
    pub fn ulViewSetDOMReadyCallback(
        view: ULView,
        callback: ULDOMReadyCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULUpdateHistoryCallback = ::std::option::Option<
    unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView),
>;
extern "C" {
    #[doc = "\n Set callback for when the history (back/forward state) is modified.\n"]
    pub fn ulViewSetUpdateHistoryCallback(
        view: ULView,
        callback: ULUpdateHistoryCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
extern "C" {
    #[doc = "\n Set whether or not a view should be repainted during the next call to ulRender.\n\n @note  This flag is automatically set whenever the page content changes but you can set it\n        directly in case you need to force a repaint.\n"]
    pub fn ulViewSetNeedsPaint(view: ULView, needs_paint: bool);
}
extern "C" {
    #[doc = "\n Whether or not a view should be painted during the next call to ulRender.\n"]
    pub fn ulViewGetNeedsPaint(view: ULView) -> bool;
}
extern "C" {
    #[doc = "\n Create an Inspector View to inspect / debug this View locally.\n\n This will only succeed if you have the inspector assets in your filesystem-- the inspector\n will look for file:///inspector/Main.html when it first loads.\n\n You must handle ULCreateChildViewCallback so that the library has a View to display\n the inspector in. This function will call the callback only if an inspector view is not\n currently active.\n"]
    pub fn ulViewCreateLocalInspectorView(view: ULView);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Settings {
    _unused: [u8; 0],
}
pub type ULSettings = *mut C_Settings;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_App {
    _unused: [u8; 0],
}
pub type ULApp = *mut C_App;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Window {
    _unused: [u8; 0],
}
pub type ULWindow = *mut C_Window;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Monitor {
    _unused: [u8; 0],
}
pub type ULMonitor = *mut C_Monitor;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Overlay {
    _unused: [u8; 0],
}
pub type ULOverlay = *mut C_Overlay;
pub const ULWindowFlags_kWindowFlags_Borderless: ULWindowFlags = 1;
pub const ULWindowFlags_kWindowFlags_Titled: ULWindowFlags = 2;
pub const ULWindowFlags_kWindowFlags_Resizable: ULWindowFlags = 4;
pub const ULWindowFlags_kWindowFlags_Maximizable: ULWindowFlags = 8;
pub const ULWindowFlags_kWindowFlags_Hidden: ULWindowFlags = 16;
#[doc = "\n Window creation flags. @see Window::Create\n"]
pub type ULWindowFlags = ::std::os::raw::c_uint;
extern "C" {
    #[doc = "\n Create settings with default values (see <AppCore/App.h>).\n"]
    pub fn ulCreateSettings() -> ULSettings;
}
extern "C" {
    #[doc = "\n Destroy settings.\n"]
    pub fn ulDestroySettings(settings: ULSettings);
}
extern "C" {
    #[doc = "\n Set the name of the developer of this app.\n\n This is used to generate a unique path to store local application data\n on the user's machine.\n\n Default is \"MyCompany\"\n"]
    pub fn ulSettingsSetDeveloperName(settings: ULSettings, name: ULString);
}
extern "C" {
    #[doc = "\n Set the name of this app.\n\n This is used to generate a unique path to store local application data\n on the user's machine.\n\n Default is \"MyApp\"\n"]
    pub fn ulSettingsSetAppName(settings: ULSettings, name: ULString);
}
extern "C" {
    #[doc = "\n Set the root file path for our file system, you should set this to the\n relative path where all of your app data is.\n\n This will be used to resolve all file URLs, eg file:///page.html\n\n @note  The default path is \"./assets/\"\n\n        This relative path is resolved using the following logic:\n         - Windows: relative to the executable path\n         - Linux:   relative to the executable path\n         - macOS:   relative to YourApp.app/Contents/Resources/\n"]
    pub fn ulSettingsSetFileSystemPath(settings: ULSettings, path: ULString);
}
extern "C" {
    #[doc = "\n Set whether or not we should load and compile shaders from the file system\n (eg, from the /shaders/ path, relative to file_system_path).\n\n If this is false (the default), we will instead load pre-compiled shaders\n from memory which speeds up application startup time.\n"]
    pub fn ulSettingsSetLoadShadersFromFileSystem(settings: ULSettings, enabled: bool);
}
extern "C" {
    #[doc = "\n We try to use the GPU renderer when a compatible GPU is detected.\n\n Set this to true to force the engine to always use the CPU renderer.\n"]
    pub fn ulSettingsSetForceCPURenderer(settings: ULSettings, force_cpu: bool);
}
extern "C" {
    #[doc = "\n Create the App singleton.\n\n @param  settings  Settings to customize App runtime behavior. You can pass\n                   NULL for this parameter to use default settings.\n\n @param  config  Config options for the Ultralight renderer. You can pass\n                 NULL for this parameter to use default config.\n\n @note  You should only create one of these per application lifetime.\n\n @note  Certain Config options may be overridden during App creation,\n        most commonly Config::face_winding and Config::device_scale_hint.\n"]
    pub fn ulCreateApp(settings: ULSettings, config: ULConfig) -> ULApp;
}
extern "C" {
    #[doc = "\n Destroy the App instance.\n"]
    pub fn ulDestroyApp(app: ULApp);
}
pub type ULUpdateCallback =
    ::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void)>;
extern "C" {
    #[doc = "\n Set a callback for whenever the App updates. You should update all app\n logic here.\n\n @note  This event is fired right before the run loop calls\n        Renderer::Update and Renderer::Render.\n"]
    pub fn ulAppSetUpdateCallback(
        app: ULApp,
        callback: ULUpdateCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
extern "C" {
    #[doc = "\n Whether or not the App is running.\n"]
    pub fn ulAppIsRunning(app: ULApp) -> bool;
}
extern "C" {
    #[doc = "\n Get the main monitor (this is never NULL).\n\n @note  We'll add monitor enumeration later.\n"]
    pub fn ulAppGetMainMonitor(app: ULApp) -> ULMonitor;
}
extern "C" {
    #[doc = "\n Get the underlying Renderer instance.\n"]
    pub fn ulAppGetRenderer(app: ULApp) -> ULRenderer;
}
extern "C" {
    #[doc = "\n Run the main loop.\n"]
    pub fn ulAppRun(app: ULApp);
}
extern "C" {
    #[doc = "\n Quit the application.\n"]
    pub fn ulAppQuit(app: ULApp);
}
extern "C" {
    #[doc = "\n Get the monitor's DPI scale (1.0 = 100%).\n"]
    pub fn ulMonitorGetScale(monitor: ULMonitor) -> f64;
}
extern "C" {
    #[doc = "\n Get the width of the monitor (in pixels).\n"]
    pub fn ulMonitorGetWidth(monitor: ULMonitor) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get the height of the monitor (in pixels).\n"]
    pub fn ulMonitorGetHeight(monitor: ULMonitor) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Create a new Window.\n\n @param  monitor       The monitor to create the Window on.\n\n @param  width         The width (in screen coordinates).\n\n @param  height        The height (in screen coordinates).\n\n @param  fullscreen    Whether or not the window is fullscreen.\n\n @param  window_flags  Various window flags.\n"]
    pub fn ulCreateWindow(
        monitor: ULMonitor,
        width: ::std::os::raw::c_uint,
        height: ::std::os::raw::c_uint,
        fullscreen: bool,
        window_flags: ::std::os::raw::c_uint,
    ) -> ULWindow;
}
extern "C" {
    #[doc = "\n Destroy a Window.\n"]
    pub fn ulDestroyWindow(window: ULWindow);
}
pub type ULCloseCallback = ::std::option::Option<
    unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, window: ULWindow),
>;
extern "C" {
    #[doc = "\n Set a callback to be notified when a window closes.\n"]
    pub fn ulWindowSetCloseCallback(
        window: ULWindow,
        callback: ULCloseCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
pub type ULResizeCallback = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        window: ULWindow,
        width: ::std::os::raw::c_uint,
        height: ::std::os::raw::c_uint,
    ),
>;
extern "C" {
    #[doc = "\n Set a callback to be notified when a window resizes\n (parameters are passed back in pixels).\n"]
    pub fn ulWindowSetResizeCallback(
        window: ULWindow,
        callback: ULResizeCallback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
extern "C" {
    #[doc = "\n Get window width (in screen coordinates).\n"]
    pub fn ulWindowGetScreenWidth(window: ULWindow) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get window width (in pixels).\n"]
    pub fn ulWindowGetWidth(window: ULWindow) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get window height (in screen coordinates).\n"]
    pub fn ulWindowGetScreenHeight(window: ULWindow) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get window height (in pixels).\n"]
    pub fn ulWindowGetHeight(window: ULWindow) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Move the window to a new position (in screen coordinates) relative to the top-left of the\n monitor area.\n"]
    pub fn ulWindowMoveTo(window: ULWindow, x: ::std::os::raw::c_int, y: ::std::os::raw::c_int);
}
extern "C" {
    #[doc = "\n Move the window to the center of the monitor.\n"]
    pub fn ulWindowMoveToCenter(arg1: ULWindow);
}
extern "C" {
    #[doc = "\n Get the x-position of the window (in screen coordinates) relative to the top-left of the\n monitor area.\n"]
    pub fn ulWindowGetPositionX(window: ULWindow) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = "\n Get the y-position of the window (in screen coordinates) relative to the top-left of the\n monitor area.\n"]
    pub fn ulWindowGetPositionY(window: ULWindow) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = "\n Get whether or not a window is fullscreen.\n"]
    pub fn ulWindowIsFullscreen(window: ULWindow) -> bool;
}
extern "C" {
    #[doc = "\n Get the DPI scale of a window.\n"]
    pub fn ulWindowGetScale(window: ULWindow) -> f64;
}
extern "C" {
    #[doc = "\n Set the window title.\n"]
    pub fn ulWindowSetTitle(window: ULWindow, title: *const ::std::os::raw::c_char);
}
extern "C" {
    #[doc = "\n Set the cursor for a window.\n"]
    pub fn ulWindowSetCursor(window: ULWindow, cursor: ULCursor);
}
extern "C" {
    #[doc = "\n Show the window (if it was previously hidden).\n"]
    pub fn ulWindowShow(window: ULWindow);
}
extern "C" {
    #[doc = "\n Hide the window.\n"]
    pub fn ulWindowHide(window: ULWindow);
}
extern "C" {
    #[doc = "\n Whether or not the window is currently visible (not hidden).\n"]
    pub fn ulWindowIsVisible(window: ULWindow) -> bool;
}
extern "C" {
    #[doc = "\n Close a window.\n"]
    pub fn ulWindowClose(window: ULWindow);
}
extern "C" {
    #[doc = "\n Convert screen coordinates to pixels using the current DPI scale.\n"]
    pub fn ulWindowScreenToPixels(
        window: ULWindow,
        val: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = "\n Convert pixels to screen coordinates using the current DPI scale.\n"]
    pub fn ulWindowPixelsToScreen(
        window: ULWindow,
        val: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = "\n Get the underlying native window handle.\n\n @note This is:  - HWND on Windows\n                 - NSWindow* on macOS\n                 - GLFWwindow* on Linux\n"]
    pub fn ulWindowGetNativeHandle(window: ULWindow) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = "\n Create a new Overlay.\n\n @param  window  The window to create the Overlay in.\n\n @param  width   The width in pixels.\n\n @param  height  The height in pixels.\n\n @param  x       The x-position (offset from the left of the Window), in\n                 pixels.\n\n @param  y       The y-position (offset from the top of the Window), in\n                 pixels.\n\n @note  Each Overlay is essentially a View and an on-screen quad. You should\n        create the Overlay then load content into the underlying View.\n"]
    pub fn ulCreateOverlay(
        window: ULWindow,
        width: ::std::os::raw::c_uint,
        height: ::std::os::raw::c_uint,
        x: ::std::os::raw::c_int,
        y: ::std::os::raw::c_int,
    ) -> ULOverlay;
}
extern "C" {
    #[doc = "\n Create a new Overlay, wrapping an existing View.\n\n @param  window  The window to create the Overlay in. (we currently only\n                 support one window per application)\n\n @param  view    The View to wrap (will use its width and height).\n\n @param  x       The x-position (offset from the left of the Window), in\n                 pixels.\n\n @param  y       The y-position (offset from the top of the Window), in\n                 pixels.\n\n @note  Each Overlay is essentially a View and an on-screen quad. You should\n        create the Overlay then load content into the underlying View.\n"]
    pub fn ulCreateOverlayWithView(
        window: ULWindow,
        view: ULView,
        x: ::std::os::raw::c_int,
        y: ::std::os::raw::c_int,
    ) -> ULOverlay;
}
extern "C" {
    #[doc = "\n Destroy an overlay.\n"]
    pub fn ulDestroyOverlay(overlay: ULOverlay);
}
extern "C" {
    #[doc = "\n Get the underlying View.\n"]
    pub fn ulOverlayGetView(overlay: ULOverlay) -> ULView;
}
extern "C" {
    #[doc = "\n Get the width (in pixels).\n"]
    pub fn ulOverlayGetWidth(overlay: ULOverlay) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get the height (in pixels).\n"]
    pub fn ulOverlayGetHeight(overlay: ULOverlay) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = "\n Get the x-position (offset from the left of the Window), in pixels.\n"]
    pub fn ulOverlayGetX(overlay: ULOverlay) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = "\n Get the y-position (offset from the top of the Window), in pixels.\n"]
    pub fn ulOverlayGetY(overlay: ULOverlay) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = "\n Move the overlay to a new position (in pixels).\n"]
    pub fn ulOverlayMoveTo(overlay: ULOverlay, x: ::std::os::raw::c_int, y: ::std::os::raw::c_int);
}
extern "C" {
    #[doc = "\n Resize the overlay (and underlying View), dimensions should be\n specified in pixels.\n"]
    pub fn ulOverlayResize(
        overlay: ULOverlay,
        width: ::std::os::raw::c_uint,
        height: ::std::os::raw::c_uint,
    );
}
extern "C" {
    #[doc = "\n Whether or not the overlay is hidden (not drawn).\n"]
    pub fn ulOverlayIsHidden(overlay: ULOverlay) -> bool;
}
extern "C" {
    #[doc = "\n Hide the overlay (will no longer be drawn).\n"]
    pub fn ulOverlayHide(overlay: ULOverlay);
}
extern "C" {
    #[doc = "\n Show the overlay.\n"]
    pub fn ulOverlayShow(overlay: ULOverlay);
}
extern "C" {
    #[doc = "\n Whether or not an overlay has keyboard focus.\n"]
    pub fn ulOverlayHasFocus(overlay: ULOverlay) -> bool;
}
extern "C" {
    #[doc = "\n Grant this overlay exclusive keyboard focus.\n"]
    pub fn ulOverlayFocus(overlay: ULOverlay);
}
extern "C" {
    #[doc = "\n Remove keyboard focus.\n"]
    pub fn ulOverlayUnfocus(overlay: ULOverlay);
}
extern "C" {
    #[doc = "\n This is only needed if you are not calling ulCreateApp().\n\n Initializes the platform font loader and sets it as the current FontLoader.\n"]
    pub fn ulEnablePlatformFontLoader();
}
extern "C" {
    #[doc = "\n This is only needed if you are not calling ulCreateApp().\n\n Initializes the platform file system (needed for loading file:/// URLs) and\n sets it as the current FileSystem.\n\n You can specify a base directory path to resolve relative paths against.\n"]
    pub fn ulEnablePlatformFileSystem(base_dir: ULString);
}
extern "C" {
    #[doc = "\n This is only needed if you are not calling ulCreateApp().\n\n Initializes the default logger (writes the log to a file).\n\n You should specify a writable log path to write the log to\n for example \"./ultralight.log\".\n"]
    pub fn ulEnableDefaultLogger(log_path: ULString);
}